FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: make precommit token check emulator-proof by olavloite · Pull Request #1402 · googleapis/python-spanner · GitHub

This repository was archived by the owner on Jun 8, 2026. It is now read-only.
/ python-spanner Public archive

chore: make precommit token check emulator-proof - #1402

Merged
rahul2393 merged 1 commit into
mainfrom
precommit-token-check
Aug 14, 2025
Merged

chore: make precommit token check emulator-proof#1402
rahul2393 merged 1 commit into
mainfrom
precommit-token-check

Conversation

olavloite commented Aug 13, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

The Emulator returns an empty pre-commit token when a commit is attempted
without a pre-commit token. This is different from not returning any
pre-commit token at all. The check for 'did the Commit return a pre-commit
token?' did not take this into account, which caused commits on the
Emulator that needed to be retried, not to be retried. This again caused
multiple test errors when running on the Emulator, as this would keep a
transaction present on the test database on the Emulator, and the Emulator
only supports one transaction at a time. These test failures went unnoticed,
because the test configuration for the Emulator had pinned the Emulator
version to 1.5.37, which did not support multiplexed sessions. This again
caused the tests to fall back to using regular sessions.

This change fixes the check for whether a pre-commit token was returned by
a Commit. It also unpins the Emulator version for the system tests using
default settings. This ensures that the tests actually use multiplexed
sessions.

See this failed test run from before making these changes (the only change for this test run was to use the latest emulator version, which triggered multiplexed sessions to be used): https://github.com/googleapis/python-spanner/actions/runs/16940453081/job/48007847941?pr=1402

olavloite requested review from a team August 13, 2025 14:35
product-auto-label Bot added the size: xs Pull request size is extra small. label Aug 13, 2025
product-auto-label Bot added the api: spanner Issues related to the googleapis/python-spanner API. label Aug 13, 2025
olavloite force-pushed the precommit-token-check branch from 253ba9c to 04ec723 Compare August 13, 2025 14:56
olavloite marked this pull request as draft August 13, 2025 15:44
olavloite force-pushed the precommit-token-check branch from 04ec723 to 550e2e1 Compare August 14, 2025 06:29
product-auto-label Bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Aug 14, 2025
olavloite force-pushed the precommit-token-check branch 3 times, most recently from 41b4e54 to 3d205c6 Compare August 14, 2025 12:15
The Emulator returns an empty pre-commit token when a commit is attempted
without a pre-commit token. This is different from not returning any
pre-commit token at all. The check for 'did the Commit return a pre-commit
token?' did not take this into account, which caused commits on the
Emulator that needed to be retried, not to be retried. This again caused
multiple test errors when running on the Emulator, as this would keep a
transaction present on the test database on the Emulator, and the Emulator
only supports one transaction at a time. These test failures went unnoticed,
because the test configuration for the Emulator had pinned the Emulator
version to 1.5.37, which did not support multiplexed sessions. This again
caused the tests to fall back to using regular sessions.

This change fixes the check for whether a pre-commit token was returned by
a Commit. It also unpins the Emulator version for the system tests using
default settings. This ensures that the tests actually use multiplexed
sessions.
olavloite force-pushed the precommit-token-check branch from 3d205c6 to c9894e1 Compare August 14, 2025 12:30
olavloite marked this pull request as ready for review August 14, 2025 12:44
olavloite requested a review from rahul2393 August 14, 2025 12:44
rahul2393 merged commit d35e7f4 into main Aug 14, 2025
23 checks passed
rahul2393 deleted the precommit-token-check branch August 14, 2025 14:20
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/python-spanner API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL