Skip to content

Add timeout to notebook session lookup#4630

Open
massy-o wants to merge 1 commit into
VertaAI:mainfrom
massy-o:codex/add-notebook-session-timeout
Open

Add timeout to notebook session lookup#4630
massy-o wants to merge 1 commit into
VertaAI:mainfrom
massy-o:codex/add-notebook-session-timeout

Conversation

@massy-o
Copy link
Copy Markdown

@massy-o massy-o commented May 14, 2026

Summary

  • add a timeout to the Jupyter sessions request used while resolving the current notebook path

Why

If a listed notebook server accepts a connection but does not respond, path discovery can hang indefinitely. A bounded timeout lets the helper continue to the existing failure path instead of waiting on the socket forever.

Testing

  • python3 -m py_compile client/verta/verta/_internal_utils/_utils.py

response = requests.get(
urljoin(server["url"], "api/sessions"),
params={"token": server.get("token", "")},
timeout=5,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review: This lookup runs against locally listed notebook servers, so a short timeout is enough to avoid blocking forever while preserving the existing behavior of trying the remaining servers and eventually raising OSError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant