Repository navigation
fix(storage): make resumable upload stream output consistent with CreateHmacKeyResponse - #16745
kalragauri wants to merge 4 commits into
Conversation
…ateHmacKeyResponse
There was a problem hiding this comment.
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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
The stream operators for
UploadChunkRequest,QueryResumableUploadRequest,DeleteResumableUploadRequest,CreateResumableUploadResponse, andUseResumableUploadSessionnow format non-empty session identifiers as[censored], consistent withCreateHmacKeyResponse, andUploadChunkRequestprintspayload_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.