GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: make precommit token check emulator-proof by olavloite · Pull Request #1402 · googleapis/python-spanner

This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Conversation

@olavloite

@olavloite olavloite commented Aug 13, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@olavloite
olavloite requested review from a team August 13, 2025 14:35
@product-auto-label product-auto-label Bot added the size: xs Pull request size is extra small. label Aug 13, 2025
@blunderbuss-gcf blunderbuss-gcf Bot assigned surbhigarg92 Aug 13, 2025
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the googleapis/python-spanner API. label Aug 13, 2025
@olavloite
olavloite force-pushed the precommit-token-check branch from 253ba9c to 04ec723 Compare August 13, 2025 14:56
@olavloite
olavloite marked this pull request as draft August 13, 2025 15:44
@olavloite
olavloite force-pushed the precommit-token-check branch from 04ec723 to 550e2e1 Compare August 14, 2025 06:29
@product-auto-label 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
olavloite force-pushed the precommit-token-check branch 3 times, most recently from 41b4e54 to 3d205c6 Compare August 14, 2025 12:15
@olavloite
chore: make precommit token check emulator-proof
c9894e1
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
olavloite force-pushed the precommit-token-check branch from 3d205c6 to c9894e1 Compare August 14, 2025 12:30
@olavloite
olavloite marked this pull request as ready for review August 14, 2025 12:44
@olavloite
olavloite requested a review from rahul2393 August 14, 2025 12:44
rahul2393
rahul2393 approved these changes Aug 14, 2025
View reviewed changes
@rahul2393
rahul2393 merged commit d35e7f4 into main Aug 14, 2025
@rahul2393
rahul2393 deleted the precommit-token-check branch August 14, 2025 14:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@rahul2393 rahul2393 rahul2393 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@surbhigarg92 surbhigarg92

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@olavloite @rahul2393 @surbhigarg92
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.