storage: SoftDeletePolicy is not getting disabled on bucket creation #10380
Labels
api: storage
Issues related to the Cloud Storage API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Client
Storage v1.42.0
Environment
local machine (MB Pro) (also tested in golang:alpine container)
Go Environment
$ go version
go version go1.22.4 darwin/arm64
Code
Expected behavior
Bucket gets created without a SoftDeletePolicy / SoftDelete Protection as mentioned in the docs:
https://github.com/googleapis/google-cloud-go/blob/storage/v1.42.0/storage/bucket.go#L491-L492
Actual behavior
Bucket has the default 7 day soft delete policy set.
Screenshots
Additional context
Using any other valid
RetentionDuration
- e.g. 10 days using10 * 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)
The text was updated successfully, but these errors were encountered: