Skip to content

feat(storage): enhance StorageTransport retry logic and parameter serialization#8119

Open
thiyaguk09 wants to merge 6 commits intogoogleapis:storage-node-18from
thiyaguk09:node18/gaxios-fix
Open

feat(storage): enhance StorageTransport retry logic and parameter serialization#8119
thiyaguk09 wants to merge 6 commits intogoogleapis:storage-node-18from
thiyaguk09:node18/gaxios-fix

Conversation

@thiyaguk09
Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@thiyaguk09 thiyaguk09 requested a review from a team as a code owner April 27, 2026 11:35
@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label Apr 27, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the storage library to centralize request handling through storageTransport, updates API endpoints to include the /storage/v1 prefix, and significantly enhances the default retry logic with granular idempotency checks based on HTTP methods and preconditions. Key improvements include standardized URL encoding for resource names, a custom query parameter serializer for repeated keys, and refined encryption header management. However, several issues were identified: the isPublic method now incorrectly uses authenticated requests, which defeats its purpose of checking anonymous access; interceptors may no longer be applied correctly due to the transport refactor; and mutating response data objects to include metadata poses risks for non-extensible types. Additionally, the retry logic's path matching should be more specific to avoid false positives with bucket names.

Comment thread handwritten/storage/src/file.ts Outdated
Comment thread handwritten/storage/src/storage.ts Outdated
Comment thread handwritten/storage/src/storage-transport.ts
Comment thread handwritten/storage/src/storage-transport.ts
@thiyaguk09 thiyaguk09 requested a review from a team as a code owner April 27, 2026 11:51
- Move legacy Service functionality to StorageTransport
- Fix interceptor binding between Gaxios and AuthClient
- Remove superseded interceptors in Bucket and File
- Improve retry logic for rate-limited GCS responses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant