Skip to content

fix(storage): make resumable upload stream output consistent with CreateHmacKeyResponse - #16745

Open
kalragauri wants to merge 4 commits into
googleapis:mainfrom
kalragauri:fix/storage-resumable-upload-stream-output
Open

kalragauri wants to merge 4 commits into
googleapis:mainfrom
kalragauri:fix/storage-resumable-upload-stream-output

Conversation

@kalragauri

@kalragauri kalragauri commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

The stream operators for UploadChunkRequest, QueryResumableUploadRequest, DeleteResumableUploadRequest, CreateResumableUploadResponse, and UseResumableUploadSession now format non-empty session identifiers as [censored], consistent with CreateHmacKeyResponse, and UploadChunkRequest prints payload_size. Upload chunk diagnostic messages likewise format non-empty session identifiers as [censored] alongside explicit chunk metadata fields (offset, range, payload_size, known_object_hashes).

Requests sent to the service and all request accessors are unchanged. Existing stream-output tests are updated and new unit tests cover formatting across resumable upload types and boundaries.

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

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

Copy link
Copy Markdown

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 implements censoring of sensitive session identifiers (such as session_id, upload_id, and upload_session_url) in diagnostic messages, stream operators, and logs across the storage client library. It introduces a helper function AppendUploadChunkDiagnostics to format chunk upload diagnostics securely and adds comprehensive unit tests to verify that sensitive tokens are correctly redacted. The review feedback suggests declaring AppendUploadChunkDiagnostics with static or placing it in an anonymous namespace to ensure internal linkage.

@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.26471% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.93%. Comparing base (79985ca) to head (decd197).

Files with missing lines Patch % Lines
google/cloud/storage/internal/connection_impl.cc 87.50% 1 Missing ⚠️
google/cloud/storage/internal/object_requests.cc 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16745      +/-   ##
==========================================
+ Coverage   92.91%   92.93%   +0.01%     
==========================================
  Files        2282     2282              
  Lines      232266   232515     +249     
==========================================
+ Hits       215820   216088     +268     
+ Misses      16446    16427      -19     

☔ View full report in Codecov by Harness.
📢 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.

@kalragauri
kalragauri marked this pull request as ready for review December 3, 2026 11:31
@kalragauri
kalragauri requested review from a team as code owners December 3, 2026 11:31
@kalragauri
kalragauri requested a review from v-pratap December 3, 2026 11:32

This branch has not been deployed

No deployments
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