-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Core] create deprecations service #94845
[Core] create deprecations service #94845
Conversation
Pinging @elastic/kibana-core (Team:Core) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review only, Security and Spaces changes LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @Bamieh! Thanks for working on it.
I read through the documentation and did a light code review. Overall LGTM. I left one comment in the code - let me know what you think.
xpack.security.session.{lifespan|idleTimeout}
#81747
@elastic/kibana-core are we planning to remove the deprecated |
Deprecations Service
The deprecations service provides a way for the Kibana platform to communicate deprecated features and configs with its users.
These deprecations are only communicated if the deployment is using these features. Allowing for a user tailored experience for upgrading the stack version.
Registering deprecated features for you plugin:
Each plugin will be responsible for registering any deprecations during the
setup
lifecycle by using the deprecations service:The
getDeprecations
function is invoked when the user requests to see the deprecations affecting their deployment. The function is passed a context object{ esClient, savedObjectsClient }
.Example
Deprecated Configs
The core service automatically hooks deprecated configs with the deprecations service.
All the config deprecation functions (
unused
,unusedFromRoot
,rename
,renameFromRoot
) now accept an optional parameter to customize the deprecation details.Example
If Kibana has the config
ui_metric.debug
in thekibana.yml
file. The deprecations service will show the following config deprecation details:Plugin config registering custom deprecations
Custom config deprecation handling allows specifying the deprecation details via the
addDeprecation
.Example:
Deprecations Client
Front the
public
side of the plugins,core
exposes a deprecations client which communicates with the kibana server and grabs the deprecations.The
start
contract exposes the following methods:Deprecations API
This API
GET /api/deprecations/
provides the user with the list of deprecations and possible corrective actions required to resolve these entries. The context is scoped to the requesting user, hence a user with limited access might not be able to see all the deprecations affecting the deployment.Sample response
Note to reviewers
Please filter by code owners and check for changes. Since the
logger
was swapped withaddDeprecation
for custom config deprecations you might just need to review those 1 line changes for your plugin.Related work for Upgrade assitant: https://github.com/elastic/elasticsearch-team-planning/issues/135