Skip to content

Conversation

benzekrimaha
Copy link
Contributor

@benzekrimaha benzekrimaha commented Sep 24, 2025

Issue: CLDSRV-724

@bert-e
Copy link
Contributor

bert-e commented Sep 24, 2025

Hello benzekrimaha,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Sep 24, 2025

Incorrect fix version

The Fix Version/s in issue CLDSRV-724 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.1.1

Please check the Fix Version/s of CLDSRV-724, or the target
branch of this pull request.

@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-sur-utapi-tests branch from 548afab to 4d4e5f0 Compare September 24, 2025 11:08
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.61%. Comparing base (a8d5672) to head (adb7ac5).

❌ Your project check has failed because the head coverage (79.61%) is below the adjusted base coverage (82.72%). You can increase the head coverage or adjust the Removed Code Behavior.

Additional details and impacted files

Impacted file tree graph
see 26 files with indirect coverage changes

@@                 Coverage Diff                 @@
##           development/9.1    #5950      +/-   ##
===================================================
- Coverage            83.72%   79.61%   -4.12%     
===================================================
  Files                  191      191              
  Lines                12233    12233              
===================================================
- Hits                 10242     9739     -503     
- Misses                1991     2494     +503     
Flag Coverage Δ
file-ft-tests 22.27% <ø> (-44.66%) ⬇️
kmip-ft-tests 27.19% <ø> (ø)
mongo-v0-ft-tests 28.14% <ø> (-40.12%) ⬇️
mongo-v1-ft-tests 28.14% <ø> (-40.11%) ⬇️
multiple-backend 19.81% <ø> (-14.44%) ⬇️
sur-tests 35.62% <ø> (-0.03%) ⬇️
sur-tests-inflights 36.70% <ø> (-0.05%) ⬇️
unit 68.32% <ø> (ø)
utapi-v2-tests 33.55% <ø> (-0.03%) ⬇️

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-sur-utapi-tests branch 4 times, most recently from fdd6e44 to 9844ffb Compare September 24, 2025 13:52
@benzekrimaha benzekrimaha marked this pull request as ready for review September 24, 2025 15:43
Copy link
Contributor

@williamlardier williamlardier left a 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

Comment on lines 800 to 802
next => {
createBucket(bucket, false, next);
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
next => {
createBucket(bucket, false, next);
},
next => createBucket(bucket, false, next);

Comment on lines +807 to +782
assert.ifError(err);
return next();
Copy link
Contributor

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)

Comment on lines 431 to 433
// Log what headers we're sending
// eslint-disable-next-line no-console
console.log('Request headers after stripping:', Object.keys(args.request.headers));
Copy link
Contributor

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

});

// Add middleware to strip ALL checksum headers
s3Client.middlewareStack.add(
Copy link
Contributor

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

Comment on lines 262 to 258
.catch(err => {
callback(err);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.catch(err => {
callback(err);
});
.catch(err => callback(err));

if (!err && !s3Config.isQuotaInflightEnabled()) {
mockScuba.incrementBytesForBucket(bucket, parts * partSize);
if (!s3Config.isQuotaInflightEnabled()) {
mockScuba.incrementBytesForBucket(bucket, -(parts * partSize));
Copy link
Contributor

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?

Comment on lines 154 to 156
.catch(err => {
cb(err);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.catch(err => {
cb(err);
});
.catch(err => cb(err));

Copy link
Contributor

Choose a reason for hiding this comment

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

`catch(cb)

@bert-e
Copy link
Contributor

bert-e commented Oct 2, 2025

Incorrect fix version

The Fix Version/s in issue CLDSRV-724 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.1.4

Please check the Fix Version/s of CLDSRV-724, or the target
branch of this pull request.

Comment on lines 16 to 30
if (unauthenticated) {
this.s3 = new S3Client({
...s3Config,
credentials: { accessKeyId: '', secretAccessKey: '' },
forcePathStyle: true,
signer: { sign: async request => request },
});
}
else {
this.s3 = new S3Client({
...s3Config,
maxAttempts: 0,
});
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (unauthenticated) {
this.s3 = new S3Client({
...s3Config,
credentials: { accessKeyId: '', secretAccessKey: '' },
forcePathStyle: true,
signer: { sign: async request => request },
});
}
else {
this.s3 = new S3Client({
...s3Config,
maxAttempts: 0,
});
}
if (unauthenticated) {
s3Config = {
...s3Config,
credentials: { accessKeyId: '', secretAccessKey: '' },
forcePathStyle: true,
signer: { sign: async request => request },
};
}
this.s3 = new S3Client({
...s3Config,
maxAttempts: 0,
});

Pretty sure that maxAttempts: 0, is working also for unauthenticated client ?

Comment on lines +80 to +84
return this.s3.send(new DeleteBucketCommand({ Bucket: bucketName }))
.catch(err => {
throw err;
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return this.s3.send(new DeleteBucketCommand({ Bucket: bucketName }))
.catch(err => {
throw err;
});
return await this.s3.send(new DeleteBucketCommand({ Bucket: bucketName }));

One good practice when working with async/await is to always await with return, this will help to preserve the full stack trace (without the await, the stack trace will start at the caller, if you put the await here, the stack trace will display deleteOne

)
.concat((data.DeleteMarkers || [])
.map(object =>
this.s3.send(new DeleteObjectCommand({
Copy link
Contributor

Choose a reason for hiding this comment

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

This indent is weird ?

emptyMany(bucketNames) {
const promises = bucketNames.map(
bucketName => this.empty(bucketName)
const promises = bucketNames.map(
Copy link
Contributor

Choose a reason for hiding this comment

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

Indent issue ?

return Promise.all(promises);
}

emptyIfExists(bucketName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think our guidelines ask us to add a new line between function definition ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch missed it here

request.on('build', () => {
request.httpRequest.headers['x-scal-s3-version-id'] = vID;
});
// Add custom header using middleware
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Add custom header using middleware

}
cb(null, data);
})
.catch(err => cb(err));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.catch(err => cb(err));
.catch(cb);

Comment on lines 154 to 156
.catch(err => {
cb(err);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

`catch(cb)

Comment on lines 377 to 358
.catch(err => {

if (!s3Config.isQuotaInflightEnabled()) {
mockScuba.incrementBytesForBucket(bucket, size);
}
return callback(err);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.catch(err => {
if (!s3Config.isQuotaInflightEnabled()) {
mockScuba.incrementBytesForBucket(bucket, size);
}
return callback(err);
});
.catch(err => {
if (!s3Config.isQuotaInflightEnabled()) {
mockScuba.incrementBytesForBucket(bucket, size);
}
return callback(err);
});

nits

}),
next => {
putObject(bucket, key, size, err => {
assert.strictEqual(err.Code, 'QuotaExceeded');
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, I'm not sure the callback will be called ?

@bert-e
Copy link
Contributor

bert-e commented Oct 2, 2025

Incorrect fix version

The Fix Version/s in issue CLDSRV-724 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.1.5

Please check the Fix Version/s of CLDSRV-724, or the target
branch of this pull request.

@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-sur-utapi-tests branch 3 times, most recently from 3aa5ada to 61f8a03 Compare October 10, 2025 12:57
As test files depend on these utilities,
they needed to be adapted to match the sdk v3
requirements.

Issue: CLDSRV-724
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-sur-utapi-tests branch 2 times, most recently from 5ff3711 to 1f24c59 Compare October 10, 2025 15:09
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-sur-utapi-tests branch from 1f24c59 to adb7ac5 Compare October 10, 2025 15:10
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.

4 participants