Skip to content

Increase session timeout values in session.py - #201

Merged
tim-u merged 3 commits into
mainfrom
tim-u-patch-1
Oct 15, 2026
Merged

tim-u merged 3 commits into
mainfrom
tim-u-patch-1

Conversation

@tim-u

@tim-u tim-u commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Some sessions may take a longer time to start (5+ minutes), but they start successfully. This change increases the timeouts to match the backend, but also checks if the session has failed or been terminated in between

@tim-u
tim-u requested a review from ZhiweiLinnn October 13, 2026 02:11

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request increases the timeouts for session creation and availability checks in google/cloud/managed_spark_connect/session.py. Specifically, the progress bar timeout is doubled to 1200 seconds, and the default timeout for waiting for a session to become available is increased to 600 seconds. The review feedback suggests optimizing the session availability check by monitoring the session state inside the polling loop, allowing the client to fail early and avoid blocking for the full 10 minutes if the session enters a terminal state such as FAILED or TERMINATED.

Comment thread google/cloud/managed_spark_connect/session.py Outdated
tim-u added 2 commits October 14, 2026 12:56
Add error handling for session state before Spark Connect endpoint availability.
Increased the timeout duration for session availability from 600 to 1200 seconds.
@tim-u
tim-u requested a review from dborowitz October 14, 2026 23:11

@dborowitz dborowitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, though I think in reality there is no upper bound when we're dealing with stockouts.

@tim-u
tim-u merged commit 5e9e8a4 into main Oct 15, 2026
11 of 13 checks passed
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.

2 participants