Skip to content

feat(storage): Add delete object source field in ComposeObject API#16094

Open
v-pratap wants to merge 3 commits into
googleapis:mainfrom
v-pratap:delete-object-source
Open

feat(storage): Add delete object source field in ComposeObject API#16094
v-pratap wants to merge 3 commits into
googleapis:mainfrom
v-pratap:delete-object-source

Conversation

@v-pratap
Copy link
Copy Markdown
Contributor

No description provided.

@v-pratap v-pratap requested review from a team as code owners May 13, 2026 08:32
@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label May 13, 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 introduces the DeleteSourceObjects option for ComposeObject requests, implementing support in both gRPC and REST paths. It also includes integration tests to verify the behavior when the option is enabled or disabled. Feedback was provided to simplify the option retrieval logic using value_or(false) for better readability and to add a docstring to the new public-facing DeleteSourceObjects parameter.

Comment thread google/cloud/storage/internal/object_requests.cc Outdated
Comment thread google/cloud/storage/well_known_parameters.h
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.70%. Comparing base (cf931ff) to head (53036f9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16094      +/-   ##
==========================================
- Coverage   92.70%   92.70%   -0.01%     
==========================================
  Files        2353     2353              
  Lines      218354   218414      +60     
==========================================
+ Hits       202419   202472      +53     
- Misses      15935    15942       +7     

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

@v-pratap v-pratap force-pushed the delete-object-source branch from b5077ac to 53036f9 Compare May 18, 2026 08:26
request.GetOption<storage::IfMetagenerationMatch>().value());
}
result.set_kms_key(request.GetOption<storage::KmsKeyName>().value_or(""));
if (request.GetOption<storage::DeleteSourceObjects>().value_or(false)) {
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.

nit: we're using GetOption instead of HasOption, which seems to be intentional so that the default behavior (no deletion) is preserved if the option is not explicitly provided. Should we add a comment to clarify?

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