-
Notifications
You must be signed in to change notification settings - Fork 84
fix: add gccl-invocation-id interceptor #1309
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
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.
HttpRpcContext testContext = new HttpRpcContext(testUUIDSupplier); | ||
testContext.newInvocationId(); | ||
assertEquals(testUUIDSupplier.get(), testContext.getInvocationId()); | ||
UUID uuid = UUID.fromString("28220dff-1e8b-4770-9e10-022c2a99d8f3"); |
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.
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.
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
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.
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>
…apis/java-storage into invocation-id-interceptor
Joint effort with @BenWhitehead who is the author of the original design, thank you Ben!