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(x-goog-request-id): commit testing scaffold by odeke-em · Pull Request #1366 · googleapis/python-spanner

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

Conversation

@odeke-em

@odeke-em odeke-em commented Apr 30, 2025

Copy link
Copy Markdown
Contributor

This change commits the scaffolding for which testing will be used. This is a carve out of PRs #1264 and #1364, meant to make those changes lighter and much easier to review then merge.

Updates googleapis/google-cloud-python#15905

Sorry, something went wrong.

Uh oh!

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

All reactions
@odeke-em
odeke-em requested review from a team April 30, 2025 18:52
@blunderbuss-gcf blunderbuss-gcf Bot assigned rahul2393 Apr 30, 2025
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/python-spanner API. labels Apr 30, 2025
odeke-em added a commit to odeke-em/python-spanner that referenced this pull request Apr 30, 2025
@odeke-em
chore(x-goog-spanner-request-id): plug in functionality after test sc…
866eecc
…affolding

This change chops down the load of the large changes for
x-goog-spanner-request-id. It depends on PR googleapis#1366 and should
only be merged after that PR.

Updates #1261
Requires PR googleapis#1366
odeke-em added a commit to odeke-em/python-spanner that referenced this pull request Apr 30, 2025
@odeke-em
chore(x-goog-spanner-request-id): plug in functionality after test sc…
9c76b52
…affolding

This change chops down the load of the large changes for
x-goog-spanner-request-id. It depends on PR googleapis#1366 and should
only be merged after that PR.

Updates #1261
Requires PR googleapis#1366
@odeke-em odeke-em mentioned this pull request Apr 30, 2025
chore(x-goog-spanner-request-id): plug in functionality after test scaffolding #1367
Merged
odeke-em added a commit to odeke-em/python-spanner that referenced this pull request Apr 30, 2025
@odeke-em
chore(x-goog-spanner-request-id): plug in functionality after test sc…
f82ef0c
…affolding

This change chops down the load of the large changes for
x-goog-spanner-request-id. It depends on PR googleapis#1366 and should
only be merged after that PR.

Updates #1261
Requires PR googleapis#1366
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 30, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 30, 2025
@odeke-em
odeke-em force-pushed the x-goog-request-id-testing-scaffold branch from eb2c3d2 to 129f662 Compare April 30, 2025 19:56
@odeke-em

odeke-em commented Apr 30, 2025

Copy link
Copy Markdown
Contributor Author

@rahul2393 kindly help me re-run the bots for this PR. Thank you

All reactions

Sorry, something went wrong.

Uh oh!

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

@odeke-em
odeke-em force-pushed the x-goog-request-id-testing-scaffold branch from 129f662 to 6f10a1f Compare April 30, 2025 21:43
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 1, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 1, 2025
odeke-em added 2 commits May 2, 2025 13:03
@odeke-em
chore(x-goog-request-id): commit testing scaffold
7e24e61
This change commits the scaffolding for which testing
will be used. This is a carve out of PRs googleapis#1264 and googleapis#1364,
meant to make those changes lighter and much easier to
review then merge.

Updates #1261
@odeke-em
Use guard to keep x-goog-request-id interceptor docile in tests until…
7988ffa
… activation later
@odeke-em
odeke-em force-pushed the x-goog-request-id-testing-scaffold branch from 6f10a1f to 7988ffa Compare May 2, 2025 10:04
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2025
@odeke-em
AtomicCounter update
e8ea4d9
@odeke-em

odeke-em commented May 2, 2025

Copy link
Copy Markdown
Contributor Author

@rahul2393 kindly help me with another bot run, I've ensured all tests are passing locally.

All reactions

Sorry, something went wrong.

Uh oh!

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

@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2025
olavloite
olavloite approved these changes May 2, 2025
View reviewed changes

@olavloite olavloite left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM (with one tiny nit)

There is one test failure, but I don't really see how that could be related to this change:

=================================== FAILURES ===================================
_________________ TestDbApi.test_execute_batch_dml_abort_retry _________________

self = 
dbapi_database = 

    def test_execute_batch_dml_abort_retry(self, dbapi_database):
        """Test that when any execute batch dml failed with Abort exception,
        then the retry succeeds with transaction having insert as well as query
        type of statements along with batch dml statements."""
    
        method_count_interceptor = dbapi_database._method_count_interceptor
        method_count_interceptor.reset()
        # called 3 times
        self._insert_row(1)
        # called 3 times
        self._cursor.execute("SELECT * FROM contacts")
        self._cursor.fetchall()
        self._cursor.execute("start batch dml")
        self._insert_row(2)
        self._insert_row(3)
        dbapi_database._method_abort_interceptor.set_method_to_abort(
            EXECUTE_BATCH_DML_METHOD, self._conn, 2
        )
        # called 3 times
        self._cursor.execute("run batch")
        dbapi_database._method_abort_interceptor.reset()
        self._conn.commit()
        assert method_count_interceptor._counts[COMMIT_METHOD] == 1
        assert method_count_interceptor._counts[EXECUTE_BATCH_DML_METHOD] == 3
>       assert method_count_interceptor._counts[EXECUTE_STREAMING_SQL_METHOD] == 6
E       assert 8 == 6

(And if it is related to this change, then I expect it only to be related to test code, and not to affect any production code)

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread tests/mockserver_tests/mock_server_test_base.py
return status


# Creates an UNAVAILABLE status with the smallest possible retry delay.

@olavloite olavloite May 2, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

nit: do we need both this method and the instance method above? If so, could we at least put the main bit of logic into one method?

Sorry, something went wrong.

Uh oh!

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

All reactions

@odeke-em odeke-em May 2, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for catching that, turns out you had already committed that code to main. I've removed it.

Sorry, something went wrong.

Uh oh!

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

All reactions
@odeke-em
Remove duplicate unavailable_status that had been already committed i…
4b7b4c9
…nto main
@odeke-em

odeke-em commented May 2, 2025

Copy link
Copy Markdown
Contributor Author

yeah that test failure is bizarre and the code I committed doesn't really touch production code and we already tested AtomicCounter.increment() and .reset() so I can't see a way either that it could work. Must be a flake. Kindly please help me re-run the bots @olavloite and thank you very much for the code review and approval!

All reactions

Sorry, something went wrong.

Uh oh!

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

@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2025
@olavloite
olavloite enabled auto-merge (squash) May 2, 2025 14:11
@olavloite
chore: fix formatting issues
adb6c56
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2025
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 2, 2025
@odeke-em
Merge branch 'main' into x-goog-request-id-testing-scaffold
76d38fe
@odeke-em

odeke-em commented May 5, 2025

Copy link
Copy Markdown
Contributor Author

@rahul2393 @olavloite @harshachinta kindly help me run the bots.

All reactions

Sorry, something went wrong.

Uh oh!

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

@odeke-em
Merge branch 'main' into x-goog-request-id-testing-scaffold
016a45c
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 7, 2025
rahul2393
rahul2393 approved these changes May 7, 2025
View reviewed changes
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 7, 2025
@olavloite
olavloite merged commit 686bda6 into googleapis:main May 7, 2025
@odeke-em
odeke-em deleted the x-goog-request-id-testing-scaffold branch May 7, 2025 06:54
odeke-em added a commit to odeke-em/python-spanner that referenced this pull request May 8, 2025
@odeke-em
chore(x-goog-spanner-request-id): plug in functionality after test sc…
9b9a263
…affolding

This change chops down the load of the large changes for
x-goog-spanner-request-id. It depends on PR googleapis#1366 and should
only be merged after that PR.

Updates #1261
Requires PR googleapis#1366
odeke-em added a commit to odeke-em/python-spanner that referenced this pull request May 8, 2025
@odeke-em
chore(x-goog-spanner-request-id): plug in functionality after test sc…
b8b1591
…affolding

This change chops down the load of the large changes for
x-goog-spanner-request-id. It depends on PR googleapis#1366 and should
only be merged after that PR.

Updates #1261
Requires PR googleapis#1366
odeke-em added a commit to odeke-em/python-spanner that referenced this pull request May 12, 2025
@odeke-em
chore(x-goog-spanner-request-id): plug in functionality after test sc…
2c44ec8
…affolding

This change chops down the load of the large changes for
x-goog-spanner-request-id. It depends on PR googleapis#1366 and should
only be merged after that PR.

Updates #1261
Requires PR googleapis#1366
olavloite added a commit that referenced this pull request May 17, 2025
@odeke-em @olavloite
chore(x-goog-spanner-request-id): plug in functionality after test sc…
3a91671
…affolding (#1367)

* chore(x-goog-spanner-request-id): plug in functionality after test scaffolding

This change chops down the load of the large changes for
x-goog-spanner-request-id. It depends on PR #1366 and should
only be merged after that PR.

Updates #1261
Requires PR #1366

* Include batch*

* Address review feedback

* chore: fix formatting

---------

Co-authored-by: Knut Olav Løite <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@olavloite olavloite olavloite approved these changes
@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

@rahul2393 rahul2393

Labels

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

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.

4 participants

@odeke-em @olavloite @rahul2393 @yoshi-kokoro
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.