Skip to content

Conversation

@benzekrimaha
Copy link
Contributor

Issue: CLDSRV-826

@bert-e
Copy link
Contributor

bert-e commented Jan 14, 2026

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 Jan 14, 2026

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-826 branch from 1ac5fba to 5baf746 Compare January 14, 2026 17:32
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-826 branch from 5baf746 to ea9cb65 Compare January 14, 2026 17:34
@benzekrimaha benzekrimaha marked this pull request as ready for review January 14, 2026 17:34
@benzekrimaha benzekrimaha requested review from a team, SylvainSenechal, delthas, francoisferrand and maeldonn and removed request for delthas and maeldonn January 14, 2026 17:35
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.26%. Comparing base (247b008) to head (b5f9d21).
⚠️ Report is 30 commits behind head on development/9.3.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph
see 1 file with indirect coverage changes

@@                 Coverage Diff                 @@
##           development/9.3    #6044      +/-   ##
===================================================
- Coverage            84.29%   84.26%   -0.04%     
===================================================
  Files                  204      204              
  Lines                12962    12962              
===================================================
- Hits                 10926    10922       -4     
- Misses                2036     2040       +4     
Flag Coverage Δ
file-ft-tests 67.39% <ø> (-0.04%) ⬇️
kmip-ft-tests 28.08% <ø> (ø)
mongo-v0-ft-tests 68.64% <ø> (-0.11%) ⬇️
mongo-v1-ft-tests 68.73% <ø> (ø)
multiple-backend 35.23% <ø> (ø)
sur-tests 35.56% <ø> (-0.81%) ⬇️
sur-tests-inflights 37.43% <ø> (ø)
unit 69.89% <ø> (ø)
utapi-v2-tests 34.23% <ø> (ø)

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.

return gcpClient.send(command)
.then(data => callback(null, data))
.catch(err => {
if (err && err.$metadata && err.$metadata.httpStatusCode &&
Copy link
Contributor

@SylvainSenechal SylvainSenechal Jan 15, 2026

Choose a reason for hiding this comment

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

no need to check if err exists here. I think err.$metadata.httpstatus code will always be defined.
Probably same for statusCode, gotta call the api once to verify but I feel like we shouldn't have to check if its defined or not

before(done => {
config = getRealAwsConfig(credentialOne);
gcpClient = new GCP(config);
gcpClient.listObjects = (params, callback) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to understand : this was available in Arsenal GcpService but you just removed it and now you are redefining it in all these files, why not keeping it in Arsenal ? I think the GcpService already has several functions that are used for tests only 🤔
Or is it because you want to reassign the statusCode ?

Copy link
Contributor

@SylvainSenechal SylvainSenechal Jan 15, 2026

Choose a reason for hiding this comment

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

Upon looking : consider updating the gcpClientRetry function : check err.$metadata.statuscode == 429 on top of the existing check err.statusCode == 429.
This way, can keep listObjects in Arsenal. (unless there are other reason I didn't see)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

even if we added the $metadata.httpStatusCode check inside gcpClientRetry, we still need bespoke error munging in these raw-node tests. Rather than keeping a half-working helper in Arsenal plus a bunch of local overrides, I’d rather keep the shared GcpService minimal and let the tests own whatever extra plumbing they require.

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.

Don't forget to use real arsenal version in package json
Just one comment to address about the gcpClient.listObjects, maybe can consider a utility function at least, or even better keep it in Arsenal

@SylvainSenechal SylvainSenechal dismissed their stale review January 15, 2026 10:48

some more comments to address

@benzekrimaha benzekrimaha changed the title Improvement/cldsrv 826 Cloudserver adaptation post arsenal refacto Jan 19, 2026
As these functions are only used in GCP tests,
we decided to remove them from gcpService. This commit
updates the tests accordingly using the new send command
directly and enabling us to drop the wrapper functions.
Issue: CLDSRV-826
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-826 branch from b7e25d5 to bd529bb Compare January 19, 2026 16:38
Copy link
Contributor

@francoisferrand francoisferrand left a comment

Choose a reason for hiding this comment

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

in addition to the comments overall, there is something weird in these test: we use GCP client from arsenal, yet at the same time there is a re-implementation of GCP without the sdk (c.f. makeGcpRequest, retryGcpRequest...)

this should probably be changed, to do things consistently: either with GCP client (to maximize code reuse), or with a custom implementation, or directly with the GCP sdk (if we want to ensure the test code is independent form the production code, and failure would thus only happen due to change in production code)

Comment on lines +19 to +47
gcpClient.listObjects = (params, callback) => {
const command = new ListObjectsCommand(params);
return gcpClient.send(command)
.then(data => callback(null, data))
.catch(err => {
if ( err.statusCode === undefined) {
// eslint-disable-next-line no-param-reassign
err.statusCode = err.$metadata.httpStatusCode;
}
return callback(err);
});
};

gcpClient.getBucket = (params, callback) =>
gcpClient.headBucket(params, (err, res) => {
if (err) {
if (err.statusCode === undefined) {
// eslint-disable-next-line no-param-reassign
err.statusCode = err.$metadata.httpStatusCode;
}
if (err.$metadata && err.$metadata.httpStatusCode === 404) {
// eslint-disable-next-line no-param-reassign
err.name = 'NoSuchBucket';
}
return callback(err);
}
return callback(null, res);
});

Copy link
Contributor

Choose a reason for hiding this comment

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

why keep these "legacy" functions, and not migrate the actual tests to the new SDK api?
since this PR is focused, it does not seem like a large change...

config = getRealAwsConfig(credentialOne);
gcpClient = new GCP(config);
gcpClient.listObjects = (params, callback) => {
const command = new ListObjectsCommand(params);
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above, should migrate each test? (and avoid duplicating this piece of code)

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.

5 participants