Skip to content

feat(storage): Extend idempotency token use to all async mutation operations#16100

Open
kalragauri wants to merge 1 commit into
googleapis:mainfrom
kalragauri:feature/async-audit
Open

feat(storage): Extend idempotency token use to all async mutation operations#16100
kalragauri wants to merge 1 commit into
googleapis:mainfrom
kalragauri:feature/async-audit

Conversation

@kalragauri
Copy link
Copy Markdown
Contributor

This change extends the use of idempotency tokens to all mutation operations within the asynchronous gRPC-based client library. A unique token is generated client-side and included in the request metadata under the x-goog-gcs-idempotency-token header.

@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label May 15, 2026
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 standardizes the addition of idempotency tokens across asynchronous storage operations—specifically Insert, Compose, Delete, and Appendable Uploads—by utilizing a new AddIdempotencyToken helper function. The changes include updating the AsyncConnectionImpl to capture and apply invocation IDs and adding unit tests to verify token presence in gRPC metadata. Review feedback recommends using GoogleMock matchers to simplify metadata verification in tests and removing an unused variable.

Comment thread google/cloud/storage/internal/async/connection_impl_test.cc Outdated
Comment thread google/cloud/storage/internal/async/connection_impl_test.cc Outdated
Comment thread google/cloud/storage/internal/async/connection_impl_test.cc Outdated
Comment thread google/cloud/storage/internal/async/connection_impl_test.cc Outdated
@kalragauri kalragauri force-pushed the feature/async-audit branch from 38e0028 to 2b7d63b Compare May 15, 2026 12:11
@kalragauri kalragauri marked this pull request as ready for review May 15, 2026 12:13
@kalragauri kalragauri requested review from a team as code owners May 15, 2026 12:13
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.68%. Comparing base (e5d585c) to head (2b7d63b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16100      +/-   ##
==========================================
- Coverage   92.69%   92.68%   -0.01%     
==========================================
  Files        2353     2353              
  Lines      218328   218377      +49     
==========================================
+ Hits       202386   202413      +27     
- Misses      15942    15964      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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