Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uiSettings should throw an error on unknown overrides #101295

Closed
TinaHeiligers opened this issue Jun 3, 2021 · 5 comments
Closed

uiSettings should throw an error on unknown overrides #101295

TinaHeiligers opened this issue Jun 3, 2021 · 5 comments
Labels
Feature:uiSettings impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc triage_needed

Comments

@TinaHeiligers
Copy link
Contributor

TinaHeiligers commented Jun 3, 2021

Part of #48925

The uiSettings.overrides setting which (when stored in kibana.yml or passed as config args when starting Kibana) allows forcing some uiSettings to always have a specific value. This setting accepts a map of uiSetting keys to values that will always be used to override whatever is stored in the config saved object. In #59694 we enforced validation on write, thereby preventing invalid values from being read or written.

Kibana should protect against unknown settings that are added or overwritten using the uiSetting.overrides.<key> in kibana.yml.

Potential side effects

There's at least two cases where introducing an exception would be a problem:

  • Any settings that have been removed from the codebase but are still present in the user's config
  • Any settings that belong to a plugin that was enabled but is now disabled. We should handle this case carefully.
@botelastic botelastic bot added the needs-team Issues missing a team label label Jun 3, 2021
@TinaHeiligers TinaHeiligers added Feature:uiSettings Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc triage_needed and removed needs-team Issues missing a team label labels Jun 3, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@pgayvallet
Copy link
Contributor

Any settings that have been removed from the codebase but are still present in the user's config

Any settings that belong to a plugin that was enabled but is now disabled. We should handle this case carefully.

Should we just output a warning, and ignore the unknown settings, instead of throwing an error then? It sounds safer.

@afharo
Copy link
Member

afharo commented Aug 17, 2021

I would expect a similar behaviour to any non-valid configuration keys. The current behaviour when adding a non-valid key is that Kibana throws an error and stops working. Shouldn't we do the same here?

@pgayvallet
Copy link
Contributor

One could argue that uiSetting.overrides is the configuration key, and that it contains a single value, the map of overrides, so it would be acceptable to have a different behavior.

But honestly, I would be fine either way. My main concern about throwing is, as Tina said, the risk when settings got deleted and the overrides still present in the config file, OTOH that feature is not even documented, and having to remove the key after a version bump seems acceptable.

@TinaHeiligers TinaHeiligers added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated labels Mar 7, 2022
@TinaHeiligers
Copy link
Contributor Author

With a fully managed offering, uiSettings overrides will no longer be a concern. As such, closing this issue as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:uiSettings impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc triage_needed
Projects
None yet
Development

No branches or pull requests

4 participants