Skip to content

Add initializeBucketCapacity to seed empty-bucket metrics (8.4 backport) - #2680

Merged
bert-e merged 3 commits into
development/8.4from
improvement/ARSN-610/init-bucket-capacity-metric-8.4
Jul 29, 2026
Merged

Add initializeBucketCapacity to seed empty-bucket metrics (8.4 backport)#2680
bert-e merged 3 commits into
development/8.4from
improvement/ARSN-610/init-bucket-capacity-metric-8.4

Conversation

@delthas

@delthas delthas commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Backport of ARSN-610 to development/8.4, cherry-picked from development/8.5 (PR #2666) with byte-identical patches (prettier pre-commit + fix; only hunk offsets differ due to unrelated divergence) — git merge-tree shows zero conflicts merging toward development/8.5, so the GitWaterFlow cascade auto-resolves on everything except the usual package.json version line.

Adds the public MongoClientInterface.initializeBucketCapacity method (exposed via MetadataWrapper) that idempotently inserts a zero-value bucket metric document in __infostore ($setOnInsert upsert, never overwrites a real count-items document).

Motivation for the backport: enable cherry-picking CLDSRV-949 (seed quota/capacity metrics at bucket creation) onto cloudserver development/9.3, which pins arsenal 8.4.x — part of the RD-2109 / ARTESCA-17063 fix chain.

Also bumps package.json to 8.4.22 — expect the usual cascade conflict on the version line at 8.5.

Issue: ARSN-610

delthas added 3 commits July 29, 2026 11:35
Isolates prettier reformatting of files that were already
prettier-dirty on development/8.5, so the functional change commit
that follows stays prettier-clean.

Issue: ARSN-610
(cherry picked from commit a8660a5)
Add a MongoClientInterface method that idempotently inserts a
zero-value bucket capacity document into __infostore when none
exists (upsert with $setOnInsert, so an existing count-items
document with real values is never overwritten). Exposed through
MetadataWrapper (no-op for non-mongodb backends).

This lets CloudServer seed a metric document at bucket creation
(or when a quota is enabled on an empty bucket) so bucket quota
checks are served before the periodic count-items job runs.

Issue: ARSN-610
(cherry picked from commit a03b468)
@bert-e

bert-e commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Hello delthas,

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.

@scality scality deleted a comment from bert-e Jul 29, 2026
@bert-e

bert-e commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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.

Comment thread lib/storage/metadata/mongoclient/MongoClientInterface.ts
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.07317% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.39%. Comparing base (83072fd) to head (64484be).

Files with missing lines Patch % Lines
lib/storage/metadata/MetadataWrapper.js 58.46% 27 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           development/8.4    #2680   +/-   ##
================================================
  Coverage            74.38%   74.39%           
================================================
  Files                  229      229           
  Lines                18519    18535   +16     
  Branches              3804     3807    +3     
================================================
+ Hits                 13776    13789   +13     
- Misses                4738     4741    +3     
  Partials                 5        5           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@delthas
delthas requested review from a team, SylvainSenechal, benzekrimaha and francoisferrand and removed request for francoisferrand July 29, 2026 09:48
@delthas

delthas commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

/approve

@scality scality deleted a comment from bert-e Jul 29, 2026
@bert-e

bert-e commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/8.4

  • ✔️ development/8.5

The following branches have NOT changed:

  • development/6.4
  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.1
  • development/8.2
  • development/8.3

This pull request did not target the following hotfix branch(es) so they
were left untouched:

  • hotfix/7.8.0
  • hotfix/7.4.4
  • hotfix/7.70.25
  • hotfix/7.7.0
  • hotfix/7.4.2
  • hotfix/7.4.5
  • hotfix/7.10.3
  • hotfix/7.10.29
  • hotfix/7.4.1
  • hotfix/7.2.0
  • hotfix/7.10.36
  • hotfix/7.5.0
  • hotfix/7.10.1
  • hotfix/7.10.47
  • hotfix/7.10.46
  • hotfix/7.10.4
  • hotfix/7.70.14
  • hotfix/7.10.0
  • hotfix/7.4.3
  • hotfix/7.4.7
  • hotfix/8.2.48
  • hotfix/7.9.0
  • hotfix/7.4.6
  • hotfix/7.70.4
  • hotfix/7.10.57
  • hotfix/7.10.31
  • hotfix/7.4.9
  • hotfix/7.4.8
  • hotfix/7.70.20
  • hotfix/6.4.7
  • hotfix/7.4.10
  • hotfix/7.4.0
  • hotfix/7.6.0
  • hotfix/7.10.43
  • hotfix/7.10.2

Please check the status of the associated issue ARSN-610.

Goodbye delthas.

The following options are set: approve

@bert-e
bert-e merged commit 64484be into development/8.4 Jul 29, 2026
12 of 14 checks passed
@bert-e
bert-e deleted the improvement/ARSN-610/init-bucket-capacity-metric-8.4 branch July 29, 2026 14:42
@delthas

delthas commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

/release

@delthas

delthas commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Release summary:

  • development/8.4: releasing 8.4.22
  • development/8.5: skipped — tag 8.5.12 already exists (not bumped, or already released)

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.

4 participants