Skip to content

Conversation

@benzekrimaha
Copy link
Contributor

@benzekrimaha benzekrimaha commented Aug 12, 2025

Issue: ARSN-514

Please note that a ticket has been creaed to add coverage not to make this PR more extended : https://scality.atlassian.net/browse/ARSN-524

@bert-e
Copy link
Contributor

bert-e commented Aug 12, 2025

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.

@benzekrimaha benzekrimaha changed the base branch from development/8.2 to development/8.3 September 18, 2025 09:52
@bert-e
Copy link
Contributor

bert-e commented Sep 18, 2025

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/ARSN-514 branch 2 times, most recently from f8e5940 to 942aa25 Compare September 18, 2025 13:02
@benzekrimaha benzekrimaha marked this pull request as ready for review September 18, 2025 13:02
@benzekrimaha benzekrimaha changed the title Improvement/arsn 514 AWS-SDK Migration Sep 18, 2025
@scality scality deleted a comment from bert-e Sep 18, 2025
@scality scality deleted a comment from bert-e Sep 18, 2025
@scality scality deleted a comment from codecov bot Sep 18, 2025
@SylvainSenechal
Copy link
Contributor

SylvainSenechal commented Sep 19, 2025

Issue: ARSN-514

Please note that a ticket has been creaed to add coverage not to make this PR more extended : https://scality.atlassian.net/browse/ARSN-524

Wait, you say you've got two Jira ticket 514/524, but they both point to this same PR 🤔

});
});

it('should create a new master encryption key', done => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a duplicate of the first test "should support default encryption key per account" 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Up, still here

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

This completes Sylvain's review. I think I covered everything that makes sense given what should probably change, so I'll come back once it's adressed

Comment on lines 308 to 314
listObjects(params, callback) {
return this.send(new ListObjectsCommand(params))
.then(data => callback && callback(null, data))
.catch(err => callback && callback(err));
}
Copy link

Choose a reason for hiding this comment

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

It could make sense to switch this file to ts, but the callback should be required?

If no you can do that

Suggested change
listObjects(params, callback) {
return this.send(new ListObjectsCommand(params))
.then(data => callback && callback(null, data))
.catch(err => callback && callback(err));
}
listObjects(params, callback) {
return this.send(new ListObjectsCommand(params))
.then(data => callback?.(null, data))
.catch(err => callback?.(err));
}

But better to always call it?

@francoisferrand francoisferrand requested review from a user and SylvainSenechal October 1, 2025 10:44
@scality scality deleted a comment from bert-e Jan 7, 2026
@scality scality deleted a comment from bert-e Jan 7, 2026
@scality scality deleted a comment from bert-e Jan 7, 2026
@scality scality deleted a comment from bert-e Jan 7, 2026
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.

Added a few comments about GCP, I think we are adding lots of dead code: should be cleaned up (but maybe in a followup)

  • GcpClient class in GcpService.js should be renamed to avoid confusion/duplicated type name → #2482 (comment)
  • It seems the functions in GcpApis are not used (they are 'added' in GcpService's class, but not called... some leftover before code was moved "inside" that class maybe, long before this PR ?) → #2482 (comment)
  • the sdk v2 functions added in GcpClient.js seem weird : if we need to keep the old syntax, should be in AwsClient (esp. since the code there is not Gcp-specific) → #2482 (comment) and #2482 (comment)
  • most sdk v2 functions added in GcpService.js seem not to be called → #2482 (comment) and #2482 (comment)
  • code for MPU looks fishy: in GcpClient.js:121 we call this._client.createMultipartUpload but this call was not migrated to new SDK nor implemented in GcpService.js.... and thus I think MPU are not tested with GCP
  • DummyService.js should get cleaned' up → #2482 (comment)

* - MPU (multipart upload) is emulated using GCP's compose/copy APIs.
* - All S3-compatible methods are available, with overrides for GCP quirks.
*/
class GcpClient extends S3Client {
Copy link
Contributor

Choose a reason for hiding this comment

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

should be rename GcpService or GCP to avoid having 2 times the same type, which can only create confusion

Comment on lines +310 to +344
listObjects(params, callback) {
return this.send(new ListObjectsCommand(params))
.then(data => callback?.(null, data))
.catch(err => callback?.(err));
}

putObject(params, callback) {
return this.send(new PutObjectCommand(params))
.then(data => callback?.(null, data))
.catch(err => callback?.(err));
}

getObject(params, callback) {
return this.send(new GetObjectCommand(params))
.then(data => callback?.(null, data))
.catch(err => callback?.(err));
}

deleteObject(params, callback) {
return this.send(new DeleteObjectCommand(params))
.then(data => callback?.(null, data))
.catch(err => callback?.(err));
}

copyObject(params, callback) {
return this.send(new CopyObjectCommand(params))
.then(data => callback?.(null, data))
.catch(err => callback?.(err));
}

headObject(params, callback) {
return this.send(new HeadObjectCommand(params))
.then(data => callback?.(null, data))
.catch(err => callback?.(err));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

if these functions are used/needed (i.e. part of the abstraction), they should be added to AwsClient ;
if not, they should not be added (at all)

* @param {object} params - S3 upload params
* @param {function} callback
*/
upload(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.

all (or most of) these new functions are not used : this class is used as _client in GcpClient (.js), where only the following API are called:
headBucket, creatMultipoartUpdload, completeMultipartUpload, uploadPart, uploadPartCopy and abortMultipartUpload (in addition to the send method inherited from S3Client)

Copy link
Contributor

Choose a reason for hiding this comment

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

actually it is matching: the functions renamed when they are exported, in index.js...

benzekrimaha and others added 17 commits January 7, 2026 18:58
As we can no longer use the Service.defineService
previously used in aws-sdk v2, we have to manually
this commit aims to implement the GCP client
using the new aws-sdk v3 architecture
and migrate the existing code to use it.
Please note that now both the setup and signing
mechanisms had to be re-implemented in the GcpService
file.
Issue: ARSN-514
In this commit several changes were done as aws-sdk v3
happens to be less permissive than v2 in terms of error handling and
stream management. To ensure backward compatibility with existing
functionalities adjustments were made, please refer to
code comments for more details.
Issue: ARSN-514
As the sdk now returns name instead of code for errors,
we need to adapt the error handling accordingly.
Issue: ARSN-514
A security issue was fixed using resolutions in package.json
as the vulnerability is in a transient dependency.
Issue: ARSN-514
@francoisferrand
Copy link
Contributor

/bypass_author_approval

@francoisferrand francoisferrand merged commit 00033b5 into development/8.3 Jan 7, 2026
5 of 7 checks passed
@francoisferrand francoisferrand deleted the improvement/ARSN-514 branch January 7, 2026 18:32
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.

6 participants