fix: add gccl-invocation-id interceptor#1309
Merged
BenWhitehead merged 26 commits intomainfrom Apr 1, 2022
Merged
Conversation
…ation attempts across multiple rpcs TODOs 1. Add option to StorageOptions to allow disabling 2. Add some unit tests to verify behavior independent of reading full request logs
…e clear themselves Also fixed a typo which meant that the v4 url wasn't being tested, however now the v4 url is failing to validate and I'm not sure how to fix the url.
frankyn
commented
Mar 28, 2022
| HttpRpcContext testContext = new HttpRpcContext(testUUIDSupplier); | ||
| testContext.newInvocationId(); | ||
| assertEquals(testUUIDSupplier.get(), testContext.getInvocationId()); | ||
| UUID uuid = UUID.fromString("28220dff-1e8b-4770-9e10-022c2a99d8f3"); |
Contributor
Author
There was a problem hiding this comment.
per-discussion with @BenWhitehead: the test prior was using the supplier instance "testUUIDSupplier.get()" caused a mutation to the state of the Supplier but passes because there is only one UUID. Instead we should not test the Supplier<> and only test HttpRpcContext(), hence the update relies on testContext rather than accessing Supplier<> directly.
BenWhitehead
requested changes
Mar 28, 2022
google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/test/java/com/google/cloud/storage/StorageImplTest.java
Outdated
Show resolved
Hide resolved
BenWhitehead
requested changes
Mar 29, 2022
Collaborator
BenWhitehead
left a comment
There was a problem hiding this comment.
We also need to add the following to private Builder(StorageOptions options) so we ensure we carry through any value set previously.
this.storageIncludeInvocationId = options.includeInvocationId;
google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
Outdated
Show resolved
Hide resolved
Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
added 2 commits
March 29, 2022 11:50
BenWhitehead
approved these changes
Apr 1, 2022
…apis/java-storage into invocation-id-interceptor
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Joint effort with @BenWhitehead who is the author of the original design, thank you Ben!