Skip to content

Conversation

@benzekrimaha
Copy link
Contributor

@benzekrimaha benzekrimaha commented Oct 23, 2025

Please note that this PR also takles the rest of the unmigrated code , better to review it by commit to have the context

Issue: CLDSRV-724

@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-service-get-related-functional-tests branch 3 times, most recently from 72dd6ed to cd35cca Compare October 28, 2025 15:59
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-backbeat-related-functional-tests branch 2 times, most recently from 425731c to 2b9959d Compare October 28, 2025 16:03
@scality scality deleted a comment from codecov bot Nov 5, 2025
@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.35%. Comparing base (0fec989) to head (df480a2).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
lib/routes/routeBackbeat.js 33.33% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/routes/routeBackbeat.js 75.79% <33.33%> (+2.40%) ⬆️

... and 28 files with indirect coverage changes

@@                                       Coverage Diff                                       @@
##           improvement/CLDSRV-724-service-get-related-functional-tests    #5985      +/-   ##
===============================================================================================
+ Coverage                                                        81.00%   84.35%   +3.34%     
===============================================================================================
  Files                                                              204      204              
  Lines                                                            12890    12899       +9     
===============================================================================================
+ Hits                                                             10442    10881     +439     
+ Misses                                                            2448     2018     -430     
Flag Coverage Δ
file-ft-tests 67.55% <0.00%> (+7.42%) ⬆️
kmip-ft-tests 28.11% <0.00%> (+<0.01%) ⬆️
mongo-v0-ft-tests 68.78% <0.00%> (+7.30%) ⬆️
mongo-v1-ft-tests 68.88% <0.00%> (+7.42%) ⬆️
multiple-backend 35.23% <0.00%> (-0.03%) ⬇️
sur-tests 36.35% <0.00%> (+0.78%) ⬆️
sur-tests-inflights 37.39% <0.00%> (-0.03%) ⬇️
unit 69.90% <33.33%> (-0.03%) ⬇️
utapi-v2-tests 34.22% <0.00%> (-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-backbeat-related-functional-tests branch 5 times, most recently from 8c9eb10 to 3ab4eae Compare November 13, 2025 10:44
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-backbeat-related-functional-tests branch 2 times, most recently from 17d2fcb to 198582c Compare November 20, 2025 17:19
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-backbeat-related-functional-tests branch 3 times, most recently from 2c806e4 to 836c556 Compare November 28, 2025 15:18
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-backbeat-related-functional-tests branch 2 times, most recently from 26ce909 to 8383cf9 Compare December 2, 2025 17:24
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-service-get-related-functional-tests branch from cd35cca to 0fec989 Compare December 4, 2025 06:39
@benzekrimaha benzekrimaha changed the title Improvement/cldsrv 724 backbeat related functional tests Improvement/cldsrv 724-backbeat-related-functional-tests Dec 4, 2025
if (attempt < MAX_VERSIONING_CHECKS) {
await new Promise(resolve => setTimeout(resolve, VERSIONING_CHECK_INTERVAL));
} else {
if (callback) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if we've reached max attempt, and get bucket versioning doesnt't fail but also doesn't return status enabled, should'nt this return an error ?

it('should return 404 and NoSuchBucket', done => {
const badBucketName = `nonexistingbucket-${genUniqID()}`;
gcpClient.getBucket({
gcpClient.listObjects({
Copy link
Contributor

Choose a reason for hiding this comment

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

Why changing from getBucket to listObject ? I guess the test is still valid because listObject will also return noSuchBucket but still, here we want to test the getBucket api I think

* round robin is confined to each nodejs cluster processes
*/
const APPROX = Math.floor(0.1 * TOTAL_OBJECTS_PER_NODE);
const APPROX = Math.ceil(0.2 * TOTAL_OBJECTS_PER_NODE);
Copy link
Contributor

Choose a reason for hiding this comment

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

do you remember what happened here that you need to do this change ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The old Math.floor(0.1 * TOTAL_OBJECTS_PER_NODE) let counts drift only ~10% low/high; on the ci we were still failing because a cluster process often handles more than 10%. Switching to Math.ceil(0.2 * TOTAL_OBJECTS_PER_NODE) widens that window to ±20% (and guarantees at least one packet of slack), so we stop treating normal round‑robin skew as a test failure.

Copy link
Contributor

@SylvainSenechal SylvainSenechal left a comment

Choose a reason for hiding this comment

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

bigbig pr again. this time I left a bit more comments but actually not many changes requested, its mostly questions to double check the changes, and make sure we understand why the changes are done because I found 2/3 things were curious

@benzekrimaha benzekrimaha requested review from a team, SylvainSenechal and delthas December 11, 2025 18:40
Copy link
Contributor

@DarkIsDude DarkIsDude left a comment

Choose a reason for hiding this comment

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

Congrats again. Sylvain did a good review, not a lot to add more

password: ${{ secrets.ARTIFACTS_PASSWORD }}
source: /tmp/artifacts
if: always()
# ceph-backend-test:
Copy link
Contributor

Choose a reason for hiding this comment

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

Just delete them ? We have githistory if needed

client = new DataFileInterface(config);
implName = 'file';
} else if (config.backends.data === 'multiple') {
Object.keys(config.locationConstraints).filter(k =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree too, it's weird ?

const expectedLocation = data.LocationConstraint || '';
assert.deepStrictEqual(expectedLocation, '');
// SDK v3 returns undefined for us-east-1, normalize to empty string for comparison
const locationConstraint = data.LocationConstraint || '';
Copy link
Contributor

Choose a reason for hiding this comment

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

Then if I get it right we can check that the value is undefined directly ?

done();
}
} else if (testResult && typeof testResult === 'object' && testResult.code) {
// This was expected to be an error, but we got success
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
// This was expected to be an error, but we got success

})
.then(data => {
// eslint-disable-next-line no-unused-vars
const {$metadata, ...aclData} = data;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this eslint ? Is really not used ? a good practice is to do add a why at the end of a lint disable instruction

Copy link
Contributor Author

Choose a reason for hiding this comment

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

$metadata won't be used , that's why

'backend successfully', done => {
const key = `somekey-${genUniqID()}`;
async.waterfall([
next => waitForVersioningBeforePut(s3, bucket, err => {
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 and following iteration

Comment on lines 285 to 289
next => {
s3.send(new AbortMultipartUploadCommand(paramsAzure))
.then(() => next())
.catch(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 => {
s3.send(new AbortMultipartUploadCommand(paramsAzure))
.then(() => next())
.catch(next);
},
async() => s3.send(new AbortMultipartUploadCommand(paramsAzure)),

we can do that ?

})
.catch(err => {
if (err && err.name === 'NetworkingError') {
setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't have a limit on the retry ?

});
});
});

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

}))
.then(() => next())
.catch(next),
next => s3.send(new DeleteObjectCommand({ Bucket: testBucket, Key: keyName1 }))
Copy link
Contributor

Choose a reason for hiding this comment

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

Here too (and it's not the only one)

Suggested change
next => s3.send(new DeleteObjectCommand({ Bucket: testBucket, Key: keyName1 }))
async () => s3.send(new DeleteObjectCommand({ Bucket: testBucket, Key: keyName1 })),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd rather keep the next here it's part of a chain

@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-backbeat-related-functional-tests branch from 3a0af19 to 7e3a81d Compare December 18, 2025 16:30
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-724-backbeat-related-functional-tests branch from 94d9c72 to ce181cb Compare December 19, 2025 06:24
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