Skip to content

fix(storage): resolve transport and retry issues#12

Open
thiyaguk09 wants to merge 53 commits into
storage-node-18from
storage-transport-retry-fix
Open

fix(storage): resolve transport and retry issues#12
thiyaguk09 wants to merge 53 commits into
storage-node-18from
storage-transport-retry-fix

Conversation

@thiyaguk09
Copy link
Copy Markdown
Owner

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> 🦕

Copy link
Copy Markdown

@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 transport layer and enhances retry logic with granular idempotency checks, including support for resumable uploads and specific GCS error reasons. It also updates encryption header handling across the File and ServiceObject classes. Feedback focuses on thread-safety concerns regarding shared interceptors in StorageTransport, the use of any type casts that bypass type safety and leak abstractions, and the discouragement of mutating response data objects with metadata.

Comment thread handwritten/storage/src/storage-transport.ts Outdated
Comment thread handwritten/storage/src/file.ts Outdated
Comment thread handwritten/storage/src/nodejs-common/service-object.ts
Comment thread handwritten/storage/src/storage-transport.ts Outdated
@thiyaguk09 thiyaguk09 force-pushed the storage-transport-retry-fix branch from 76b351d to a55baa3 Compare May 7, 2026 11:01
thiyaguk09 and others added 3 commits May 7, 2026 11:37
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@thiyaguk09 thiyaguk09 force-pushed the storage-node-18 branch 3 times, most recently from 82db716 to b2e12e7 Compare May 12, 2026 09:36
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…request interception and test bench integration
…e etag check

- Updated `responseHandler` to correctly handle different payload types:
- Plain objects are mutated with `.headers` and `.status` and
returned.
- Binary payloads (Buffer/Stream) return raw data to prevent dangerous
mutations.
- Primitives (e.g., empty strings) return the full `GaxiosResponse`
wrapper to preserve access to headers like `Location` for resumable
upload initiation.
- Fixed `hasPrecondition` logic to safely parse stringified JSON or
inspect objects directly for an `etag` property. This prevents false
positives on raw text payloads containing the word "etag" and false
negatives on object payloads.
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
…sport (googleapis#8283)

- Remove Service.ts and common.ts files from handwritten/storage

- Migrate remaining functionality to StorageTransport

- chore(ci): upgrade conformance tests to Node 18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant