-
Notifications
You must be signed in to change notification settings - Fork 253
Improvement/cldsrv 724-backbeat-related-functional-tests #5985
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: improvement/CLDSRV-724-service-get-related-functional-tests
Are you sure you want to change the base?
Conversation
72dd6ed to
cd35cca
Compare
425731c to
2b9959d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files
... 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
8c9eb10 to
3ab4eae
Compare
17d2fcb to
198582c
Compare
2c806e4 to
836c556
Compare
26ce909 to
8383cf9
Compare
cd35cca to
0fec989
Compare
| if (attempt < MAX_VERSIONING_CHECKS) { | ||
| await new Promise(resolve => setTimeout(resolve, VERSIONING_CHECK_INTERVAL)); | ||
| } else { | ||
| if (callback) { |
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.
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({ |
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.
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); |
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.
do you remember what happened here that you need to do this change ?
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.
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.
SylvainSenechal
left a comment
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.
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
DarkIsDude
left a comment
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.
Congrats again. Sylvain did a good review, not a lot to add more
.github/workflows/tests.yaml
Outdated
| password: ${{ secrets.ARTIFACTS_PASSWORD }} | ||
| source: /tmp/artifacts | ||
| if: always() | ||
| # ceph-backend-test: |
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.
Just delete them ? We have githistory if needed
lib/data/wrapper.js
Outdated
| client = new DataFileInterface(config); | ||
| implName = 'file'; | ||
| } else if (config.backends.data === 'multiple') { | ||
| Object.keys(config.locationConstraints).filter(k => |
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.
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 || ''; |
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.
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 |
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.
| // This was expected to be an error, but we got success |
| }) | ||
| .then(data => { | ||
| // eslint-disable-next-line no-unused-vars | ||
| const {$metadata, ...aclData} = data; |
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.
Why this eslint ? Is really not used ? a good practice is to do add a why at the end of a lint disable instruction
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.
$metadata won't be used , that's why
| 'backend successfully', done => { | ||
| const key = `somekey-${genUniqID()}`; | ||
| async.waterfall([ | ||
| next => waitForVersioningBeforePut(s3, bucket, 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.
Same here and following iteration
| next => { | ||
| s3.send(new AbortMultipartUploadCommand(paramsAzure)) | ||
| .then(() => next()) | ||
| .catch(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 => { | |
| 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(() => { |
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 don't have a limit on the retry ?
| }); | ||
| }); | ||
| }); | ||
|
|
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.
| })) | ||
| .then(() => next()) | ||
| .catch(next), | ||
| next => s3.send(new DeleteObjectCommand({ Bucket: testBucket, Key: keyName1 })) |
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.
Here too (and it's not the only one)
| next => s3.send(new DeleteObjectCommand({ Bucket: testBucket, Key: keyName1 })) | |
| async () => s3.send(new DeleteObjectCommand({ Bucket: testBucket, Key: keyName1 })), |
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'd rather keep the next here it's part of a chain
3a0af19 to
7e3a81d
Compare
94d9c72 to
ce181cb
Compare
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