Skip to content

Conversation

@shubham-up-47
Copy link
Contributor

@shubham-up-47 shubham-up-47 commented Sep 19, 2025

This PR corrects the logic in AsyncWriterConnectionResumedState::Resume() where it incorrectly assumed initial_request_ would always contain an write_object_spec. This assumption fails when resuming an upload that was initiated with ResumeAppendableObjectUpload, which uses append_object_spec, which leads to passing the bucket and object names empty.

The fix introduces a check to determine whether initial_request_ contains a write_object_spec or an append_object_spec, and then correctly extracts the bucket and object names from the available spec. This approach aligns with the pattern already used in WriteResultFactory for handling these two types of specifications.


This change is Reviewable

@shubham-up-47 shubham-up-47 requested review from a team as code owners September 19, 2025 14:08
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Sep 19, 2025
@codecov
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.04%. Comparing base (97b036b) to head (06703c0).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15558   +/-   ##
=======================================
  Coverage   93.04%   93.04%           
=======================================
  Files        2411     2411           
  Lines      220299   220346   +47     
=======================================
+ Hits       204978   205022   +44     
- Misses      15321    15324    +3     

☔ 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.

@shubham-up-47 shubham-up-47 changed the title feat(storage): Fix Resume() to use append_object_spec instead of write_object_spec for resumed appendable uploads fix(storage): Fix Resume() to use append_object_spec instead of write_object_spec for resumed appendable uploads Sep 22, 2025
Copy link
Member

@scotthart scotthart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scotthart reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @v-pratap)

@shubham-up-47 shubham-up-47 merged commit 3b96c4b into googleapis:main Sep 23, 2025
67 of 72 checks passed
@shubham-up-47 shubham-up-47 deleted the fix_bucket_not_found_error branch September 23, 2025 15:28
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.

4 participants