Skip to content

Conversation

@DarkIsDude
Copy link
Contributor

@DarkIsDude DarkIsDude self-assigned this Jan 8, 2026
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.34%. Comparing base (f626fcb) to head (3ceb257).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
lib/api/bucketGet.js 72.72% 6 Missing ⚠️

❌ Your patch check has failed because the patch coverage (73.91%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/api/metadataSearch.js 76.38% <100.00%> (+0.33%) ⬆️
lib/routes/veeam/list.js 97.50% <ø> (ø)
lib/api/bucketGet.js 92.85% <72.72%> (-3.39%) ⬇️
@@                                     Coverage Diff                                     @@
##           feature/CLDSRV-812/list-objects-v2-optional-permissions    #6043      +/-   ##
===========================================================================================
- Coverage                                                    84.36%   84.34%   -0.02%     
===========================================================================================
  Files                                                          204      204              
  Lines                                                        12935    12957      +22     
===========================================================================================
+ Hits                                                         10912    10928      +16     
- Misses                                                        2023     2029       +6     
Flag Coverage Δ
file-ft-tests 67.37% <30.43%> (-0.07%) ⬇️
kmip-ft-tests 28.08% <0.00%> (-0.05%) ⬇️
mongo-v0-ft-tests 68.63% <34.78%> (-0.07%) ⬇️
mongo-v1-ft-tests 68.62% <34.78%> (-0.07%) ⬇️
multiple-backend 35.33% <26.08%> (-0.03%) ⬇️
sur-tests 36.42% <4.34%> (+0.74%) ⬆️
sur-tests-inflights 37.43% <4.34%> (-0.07%) ⬇️
unit 69.99% <69.56%> (+0.05%) ⬆️
utapi-v2-tests 34.35% <26.08%> (-0.02%) ⬇️

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.

@DarkIsDude DarkIsDude force-pushed the feature/CLDSRV-813/optional-attributes-response branch 3 times, most recently from 1fde211 to a8eba02 Compare January 9, 2026 11:13
@DarkIsDude DarkIsDude requested review from a team, benzekrimaha and maeldonn January 9, 2026 11:46
for (const version of versions) {
if (version.value) {
version.value.uploadId = undefined;
version.value.restoreStatus = undefined;
Copy link
Contributor

@francoisferrand francoisferrand Jan 11, 2026

Choose a reason for hiding this comment

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

why do we need to clear RestoreStatus from all of these tests?

RestoreStatus is only set by cold storage, so will not be set in most case : so seems best to keep this "as is" and handle the cold-storage tests

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 issue is that we call directly metadata.listObject in tests. Regarding arsenal PR, the restoreStatus attribute will be returned as soon as we have an archive field.

And we have a diff. The issue is that the versionBefore do a fakeMetadataArchive that update the object. So the version before contains it. This is not done in the second one (versionAfter) and so we have this diff. Regarding the test, that make sense and our API don't change, here we have this diff just because we don't call our API but internal arsenal function.


for (const version of versions) {
if (version.value) {
version.value.restoreStatus = undefined;
Copy link
Contributor

@francoisferrand francoisferrand Jan 11, 2026

Choose a reason for hiding this comment

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

why do we need to clear RestoreStatus in every test?

all APIs should behave the same as before, so you should not need to tweak the tests
(and resetting restoreStatus may be expected -if anywhere- only in tests where you do actually invoke the list object v2 api with optional attributes)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

assert.strictEqual(err, null);
assert.strictEqual(result.ListBucketResult.$.xmlns, 'http://s3.amazonaws.com/doc/2006-03-01/');
done();
});
Copy link
Contributor

Choose a reason for hiding this comment

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

would be nice to have some functional tests as well : i.e. tests using the AWS sdk to retrieve the values from a running cloudserver service.

As an extra benefit, it would also provide an exemple of how to use the API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's done, thanks for the suggestion. It was a good idea 🙏

@DarkIsDude DarkIsDude force-pushed the feature/CLDSRV-813/optional-attributes-response branch 3 times, most recently from 3711fb9 to 037e011 Compare January 13, 2026 15:03
@DarkIsDude DarkIsDude force-pushed the feature/CLDSRV-813/optional-attributes-response branch from 037e011 to 9ba243d Compare January 14, 2026 13:39
@DarkIsDude DarkIsDude force-pushed the feature/CLDSRV-813/optional-attributes-response branch from b8457d5 to 0d9a18a Compare January 14, 2026 14:38
@DarkIsDude DarkIsDude force-pushed the feature/CLDSRV-813/optional-attributes-response branch from 0d9a18a to 3ceb257 Compare January 14, 2026 14:41
@maeldonn maeldonn removed their request for review January 14, 2026 17:00
}
});

it('should return an XML if the header is only RestoreStatus even without permission', async () => {
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
it('should return an XML if the header is only RestoreStatus even without permission', async () => {
it('should always return an XML when the header is RestoreStatus, async () => {

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