fix: (storage) delete non current version of objects
Release Note Template for Downstream PRs (will be copied) Fixes: See Write release notes for guidance.
storage: delete non current objects
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 2 files changed, 56 insertions(+), 14 deletions(-))
google-beta provider: Diff ( 2 files changed, 56 insertions(+), 14 deletions(-))
Tests analytics
Total tests: 120 Passed tests: 109 Skipped tests: 10 Affected tests: 1
Click here to see the affected service packages
- storage
Action taken
Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
- TestAccStorageBucket_forceDestroyWithVersioning
🟢 Tests passed during RECORDING mode:
TestAccStorageBucket_forceDestroyWithVersioning [Debug log]
🟢 No issues found for passed tests after REPLAYING rerun.
🟢 All tests passed!
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 2 files changed, 71 insertions(+), 27 deletions(-))
google-beta provider: Diff ( 2 files changed, 71 insertions(+), 27 deletions(-))
Errors
google provider:
- The diff processor failed to build. This is usually due to the downstream provider failing to compile.
google-beta provider:
- The diff processor failed to build. This is usually due to the downstream provider failing to compile.
Tests analytics
Total tests: 0 Passed tests: 0 Skipped tests: 0 Affected tests: 0
Click here to see the affected service packages
- storage
🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.
View the build log
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 2 files changed, 70 insertions(+), 27 deletions(-))
google-beta provider: Diff ( 2 files changed, 70 insertions(+), 27 deletions(-))
Tests analytics
Total tests: 120 Passed tests: 110 Skipped tests: 10 Affected tests: 0
Click here to see the affected service packages
- storage
🟢 All tests passed!
View the build log
Hello! I am a robot. Tests will require approval from a repository maintainer to run.
Googlers: For automatic test runs see go/terraform-auto-test-runs.
@slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.
You can help make sure that review is quick by doing a self-review and by running impacted tests locally.
@kautikdk please review, I'll do a pass after you give approval
Hi @gurusai-voleti, Can you please briefly explain what is the solution you are proposing?
Hi @gurusai-voleti, Can you please briefly explain what is the solution you are proposing?
@kautikdk
Our current method for deleting objects from a bucket involves using the list object API. This API retrieves a maximum of 1000 objects at a time. If a bucket contains more than 1000 objects, the API response will include a nextPageToken. We then use this token to make subsequent calls to the list API, continuing to retrieve and delete objects until the nextPageToken is no longer present, ensuring all objects are removed from the bucket.
@slevenick This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.
Is your solution related to the deletion of non current version of object? I believe the original issue is about
force_destroyis not working for buckets with versioning enabled.
yes the solution will delete all live and versioned objects
@GoogleCloudPlatform/terraform-team @slevenick This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.
@GoogleCloudPlatform/terraform-team @slevenick This PR has been waiting for review for 2 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.
@GoogleCloudPlatform/terraform-team @slevenick This PR has been waiting for review for 3 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.
What's the next step here? As far as I can tell we're waiting on review from @kautikdk
I am verifying whether the current logic is deleting all the objects or not even version objects, and it seems no need to update the logic, will confirm if existing logic working fine we need some more info from the bug reporter in which case customer faced the error
@slevenick @kautikdk created a bucket with more than 1000 version objects and few live objects and tested the current code on main branch (latest tf version), no changes are required for delete functionality as current logic is working fine, until we get some info on the customer issue, we will keep this PR as draft
@gurusai-voleti so that's what I was thinking. The PR code might not be completely related to the issue that was linked. If you think there is an separate bug that this PR is fixing, you can create one GitHub issue with storage tag and link that issue to this PR.