Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
  • Loading branch information
Bamieh and joshdover authored May 3, 2021
1 parent c388d58 commit 5db8e32
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/server/deprecations/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ This guide is written in the format of a FAQ to help you get started using the d
For more details on the service contract we've documented all the service apis and properties under the deprecation service docs generated by in core.

## What is the 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.
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.

## Where does the deprecations show for the users?
## Where are deprecations displayed to users?
The Upgrade Assistant (UA) in kibana is consuming the core deprecations service in order to surface plugin deprecations. Each deprecation should have manual steps that we display in the UI to fix the deprecation an API to automatically resolve it.

To check your plugin deprecations go to the UA interface and click on `view deprecations` under the kibana section.

## How do I use this service for my deprecated plugin configurations?
## How do I use this service for deprecated plugin configurations?
The deprecations 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.
Expand Down Expand Up @@ -170,8 +170,8 @@ async function getDeprecations({ esClient, savedObjectsClient }: GetDeprecations
}
```
## How do I implement the api corrective action?
The deprecations API allows plugins to provide an API to automatically fix specific deprecations.
## How do I implement the API corrective action?
The deprecations API allows plugins to provide an API call that can be used to automatically fix specific deprecations.
To do so create a `PUT` or `POST` route in your plugin and specify data you want to be passed in the payload for the deprecation.
In the example above `/internal/security/users/test_dashboard_user` will be called when users click on `Quick Resolve` in the UA. The service will automatically pass the body provided in the api corrective action to provide context to the route for fixing the deprecation.
Expand All @@ -184,11 +184,11 @@ To check the deprecation in the UI pleae check the UA page.
To test that your logic registering the deprecations with the deprecations service during `setup` is valid we recommend adding unit tests to check that the `getDeprecations` is returning the expected array of deprecations at different scenarios.
The core team provides `mocks` for the service which should help you focus on testing only your specific requirements.
Core provides `mocks` for the service which should help you focus on testing only your specific requirements.
You can also use the deprecations service API; The deprecations service exposes an api `GET /api/deprecations/` which provides a 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.
## Should I use the service for all the deprecations before 8.0?
Yes. Using this service should help the users find and resolve any issues specific to their deployment before upgrading.
We recommend adding a `documentationUrl` for every deprecation you expose to further assist our users if they need extra help.
We recommend adding a `documentationUrl` for every deprecation you expose to further assist our users if they need extra help.

0 comments on commit 5db8e32

Please sign in to comment.