You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
storage: SoftDeletePolicy is not getting disabled on bucket creation #10380
In order to fully disable soft delete, you need to set a policy with a RetentionDuration of 0.
Actual behavior
Bucket has the default 7 day soft delete policy set.
Screenshots
Additional context
Using any other valid RetentionDuration - e.g. 10 days using 10 * 24 * time.hour - is working as expected and sets the SoftDelete Policy to a 10 day retention duration.
Without knowing much about the internal behaviours of the golang storage lib, I would first suspect these lines when looking at the PR that implements the SoftDeletePolicy: https://github.com/googleapis/google-cloud-go/blob/main/storage/bucket.go#L1334-L1336
(But this could also be totally wrong and the issue could be caused by something completely different)
Thanks for the well-researched issue. I was able to reproduce the problem; it looks like the call works as expected for the gRPC API while failing for JSON. I am going to work on a fix.
Activity
tritone commentedon Jun 17, 2024
Thanks for the well-researched issue. I was able to reproduce the problem; it looks like the call works as expected for the gRPC API while failing for JSON. I am going to work on a fix.
fix(storage): allow empty soft delete on Create
fix(storage): allow empty soft delete on Create (googleapis#10394)