Read the quota staleness window from the correct config key - #6251
Conversation
Hello delthas,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:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
@@ Coverage Diff @@
## development/9.4 #6251 +/- ##
================================================
Coverage 86.38% 86.38%
================================================
Files 212 212
Lines 14567 14570 +3
================================================
+ Hits 12583 12586 +3
Misses 1984 1984
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
quota.maxStalenessMS was read as quota.maxStatenessMS, so a value set in config.json was silently ignored and the hardcoded 24h default was used instead. Only QUOTA_MAX_STALENESS_MS could change the window. Validate the setting the way the surrounding options are validated: apply the default, then assert that an explicitly provided value is a positive integer instead of silently falling back on a malformed one. Move the default to constants.js as defaultQuotaMaxStalenessMS. The existing test could not catch this: the fixture set the correctly spelled key to 86400000, which equals the default, so the assertion passed through the fallback branch. Use a distinct value and assert it differs from the default. Issue: CLDSRV-970
73cc245 to
5643934
Compare
|
Requested @DarkIsDude in place of Maha Benzekri, who is currently on PTO. |
|
/approve |
|
!done 2h |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
This pull request does not target the following hotfix branch(es) so they
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue CLDSRV-970. Goodbye delthas. |
|
|
lib/Config.jsread the quota staleness window fromquota.maxStatenessMSinstead of
quota.maxStalenessMS, so a value set inconfig.jsonwassilently ignored and the hardcoded 24h default was used instead. Only the
QUOTA_MAX_STALENESS_MSenvironment variable could change the window.The setting is now validated like the options around it: apply the default,
then assert that an explicitly provided value is a positive integer rather
than silently falling back on a malformed one. The default moves to
constants.jsasdefaultQuotaMaxStalenessMS.The existing test could not catch this. The fixture set the correctly
spelled key to
86400000, which equals the default, so the assertion passedthrough the fallback branch either way. It now uses a distinct value and
asserts that value differs from the default.
Issue: CLDSRV-970