Skip to content

Pass instanceId to mongodb metadata backend #5826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: development/8.8
Choose a base branch
from

Conversation

Kerkesni
Copy link
Contributor

@Kerkesni Kerkesni commented Jun 12, 2025

instanceId will be used when generating versionIds.
This will ensure uniqueness of the versionID across
all Cloudserver pods in the cluster.

The instanceId is a combination of the short hash
contained in the name of the pods, which is unique
across all pods within the same deployment, and a
prefix for differenciating the different types of
deployments (internal vs external).

see. https://scality.atlassian.net/wiki/spaces/OS/pages/3225583692/VersionID+Collisions+in+Zenko

Related PR: scality/Arsenal#2445

Issue: CLDSRV-665

@bert-e
Copy link
Contributor

bert-e commented Jun 12, 2025

Hello kerkesni,

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.

Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.10%. Comparing base (b6a78b9) to head (21464a5).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/Config.js 75.54% <100.00%> (+0.22%) ⬆️
lib/metadata/wrapper.js 55.55% <ø> (ø)
@@                    Coverage Diff                     @@
##           improvement/CLDSRV-715    #5826      +/-   ##
==========================================================
+ Coverage                   65.08%   65.10%   +0.02%     
==========================================================
  Files                         188      188              
  Lines                       11948    11956       +8     
==========================================================
+ Hits                         7776     7784       +8     
  Misses                       4172     4172              
Flag Coverage Δ
unit 65.10% <100.00%> (+0.02%) ⬆️

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.

@bert-e
Copy link
Contributor

bert-e commented Jun 12, 2025

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@scality scality deleted a comment from bert-e Jun 12, 2025
Copy link
Contributor

@williamlardier williamlardier left a comment

Choose a reason for hiding this comment

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

LGTM, as discussed, let's add the base62 as the default during tests as well, so we are actually testing what is used in production

@Kerkesni Kerkesni force-pushed the bugfix/CLDSRV-665 branch 2 times, most recently from 187bb49 to 526ed7b Compare June 12, 2025 15:05
@Kerkesni Kerkesni force-pushed the bugfix/CLDSRV-665 branch from 526ed7b to 892f4cd Compare June 12, 2025 15:15
@Kerkesni Kerkesni force-pushed the bugfix/CLDSRV-665 branch 2 times, most recently from 06d051c to 85ab804 Compare July 1, 2025 17:00
@Kerkesni Kerkesni changed the title remove hardcoded replicationGroupId and generate from pod name Pass instanceId to mongodb metadata backend Jul 1, 2025
@Kerkesni
Copy link
Contributor Author

Kerkesni commented Jul 1, 2025

Note for reviewers, i updated this PR following the changes in the TAD.
We no longer use the replicationGroupId as a local unique id but a new field called instanceId.

@williamlardier
Copy link
Contributor

@Kerkesni do we want to target 8.8? Some clients might not be ready to upgrade to the latest product version right away

@Kerkesni Kerkesni force-pushed the bugfix/CLDSRV-665 branch from 85ab804 to 6db3320 Compare July 2, 2025 09:08
@Kerkesni Kerkesni changed the base branch from development/9.0 to development/8.8 July 2, 2025 09:08
@bert-e
Copy link
Contributor

bert-e commented Jul 2, 2025

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@scality scality deleted a comment from bert-e Jul 2, 2025
@Kerkesni
Copy link
Contributor Author

Kerkesni commented Jul 2, 2025

@williamlardier yes forgot about that part, thanks

@Kerkesni Kerkesni force-pushed the bugfix/CLDSRV-665 branch 3 times, most recently from 735f683 to 3e340d4 Compare July 2, 2025 13:46
Copy link
Contributor

@williamlardier williamlardier left a comment

Choose a reason for hiding this comment

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

lgtm otherwise, but let's wait for the finalized Arsenal part

@Kerkesni Kerkesni force-pushed the bugfix/CLDSRV-665 branch 5 times, most recently from d1c6b67 to a7fd024 Compare July 15, 2025 15:52
Kerkesni added 3 commits July 15, 2025 18:07

Verified

This commit was signed with the committer’s verified signature.
Kerkesni Walid El Ansari
instanceId will be used when generating versionIds.
This will ensure uniqueness of the versionID across
all Cloudserver pods in the cluster.

The instanceId is a combination of the short hash
contained in the name of the pods, which is unique
across all pods within the same deployment, and a
prefix for differenciating the different types of
deployments (internal vs external).

see. https://scality.atlassian.net/wiki/spaces/OS/pages/3225583692/VersionID+Collisions+in+Zenko

Issue: CLDSRV-665

Verified

This commit was signed with the committer’s verified signature.
Kerkesni Walid El Ansari
Cloudserver in Zenko always uses base62 encoding, so we enforce
it in the mongo tests.

Issue: CLDSRV-665

Verified

This commit was signed with the committer’s verified signature.
Kerkesni Walid El Ansari
@Kerkesni Kerkesni force-pushed the bugfix/CLDSRV-665 branch from a7fd024 to 21464a5 Compare July 15, 2025 16:11
@Kerkesni Kerkesni changed the base branch from development/8.8 to improvement/CLDSRV-715 July 15, 2025 16:11
Base automatically changed from improvement/CLDSRV-715 to development/8.8 July 16, 2025 15:20
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.

None yet

4 participants