Skip to content

chore: add x-goog-request-id insertion into *Exception #3813

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
merged 3 commits into from
Apr 15, 2025

Conversation

odeke-em
Copy link
Contributor

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

Allows users to examine and report the requestId in any thrown exceptions.

@odeke-em odeke-em requested review from a team as code owners April 9, 2025 16:00
@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 Apr 9, 2025
@odeke-em odeke-em force-pushed the x-goog-request-id-base branch from 6ab4f05 to 4d3f093 Compare April 9, 2025 16:02
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Apr 10, 2025
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
@odeke-em odeke-em force-pushed the x-goog-request-id-base branch from f9eb16b to b91b415 Compare April 10, 2025 18:27
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
@odeke-em odeke-em force-pushed the x-goog-request-id-base branch from b91b415 to a4dd421 Compare April 10, 2025 18:28
@odeke-em
Copy link
Contributor Author

@rahul2393 kindly help me again as I had to rebase from the latest main

@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
Allows users to examine and report the requestId in any
thrown exceptions.

Updates googleapis#3537
@odeke-em odeke-em force-pushed the x-goog-request-id-base branch from a4dd421 to ae29724 Compare April 10, 2025 20:17
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: l Pull request size is large. labels Apr 10, 2025
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2025
@sakthivelmanii sakthivelmanii added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2025
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 15, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 15, 2025
Exception exc = new StatusRuntimeException(status);
SpannerException spannerExceptionWithReqId =
SpannerExceptionFactory.newSpannerException(exc, reqIdIn);
assertThat(spannerExceptionWithReqId.getRequestId()).isEqualTo(reqIdIn.toString());
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit, for following pull requests: Please prefer the use of standard JUnit assertEquals(expected, actual) over assertThat, even when the test class in question uses assertThat.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it and thank you @olavloite.

@olavloite olavloite added the automerge Merge the pull request once unit tests and other checks pass. label Apr 15, 2025
@gcf-merge-on-green gcf-merge-on-green bot merged commit c102cb4 into googleapis:main Apr 15, 2025
31 of 32 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Apr 15, 2025
@odeke-em odeke-em deleted the x-goog-request-id-base branch April 15, 2025 11:03
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: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants