refactor getReplicationInfo into object parameters#6232
Conversation
Hello sylvainsenechal,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
13f735e to
e42d8b6
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the internal getReplicationInfo helper (used across S3 object and Backbeat replication paths) to take a single named-parameters object, improving call-site clarity and making optional arguments more explicit.
Changes:
- Refactored
getReplicationInfofrom positional arguments to a{ ...params }object and updated its JSDoc accordingly. - Updated all in-repo call sites to the new invocation style (object ops, Backbeat route, metadata ACL).
- Updated unit tests for
getReplicationInfoto use the new signature.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
lib/api/apiUtils/object/getReplicationInfo.js |
Changes function signature to a params object and updates JSDoc/parameter handling. |
lib/api/apiUtils/object/createAndStoreObject.js |
Updates replicationInfo generation to call getReplicationInfo({ ... }). |
lib/api/completeMultipartUpload.js |
Updates call site to pass named params (including operationType). |
lib/api/objectCopy.js |
Updates call site to pass named params (incl. objSize). |
lib/api/objectDeleteTagging.js |
Updates call site to pass named params for replication stamping on tagging delete. |
lib/api/objectPutLegalHold.js |
Updates call site to pass named params for replication stamping on legal-hold updates. |
lib/api/objectPutRetention.js |
Updates call site to pass named params for replication stamping on retention updates. |
lib/api/objectPutTagging.js |
Updates call site to pass named params for replication stamping on tagging updates. |
lib/metadata/acl.js |
Updates call site to pass named params for replication backend role checks. |
lib/routes/routeBackbeat.js |
Updates replication “next hop” computation call to use named params. |
tests/unit/api/apiUtils/getReplicationInfo.js |
Updates unit tests to use the new getReplicationInfo({ ... }) API. |
benzekrimaha
left a comment
There was a problem hiding this comment.
LGTM , one minor none blocking comment. well done
e42d8b6 to
9f11019
Compare
|
/approve |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
... and 1 file with indirect coverage changes @@ Coverage Diff @@
## development/9.4 #6232 +/- ##
===================================================
+ Coverage 86.08% 86.13% +0.04%
===================================================
Files 212 212
Lines 14495 14496 +1
===================================================
+ Hits 12478 12486 +8
+ Misses 2017 2010 -7
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
This pull request did not target the following hotfix branch(es) so they
Please check the status of the associated issue CLDSRV-950. Goodbye sylvainsenechal. The following options are set: approve |
Issue: CLDSRV-950
Refactor getReplicationInfo with object parameters
Not super useful but we said we would do it during the crr cascade so here we are