Skip to content

feat(storage): add x-goog-gcs-idempotency-token header#8837

Open
thiyaguk09 wants to merge 7 commits into
googleapis:mainfrom
thiyaguk09:feat/idempotency-tokens
Open

feat(storage): add x-goog-gcs-idempotency-token header#8837
thiyaguk09 wants to merge 7 commits into
googleapis:mainfrom
thiyaguk09:feat/idempotency-tokens

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

@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label Jul 9, 2026

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

Copy link
Copy Markdown
Contributor

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 introduces changes to align the x-goog-gcs-idempotency-token header with the gccl-invocation-id across various request types, including standard service requests and resumable uploads. It also respects user-provided idempotency tokens case-insensitively. The review feedback highlights a critical issue in resumable-upload.ts where user-provided customRequestOptions.headers are mutated directly. This can lead to unexpected side effects or runtime errors if the options object is frozen. It is recommended to clone the options and headers objects before modifying them.

Comment thread handwritten/storage/src/resumable-upload.ts
Comment thread handwritten/storage/src/resumable-upload.ts
Comment thread handwritten/storage/src/resumable-upload.ts
@thiyaguk09 thiyaguk09 marked this pull request as ready for review July 9, 2026 12:45
@thiyaguk09 thiyaguk09 requested a review from a team as a code owner July 9, 2026 12:45
@thiyaguk09 thiyaguk09 force-pushed the feat/idempotency-tokens branch from 5a6aa6e to 46f25f7 Compare July 10, 2026 12:29
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