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

[Deprecations service] Expose level field to config deprecations #111516

Merged

Conversation

Bamieh
Copy link
Member

@Bamieh Bamieh commented Sep 8, 2021

Summary

We assumed that all config deprecations are of level critical hence we did not expose this field to the deprecation factory. A few configs are indeed not critical for 8.0 hence allowing devs to override the level make enables warning level deprecations to be addressed by the deprecations service.

Usage:

export const config = {
  schema: configSchema,
  deprecations: () => [
     (rawConfig, fromPath, addDeprecation) => {
        addDeprecation({
          level: 'warning', // optional; Defaults to 'critical' for config deprecations.

          title: i18n.translate(...),
          message: i18n.translate(...),
          correctiveActions: { ... },
        });
     }
  ],
};

Closes #110603

@Bamieh Bamieh added auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes v7.16.0 v8.0.0 labels Sep 8, 2021
@Bamieh Bamieh marked this pull request as ready for review September 9, 2021 10:56
@Bamieh Bamieh requested a review from a team as a code owner September 9, 2021 10:56
@Bamieh Bamieh enabled auto-merge (squash) September 9, 2021 11:08
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

@Bamieh Bamieh deleted the deprecations/expose_level_to_config_deprecations branch September 9, 2021 13:31
kibanamachine added a commit that referenced this pull request Sep 9, 2021
…111516) (#111720)

Co-authored-by: Ahmad Bamieh <ahmadbamieh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Deprecation service] Expose level field to config deprecations
3 participants