CLDSRV-911: promisify removeAllVersions versioning test utility#6183
Conversation
Migrate removeAllVersions and its _deleteVersionList helper from async.waterfall/callbacks to async/await, keeping a callback trampoline so existing callback and promisify callers keep working. The waterfall never returned a Promise, so callers doing `await removeAllVersions(...)` resolved immediately and version cleanup ran fire-and-forget in the background. Under a RAFT-based metadata backend the consensus latency exposes the race: bucket teardown runs before cleanup finishes, leaving versioned objects behind and failing DeleteBucket with BucketNotEmpty.
Hello tcarmet,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
|
LGTM |
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
|
/approve |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option The following options are set: approve |
| function enableVersioningThenPutObject(bucket, object, callback) { | ||
| enableVersioning(bucket, err => { | ||
| if (err) { | ||
| callback(err); |
There was a problem hiding this comment.
Pre-existing double-callback: when enableVersioning fails, callback(err) fires but execution falls through to s3Client.send(...), which eventually calls callback a second time.
```suggestion
return callback(err);
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
@@ Coverage Diff @@
## development/9.3 #6183 +/- ##
===================================================
- Coverage 84.58% 84.53% -0.06%
===================================================
Files 206 206
Lines 13360 13360
===================================================
- Hits 11301 11294 -7
- Misses 2059 2066 +7
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Build failedThe build for commit did not succeed in branch w/9.4/bugfix/CLDSRV-911-incomplete-sdk-migration The following options are set: approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
This pull request does not target the following hotfix branch(es) so they
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue CLDSRV-911. Goodbye tcarmet. |
A versioning functional-test cleanup helper was left mid-migration to the new AWS SDK: it used Promise-based SDK calls inside a callback-style control flow (async.waterfall) that never returned a Promise. Callers that awaited it resolved immediately while version and delete-marker deletion continued in the background, so bucket teardown raced ahead and failed against a consensus-based metadata backend (BucketNotEmpty, leftover buckets polluting shared metadata). This migrates the helper and its internal delete helper to async/await while keeping a callback trampoline, so awaiting it now waits for cleanup to complete and existing callback and promisify-based callers are unaffected.