Skip to content

feat(storage): add deleteSourceObjects option to Bucket::compose()#9211

Open
salilg-eng wants to merge 5 commits into
googleapis:mainfrom
salilg-eng:feat/delete_source_objects
Open

feat(storage): add deleteSourceObjects option to Bucket::compose()#9211
salilg-eng wants to merge 5 commits into
googleapis:mainfrom
salilg-eng:feat/delete_source_objects

Conversation

@salilg-eng
Copy link
Copy Markdown
Contributor

This PR introduces the deleteSourceObjects option (boolean) to the Bucket::compose() method. When set to true, the library takes care of auto-deleting the source objects immediately and safely following a successful composition.

Transaction Safe: Cleanup is only triggered if composition succeeds. If composition fails and throws a ServiceException, the source files are safely preserved.
Polymorphic Handling: The deletion loop correctly handles lists containing both plain string paths (string[]) and typed StorageObject instances.
API Definition Consistency: deleteSourceObjects is added as a schema query parameter in the API Service Definition (storage-v1.json), ensuring consistent serialization down to the REST connection level.

@salilg-eng salilg-eng requested review from a team as code owners May 25, 2026 11:50
@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label May 25, 2026
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