feat(sqlalchemy-spanner): wire timeout execution option through to DBAPI Connection.timeout - #18485
Open
sakthivelmanii wants to merge 1 commit into
Open
sakthivelmanii wants to merge 1 commit into
sakthivelmanii wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for statement-level timeouts in the SpannerExecutionContext by saving the original connection timeout before execution, applying the execution option's timeout, and restoring the original timeout in post_exec and handle_dbapi_exception. It also resets the timeout to None when resetting the connection. The review feedback suggests wrapping the timeout restoration logic in a try...except block to prevent secondary exceptions (e.g., on a broken connection) from masking the primary database exception.
sakthivelmanii
force-pushed
the
feat/sqlalchemy-spanner-timeout
branch
2 times, most recently
from
September 28, 2026 12:46
dc7b725 to
a41432e
Compare
…API Connection.timeout - Reset connection timeout to None on pool checkin in reset_connection. - Support timeout execution option in SpannerExecutionContext.pre_exec. - Use scoped save-and-restore in SpannerExecutionContext to restore connection timeout in post_exec and handle_dbapi_exception. - Add unit tests covering timeout lifecycle and exception restoration.
sakthivelmanii
force-pushed
the
feat/sqlalchemy-spanner-timeout
branch
from
September 28, 2026 14:20
a41432e to
ceac66c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕