Support configuration overrides for troubleshooting - #2810
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
... and 2 files with indirect coverage changes
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
SylvainSenechal
left a comment
There was a problem hiding this comment.
- 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 ?
96f7010 to
a38772c
Compare
06dcc11 to
58986df
Compare
58986df to
e5ae10f
Compare
a38772c to
529ec39
Compare
529ec39 to
686f140
Compare
e5ae10f to
5e1ba68
Compare
Hello francoisferrand,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:
|
686f140 to
92fb5ef
Compare
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
92fb5ef to
4b0d390
Compare
|
/approve |
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 |
Queue build failedThe corresponding build for the queue failed:
Remove the pull request from the queue
|
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue BB-809. Goodbye francoisferrand. |
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