fix(sqlalchemy-spanner): isolate test database names and extend stale cleanup cutoff - #18160
Draft
chalmerlowe wants to merge 8 commits into
Draft
fix(sqlalchemy-spanner): isolate test database names and extend stale cleanup cutoff#18160chalmerlowe wants to merge 8 commits into
chalmerlowe wants to merge 8 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the test database lifecycle management for sqlalchemy-spanner. It extends the stale database cleanup threshold from 10 to 30 minutes, introduces session-isolated database IDs, and records database session metadata to track and report active duration upon teardown. The review comments point out critical issues: truncating the Unix timestamp to 9 digits changes the year to 1992, which would cause immediate deletion of newly created databases; the cleanup routine needs to handle both 10-digit and 13-digit timestamps; and the loaded JSON metadata should be type-validated as a dictionary before lookup to comply with the repository's style guide.
…d validate metadata dict type
… garbage collection
…nerous 1-hour cutoff
…prevent cross-session drops
…nt cross-session database drops
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.
Problem
When running comprehensive compliance and system test suites for sqlalchemy-spanner, test sessions occasionally encountered "404 Database not found" errors. This happened because:
Solution
Notes for Reviewers