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

New Platform Config service should support deprecations #40255

Closed
mshustov opened this issue Jul 3, 2019 · 4 comments · Fixed by #52251
Closed

New Platform Config service should support deprecations #40255

mshustov opened this issue Jul 3, 2019 · 4 comments · Fixed by #52251
Assignees
Labels
blocker chore Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@mshustov
Copy link
Contributor

mshustov commented Jul 3, 2019

A migrated to New platform plugin uses NP Config service, which doesn't support Deprecations yet. It means plugins have to tweak config schema, config values and log warnings manually.
Legacy platform config uses a separate module for deprecations https://github.com/restrry/kibana/blob/0f25401fe4caaf97ff1b701d245455a0ef71ec3a/src/legacy/server/config/transform_deprecations.js#L75

@mshustov mshustov added chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform labels Jul 3, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@epixa
Copy link
Contributor

epixa commented Jul 3, 2019

Why is handling deprecations manually a problem? It seems like a pretty trivial thing to wrap a warning log in a conditional.

@mshustov
Copy link
Contributor Author

mshustov commented Jul 5, 2019

It's not only about logging a warning message.

Config Schema

A user has to specify the config schema. When one property deprecated in favor of another one schema looks like:

  • NewProperty should be validated if present in config.
  • OldProperty should be validated if NewProperty is not defined.
  • throw an error is both NewProperty and OldProperty are present in the config.

At least we can do here is to provide a @kbn/config-schema helper for this logic.

Config Value

A user has to calculate a value manually.

const value = config.NewProperty || config.OldProperty

@epixa
Copy link
Contributor

epixa commented Jul 5, 2019

Makes sense, thanks for the explanation.

@joshdover joshdover added this to Prioritized Backlog in kibana-core [DEPRECATED] Nov 12, 2019
@mshustov mshustov self-assigned this Nov 19, 2019
@joshdover joshdover assigned pgayvallet and unassigned mshustov Dec 3, 2019
@elasticmachine elasticmachine mentioned this issue Dec 6, 2019
12 tasks
@pgayvallet pgayvallet moved this from Prioritized Backlog to In progress in kibana-core [DEPRECATED] Dec 6, 2019
kibana-core [DEPRECATED] automation moved this from In progress to Done (7.6) Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker chore Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants