Skip to content

refactor getReplicationInfo into object parameters#6232

Open
SylvainSenechal wants to merge 1 commit into
development/9.4from
improvement/CLDSRV-950
Open

refactor getReplicationInfo into object parameters#6232
SylvainSenechal wants to merge 1 commit into
development/9.4from
improvement/CLDSRV-950

Conversation

@SylvainSenechal

@SylvainSenechal SylvainSenechal commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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

@bert-e

bert-e commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Hello sylvainsenechal,

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

bert-e commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

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

  • the author

  • 2 peers

@SylvainSenechal
SylvainSenechal force-pushed the improvement/CLDSRV-950 branch from 13f735e to e42d8b6 Compare July 21, 2026 18:59
@SylvainSenechal
SylvainSenechal requested review from a team, benzekrimaha, Copilot and delthas July 21, 2026 20:15
@SylvainSenechal
SylvainSenechal marked this pull request as ready for review July 21, 2026 20:15
@SylvainSenechal
SylvainSenechal requested a review from maeldonn July 21, 2026 20:16
@SylvainSenechal
SylvainSenechal removed the request for review from delthas July 21, 2026 20:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 getReplicationInfo from 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 getReplicationInfo to 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.

* @param {string} params.objKey - The key of the object
* @param {object} params.bucketMD - The bucket metadata
* @param {boolean} params.isMD - Whether the operation is only updating metadata
* @param {number} params.objSize - The size, in bytes, of the object being PUT
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.

3 participants