Repository navigation
test(storage): Parameterized test setup for RCU integration testing #14530
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
Open
+956
−99
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ba14c63
test(storage): Parameterized test setup for RCU Integration Testing
nidhiii-27 f67b25c
fix(storage): resolve PR feedback for raw URI path and Zonal Rapid lo…
nidhiii-27 79acb1d
fix(storage): address PR review feedback on URI path and CrossRun Jav…
nidhiii-27 ffb85c3
test(storage): resolve PR review comments for RCU parameterized setup
nidhiii-27 695027e
test(storage): add baseline equivalence test for HttpStorageRpc non-p…
nidhiii-27 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
This change is in production code, so I think it might change behavior for existing users who set a host with a path, e.g. https://proxy.example.com/gcs/. Today the whole host is the root URL, so requests go to https://proxy.example.com/gcs/storage/v1/b/.... With this change the path replaces storage/v1/, so the same config sends requests to https://proxy.example.com/gcs/b/....
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.
Good catch! Updated the host parsing logic in
HttpStorageRpcso thatservicePathis only overridden when the URI path explicitly contains a/storage/v1...segment (such as/storage/v1_preprod/), preserving the existingrootUrlbehavior for reverse-proxy paths likehttps://proxy.example.com/gcs/.Co-authored by AI Agent
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.
The check is indexOf("/storage/v1"), a substring match, so hosts like https://proxy/storage/v1-mirror/ or /storage/v1beta/ still change from storage/v1/b/... to b/...
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.
Restricted the service path split in
HttpStorageRpcto match only/storage/v1_preprod(or/storage/v1_preprod/), and added unit tests inHttpStorageRpcUriTestcovering/storage/v1-mirror/and/storage/v1beta/.Co-authored by AI Agent
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.
Looks safe to me but since HttpStorageRpc ships to customers, but under the test: commit type release-please leaves it out of the changelog, to be doubly sure can we validate that this has no impact on users.
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.
The PR description still says "custom /storage/v1* service paths". It should say only /storage/v1_preprod can you update it accordingly
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.
Validated that this change has zero impact on users:
ServiceOptionsandHttpStorageOptions.Builder.build()always resolveoptions.getHost()to a non-null string (defaulting to"https://storage.googleapis.com/"or"https://storage.<universeDomain>/"), andHttpStorageRpconly splitsrootUrl/servicePathwhennormalizedPath.endsWith("/storage/v1_preprod"). Every other host (default prod, custom universe domain, local TestBench/emulator, IPv6, reverse-proxy paths, or even malformed URI strings) executesstorageBuilder.setRootUrl(host), which is identical tomain.nonPreprodHosts_matchMainBaselineExactlyinHttpStorageRpcUriTestcomparingHttpStorageRpc'sStorageclient againstmain'snew Storage.Builder(...).setRootUrl(options.getHost()).build()(getRootUrl(),getServicePath(),getBaseUrl(), andbuildHttpRequestUrl()) across all user-facingStorageOptionsconfigurations.Co-authored by AI Agent
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.
Done. Updated the PR description to specify
/storage/v1_preprodonly.Co-authored by AI Agent