-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support bucket soft-delete policies #593
feat: support bucket soft-delete policies #593
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #593 +/- ##
==========================================
+ Coverage 98.60% 98.63% +0.03%
==========================================
Files 50 50
Lines 8072 8365 +293
==========================================
+ Hits 7959 8251 +292
- Misses 113 114 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
gcs/bucket.py
Outdated
) | ||
if policy.retention_duration.ToSeconds() >= 365 * 86400: | ||
testbench.error.invalid( | ||
"SoftDeletePolicy.retention_duration should be at less than a year", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is soft delete retention_duration maximum 90 days? This is what I see in the user guide:
The value must be greater than or equal to 604,800 seconds (7 days) and less than 7,776,000 seconds (90 days)
nit: extra at within error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to 90d. The .proto file says 365:
🤷
Part of the work for googleapis/google-cloud-cpp#13575