Skip to content

Commit 3f1056d

Browse files
committed
add deprecationType and use it in configs deprecations
1 parent 3ef24aa commit 3f1056d

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/core/server/deprecations/deprecations_service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export class DeprecationsService implements CoreService<InternalDeprecationsServ
156156
return deprecationsContexts.map(({ message, correctiveActions, documentationUrl }) => {
157157
return {
158158
level: 'critical',
159+
deprecationType: 'config',
159160
message,
160161
correctiveActions: correctiveActions ?? {},
161162
documentationUrl,

src/core/server/deprecations/types.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ export interface DeprecationsDetails {
2525
* - fetch_error: Deprecations service failed to grab the deprecation details for the domain.
2626
*/
2727
level: 'warning' | 'critical' | 'fetch_error';
28+
/**
29+
* (optiional) Used to identify between different deprecation types.
30+
* Example use case: in Upgrade Assistant, we may want to allow the user to sort by
31+
* deprecation type or show each type in a separate tab.
32+
*
33+
* Feel free to add new types if necessary.
34+
* Predefined types are necessary to reduce similar definitions with different keywords
35+
* across all kibana deprecations.
36+
*/
37+
deprecationType?: 'config' | 'feature';
2838
/* (optional) link to the documentation for more details on the deprecation. */
2939
documentationUrl?: string;
3040
/* corrective action needed to fix this deprecation. */

0 commit comments

Comments
 (0)