-
Notifications
You must be signed in to change notification settings - Fork 555
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
Sample(storage): Soft deleted Bucket Restore #28760
base: main
Are you sure you want to change the base?
Sample(storage): Soft deleted Bucket Restore #28760
Conversation
0085055
to
4bdeb8b
Compare
Please ignore ci issues in this PR for now, This Pr is for tracking sample failures |
let(:new_bucket_name) { random_bucket_name } | ||
|
||
it "get soft deleted bucket, its soft_delete_time and hard_delete_time" do | ||
new_bucket = storage_client.create_bucket new_bucket_name |
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.
Does this new bucket have soft_delete_policy
?
If not, we won't be able to recover the bucket.
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.
@bajajneha27 on console I can see this for one of the ruby sample test bucket
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 the soft_delete_policy
set by default if you create a new bucket?
If not, you'll have to pass it while creating the new bucket.
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.
yes this is set by default
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.
Hmmm. Can you explicitly check the policy in test too, so that we're sure we've the policy in place.
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.
@bajajneha27 tried to set retention period for the bucket explicitly but getting same result
also I can see in this doc (https://cloud.google.com/storage/docs/soft-delete#retention-duration) that default soft deleted policy is set as 7 days for a bucket
…_restore_with_sample' into soft_deleted_bucket_restore_with_sample
Add support for restoring soft deleted bucket.
Operation Supported: