Skip to content

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

Merged
kalragauri merged 18 commits into
googleapis:mainfrom
thiyaguk09:feat/idempotency-tokens
Aug 31, 2026
Merged

kalragauri merged 18 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 Outdated
Comment thread handwritten/storage/src/resumable-upload.ts Outdated
Comment thread handwritten/storage/src/resumable-upload.ts Outdated
@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
@thiyaguk09
thiyaguk09 force-pushed the feat/idempotency-tokens branch 6 times, most recently from 7f65a3e to f164923 Compare July 28, 2026 13:50
@thiyaguk09
thiyaguk09 force-pushed the feat/idempotency-tokens branch 6 times, most recently from 97ee7dd to e5071ef Compare August 5, 2026 04:39
@thiyaguk09
thiyaguk09 force-pushed the feat/idempotency-tokens branch 7 times, most recently from 9d060dc to c2b54e7 Compare August 12, 2026 05:09
@thiyaguk09
thiyaguk09 force-pushed the feat/idempotency-tokens branch 5 times, most recently from fa3deb3 to d7d619f Compare August 19, 2026 04:43
@kalragauri
kalragauri self-requested a review August 19, 2026 11:03
@thiyaguk09
thiyaguk09 force-pushed the feat/idempotency-tokens branch from d7d619f to 6272ca4 Compare August 20, 2026 02:44
@thiyaguk09
thiyaguk09 force-pushed the feat/idempotency-tokens branch from 6272ca4 to f0b6616 Compare August 24, 2026 03:58
Comment thread handwritten/storage/src/resumable-upload.ts Outdated
Comment thread handwritten/storage/src/resumable-upload.ts Outdated
Comment thread handwritten/storage/test/resumable-upload.ts
Comment thread handwritten/storage/package.json Outdated
Comment thread handwritten/storage/test/nodejs-common/service.ts Outdated
Comment thread handwritten/storage/src/resumable-upload.ts Outdated
Comment thread handwritten/storage/src/resumable-upload.ts Outdated
@thiyaguk09
thiyaguk09 requested a review from kalragauri August 31, 2026 11:16
@kalragauri
kalragauri merged commit 0df2e55 into googleapis:main Aug 31, 2026
51 checks passed
danieljbruce pushed a commit that referenced this pull request Sep 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[8.1.0](storage-v8.0.1...storage-v8.1.0)
(2026-09-08)


### Features

* **storage:** Add IpFilter support to bucket metadata
([#8623](#8623))
([30c91c8](30c91c8))
* **storage:** Add x-goog-gcs-idempotency-token header
([#8837](#8837))
([0df2e55](0df2e55))
* **storage:** Support copying CSEK-encrypted files to non-CSEK
destinations
([#8771](#8771))
([953328f](953328f))


### Bug Fixes

* **storage:** Resolve strict linter and TypeScript errors
([#9198](#9198))
([cee5338](cee5338))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
@thiyaguk09
thiyaguk09 deleted the feat/idempotency-tokens branch September 15, 2026 09:57
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.

2 participants