Commit 16ab4c2
feat(storage): Add delete_source_objects optional parameter to compose API (#17163)
Add an optional `delete_source_objects` boolean parameter to the
`Blob.compose` method in `google-cloud-storage`. When this parameter is
set to `True`, it includes the `deleteSourceObjects` field in the
request body to the GCS JSON API, which triggers the deletion of source
objects upon successful composition.
Unit and system tests have been added and verified to pass.
---
*PR created automatically by Jules for task
[8742736712890332678](https://jules.google.com/task/8742736712890332678)
started by @nidhiii-27*
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: nidhiii-27 <224584462+nidhiii-27@users.noreply.github.com>1 parent 9ba049a commit 16ab4c2Copy full SHA for 16ab4c2
3 files changed
+66Lines changed: 66 additions & 0 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- packages/google-cloud-storage
- google/cloud/storage
- tests
- system
- unit
Expand file treeCollapse file tree
Open diff view settings
Collapse file
packages/google-cloud-storage/google/cloud/storage/blob.py
Copy file name to clipboardExpand all lines: packages/google-cloud-storage/google/cloud/storage/blob.py+9Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3849 | 3849 | |
3850 | 3850 | |
3851 | 3851 | |
| 3852 | + |
3852 | 3853 | |
3853 | 3854 | |
3854 | 3855 | |
| ||
3908 | 3909 | |
3909 | 3910 | |
3910 | 3911 | |
| 3912 | + |
| 3913 | + |
| 3914 | + |
| 3915 | + |
| 3916 | + |
3911 | 3917 | |
3912 | 3918 | |
3913 | 3919 | |
| ||
3964 | 3970 | |
3965 | 3971 | |
3966 | 3972 | |
| 3973 | + |
| 3974 | + |
| 3975 | + |
3967 | 3976 | |
3968 | 3977 | |
3969 | 3978 | |
|
Collapse file
packages/google-cloud-storage/tests/system/test_blob.py
Copy file name to clipboardExpand all lines: packages/google-cloud-storage/tests/system/test_blob.py+20Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1209 | 1209 | |
1210 | 1210 | |
1211 | 1211 | |
| 1212 | + |
| 1213 | + |
| 1214 | + |
| 1215 | + |
| 1216 | + |
| 1217 | + |
| 1218 | + |
| 1219 | + |
| 1220 | + |
| 1221 | + |
| 1222 | + |
| 1223 | + |
| 1224 | + |
| 1225 | + |
| 1226 | + |
| 1227 | + |
| 1228 | + |
| 1229 | + |
| 1230 | + |
| 1231 | + |
Collapse file
packages/google-cloud-storage/tests/unit/test_blob.py
Copy file name to clipboardExpand all lines: packages/google-cloud-storage/tests/unit/test_blob.py+37Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4874 | 4874 | |
4875 | 4875 | |
4876 | 4876 | |
| 4877 | + |
| 4878 | + |
| 4879 | + |
| 4880 | + |
| 4881 | + |
| 4882 | + |
| 4883 | + |
| 4884 | + |
| 4885 | + |
| 4886 | + |
| 4887 | + |
| 4888 | + |
| 4889 | + |
| 4890 | + |
| 4891 | + |
| 4892 | + |
| 4893 | + |
| 4894 | + |
| 4895 | + |
| 4896 | + |
| 4897 | + |
| 4898 | + |
| 4899 | + |
| 4900 | + |
| 4901 | + |
| 4902 | + |
| 4903 | + |
| 4904 | + |
| 4905 | + |
| 4906 | + |
| 4907 | + |
| 4908 | + |
| 4909 | + |
| 4910 | + |
| 4911 | + |
| 4912 | + |
| 4913 | + |
4877 | 4914 | |
4878 | 4915 | |
4879 | 4916 | |
|
0 commit comments