Skip to content

chore(x-goog-spanner-request-id): enable tests for more RPCs #3898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

odeke-em
Copy link
Contributor

@odeke-em odeke-em commented May 31, 2025

Enable asserting that all the Spanner Method RPCs have
x-goog-spanner-request-id.

Updates #3537

@odeke-em odeke-em requested review from a team as code owners May 31, 2025 00:22
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels May 31, 2025
@odeke-em odeke-em force-pushed the x-goog-spanner-request-id+round-2-plumbing branch 3 times, most recently from 91ec136 to 427ad07 Compare June 5, 2025 22:21
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 6, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 6, 2025
@odeke-em odeke-em force-pushed the x-goog-spanner-request-id+round-2-plumbing branch from 427ad07 to efa5fac Compare June 6, 2025 22:10
@odeke-em odeke-em force-pushed the x-goog-spanner-request-id+round-2-plumbing branch 2 times, most recently from 6de2b89 to abe982f Compare June 20, 2025 05:10
odeke-em added a commit to odeke-em/java-spanner that referenced this pull request Jun 22, 2025
…s prior code review suggestions

This change propagates the associated request-id into encountered
exceptions and also addresses some code review questions from PR googleapis#3900.
While here added some updates for AbstractReadContext.java and
ResumableStreamIterator.java to set grounds for much smaller PRs
in which we shall wholesomely test the changes.

Curved out of PR googleapis#3898 and PR googleapis#3915
odeke-em added a commit to odeke-em/java-spanner that referenced this pull request Jun 22, 2025
…s prior code review suggestions

This change propagates the associated request-id into encountered
exceptions and also addresses some code review questions from PR googleapis#3900.
While here added some updates for AbstractReadContext.java and
ResumableStreamIterator.java to set grounds for much smaller PRs
in which we shall wholesomely test the changes.

Curved out of PR googleapis#3898 and PR googleapis#3915
odeke-em added a commit to odeke-em/java-spanner that referenced this pull request Jun 23, 2025
…s prior code review suggestions

This change propagates the associated request-id into encountered
exceptions and also addresses some code review questions from PR googleapis#3900.
While here added some updates for AbstractReadContext.java and
ResumableStreamIterator.java to set grounds for much smaller PRs
in which we shall wholesomely test the changes.

Curved out of PR googleapis#3898 and PR googleapis#3915
odeke-em added a commit to odeke-em/java-spanner that referenced this pull request Jun 23, 2025
…s prior code review suggestions

This change propagates the associated request-id into encountered
exceptions and also addresses some code review questions from PR googleapis#3900.
While here added some updates for AbstractReadContext.java and
ResumableStreamIterator.java to set grounds for much smaller PRs
in which we shall wholesomely test the changes.

Curved out of PR googleapis#3898 and PR googleapis#3915
odeke-em added a commit to odeke-em/java-spanner that referenced this pull request Jun 26, 2025
…s prior code review suggestions

This change propagates the associated request-id into encountered
exceptions and also addresses some code review questions from PR googleapis#3900.
While here added some updates for AbstractReadContext.java and
ResumableStreamIterator.java to set grounds for much smaller PRs
in which we shall wholesomely test the changes.

Curved out of PR googleapis#3898 and PR googleapis#3915
olavloite pushed a commit that referenced this pull request Jun 27, 2025
…s prior code review suggestions (#3922)

* chore(x-goog-spanner-request-id): propagate reqId into exceptions plus prior code review suggestions

This change propagates the associated request-id into encountered
exceptions and also addresses some code review questions from PR #3900.
While here added some updates for AbstractReadContext.java and
ResumableStreamIterator.java to set grounds for much smaller PRs
in which we shall wholesomely test the changes.

Curved out of PR #3898 and PR #3915

* Update tests with session.getRequestIdCreator

* More plumbing

* Update tests

* Deal with the multiplex-session .getOptions null returns in getChannel

* Correct array copy
@odeke-em odeke-em force-pushed the x-goog-spanner-request-id+round-2-plumbing branch from 7449771 to 675c5de Compare June 27, 2025 22:10
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Jun 27, 2025
Enable asserting that all the Spanner Method RPCs have
x-goog-spanner-request-id.

Updates googleapis#3537
@odeke-em odeke-em changed the title chore(x-goog-spanner-request-id): add BeginTransaction+ResumableStreamIterator chore(x-goog-spanner-request-id): enable tests for more RPCs Jun 27, 2025
@odeke-em odeke-em force-pushed the x-goog-spanner-request-id+round-2-plumbing branch from 675c5de to 430c098 Compare June 27, 2025 22:19
@odeke-em
Copy link
Contributor Author

@olavloite @rahul2393 @sakthivelmanii kindly help me run the bots for this PR.

@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 28, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 28, 2025
Comment on lines 1101 to 1103
if (this.reqId == null || other.reqId == null) {
return this.reqId == null && other.reqId == null;
}
Copy link
Collaborator

@olavloite olavloite Jun 28, 2025

Choose a reason for hiding this comment

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

nit: you can remove this as well when you use Objects.equals(...) (feel free to do in a following PR)

Suggested change
if (this.reqId == null || other.reqId == null) {
return this.reqId == null && other.reqId == null;
}

@olavloite olavloite merged commit 380ea90 into googleapis:main Jun 28, 2025
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants