Call config.isQuotaEnabled instead of testing the reference - #6253
Open
delthas wants to merge 2 commits into
Open
Call config.isQuotaEnabled instead of testing the reference#6253delthas wants to merge 2 commits into
delthas wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files
@@ Coverage Diff @@
## improvement/CLDSRV-971/quota-metrics-retrieval-code-label #6253 +/- ##
=============================================================================================
- Coverage 86.38% 86.36% -0.02%
=============================================================================================
Files 212 212
Lines 14567 14567
=============================================================================================
- Hits 12583 12581 -2
- Misses 1984 1986 +2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
delthas
marked this pull request as ready for review
August 12, 2026 14:09
SylvainSenechal
approved these changes
Aug 12, 2026
delthas
force-pushed
the
improvement/CLDSRV-972/call-isquotaenabled
branch
from
August 12, 2026 15:33
b448fe5 to
d580a11
Compare
delthas
requested review from
francoisferrand
and removed request for
benzekrimaha
August 13, 2026 07:49
Contributor
Author
|
Requested @francoisferrand in place of Maha Benzekri, who is currently on PTO. |
Both quota gates in monitoringHandler tested the function reference rather than calling it, so both were always true. The two bugs cancelled out: metrics were always registered, so crrCacheToProm never reached an unregistered gauge. Fixing only the registration gate would crash it, and would also crash the metric observation in the scuba wrapper, which the Veeam capacity route reaches with no quota gating at all -- in a finally block, so the TypeError would replace the original error. Guard every metric touch point so each tolerates a metric that was never registered. Note this changes an operator-visible surface: the six s3_cloudserver_quota_* metrics are now absent when quota is disabled. Issue: CLDSRV-972
delthas
force-pushed
the
improvement/CLDSRV-972/call-isquotaenabled
branch
from
August 13, 2026 08:10
d580a11 to
fcefd5a
Compare
Base automatically changed from
improvement/CLDSRV-971/quota-metrics-retrieval-code-label
to
development/9.4
August 13, 2026 08:39
Contributor
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lib/utilities/monitoringHandler.jsgated quota metrics onconfig.isQuotaEnabled— the function reference, not a call — at two sites,so both were always true.
The two bugs cancelled out. Because the registration gate was always true all
six quota metrics always existed, so the always-true gate in
crrCacheToPromnever touched an unregistered gauge. Fixing only the registration site would
crash it, and would also crash the metric observation in the scuba wrapper,
which the Veeam capacity route reaches with no quota gating at all
(
lib/routes/veeam/list.js,lib/routes/veeam/utils.js) — in afinallyblock, so the
TypeErrorwould replace the original error. Every metric touchpoint is therefore guarded to tolerate a metric that was never registered:
three in the scuba wrapper, three in
quotaUtils.js.This changes an operator-visible surface: the six
s3_cloudserver_quota_*metrics are now absent when quota is disabled, where previously they were
always registered. Anything scraping or alerting on them in a non-quota
deployment will see them disappear.
An alternative, recorded on the ticket, is to drop the dead conditional and
register unconditionally — preserving today's behaviour exactly with no
metric-surface change.
Issue: CLDSRV-972