Skip to content
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

Merged
merged 5 commits into from
Feb 16, 2024
Merged

feat: support bucket soft-delete policies #593

merged 5 commits into from
Feb 16, 2024

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Feb 15, 2024

Part of the work for googleapis/google-cloud-cpp#13575

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (65105b6) 98.60% compared to head (ad5e059) 98.63%.
Report is 2 commits behind head on main.

Files Patch % Lines
gcs/bucket.py 96.42% 1 Missing ⚠️
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     
Flag Coverage Δ
unittests 98.63% <98.78%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coryan coryan marked this pull request as ready for review February 15, 2024 23:04
@coryan coryan requested review from a team as code owners February 15, 2024 23:04
gcs/bucket.py Outdated
)
if policy.retention_duration.ToSeconds() >= 365 * 86400:
testbench.error.invalid(
"SoftDeletePolicy.retention_duration should be at less than a year",
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coryan coryan merged commit 02c157a into googleapis:main Feb 16, 2024
13 checks passed
@coryan coryan deleted the feat-support-soft-delete-policy branch February 16, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants