Skip to content

Support configuration overrides for troubleshooting - #2810

Open
francoisferrand wants to merge 3 commits into
development/9.6from
improvement/BB-809
Open

Support configuration overrides for troubleshooting#2810
francoisferrand wants to merge 3 commits into
development/9.6from
improvement/BB-809

Conversation

@francoisferrand

@francoisferrand francoisferrand commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Any configuration field should be changeable per process, without a new image or release, so that support can adjust a setting on a running platform. The named settings only cover the knobs a schema field exists for, and cannot reach objects with unconstrained keys, such as the librdkafka producer parameters.

BACKBEAT_CONFIG_OVERRIDES now holds a JSON document applied to the configuration as a JSON Merge Patch, before validation: the merged result is validated as a whole, so a typo or a wrong type fails at startup rather than leaving the setting silently ignored. Each schema is given the fraction of the patch covering its own fields, applied after the environment variables derived from it, so that nothing silently overrides the escape hatch someone reached for precisely because the usual path did not work.

It is applied over the configuration file and any other setting, so that nothing silently overrides the escape hatch someone reached for precisely because the usual path did not work.

This stays an escape hatch: the named settings remain the supported way to configure backbeat.

Issue: BB-809

Comment thread lib/config/configOverrides.js
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.10%. Comparing base (d054ab6) to head (4b0d390).

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/Config.js 81.81% <100.00%> (+0.67%) ⬆️
lib/config/configOverrides.js 100.00% <100.00%> (ø)
lib/config/envOverrides.js 98.70% <100.00%> (+0.01%) ⬆️

... and 2 files with indirect coverage changes

Components Coverage Δ
Bucket Notification 80.25% <ø> (ø)
Core Library 82.36% <100.00%> (+0.04%) ⬆️
Ingestion 71.37% <ø> (ø)
Lifecycle 80.45% <ø> (ø)
Oplog Populator 85.80% <ø> (ø)
Replication 62.13% <ø> (ø)
Bucket Scanner 85.76% <ø> (ø)
@@                 Coverage Diff                 @@
##           development/9.6    #2810      +/-   ##
===================================================
+ Coverage            76.07%   76.10%   +0.03%     
===================================================
  Files                  203      204       +1     
  Lines                14024    14051      +27     
===================================================
+ Hits                 10669    10694      +25     
- Misses                3345     3347       +2     
  Partials                10       10              
Flag Coverage Δ
api:retry 9.46% <29.03%> (+0.01%) ⬆️
api:routes 9.22% <29.03%> (+0.01%) ⬆️
bucket-scanner 85.76% <ø> (ø)
ft_test:queuepopulator 10.84% <29.03%> (-0.62%) ⬇️
ingestion 12.59% <29.03%> (+0.01%) ⬆️
lib 9.21% <29.03%> (+0.01%) ⬆️
lifecycle 19.61% <29.03%> (-0.01%) ⬇️
notification 1.01% <0.00%> (-0.01%) ⬇️
oplogPopulator 0.13% <0.00%> (-0.01%) ⬇️
replication 19.16% <29.03%> (-0.01%) ⬇️
unit 55.57% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 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.

Comment thread docs/config-overrides.md
Comment thread tests/unit/lib/config/Config.spec.js

@SylvainSenechal SylvainSenechal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • I think this will need a small artesca ticket to document it ? Unless we only want CS to use it and not clients directly 🤔
  • We may wanna exercise config overrides in zenko functional tests. No need to create new specific tests, but for example we have a variable timeFactor to turn one day into a second that maybe we could use it on ?

Comment thread lib/config/configOverrides.js
Comment thread lib/config/configOverrides.js
Base automatically changed from improvement/BB-808 to development/9.6 August 27, 2026 13:13
@bert-e

bert-e commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Hello francoisferrand,

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.
/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 Aug 27, 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

Any configuration field should be changeable per process, without a new
image or release, so that support can adjust a setting on a running
platform. The named settings only cover the knobs a schema field exists
for, and cannot reach objects with unconstrained keys, such as the
librdkafka producer parameters.

BACKBEAT_CONFIG_OVERRIDES now holds a JSON document applied to the
configuration as a JSON Merge Patch, before validation: the merged
result is validated as a whole, so a typo or a wrong type fails at
startup rather than leaving the setting silently ignored. Each
schema is given the fraction of the patch covering its own fields,
applied after the environment variables derived from it, so that
nothing silently overrides the escape hatch someone reached for
precisely because the usual path did not work.

It is applied over the configuration file and any other setting, so
that nothing silently overrides the escape hatch someone reached for
precisely because the usual path did not work.

This stays an escape hatch: the named settings remain the supported
way to configure backbeat.

Issue: BB-809
JSON.parse sets a `__proto__` key as a plain member, so a
`BACKBEAT_CONFIG_OVERRIDES` document naming one had it merged into
Object.prototype: the configuration field the operator meant to set
stayed untouched, and the override silently corrupted every object in
the process instead.

No configuration field is named that, and a JS object cannot hold such a
member anyway, so the key is now dropped when the document is parsed,
and ignored by the merge whatever its caller passes. Reaching the escape
hatch takes operator access, but neither the parsing nor the merge
should depend on that to stay harmless.

Issue: BB-809
Code could crash instead of throwing a "clean" error if transitions are
enabled in config but there is replication is not configured at all.

Issue: BB-809
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