-
Couldn't load subscription status.
- Fork 252
Improvement/cldsrv 724 sur utapi tests #5950
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
base: development/9.1
Are you sure you want to change the base?
Improvement/cldsrv 724 sur utapi tests #5950
Conversation
Hello benzekrimaha,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 |
548afab to
4d4e5f0
Compare
❌ 390 Tests Failed:
View the top 3 failed test(s) by shortest run time
View the full list of 50 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
fdd6e44 to
9844ffb
Compare
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.
I just have one comment "blocking", it's the behavior change on one of the quota tests, i'm not sure this is needed
tests/sur/quota.js
Outdated
| next => { | ||
| createBucket(bucket, false, next); | ||
| }, |
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.
| next => { | |
| createBucket(bucket, false, next); | |
| }, | |
| next => createBucket(bucket, false, next); |
| assert.ifError(err); | ||
| return next(); |
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.
not related to your changes but a quick win could be to just call the next with the error, because an assert in a cb makes it harder to debug, and can even hide the error (as we crash)
tests/sur/quota.js
Outdated
| // Log what headers we're sending | ||
| // eslint-disable-next-line no-console | ||
| console.log('Request headers after stripping:', Object.keys(args.request.headers)); |
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.
We can probably remove this console log
tests/sur/quota.js
Outdated
| }); | ||
|
|
||
| // Add middleware to strip ALL checksum headers | ||
| s3Client.middlewareStack.add( |
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.
Can we maybe add a comment to explain why we need this? And maybe a ticket number if that could be removed, so we just support the standard headers
tests/sur/quota.js
Outdated
| .catch(err => { | ||
| callback(err); | ||
| }); |
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.
| .catch(err => { | |
| callback(err); | |
| }); | |
| .catch(err => callback(err)); |
tests/sur/quota.js
Outdated
| if (!err && !s3Config.isQuotaInflightEnabled()) { | ||
| mockScuba.incrementBytesForBucket(bucket, parts * partSize); | ||
| if (!s3Config.isQuotaInflightEnabled()) { | ||
| mockScuba.incrementBytesForBucket(bucket, -(parts * partSize)); |
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.
i'm not sure to get why we increment the bytes before the call then we decrement them, is there any issue with the test?
tests/sur/quota.js
Outdated
| .catch(err => { | ||
| cb(err); | ||
| }); |
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.
| .catch(err => { | |
| cb(err); | |
| }); | |
| .catch(err => cb(err)); |
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.
`catch(cb)
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
| emptyMany(bucketNames) { | ||
| const promises = bucketNames.map( | ||
| bucketName => this.empty(bucketName) | ||
| const promises = bucketNames.map( |
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.
Indent issue ?
tests/sur/quota.js
Outdated
| .catch(err => { | ||
| cb(err); | ||
| }); |
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.
`catch(cb)
3aa5ada to
61f8a03
Compare
As test files depend on these utilities, they needed to be adapted to match the sdk v3 requirements. Issue: CLDSRV-724
5ff3711 to
1f24c59
Compare
1f24c59 to
adb7ac5
Compare
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
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.
Some code style issues
When the code style comments from @DarkIsDude are addressed we should be good, so approving for my part
| return Promise.all(promises); | ||
| } | ||
|
|
||
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.
| .map(object => | ||
| this.s3.send(new DeleteObjectCommand({ |
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.
| .map(object => | |
| this.s3.send(new DeleteObjectCommand({ | |
| .map(object => this.s3.send(new DeleteObjectCommand({ |
| .catch(err => { | ||
| throw err; | ||
| }); |
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.
You can remove the .catch here, if we just re-throw inside
| .catch(err => { | |
| throw err; | |
| }); |
package.json
Outdated
| }, | ||
| "homepage": "https://github.com/scality/S3#readme", | ||
| "dependencies": { | ||
| "@aws-sdk/client-s3": "^3.705.0", |
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.
| "@aws-sdk/client-s3": "^3.705.0", | |
| "@aws-sdk/client-s3": "^3.908.0", |
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.
Looks good to me, I'll let you address the last comments and Edouard approve it
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following reviewers are expecting changes from the author, or must review again: |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
Issue: CLDSRV-724