-
Notifications
You must be signed in to change notification settings - Fork 93
Storage#update always removes all lifecycle rules if they are not specified #850
Copy link
Copy link
Closed
Labels
api: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Issue with
com.google.cloud.storage.Storage#update(com.google.cloud.storage.BucketInfo, com.google.cloud.storage.Storage.BucketTargetOption...)Expected behaviour:
update only fields that are specified in
BucketInfoparameter.Actual behaviour:
along the updated fields, removes lifecycle rules if they are not specified.
Example code:
Actual output (for bucket with 1 lifecycle rule):
I suspect that issue is located here:
java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java
Lines 1841 to 1869 in accf502