Update functional tests to use cloudserverclient extended commands#6103
Update functional tests to use cloudserverclient extended commands#6103maeldonn wants to merge 5 commits intodevelopment/9.3from
Conversation
Hello maeldonn,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 |
package.json
Outdated
| }, | ||
| "devDependencies": { | ||
| "@eslint/compat": "^1.2.2", | ||
| "@scality/cloudserverclient": "github:scality/cloudserverclient#improvement/CLDSRVCLT-10/user-metadata", |
There was a problem hiding this comment.
| "@scality/cloudserverclient": "github:scality/cloudserverclient#improvement/CLDSRVCLT-10/user-metadata", | |
| "@scality/cloudserverclient": "^1.0.5", |
Review by Claude Code |
❌ 8 Tests Failed:
View the top 3 failed test(s) by shortest run time
View the full list of 3 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
DarkIsDude
left a comment
There was a problem hiding this comment.
Your CI is fully broken
5eeb4ea to
6710658
Compare
|
LGTM |
6710658 to
f3cd77a
Compare
Review by Claude Code |
f3cd77a to
651272d
Compare
|
LGTM |
651272d to
59d9e0a
Compare
|
LGTM |
59d9e0a to
b317ddc
Compare
package.json
Outdated
| "dependencies": { | ||
| "@aws-sdk/client-iam": "^3.930.0", | ||
| "@aws-sdk/client-s3": "^3.908.0", | ||
| "@aws-sdk/client-s3": "^3.931.0", |
There was a problem hiding this comment.
The @scality/cloudserverclient dependency pulls in @aws-sdk/client-s3@^3.1009.0 as a transitive dependency. Since package.json only bumps the direct @aws-sdk/client-s3 to ^3.931.0, yarn resolves a single 3.1009.0 instance for both. This means the production @aws-sdk/client-s3 is now forced to 3.1009.0 — a much larger jump than the ^3.931.0 in package.json suggests. Consider aligning the direct dependency version to ^3.1009.0 to make this explicit, or pinning @scality/cloudserverclient peer dependency range to avoid silently pulling the production SDK forward.
— Claude Code
| @@ -224,18 +224,6 @@ describe('GET object', () => { | |||
| await s3.send(new DeleteBucketCommand({ Bucket: bucketName })); | |||
| }); | |||
|
|
|||
There was a problem hiding this comment.
The test for empty bucket name was removed, but the equivalent test in head.js was kept and changed to assert a 405 HTTP status. Was this removal intentional? If the newer SDK now sends the request to the server (instead of rejecting client-side), this test should be updated like head.js rather than deleted, to retain coverage of the server's behavior on empty bucket names.
— Claude Code
Review by Claude Code |
b317ddc to
4b3ce9a
Compare
| }); | ||
| }); | ||
|
|
||
| it('should return NoSuchKey error when no such object', |
There was a problem hiding this comment.
The test for GET object with empty bucket name was removed entirely. Unlike the HEAD bucket test (head.js) which was updated to check the new server-side error behavior, this test was just deleted. If the newer SDK now sends the request to the server instead of rejecting client-side, consider adding a replacement test that asserts the expected server response (as was done for HEAD).
— Claude Code
| }, | ||
| "devDependencies": { | ||
| "@eslint/compat": "^1.2.2", | ||
| "@scality/cloudserverclient": "1.0.7", |
There was a problem hiding this comment.
Adding @scality/cloudserverclient (which depends on @aws-sdk/client-s3@^3.1009.0) as a devDependency causes yarn to deduplicate and resolve the production @aws-sdk/client-s3 from 3.917.0 to 3.1009.0. This is a much larger jump than the ^3.908.0 to ^3.931.0 bump in package.json suggests. Ensure this is intentional and that the 3.1009.0 SDK has been validated against the production server code (not just functional tests).
— Claude Code
|
Unintended production dependency bump: Adding @scality/cloudserverclient (requires @aws-sdk/client-s3 ^3.1009.0) causes yarn deduplication to bump the production @aws-sdk/client-s3 from 3.917.0 to 3.1009.0, far beyond the ^3.931.0 range declared in package.json. Validate this jump against production server code. Consider whether the package.json range should be updated to ^3.1009.0 to make the actual resolved version explicit. |
| "jsonwebtoken": "^9.0.0", | ||
| "nan": "v2.22.0" | ||
| "nan": "v2.22.0", | ||
| "fast-xml-parser": ">=5.5.6" |
There was a problem hiding this comment.
The resolution >=5.5.6 has no upper bound — a future major version (e.g. 6.x) could introduce breaking changes. Pin it more tightly.
```suggestion
"fast-xml-parser": "^5.5.6"
|
fast-xml-parser resolution uses >=5.5.6 which has no upper bound and could pull in breaking major versions. Use ^5.5.6 instead to cap at the current major. |
| "jsonwebtoken": "^9.0.0", | ||
| "nan": "v2.22.0" | ||
| "nan": "v2.22.0", | ||
| "fast-xml-parser": ">=5.5.6" |
There was a problem hiding this comment.
The >=5.5.6 resolution is overly permissive — it allows any future major version of fast-xml-parser, which could introduce breaking changes. Consider pinning to a safe range.suggestion<br> "fast-xml-parser": "^5.5.6"<br>
— Claude Code
Review by Claude Code |
39610f4 to
a5b3c62
Compare
package.json
Outdated
| "jsonwebtoken": "^9.0.0", | ||
| "nan": "v2.22.0" | ||
| "nan": "v2.22.0", | ||
| "fast-xml-parser": "5.3.8" |
There was a problem hiding this comment.
The fast-xml-parser resolution is pinned to an exact version (5.3.8) without a range operator. This means it will not receive patch-level security fixes automatically. Consider using ^5.3.8 or >=5.3.8 unless there is a specific reason to lock this exact version (e.g., a known regression in newer versions). If intentional, a comment in the PR body explaining why would help future maintainers.
— Claude Code
| } catch (err) { | ||
| assert.strictEqual(err.message, 'Empty value provided for input HTTP label: Bucket.'); | ||
| assert.strictEqual(err.$metadata.httpStatusCode, 405); | ||
| assert.strictEqual(err.name, 'Unknown'); |
There was a problem hiding this comment.
The assertion on err.name === 'Unknown' is fragile. If the server returns a proper error code in the future, this test will pass silently even if behavior changes. Consider adding a comment explaining why 'Unknown' is the expected error name here (likely because HEAD responses have no body for error details).
— Claude Code
Review by Claude Code |
a5b3c62 to
58a5074
Compare
| "jsonwebtoken": "^9.0.0", | ||
| "nan": "v2.22.0" | ||
| "nan": "v2.22.0", | ||
| "fast-xml-parser": ">=5.5.6" |
There was a problem hiding this comment.
The fast-xml-parser resolution uses >=5.5.6 which is an open-ended range. This could pull in future major versions with breaking changes. Consider pinning to a tighter range like ^5.5.6.
— Claude Code
| } catch (err) { | ||
| assert.strictEqual(err.message, 'Empty value provided for input HTTP label: Bucket.'); | ||
| assert.strictEqual(err.$metadata.httpStatusCode, 405); | ||
| assert.strictEqual(err.name, 'Unknown'); |
There was a problem hiding this comment.
This test previously validated SDK client-side input checking (err.message). The newer SDK no longer validates empty bucket names client-side and sends the request to the server, returning 405. Asserting on err.name === 'Unknown' is fragile — if CloudServer starts returning a named error for this case, the test breaks silently. Consider also asserting on a more descriptive property if available.
— Claude Code
Overall the refactoring to @scality/cloudserverclient extended commands is a clean improvement. Review by Claude Code |
Issue: CLDSRV-868