diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
index 51101c8804680..d90972d327041 100644
--- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
+++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
@@ -17,4 +17,5 @@ export interface DocLinksStart
| --- | --- | --- |
| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | string
| |
| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | string
| |
-| [links](./kibana-plugin-core-public.doclinksstart.links.md) | {
readonly settings: string;
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
readonly customLinks: string;
readonly droppedTransactionSpans: string;
readonly upgrading: string;
readonly metaData: string;
};
readonly canvas: {
readonly guide: string;
};
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
readonly drilldownsTriggerPicker: string;
readonly urlDrilldownTemplateSyntax: string;
readonly urlDrilldownVariables: string;
};
readonly discover: Record<string, string>;
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly elasticsearchModule: string;
readonly startup: string;
readonly exportedFields: string;
readonly suricataModule: string;
readonly zeekModule: string;
};
readonly auditbeat: {
readonly base: string;
readonly auditdModule: string;
readonly systemModule: string;
};
readonly metricbeat: {
readonly base: string;
readonly configure: string;
readonly httpEndpoint: string;
readonly install: string;
readonly start: string;
};
readonly enterpriseSearch: {
readonly base: string;
readonly appSearchBase: string;
readonly workplaceSearchBase: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly libbeat: {
readonly getStarted: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly composite: string;
readonly composite_missing_bucket: string;
readonly date_histogram: string;
readonly date_range: string;
readonly date_format_pattern: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly runtimeFields: {
readonly overview: string;
readonly mapping: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessLangSpec: string;
readonly painlessSyntax: string;
readonly painlessWalkthrough: string;
readonly luceneExpressions: string;
};
readonly search: {
readonly sessions: string;
readonly sessionLimits: string;
};
readonly indexPatterns: {
readonly introduction: string;
readonly fieldFormattersNumber: string;
readonly fieldFormattersString: string;
readonly runtimeFields: string;
};
readonly addData: string;
readonly kibana: string;
readonly upgradeAssistant: string;
readonly rollupJobs: string;
readonly elasticsearch: Record<string, string>;
readonly siem: {
readonly privileges: string;
readonly guide: string;
readonly gettingStarted: string;
readonly ml: string;
readonly ruleChangeLog: string;
readonly detectionsReq: string;
readonly networkMap: string;
};
readonly securitySolution: {
readonly trustedApps: string;
};
readonly query: {
readonly eql: string;
readonly kueryQuerySyntax: string;
readonly luceneQuerySyntax: string;
readonly percolate: string;
readonly queryDsl: string;
readonly autocompleteChanges: string;
};
readonly date: {
readonly dateMath: string;
readonly dateMathIndexNames: string;
};
readonly management: Record<string, string>;
readonly ml: Record<string, string>;
readonly transforms: Record<string, string>;
readonly visualize: Record<string, string>;
readonly apis: Readonly<{
bulkIndexAlias: string;
byteSizeUnits: string;
createAutoFollowPattern: string;
createFollower: string;
createIndex: string;
createSnapshotLifecyclePolicy: string;
createRoleMapping: string;
createRoleMappingTemplates: string;
createRollupJobsRequest: string;
createApiKey: string;
createPipeline: string;
createTransformRequest: string;
cronExpressions: string;
executeWatchActionModes: string;
indexExists: string;
openIndex: string;
putComponentTemplate: string;
painlessExecute: string;
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putIndexTemplateV1: string;
putWatch: string;
simulatePipeline: string;
timeUnits: string;
updateTransform: string;
}>;
readonly observability: Readonly<{
guide: string;
infrastructureThreshold: string;
logsThreshold: string;
metricsThreshold: string;
monitorStatus: string;
monitorUptime: string;
tlsCertificate: string;
uptimeDurationAnomaly: string;
}>;
readonly alerting: Record<string, string>;
readonly maps: Record<string, string>;
readonly monitoring: Record<string, string>;
readonly security: Readonly<{
apiKeyServiceSettings: string;
clusterPrivileges: string;
elasticsearchSettings: string;
elasticsearchEnableSecurity: string;
indicesPrivileges: string;
kibanaTLS: string;
kibanaPrivileges: string;
mappingRoles: string;
mappingRolesFieldRules: string;
runAsPrivilege: string;
}>;
readonly watcher: Record<string, string>;
readonly ccs: Record<string, string>;
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
settings: string;
settingsFleetServerHostSettings: string;
troubleshooting: string;
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
}>;
readonly ecs: {
readonly guide: string;
};
readonly clients: {
readonly guide: string;
readonly goOverview: string;
readonly javaIndex: string;
readonly jsIntro: string;
readonly netGuide: string;
readonly perlGuide: string;
readonly phpGuide: string;
readonly pythonGuide: string;
readonly rubyOverview: string;
readonly rustGuide: string;
};
}
| |
\ No newline at end of file
+| [links](./kibana-plugin-core-public.doclinksstart.links.md) | {
readonly settings: string;
readonly elasticStackGetStarted: string;
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
readonly customLinks: string;
readonly droppedTransactionSpans: string;
readonly upgrading: string;
readonly metaData: string;
};
readonly canvas: {
readonly guide: string;
};
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
readonly drilldownsTriggerPicker: string;
readonly urlDrilldownTemplateSyntax: string;
readonly urlDrilldownVariables: string;
};
readonly discover: Record<string, string>;
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly elasticsearchModule: string;
readonly startup: string;
readonly exportedFields: string;
readonly suricataModule: string;
readonly zeekModule: string;
};
readonly auditbeat: {
readonly base: string;
readonly auditdModule: string;
readonly systemModule: string;
};
readonly metricbeat: {
readonly base: string;
readonly configure: string;
readonly httpEndpoint: string;
readonly install: string;
readonly start: string;
};
readonly enterpriseSearch: {
readonly base: string;
readonly appSearchBase: string;
readonly workplaceSearchBase: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly libbeat: {
readonly getStarted: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly composite: string;
readonly composite_missing_bucket: string;
readonly date_histogram: string;
readonly date_range: string;
readonly date_format_pattern: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly runtimeFields: {
readonly overview: string;
readonly mapping: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessLangSpec: string;
readonly painlessSyntax: string;
readonly painlessWalkthrough: string;
readonly luceneExpressions: string;
};
readonly search: {
readonly sessions: string;
readonly sessionLimits: string;
};
readonly indexPatterns: {
readonly introduction: string;
readonly fieldFormattersNumber: string;
readonly fieldFormattersString: string;
readonly runtimeFields: string;
};
readonly addData: string;
readonly kibana: string;
readonly upgradeAssistant: string;
readonly rollupJobs: string;
readonly elasticsearch: Record<string, string>;
readonly siem: {
readonly privileges: string;
readonly guide: string;
readonly gettingStarted: string;
readonly ml: string;
readonly ruleChangeLog: string;
readonly detectionsReq: string;
readonly networkMap: string;
readonly troubleshootGaps: string;
};
readonly securitySolution: {
readonly trustedApps: string;
};
readonly query: {
readonly eql: string;
readonly kueryQuerySyntax: string;
readonly luceneQuerySyntax: string;
readonly percolate: string;
readonly queryDsl: string;
readonly autocompleteChanges: string;
};
readonly date: {
readonly dateMath: string;
readonly dateMathIndexNames: string;
};
readonly management: Record<string, string>;
readonly ml: Record<string, string>;
readonly transforms: Record<string, string>;
readonly visualize: Record<string, string>;
readonly apis: Readonly<{
bulkIndexAlias: string;
byteSizeUnits: string;
createAutoFollowPattern: string;
createFollower: string;
createIndex: string;
createSnapshotLifecyclePolicy: string;
createRoleMapping: string;
createRoleMappingTemplates: string;
createRollupJobsRequest: string;
createApiKey: string;
createPipeline: string;
createTransformRequest: string;
cronExpressions: string;
executeWatchActionModes: string;
indexExists: string;
openIndex: string;
putComponentTemplate: string;
painlessExecute: string;
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putIndexTemplateV1: string;
putWatch: string;
simulatePipeline: string;
timeUnits: string;
updateTransform: string;
}>;
readonly observability: Readonly<{
guide: string;
infrastructureThreshold: string;
logsThreshold: string;
metricsThreshold: string;
monitorStatus: string;
monitorUptime: string;
tlsCertificate: string;
uptimeDurationAnomaly: string;
}>;
readonly alerting: Record<string, string>;
readonly maps: Record<string, string>;
readonly monitoring: Record<string, string>;
readonly security: Readonly<{
apiKeyServiceSettings: string;
clusterPrivileges: string;
elasticsearchSettings: string;
elasticsearchEnableSecurity: string;
indicesPrivileges: string;
kibanaTLS: string;
kibanaPrivileges: string;
mappingRoles: string;
mappingRolesFieldRules: string;
runAsPrivilege: string;
}>;
readonly spaces: Readonly<{
kibanaLegacyUrlAliases: string;
kibanaDisableLegacyUrlAliasesApi: string;
}>;
readonly watcher: Record<string, string>;
readonly ccs: Record<string, string>;
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
settings: string;
settingsFleetServerHostSettings: string;
troubleshooting: string;
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
apiKeysLearnMore: string;
}>;
readonly ecs: {
readonly guide: string;
};
readonly clients: {
readonly guide: string;
readonly goOverview: string;
readonly javaIndex: string;
readonly jsIntro: string;
readonly netGuide: string;
readonly perlGuide: string;
readonly phpGuide: string;
readonly pythonGuide: string;
readonly rubyOverview: string;
readonly rustGuide: string;
};
}
| |
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md
similarity index 66%
rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md
rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md
index d7d10651033bf..273945166735b 100644
--- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md
+++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md
@@ -1,8 +1,8 @@
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [correctiveActions](./kibana-plugin-core-server.deprecationsdetails.correctiveactions.md)
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [correctiveActions](./kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md)
-## DeprecationsDetails.correctiveActions property
+## BaseDeprecationDetails.correctiveActions property
corrective action needed to fix this deprecation.
diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md
similarity index 70%
rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md
rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md
index 3a76bc60ee630..072dfd17418f9 100644
--- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md
+++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md
@@ -1,8 +1,8 @@
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [deprecationType](./kibana-plugin-core-server.deprecationsdetails.deprecationtype.md)
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [deprecationType](./kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md)
-## DeprecationsDetails.deprecationType property
+## BaseDeprecationDetails.deprecationType property
(optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab.
diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.documentationurl.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.documentationurl.md
similarity index 53%
rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.documentationurl.md
rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.documentationurl.md
index 457cf7b61dac8..c8f0762acdce6 100644
--- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.documentationurl.md
+++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.documentationurl.md
@@ -1,8 +1,8 @@
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [documentationUrl](./kibana-plugin-core-server.deprecationsdetails.documentationurl.md)
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [documentationUrl](./kibana-plugin-core-server.basedeprecationdetails.documentationurl.md)
-## DeprecationsDetails.documentationUrl property
+## BaseDeprecationDetails.documentationUrl property
(optional) link to the documentation for more details on the deprecation.
diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.level.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.level.md
similarity index 66%
rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.level.md
rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.level.md
index 64ad22e2c87fb..ad755805d00b9 100644
--- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.level.md
+++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.level.md
@@ -1,8 +1,8 @@
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [level](./kibana-plugin-core-server.deprecationsdetails.level.md)
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [level](./kibana-plugin-core-server.basedeprecationdetails.level.md)
-## DeprecationsDetails.level property
+## BaseDeprecationDetails.level property
levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain.
diff --git a/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md
new file mode 100644
index 0000000000000..3e47865062352
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md
@@ -0,0 +1,26 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md)
+
+## BaseDeprecationDetails interface
+
+Base properties shared by all types of deprecations
+
+Signature:
+
+```typescript
+export interface BaseDeprecationDetails
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [correctiveActions](./kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md) | {
api?: {
path: string;
method: 'POST' | 'PUT';
body?: {
[key: string]: any;
};
omitContextFromBody?: boolean;
};
manualSteps: string[];
}
| corrective action needed to fix this deprecation. |
+| [deprecationType](./kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md) | 'config' | 'feature'
| (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab.Feel free to add new types if necessary. Predefined types are necessary to reduce having similar definitions with different keywords across kibana deprecations. |
+| [documentationUrl](./kibana-plugin-core-server.basedeprecationdetails.documentationurl.md) | string
| (optional) link to the documentation for more details on the deprecation. |
+| [level](./kibana-plugin-core-server.basedeprecationdetails.level.md) | 'warning' | 'critical' | 'fetch_error'
| levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. |
+| [message](./kibana-plugin-core-server.basedeprecationdetails.message.md) | string
| The description message to be displayed for the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx
|
+| [requireRestart](./kibana-plugin-core-server.basedeprecationdetails.requirerestart.md) | boolean
| (optional) specify the fix for this deprecation requires a full kibana restart. |
+| [title](./kibana-plugin-core-server.basedeprecationdetails.title.md) | string
| The title of the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx
|
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.message.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.message.md
similarity index 60%
rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.message.md
rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.message.md
index 906ce8118f95b..5802bc316cc08 100644
--- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.message.md
+++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.message.md
@@ -1,8 +1,8 @@
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [message](./kibana-plugin-core-server.deprecationsdetails.message.md)
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [message](./kibana-plugin-core-server.basedeprecationdetails.message.md)
-## DeprecationsDetails.message property
+## BaseDeprecationDetails.message property
The description message to be displayed for the deprecation. Check the README for writing deprecations in `src/core/server/deprecations/README.mdx`
diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.requirerestart.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.requirerestart.md
similarity index 54%
rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.requirerestart.md
rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.requirerestart.md
index 85bddd9436e73..3f589600d0458 100644
--- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.requirerestart.md
+++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.requirerestart.md
@@ -1,8 +1,8 @@
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [requireRestart](./kibana-plugin-core-server.deprecationsdetails.requirerestart.md)
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [requireRestart](./kibana-plugin-core-server.basedeprecationdetails.requirerestart.md)
-## DeprecationsDetails.requireRestart property
+## BaseDeprecationDetails.requireRestart property
(optional) specify the fix for this deprecation requires a full kibana restart.
diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.title.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.title.md
similarity index 59%
rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.title.md
rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.title.md
index e8907688f6e5e..b6788a4faa7c5 100644
--- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.title.md
+++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.title.md
@@ -1,8 +1,8 @@
-[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [title](./kibana-plugin-core-server.deprecationsdetails.title.md)
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [title](./kibana-plugin-core-server.basedeprecationdetails.title.md)
-## DeprecationsDetails.title property
+## BaseDeprecationDetails.title property
The title of the deprecation. Check the README for writing deprecations in `src/core/server/deprecations/README.mdx`
diff --git a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.configpath.md b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.configpath.md
new file mode 100644
index 0000000000000..7af6c16d86e4a
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.configpath.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) > [configPath](./kibana-plugin-core-server.configdeprecationdetails.configpath.md)
+
+## ConfigDeprecationDetails.configPath property
+
+Signature:
+
+```typescript
+configPath: string;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md
new file mode 100644
index 0000000000000..fb3737062f986
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) > [deprecationType](./kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md)
+
+## ConfigDeprecationDetails.deprecationType property
+
+Signature:
+
+```typescript
+deprecationType: 'config';
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md
new file mode 100644
index 0000000000000..d1ccbb0b6164a
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md
@@ -0,0 +1,20 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md)
+
+## ConfigDeprecationDetails interface
+
+
+Signature:
+
+```typescript
+export interface ConfigDeprecationDetails extends BaseDeprecationDetails
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [configPath](./kibana-plugin-core-server.configdeprecationdetails.configpath.md) | string
| |
+| [deprecationType](./kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md) | 'config'
| |
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md
index 2ff9f4b792f5d..d8ced1da62416 100644
--- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md
+++ b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md
@@ -2,24 +2,11 @@
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md)
-## DeprecationsDetails interface
+## DeprecationsDetails type
Signature:
```typescript
-export interface DeprecationsDetails
+export declare type DeprecationsDetails = ConfigDeprecationDetails | FeatureDeprecationDetails;
```
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [correctiveActions](./kibana-plugin-core-server.deprecationsdetails.correctiveactions.md) | {
api?: {
path: string;
method: 'POST' | 'PUT';
body?: {
[key: string]: any;
};
omitContextFromBody?: boolean;
};
manualSteps: string[];
}
| corrective action needed to fix this deprecation. |
-| [deprecationType](./kibana-plugin-core-server.deprecationsdetails.deprecationtype.md) | 'config' | 'feature'
| (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab.Feel free to add new types if necessary. Predefined types are necessary to reduce having similar definitions with different keywords across kibana deprecations. |
-| [documentationUrl](./kibana-plugin-core-server.deprecationsdetails.documentationurl.md) | string
| (optional) link to the documentation for more details on the deprecation. |
-| [level](./kibana-plugin-core-server.deprecationsdetails.level.md) | 'warning' | 'critical' | 'fetch_error'
| levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. |
-| [message](./kibana-plugin-core-server.deprecationsdetails.message.md) | string
| The description message to be displayed for the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx
|
-| [requireRestart](./kibana-plugin-core-server.deprecationsdetails.requirerestart.md) | boolean
| (optional) specify the fix for this deprecation requires a full kibana restart. |
-| [title](./kibana-plugin-core-server.deprecationsdetails.title.md) | string
| The title of the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx
|
-
diff --git a/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md
new file mode 100644
index 0000000000000..b530874d3678b
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [FeatureDeprecationDetails](./kibana-plugin-core-server.featuredeprecationdetails.md) > [deprecationType](./kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md)
+
+## FeatureDeprecationDetails.deprecationType property
+
+Signature:
+
+```typescript
+deprecationType?: 'feature' | undefined;
+```
diff --git a/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md
new file mode 100644
index 0000000000000..bed3356e36129
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md
@@ -0,0 +1,19 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [FeatureDeprecationDetails](./kibana-plugin-core-server.featuredeprecationdetails.md)
+
+## FeatureDeprecationDetails interface
+
+
+Signature:
+
+```typescript
+export interface FeatureDeprecationDetails extends BaseDeprecationDetails
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [deprecationType](./kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md) | 'feature' | undefined
| |
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md
index 89203cb94d573..20b4b43776f21 100644
--- a/docs/development/core/server/kibana-plugin-core-server.md
+++ b/docs/development/core/server/kibana-plugin-core-server.md
@@ -53,9 +53,11 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [AuthRedirectedParams](./kibana-plugin-core-server.authredirectedparams.md) | Result of auth redirection. |
| [AuthResultParams](./kibana-plugin-core-server.authresultparams.md) | Result of successful authentication. |
| [AuthToolkit](./kibana-plugin-core-server.authtoolkit.md) | A tool set defining an outcome of Auth interceptor for incoming request. |
+| [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) | Base properties shared by all types of deprecations |
| [Capabilities](./kibana-plugin-core-server.capabilities.md) | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. |
| [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | APIs to manage the [Capabilities](./kibana-plugin-core-server.capabilities.md) that will be used by the application.Plugins relying on capabilities to toggle some of their features should register them during the setup phase using the registerProvider
method.Plugins having the responsibility to restrict capabilities depending on a given context should register their capabilities switcher using the registerSwitcher
method.Refers to the methods documentation for complete description and examples. |
| [CapabilitiesStart](./kibana-plugin-core-server.capabilitiesstart.md) | APIs to access the application [Capabilities](./kibana-plugin-core-server.capabilities.md). |
+| [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) | |
| [ContextSetup](./kibana-plugin-core-server.contextsetup.md) | An object that handles registration of context providers and configuring handlers with context. |
| [CorePreboot](./kibana-plugin-core-server.corepreboot.md) | Context passed to the setup
method of preboot
plugins. |
| [CoreSetup](./kibana-plugin-core-server.coresetup.md) | Context passed to the setup
method of standard
plugins. |
@@ -65,7 +67,6 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [CustomHttpResponseOptions](./kibana-plugin-core-server.customhttpresponseoptions.md) | HTTP response parameters for a response with adjustable status code. |
| [DeleteDocumentResponse](./kibana-plugin-core-server.deletedocumentresponse.md) | |
| [DeprecationsClient](./kibana-plugin-core-server.deprecationsclient.md) | Server-side client that provides access to fetch all Kibana deprecations |
-| [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) | |
| [DeprecationSettings](./kibana-plugin-core-server.deprecationsettings.md) | UiSettings deprecation field options. |
| [DeprecationsServiceSetup](./kibana-plugin-core-server.deprecationsservicesetup.md) | 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 Deprecation service is consumed by the upgrade assistant to assist with the upgrade experience.If a deprecated feature can be resolved without manual user intervention. Using correctiveActions.api allows the Upgrade Assistant to use this api to correct the deprecation upon a user trigger. |
| [DiscoveredPlugin](./kibana-plugin-core-server.discoveredplugin.md) | Small container object used to expose information about discovered plugins that may or may not have been started. |
@@ -77,6 +78,7 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [ErrorHttpResponseOptions](./kibana-plugin-core-server.errorhttpresponseoptions.md) | HTTP response parameters |
| [ExecutionContextSetup](./kibana-plugin-core-server.executioncontextsetup.md) | |
| [FakeRequest](./kibana-plugin-core-server.fakerequest.md) | Fake request object created manually by Kibana plugins. |
+| [FeatureDeprecationDetails](./kibana-plugin-core-server.featuredeprecationdetails.md) | |
| [GetDeprecationsContext](./kibana-plugin-core-server.getdeprecationscontext.md) | |
| [GetResponse](./kibana-plugin-core-server.getresponse.md) | |
| [HttpAuth](./kibana-plugin-core-server.httpauth.md) | |
@@ -246,6 +248,7 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [AuthResult](./kibana-plugin-core-server.authresult.md) | |
| [CapabilitiesProvider](./kibana-plugin-core-server.capabilitiesprovider.md) | See [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) |
| [CapabilitiesSwitcher](./kibana-plugin-core-server.capabilitiesswitcher.md) | See [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) |
+| [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) | |
| [DestructiveRouteMethod](./kibana-plugin-core-server.destructiveroutemethod.md) | Set of HTTP methods changing the state of the server. |
| [ElasticsearchClient](./kibana-plugin-core-server.elasticsearchclient.md) | Client used to query the elasticsearch cluster. |
| [ElasticsearchClientConfig](./kibana-plugin-core-server.elasticsearchclientconfig.md) | Configuration options to be used to create a [cluster client](./kibana-plugin-core-server.iclusterclient.md) using the [createClient API](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) |
diff --git a/packages/kbn-config/src/config_service.test.ts b/packages/kbn-config/src/config_service.test.ts
index e8fd7ab187596..4a8164b100626 100644
--- a/packages/kbn-config/src/config_service.test.ts
+++ b/packages/kbn-config/src/config_service.test.ts
@@ -382,6 +382,7 @@ test('logs deprecation if schema is not present and "enabled" is used', async ()
"foo",
Array [
Object {
+ "configPath": "foo.enabled",
"correctiveActions": Object {
"manualSteps": Array [
"Remove \\"foo.enabled\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.",
@@ -452,10 +453,12 @@ test('logs deprecation warning during validation', async () => {
mockApplyDeprecations.mockImplementationOnce((config, deprecations, createAddDeprecation) => {
const addDeprecation = createAddDeprecation!('');
addDeprecation({
+ configPath: 'test1',
message: 'some deprecation message',
correctiveActions: { manualSteps: ['do X'] },
});
addDeprecation({
+ configPath: 'test2',
message: 'another deprecation message',
correctiveActions: { manualSteps: ['do Y'] },
});
@@ -521,11 +524,13 @@ test('does not log warnings for silent deprecations during validation', async ()
.mockImplementationOnce((config, deprecations, createAddDeprecation) => {
const addDeprecation = createAddDeprecation!('');
addDeprecation({
+ configPath: 'test1',
message: 'some deprecation message',
correctiveActions: { manualSteps: ['do X'] },
silent: true,
});
addDeprecation({
+ configPath: 'test2',
message: 'another deprecation message',
correctiveActions: { manualSteps: ['do Y'] },
});
@@ -534,6 +539,7 @@ test('does not log warnings for silent deprecations during validation', async ()
.mockImplementationOnce((config, deprecations, createAddDeprecation) => {
const addDeprecation = createAddDeprecation!('');
addDeprecation({
+ configPath: 'silent',
message: 'I am silent',
silent: true,
correctiveActions: { manualSteps: ['do Z'] },
@@ -617,6 +623,7 @@ describe('getHandledDeprecatedConfigs', () => {
deprecations.forEach((deprecation) => {
const addDeprecation = createAddDeprecation!(deprecation.path);
addDeprecation({
+ configPath: 'test1',
message: `some deprecation message`,
documentationUrl: 'some-url',
correctiveActions: { manualSteps: ['do X'] },
@@ -633,6 +640,7 @@ describe('getHandledDeprecatedConfigs', () => {
"base",
Array [
Object {
+ "configPath": "test1",
"correctiveActions": Object {
"manualSteps": Array [
"do X",
diff --git a/packages/kbn-config/src/config_service.ts b/packages/kbn-config/src/config_service.ts
index d99d4bd410743..f087b3fff8612 100644
--- a/packages/kbn-config/src/config_service.ts
+++ b/packages/kbn-config/src/config_service.ts
@@ -184,6 +184,7 @@ export class ConfigService {
if (validatedConfig?.enabled === undefined && isEnabled !== undefined) {
const deprecationPath = pathToString(enabledPath);
const deprecatedConfigDetails: DeprecatedConfigDetails = {
+ configPath: deprecationPath,
title: `Setting "${deprecationPath}" is deprecated`,
message: `Configuring "${deprecationPath}" is deprecated and will be removed in 8.0.0.`,
correctiveActions: {
diff --git a/packages/kbn-config/src/deprecation/deprecation_factory.test.ts b/packages/kbn-config/src/deprecation/deprecation_factory.test.ts
index 415c8fb9f0610..d9fe90ff711ed 100644
--- a/packages/kbn-config/src/deprecation/deprecation_factory.test.ts
+++ b/packages/kbn-config/src/deprecation/deprecation_factory.test.ts
@@ -43,6 +43,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.",
@@ -79,6 +80,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.section.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Remove \\"myplugin.section.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.",
@@ -134,6 +136,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.",
@@ -197,6 +200,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Replace \\"myplugin.deprecated\\" with \\"myplugin.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).",
@@ -254,6 +258,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.oldsection.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Replace \\"myplugin.oldsection.deprecated\\" with \\"myplugin.newsection.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).",
@@ -286,6 +291,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Make sure \\"myplugin.renamed\\" contains the correct value in the config file, CLI flag, or environment variable (in Docker only).",
@@ -331,6 +337,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Replace \\"myplugin.deprecated\\" with \\"myplugin.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).",
@@ -373,6 +380,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "oldplugin.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Replace \\"oldplugin.deprecated\\" with \\"newplugin.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).",
@@ -427,6 +435,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Make sure \\"myplugin.renamed\\" contains the correct value in the config file, CLI flag, or environment variable (in Docker only).",
@@ -461,6 +470,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only).",
@@ -494,6 +504,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.section.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Remove \\"myplugin.section.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only).",
@@ -546,6 +557,7 @@ describe('DeprecationFactory', () => {
Array [
Array [
Object {
+ "configPath": "myplugin.deprecated",
"correctiveActions": Object {
"manualSteps": Array [
"Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only).",
diff --git a/packages/kbn-config/src/deprecation/deprecation_factory.ts b/packages/kbn-config/src/deprecation/deprecation_factory.ts
index 1d61733715bd9..ea4db280e915b 100644
--- a/packages/kbn-config/src/deprecation/deprecation_factory.ts
+++ b/packages/kbn-config/src/deprecation/deprecation_factory.ts
@@ -37,6 +37,7 @@ const _deprecate = (
return;
}
addDeprecation({
+ configPath: fullPath,
title: getDeprecationTitle(fullPath),
message: i18n.translate('kbnConfig.deprecations.deprecatedSettingMessage', {
defaultMessage: 'Configuring "{fullPath}" is deprecated and will be removed in {removeBy}.',
@@ -73,6 +74,7 @@ const _rename = (
const newValue = get(config, fullNewPath);
if (newValue === undefined) {
addDeprecation({
+ configPath: fullOldPath,
title: getDeprecationTitle(fullOldPath),
message: i18n.translate('kbnConfig.deprecations.replacedSettingMessage', {
defaultMessage: `Setting "{fullOldPath}" has been replaced by "{fullNewPath}"`,
@@ -95,6 +97,7 @@ const _rename = (
};
} else {
addDeprecation({
+ configPath: fullOldPath,
title: getDeprecationTitle(fullOldPath),
message: i18n.translate('kbnConfig.deprecations.conflictSettingMessage', {
defaultMessage:
@@ -135,6 +138,7 @@ const _unused = (
return;
}
addDeprecation({
+ configPath: fullPath,
title: getDeprecationTitle(fullPath),
message: i18n.translate('kbnConfig.deprecations.unusedSettingMessage', {
defaultMessage: 'You no longer need to configure "{fullPath}".',
diff --git a/packages/kbn-config/src/deprecation/types.ts b/packages/kbn-config/src/deprecation/types.ts
index 12b561aa2b1b9..f5bb240f5cc43 100644
--- a/packages/kbn-config/src/deprecation/types.ts
+++ b/packages/kbn-config/src/deprecation/types.ts
@@ -20,6 +20,8 @@ export type AddConfigDeprecation = (details: DeprecatedConfigDetails) => void;
* @public
*/
export interface DeprecatedConfigDetails {
+ /** The path of the deprecated config setting */
+ configPath: string;
/** The title to be displayed for the deprecation. */
title?: string;
/** The message to be displayed for the deprecation. */
@@ -30,7 +32,7 @@ export interface DeprecatedConfigDetails {
* - critical: needs to be addressed before upgrade.
*/
level?: 'warning' | 'critical';
- /** (optional) set false to prevent the config service from logging the deprecation message. */
+ /** (optional) set to `true` to prevent the config service from logging the deprecation message. */
silent?: boolean;
/** (optional) link to the documentation for more details on the deprecation. */
documentationUrl?: string;
diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md
index 2da4370242e6c..f39ad9d5f8cde 100644
--- a/src/core/public/public.api.md
+++ b/src/core/public/public.api.md
@@ -736,10 +736,9 @@ export interface DocLinksStart {
// Warning: (ae-forgotten-export) The symbol "DeprecationsDetails" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
-export interface DomainDeprecationDetails extends DeprecationsDetails {
- // (undocumented)
+export type DomainDeprecationDetails = DeprecationsDetails & {
domainId: string;
-}
+};
export { EnvironmentMode }
diff --git a/src/core/server/config/deprecation/core_deprecations.ts b/src/core/server/config/deprecation/core_deprecations.ts
index 6909375408fb4..1cf67f479f9b3 100644
--- a/src/core/server/config/deprecation/core_deprecations.ts
+++ b/src/core/server/config/deprecation/core_deprecations.ts
@@ -12,6 +12,7 @@ import { ConfigDeprecationProvider, ConfigDeprecation } from '@kbn/config';
const kibanaPathConf: ConfigDeprecation = (settings, fromPath, addDeprecation) => {
if (process.env?.KIBANA_PATH_CONF) {
addDeprecation({
+ configPath: 'env.KIBANA_PATH_CONF',
message: `Environment variable "KIBANA_PATH_CONF" is deprecated. It has been replaced with "KBN_PATH_CONF" pointing to a config folder`,
correctiveActions: {
manualSteps: [
@@ -25,6 +26,7 @@ const kibanaPathConf: ConfigDeprecation = (settings, fromPath, addDeprecation) =
const configPathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => {
if (process.env?.CONFIG_PATH) {
addDeprecation({
+ configPath: 'env.CONFIG_PATH',
message: `Environment variable "CONFIG_PATH" is deprecated. It has been replaced with "KBN_PATH_CONF" pointing to a config folder`,
correctiveActions: {
manualSteps: ['Use "KBN_PATH_CONF" instead of "CONFIG_PATH" to point to a config folder.'],
@@ -36,6 +38,7 @@ const configPathDeprecation: ConfigDeprecation = (settings, fromPath, addDepreca
const dataPathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => {
if (process.env?.DATA_PATH) {
addDeprecation({
+ configPath: 'env.DATA_PATH',
message: `Environment variable "DATA_PATH" will be removed. It has been replaced with kibana.yml setting "path.data"`,
correctiveActions: {
manualSteps: [
@@ -49,6 +52,8 @@ const dataPathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati
const rewriteBasePathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => {
if (settings.server?.basePath && !settings.server?.rewriteBasePath) {
addDeprecation({
+ configPath: 'server.basePath',
+ title: 'Setting "server.rewriteBasePath" should be set when using "server.basePath"',
message:
'You should set server.basePath along with server.rewriteBasePath. Starting in 7.0, Kibana ' +
'will expect that all requests start with server.basePath rather than expecting you to rewrite ' +
@@ -69,6 +74,8 @@ const rewriteCorsSettings: ConfigDeprecation = (settings, fromPath, addDeprecati
const corsSettings = settings.server?.cors;
if (typeof corsSettings === 'boolean') {
addDeprecation({
+ configPath: 'server.cors',
+ title: 'Setting "server.cors" is deprecated',
message: '"server.cors" is deprecated and has been replaced by "server.cors.enabled"',
correctiveActions: {
manualSteps: [
@@ -105,6 +112,7 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati
value: [...parsed].map(([policy, sourceList]) => {
if (sourceList.find((source) => source.includes(NONCE_STRING))) {
addDeprecation({
+ configPath: 'csp.rules',
message: `csp.rules no longer supports the {nonce} syntax. Replacing with 'self' in ${policy}`,
correctiveActions: {
manualSteps: [`Replace {nonce} syntax with 'self' in ${policy}`],
@@ -123,6 +131,7 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati
!sourceList.find((source) => source.includes(SELF_STRING))
) {
addDeprecation({
+ configPath: 'csp.rules',
message: `csp.rules must contain the 'self' source. Automatically adding to ${policy}.`,
correctiveActions: {
manualSteps: [`Add 'self' source to ${policy}.`],
@@ -146,6 +155,7 @@ const mapManifestServiceUrlDeprecation: ConfigDeprecation = (
) => {
if (settings.map?.manifestServiceUrl) {
addDeprecation({
+ configPath: 'map.manifestServiceUrl',
message:
'You should no longer use the map.manifestServiceUrl setting in kibana.yml to configure the location ' +
'of the Elastic Maps Service settings. These settings have moved to the "map.emsTileApiUrl" and ' +
@@ -164,6 +174,7 @@ const mapManifestServiceUrlDeprecation: ConfigDeprecation = (
const serverHostZeroDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => {
if (settings.server?.host === '0') {
addDeprecation({
+ configPath: 'server.host',
message:
'Support for setting server.host to "0" in kibana.yml is deprecated and will be removed in Kibana version 8.0.0. ' +
'Instead use "0.0.0.0" to bind to all interfaces.',
@@ -194,6 +205,7 @@ const opsLoggingEventDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.events?.ops) {
addDeprecation({
+ configPath: 'logging.events.ops',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`,
title: i18n.translate('core.deprecations.loggingEventsOps.deprecationTitle', {
defaultMessage: `Setting "logging.events.ops" is deprecated`,
@@ -224,6 +236,7 @@ const requestLoggingEventDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.events?.request) {
addDeprecation({
+ configPath: 'logging.events.request',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`,
title: i18n.translate('core.deprecations.loggingEventsRequest.deprecationTitle', {
defaultMessage: `Setting "logging.events.request" is deprecated`,
@@ -254,6 +267,7 @@ const responseLoggingEventDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.events?.response) {
addDeprecation({
+ configPath: 'logging.events.response',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`,
title: i18n.translate('core.deprecations.loggingEventsResponse.deprecationTitle', {
defaultMessage: `Setting "logging.events.response" is deprecated`,
@@ -284,6 +298,7 @@ const timezoneLoggingDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.timezone) {
addDeprecation({
+ configPath: 'logging.timezone',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingtimezone`,
title: i18n.translate('core.deprecations.loggingTimezone.deprecationTitle', {
defaultMessage: `Setting "logging.timezone" is deprecated`,
@@ -314,6 +329,7 @@ const destLoggingDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.dest) {
addDeprecation({
+ configPath: 'logging.dest',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingdest`,
title: i18n.translate('core.deprecations.loggingDest.deprecationTitle', {
defaultMessage: `Setting "logging.dest" is deprecated`,
@@ -344,6 +360,7 @@ const quietLoggingDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.quiet) {
addDeprecation({
+ configPath: 'logging.quiet',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingquiet`,
title: i18n.translate('core.deprecations.loggingQuiet.deprecationTitle', {
defaultMessage: `Setting "logging.quiet" is deprecated`,
@@ -373,6 +390,7 @@ const silentLoggingDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.silent) {
addDeprecation({
+ configPath: 'logging.silent',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingsilent`,
title: i18n.translate('core.deprecations.loggingSilent.deprecationTitle', {
defaultMessage: `Setting "logging.silent" is deprecated`,
@@ -402,6 +420,7 @@ const verboseLoggingDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.verbose) {
addDeprecation({
+ configPath: 'logging.verbose',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingverbose`,
title: i18n.translate('core.deprecations.loggingVerbose.deprecationTitle', {
defaultMessage: `Setting "logging.verbose" is deprecated`,
@@ -435,6 +454,7 @@ const jsonLoggingDeprecation: ConfigDeprecation = (
// ` legacyLoggingConfigSchema` returns `true` for the TTY check on `process.stdout.isTTY`
if (settings.logging?.json && settings.env !== 'development') {
addDeprecation({
+ configPath: 'logging.json',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx`,
title: i18n.translate('core.deprecations.loggingJson.deprecationTitle', {
defaultMessage: `Setting "logging.json" is deprecated`,
@@ -466,6 +486,7 @@ const logRotateDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.rotate) {
addDeprecation({
+ configPath: 'logging.rotate',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#rolling-file-appender`,
title: i18n.translate('core.deprecations.loggingRotate.deprecationTitle', {
defaultMessage: `Setting "logging.rotate" is deprecated`,
@@ -496,6 +517,7 @@ const logEventsLogDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.events?.log) {
addDeprecation({
+ configPath: 'logging.events.log',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`,
title: i18n.translate('core.deprecations.loggingEventsLog.deprecationTitle', {
defaultMessage: `Setting "logging.events.log" is deprecated`,
@@ -525,6 +547,7 @@ const logEventsErrorDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.events?.error) {
addDeprecation({
+ configPath: 'logging.events.error',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`,
title: i18n.translate('core.deprecations.loggingEventsError.deprecationTitle', {
defaultMessage: `Setting "logging.events.error" is deprecated`,
@@ -554,6 +577,7 @@ const logFilterDeprecation: ConfigDeprecation = (
) => {
if (settings.logging?.filter) {
addDeprecation({
+ configPath: 'logging.filter',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingfilter`,
title: i18n.translate('core.deprecations.loggingFilter.deprecationTitle', {
defaultMessage: `Setting "logging.filter" is deprecated`,
diff --git a/src/core/server/csp/config.ts b/src/core/server/csp/config.ts
index 16a2fa4e62894..6697eda62597b 100644
--- a/src/core/server/csp/config.ts
+++ b/src/core/server/csp/config.ts
@@ -137,6 +137,7 @@ export const config: ServiceConfigDescriptor = {
const cspConfig = rawConfig[fromPath];
if (cspConfig?.rules) {
addDeprecation({
+ configPath: 'csp.rules',
message:
'`csp.rules` is deprecated in favor of directive specific configuration. Please use `csp.connect_src`, ' +
'`csp.default_src`, `csp.font_src`, `csp.frame_ancestors`, `csp.frame_src`, `csp.img_src`, ' +
diff --git a/src/core/server/deprecations/deprecation_config.ts b/src/core/server/deprecations/deprecation_config.ts
new file mode 100644
index 0000000000000..fb5ff7e5957f5
--- /dev/null
+++ b/src/core/server/deprecations/deprecation_config.ts
@@ -0,0 +1,22 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { schema, TypeOf } from '@kbn/config-schema';
+import { ServiceConfigDescriptor } from '../internal_types';
+
+const configSchema = schema.object({
+ // `deprecation.skip_deprecated_settings` is consistent with the equivalent ES feature and config property
+ skip_deprecated_settings: schema.arrayOf(schema.string(), { defaultValue: [] }),
+});
+
+export type DeprecationConfigType = TypeOf;
+
+export const config: ServiceConfigDescriptor = {
+ path: 'deprecation',
+ schema: configSchema,
+};
diff --git a/src/core/server/deprecations/deprecations_factory.test.ts b/src/core/server/deprecations/deprecations_factory.test.ts
index 85ef521538b15..9a67c6dc36dd2 100644
--- a/src/core/server/deprecations/deprecations_factory.test.ts
+++ b/src/core/server/deprecations/deprecations_factory.test.ts
@@ -7,20 +7,26 @@
*/
import type { GetDeprecationsContext } from './types';
-import { DeprecationsFactory } from './deprecations_factory';
+import { DeprecationsFactory, DeprecationsFactoryConfig } from './deprecations_factory';
import { loggerMock } from '../logging/logger.mock';
+import { DeprecationsDetails } from './types';
describe('DeprecationsFactory', () => {
- const logger = loggerMock.create();
+ let logger: ReturnType;
+ let config: DeprecationsFactoryConfig;
+
beforeEach(() => {
- loggerMock.clear(logger);
+ logger = loggerMock.create();
+ config = {
+ ignoredConfigDeprecations: [],
+ };
});
describe('getRegistry', () => {
const domainId = 'test-plugin';
it('creates a registry for a domainId', async () => {
- const deprecationsFactory = new DeprecationsFactory({ logger });
+ const deprecationsFactory = new DeprecationsFactory({ logger, config });
const registry = deprecationsFactory.getRegistry(domainId);
expect(registry).toHaveProperty('registerDeprecations');
@@ -28,7 +34,7 @@ describe('DeprecationsFactory', () => {
});
it('creates one registry for a domainId', async () => {
- const deprecationsFactory = new DeprecationsFactory({ logger });
+ const deprecationsFactory = new DeprecationsFactory({ logger, config });
const registry = deprecationsFactory.getRegistry(domainId);
const sameRegistry = deprecationsFactory.getRegistry(domainId);
@@ -36,7 +42,7 @@ describe('DeprecationsFactory', () => {
});
it('returns a registered registry', () => {
- const deprecationsFactory = new DeprecationsFactory({ logger });
+ const deprecationsFactory = new DeprecationsFactory({ logger, config });
const mockRegistry = 'mock-reg';
const mockRegistries = {
set: jest.fn(),
@@ -61,7 +67,7 @@ describe('DeprecationsFactory', () => {
} as unknown as GetDeprecationsContext;
it('returns a flattened array of deprecations', async () => {
- const deprecationsFactory = new DeprecationsFactory({ logger });
+ const deprecationsFactory = new DeprecationsFactory({ logger, config });
const mockPluginDeprecationsInfo = [
{
message: 'mockPlugin message',
@@ -97,8 +103,8 @@ describe('DeprecationsFactory', () => {
getDeprecations: jest.fn().mockResolvedValue(anotherMockPluginDeprecationsInfo),
});
- const derpecations = await deprecationsFactory.getAllDeprecations(mockDependencies);
- expect(derpecations).toStrictEqual(
+ const deprecations = await deprecationsFactory.getAllDeprecations(mockDependencies);
+ expect(deprecations).toStrictEqual(
[
mockPluginDeprecationsInfo.map((info) => ({ ...info, domainId: 'mockPlugin' })),
anotherMockPluginDeprecationsInfo.map((info) => ({
@@ -110,7 +116,7 @@ describe('DeprecationsFactory', () => {
});
it(`returns a failure message for failed getDeprecations functions`, async () => {
- const deprecationsFactory = new DeprecationsFactory({ logger });
+ const deprecationsFactory = new DeprecationsFactory({ logger, config });
const domainId = 'mockPlugin';
const mockError = new Error();
@@ -142,7 +148,7 @@ describe('DeprecationsFactory', () => {
});
it(`returns successful results even when some getDeprecations fail`, async () => {
- const deprecationsFactory = new DeprecationsFactory({ logger });
+ const deprecationsFactory = new DeprecationsFactory({ logger, config });
const mockPluginRegistry = deprecationsFactory.getRegistry('mockPlugin');
const anotherMockPluginRegistry = deprecationsFactory.getRegistry('anotherMockPlugin');
const mockError = new Error();
@@ -161,14 +167,14 @@ describe('DeprecationsFactory', () => {
anotherMockPluginRegistry.registerDeprecations({
getDeprecations: jest.fn().mockRejectedValue(mockError),
});
- const derpecations = await deprecationsFactory.getAllDeprecations(mockDependencies);
+ const deprecations = await deprecationsFactory.getAllDeprecations(mockDependencies);
expect(logger.warn).toBeCalledTimes(1);
expect(logger.warn).toBeCalledWith(
`Failed to get deprecations info for plugin "anotherMockPlugin".`,
mockError
);
- expect(derpecations).toStrictEqual([
+ expect(deprecations).toStrictEqual([
...mockPluginDeprecationsInfo.map((info) => ({ ...info, domainId: 'mockPlugin' })),
{
domainId: 'anotherMockPlugin',
@@ -181,6 +187,123 @@ describe('DeprecationsFactory', () => {
},
]);
});
+
+ it('excludes config deprecations explicitly ignored via `ignoredConfigDeprecations`', async () => {
+ const deprecationsFactory = new DeprecationsFactory({
+ logger,
+ config: {
+ ignoredConfigDeprecations: ['mockPlugin.foo', 'anotherMockPlugin.bar'],
+ },
+ });
+ const mockPluginDeprecationsInfo: DeprecationsDetails[] = [
+ {
+ configPath: 'mockPlugin.foo',
+ title: 'mockPlugin.foo is deprecated',
+ message: 'mockPlugin.foo is deprecated and will be removed in a future Kibana version',
+ level: 'critical',
+ deprecationType: 'config',
+ correctiveActions: {
+ manualSteps: ['come on', 'do something'],
+ },
+ },
+ {
+ configPath: 'mockPlugin.bar',
+ title: 'mockPlugin.bar is deprecated',
+ message: 'mockPlugin.bar is deprecated and will be removed in a future Kibana version',
+ level: 'critical',
+ deprecationType: 'config',
+ correctiveActions: {
+ manualSteps: ['come on', 'do something'],
+ },
+ },
+ ];
+ const anotherMockPluginDeprecationsInfo: DeprecationsDetails[] = [
+ {
+ configPath: 'anotherMockPlugin.foo',
+ title: 'anotherMockPlugin.foo is deprecated',
+ message:
+ 'anotherMockPlugin.foo is deprecated and will be removed in a future Kibana version',
+ level: 'critical',
+ deprecationType: 'config',
+ correctiveActions: {
+ manualSteps: ['come on', 'do something'],
+ },
+ },
+ {
+ configPath: 'anotherMockPlugin.bar',
+ title: 'anotherMockPlugin.bar is deprecated',
+ message:
+ 'anotherMockPlugin.bar is deprecated and will be removed in a future Kibana version',
+ level: 'critical',
+ deprecationType: 'config',
+ correctiveActions: {
+ manualSteps: ['come on', 'do something'],
+ },
+ },
+ ];
+
+ const mockPluginRegistry = deprecationsFactory.getRegistry('mockPlugin');
+ mockPluginRegistry.registerDeprecations({
+ getDeprecations: jest.fn().mockResolvedValue(mockPluginDeprecationsInfo),
+ });
+
+ const anotherMockPluginRegistry = deprecationsFactory.getRegistry('anotherMockPlugin');
+ anotherMockPluginRegistry.registerDeprecations({
+ getDeprecations: jest.fn().mockResolvedValue(anotherMockPluginDeprecationsInfo),
+ });
+
+ const deprecations = await deprecationsFactory.getAllDeprecations(mockDependencies);
+
+ expect(deprecations).toHaveLength(2);
+ expect(deprecations).toEqual([
+ expect.objectContaining({
+ configPath: 'mockPlugin.bar',
+ title: 'mockPlugin.bar is deprecated',
+ }),
+ expect.objectContaining({
+ configPath: 'anotherMockPlugin.foo',
+ title: 'anotherMockPlugin.foo is deprecated',
+ }),
+ ]);
+ });
+
+ it('does not throw when configured with paths not matching any deprecation', async () => {
+ const deprecationsFactory = new DeprecationsFactory({
+ logger,
+ config: {
+ ignoredConfigDeprecations: ['unknown.bar'],
+ },
+ });
+ const mockPluginDeprecationsInfo: DeprecationsDetails[] = [
+ {
+ configPath: 'mockPlugin.foo',
+ title: 'mockPlugin.foo is deprecated',
+ message: 'mockPlugin.foo is deprecated and will be removed in a future Kibana version',
+ level: 'critical',
+ deprecationType: 'config',
+ correctiveActions: {
+ manualSteps: ['come on', 'do something'],
+ },
+ },
+ {
+ configPath: 'mockPlugin.bar',
+ title: 'mockPlugin.bar is deprecated',
+ message: 'mockPlugin.bar is deprecated and will be removed in a future Kibana version',
+ level: 'critical',
+ deprecationType: 'config',
+ correctiveActions: {
+ manualSteps: ['come on', 'do something'],
+ },
+ },
+ ];
+
+ const mockPluginRegistry = deprecationsFactory.getRegistry('mockPlugin');
+ mockPluginRegistry.registerDeprecations({
+ getDeprecations: jest.fn().mockResolvedValue(mockPluginDeprecationsInfo),
+ });
+
+ await expect(deprecationsFactory.getAllDeprecations(mockDependencies)).resolves.toBeDefined();
+ });
});
describe('getDeprecations', () => {
@@ -190,7 +313,7 @@ describe('DeprecationsFactory', () => {
} as unknown as GetDeprecationsContext;
it('returns a flattened array of DeprecationInfo', async () => {
- const deprecationsFactory = new DeprecationsFactory({ logger });
+ const deprecationsFactory = new DeprecationsFactory({ logger, config });
const deprecationsRegistry = deprecationsFactory.getRegistry('mockPlugin');
const deprecationsBody = [
{
@@ -215,40 +338,62 @@ describe('DeprecationsFactory', () => {
getDeprecations: jest.fn().mockResolvedValue(deprecationsBody),
});
- const derpecations = await deprecationsFactory.getDeprecations(
+ const deprecations = await deprecationsFactory.getDeprecations(
'mockPlugin',
mockDependencies
);
- expect(derpecations).toStrictEqual(
+ expect(deprecations).toStrictEqual(
deprecationsBody.flat().map((body) => ({ ...body, domainId: 'mockPlugin' }))
);
});
- it('removes empty entries from the returned array', async () => {
- const deprecationsFactory = new DeprecationsFactory({ logger });
+ it('excludes config deprecations explicitly ignored via `ignoredConfigDeprecations`', async () => {
+ const deprecationsFactory = new DeprecationsFactory({
+ logger,
+ config: {
+ ignoredConfigDeprecations: ['test.foo'],
+ },
+ });
const deprecationsRegistry = deprecationsFactory.getRegistry('mockPlugin');
- const deprecationsBody = [
+ const deprecationsBody: DeprecationsDetails[] = [
{
- message: 'mockPlugin message',
+ configPath: 'test.foo',
+ title: 'test.foo is deprecated',
+ message: 'test.foo is deprecated and will be removed in a future Kibana version',
level: 'critical',
+ deprecationType: 'config',
correctiveActions: {
- manualSteps: ['mockPlugin step 1', 'mockPlugin step 2'],
+ manualSteps: ['come on', 'do something'],
+ },
+ },
+ {
+ configPath: 'test.bar',
+ title: 'test.bar is deprecated',
+ message: 'test.bar is deprecated and will be removed in a future Kibana version',
+ level: 'critical',
+ deprecationType: 'config',
+ correctiveActions: {
+ manualSteps: ['come on', 'do something'],
},
},
- [undefined],
- undefined,
];
deprecationsRegistry.registerDeprecations({
getDeprecations: jest.fn().mockResolvedValue(deprecationsBody),
});
- const derpecations = await deprecationsFactory.getDeprecations(
+ const deprecations = await deprecationsFactory.getDeprecations(
'mockPlugin',
mockDependencies
);
- expect(derpecations).toHaveLength(1);
- expect(derpecations).toStrictEqual([{ ...deprecationsBody[0], domainId: 'mockPlugin' }]);
+ expect(deprecations).toHaveLength(1);
+ expect(deprecations[0]).toEqual(
+ expect.objectContaining({
+ deprecationType: 'config',
+ configPath: 'test.bar',
+ title: 'test.bar is deprecated',
+ })
+ );
});
});
});
diff --git a/src/core/server/deprecations/deprecations_factory.ts b/src/core/server/deprecations/deprecations_factory.ts
index 9905f0b26b4f3..ad28af2db528e 100644
--- a/src/core/server/deprecations/deprecations_factory.ts
+++ b/src/core/server/deprecations/deprecations_factory.ts
@@ -17,13 +17,21 @@ import type {
export interface DeprecationsFactoryDeps {
logger: Logger;
+ config: DeprecationsFactoryConfig;
+}
+
+export interface DeprecationsFactoryConfig {
+ ignoredConfigDeprecations: string[];
}
export class DeprecationsFactory {
private readonly registries: Map = new Map();
private readonly logger: Logger;
- constructor({ logger }: DeprecationsFactoryDeps) {
+ private readonly config: DeprecationsFactoryConfig;
+
+ constructor({ logger, config }: DeprecationsFactoryDeps) {
this.logger = logger;
+ this.config = config;
}
public getRegistry = (domainId: string): DeprecationsRegistry => {
@@ -41,7 +49,7 @@ export class DeprecationsFactory {
dependencies: GetDeprecationsContext
): Promise => {
const infoBody = await this.getDeprecationsBody(domainId, dependencies);
- return this.createDeprecationInfo(domainId, infoBody).flat();
+ return this.createDeprecationInfo(domainId, infoBody);
};
public getAllDeprecations = async (
@@ -63,13 +71,10 @@ export class DeprecationsFactory {
domainId: string,
deprecationInfoBody: DeprecationsDetails[]
): DomainDeprecationDetails[] => {
- return deprecationInfoBody
- .flat()
- .filter(Boolean)
- .map((pluginDeprecation) => ({
- ...pluginDeprecation,
- domainId,
- }));
+ return deprecationInfoBody.map((pluginDeprecation) => ({
+ ...pluginDeprecation,
+ domainId,
+ }));
};
private getDeprecationsBody = async (
@@ -113,7 +118,7 @@ export class DeprecationsFactory {
];
}
- return settledResult.value;
+ return filterIgnoredDeprecations(settledResult.value.flat(), this.config);
});
} catch (err) {
this.logger.warn(`Failed to get deprecations info for plugin "${domainId}".`, err);
@@ -121,3 +126,15 @@ export class DeprecationsFactory {
}
};
}
+
+const filterIgnoredDeprecations = (
+ deprecations: DeprecationsDetails[],
+ config: DeprecationsFactoryConfig
+): DeprecationsDetails[] => {
+ return deprecations.filter((deprecation) => {
+ if (deprecation.deprecationType === 'config') {
+ return !config.ignoredConfigDeprecations.includes(deprecation.configPath);
+ }
+ return true;
+ });
+};
diff --git a/src/core/server/deprecations/deprecations_service.mock.ts b/src/core/server/deprecations/deprecations_service.mock.ts
index 2f9c8bade6405..c274c4409cce2 100644
--- a/src/core/server/deprecations/deprecations_service.mock.ts
+++ b/src/core/server/deprecations/deprecations_service.mock.ts
@@ -50,7 +50,7 @@ const createDeprecationsServiceMock = () => {
stop: jest.fn(),
};
- mocked.setup.mockReturnValue(createInternalSetupContractMock());
+ mocked.setup.mockResolvedValue(createInternalSetupContractMock());
return mocked;
};
diff --git a/src/core/server/deprecations/deprecations_service.test.mocks.ts b/src/core/server/deprecations/deprecations_service.test.mocks.ts
new file mode 100644
index 0000000000000..3174698725f96
--- /dev/null
+++ b/src/core/server/deprecations/deprecations_service.test.mocks.ts
@@ -0,0 +1,18 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { mockDeprecationsFactory } from './deprecations_factory.mock';
+
+export const mockedDeprecationFactoryInstance = mockDeprecationsFactory.create();
+export const DeprecationsFactoryMock = jest
+ .fn()
+ .mockImplementation(() => mockedDeprecationFactoryInstance);
+
+jest.doMock('./deprecations_factory', () => ({
+ DeprecationsFactory: DeprecationsFactoryMock,
+}));
diff --git a/src/core/server/deprecations/deprecations_service.test.ts b/src/core/server/deprecations/deprecations_service.test.ts
index 0067cff1d2306..256cfdaa666b3 100644
--- a/src/core/server/deprecations/deprecations_service.test.ts
+++ b/src/core/server/deprecations/deprecations_service.test.ts
@@ -6,42 +6,69 @@
* Side Public License, v 1.
*/
+import { DeprecationsFactoryMock } from './deprecations_service.test.mocks';
+
/* eslint-disable dot-notation */
-import { DeprecationsService } from './deprecations_service';
+import { DeprecationsService, DeprecationsSetupDeps } from './deprecations_service';
import { httpServiceMock } from '../http/http_service.mock';
-import { mockRouter } from '../http/router/router.mock';
-import { savedObjectsClientMock, elasticsearchServiceMock } from '../mocks';
+import { savedObjectsClientMock, elasticsearchServiceMock, configServiceMock } from '../mocks';
import { mockCoreContext } from '../core_context.mock';
import { mockDeprecationsFactory } from './deprecations_factory.mock';
import { mockDeprecationsRegistry } from './deprecations_registry.mock';
describe('DeprecationsService', () => {
- const coreContext = mockCoreContext.create();
- const http = httpServiceMock.createInternalSetupContract();
- const router = mockRouter.create();
- http.createRouter.mockReturnValue(router);
- const deprecationsCoreSetupDeps = { http };
+ let coreContext: ReturnType;
+ let http: ReturnType;
+ let router: ReturnType;
+ let deprecationsCoreSetupDeps: DeprecationsSetupDeps;
+
+ beforeEach(() => {
+ const configService = configServiceMock.create({
+ atPath: { skip_deprecated_settings: ['hello', 'world'] },
+ });
+ coreContext = mockCoreContext.create({ configService });
+ http = httpServiceMock.createInternalSetupContract();
+ router = httpServiceMock.createRouter();
+ http.createRouter.mockReturnValue(router);
+ deprecationsCoreSetupDeps = { http };
+ });
- beforeEach(() => jest.clearAllMocks());
+ afterEach(() => {
+ jest.clearAllMocks();
+ DeprecationsFactoryMock.mockClear();
+ });
describe('#setup', () => {
- it('registers routes', () => {
+ it('registers routes', async () => {
const deprecationsService = new DeprecationsService(coreContext);
- deprecationsService.setup(deprecationsCoreSetupDeps);
- // Registers correct base api path
+ await deprecationsService.setup(deprecationsCoreSetupDeps);
+ // registers correct base api path
expect(http.createRouter).toBeCalledWith('/api/deprecations');
// registers get route '/'
expect(router.get).toHaveBeenCalledTimes(1);
expect(router.get).toHaveBeenCalledWith({ path: '/', validate: false }, expect.any(Function));
});
- it('calls registerConfigDeprecationsInfo', () => {
+ it('calls registerConfigDeprecationsInfo', async () => {
const deprecationsService = new DeprecationsService(coreContext);
const mockRegisterConfigDeprecationsInfo = jest.fn();
deprecationsService['registerConfigDeprecationsInfo'] = mockRegisterConfigDeprecationsInfo;
- deprecationsService.setup(deprecationsCoreSetupDeps);
+ await deprecationsService.setup(deprecationsCoreSetupDeps);
expect(mockRegisterConfigDeprecationsInfo).toBeCalledTimes(1);
});
+
+ it('creates DeprecationsFactory with the correct parameters', async () => {
+ const deprecationsService = new DeprecationsService(coreContext);
+ await deprecationsService.setup(deprecationsCoreSetupDeps);
+
+ expect(DeprecationsFactoryMock).toHaveBeenCalledTimes(1);
+ expect(DeprecationsFactoryMock).toHaveBeenCalledWith({
+ logger: expect.any(Object),
+ config: {
+ ignoredConfigDeprecations: ['hello', 'world'],
+ },
+ });
+ });
});
describe('#start', () => {
@@ -51,7 +78,7 @@ describe('DeprecationsService', () => {
const savedObjectsClient = savedObjectsClientMock.create();
const deprecationsService = new DeprecationsService(coreContext);
- deprecationsService.setup(deprecationsCoreSetupDeps);
+ await deprecationsService.setup(deprecationsCoreSetupDeps);
const start = deprecationsService.start();
const deprecationsClient = start.asScopedToClient(esClient, savedObjectsClient);
@@ -73,6 +100,7 @@ describe('DeprecationsService', () => {
'testDomain',
[
{
+ configPath: 'test',
message: 'testMessage',
documentationUrl: 'testDocUrl',
correctiveActions: {
@@ -100,6 +128,7 @@ describe('DeprecationsService', () => {
expect(configDeprecations).toMatchInlineSnapshot(`
Array [
Object {
+ "configPath": "test",
"correctiveActions": Object {
"manualSteps": Array [
"Using Kibana user management, change all users using the kibana_user role to the kibana_admin role.",
@@ -124,6 +153,7 @@ describe('DeprecationsService', () => {
'testDomain',
[
{
+ configPath: 'test',
message: 'testMessage',
level: 'warning',
correctiveActions: {
diff --git a/src/core/server/deprecations/deprecations_service.ts b/src/core/server/deprecations/deprecations_service.ts
index cfc0aae443d1b..0c3fd75987aa6 100644
--- a/src/core/server/deprecations/deprecations_service.ts
+++ b/src/core/server/deprecations/deprecations_service.ts
@@ -6,11 +6,14 @@
* Side Public License, v 1.
*/
+import { take } from 'rxjs/operators';
+
import { DeprecationsFactory } from './deprecations_factory';
import { DomainDeprecationDetails, RegisterDeprecationsConfig } from './types';
import { registerRoutes } from './routes';
-
+import { config as deprecationConfig, DeprecationConfigType } from './deprecation_config';
import { CoreContext } from '../core_context';
+import { IConfigService } from '../config';
import { CoreService } from '../../types';
import { InternalHttpServiceSetup } from '../http';
import { Logger } from '../logging';
@@ -103,6 +106,7 @@ export interface DeprecationsServiceSetup {
export interface DeprecationsClient {
getAllDeprecations: () => Promise;
}
+
export interface InternalDeprecationsServiceStart {
/**
* Creates a {@link DeprecationsClient} with provided SO client and ES client.
@@ -129,22 +133,33 @@ export class DeprecationsService
implements CoreService
{
private readonly logger: Logger;
- private readonly deprecationsFactory: DeprecationsFactory;
+ private readonly configService: IConfigService;
+ private deprecationsFactory?: DeprecationsFactory;
- constructor(private readonly coreContext: Pick) {
+ constructor(coreContext: Pick) {
this.logger = coreContext.logger.get('deprecations-service');
- this.deprecationsFactory = new DeprecationsFactory({
- logger: this.logger,
- });
+ this.configService = coreContext.configService;
}
- public setup({ http }: DeprecationsSetupDeps): InternalDeprecationsServiceSetup {
+ public async setup({ http }: DeprecationsSetupDeps): Promise {
this.logger.debug('Setting up Deprecations service');
- const deprecationsFactory = this.deprecationsFactory;
+
+ const config = await this.configService
+ .atPath(deprecationConfig.path)
+ .pipe(take(1))
+ .toPromise();
+
+ this.deprecationsFactory = new DeprecationsFactory({
+ logger: this.logger,
+ config: {
+ ignoredConfigDeprecations: config.skip_deprecated_settings,
+ },
+ });
registerRoutes({ http });
this.registerConfigDeprecationsInfo(this.deprecationsFactory);
+ const deprecationsFactory = this.deprecationsFactory;
return {
getRegistry: (domainId: string): DeprecationsServiceSetup => {
const registry = deprecationsFactory.getRegistry(domainId);
@@ -156,6 +171,9 @@ export class DeprecationsService
}
public start(): InternalDeprecationsServiceStart {
+ if (!this.deprecationsFactory) {
+ throw new Error('`setup` must be called before `start`');
+ }
return {
asScopedToClient: this.createScopedDeprecations(),
};
@@ -169,7 +187,7 @@ export class DeprecationsService
) => DeprecationsClient {
return (esClient: IScopedClusterClient, savedObjectsClient: SavedObjectsClientContract) => {
return {
- getAllDeprecations: this.deprecationsFactory.getAllDeprecations.bind(null, {
+ getAllDeprecations: this.deprecationsFactory!.getAllDeprecations.bind(null, {
savedObjectsClient,
esClient,
}),
@@ -178,7 +196,7 @@ export class DeprecationsService
}
private registerConfigDeprecationsInfo(deprecationsFactory: DeprecationsFactory) {
- const handledDeprecatedConfigs = this.coreContext.configService.getHandledDeprecatedConfigs();
+ const handledDeprecatedConfigs = this.configService.getHandledDeprecatedConfigs();
for (const [domainId, deprecationsContexts] of handledDeprecatedConfigs) {
const deprecationsRegistry = deprecationsFactory.getRegistry(domainId);
@@ -186,12 +204,14 @@ export class DeprecationsService
getDeprecations: () => {
return deprecationsContexts.map(
({
+ configPath,
title = `${domainId} has a deprecated setting`,
level = 'critical',
message,
correctiveActions,
documentationUrl,
}) => ({
+ configPath,
title,
level,
message,
diff --git a/src/core/server/deprecations/index.ts b/src/core/server/deprecations/index.ts
index 5c2a0b87b42de..d9225750f04a1 100644
--- a/src/core/server/deprecations/index.ts
+++ b/src/core/server/deprecations/index.ts
@@ -7,7 +7,10 @@
*/
export type {
+ BaseDeprecationDetails,
DeprecationsDetails,
+ ConfigDeprecationDetails,
+ FeatureDeprecationDetails,
GetDeprecationsContext,
RegisterDeprecationsConfig,
DeprecationsGetResponse,
@@ -21,3 +24,4 @@ export type {
} from './deprecations_service';
export { DeprecationsService } from './deprecations_service';
+export { config } from './deprecation_config';
diff --git a/src/core/server/deprecations/types.ts b/src/core/server/deprecations/types.ts
index e24c6a13fceea..3990a76f7578e 100644
--- a/src/core/server/deprecations/types.ts
+++ b/src/core/server/deprecations/types.ts
@@ -6,22 +6,16 @@
* Side Public License, v 1.
*/
+import type { MaybePromise } from '@kbn/utility-types';
import type { SavedObjectsClientContract } from '../saved_objects/types';
import type { IScopedClusterClient } from '../elasticsearch';
-type MaybePromise = T | Promise;
-
-/**
- * @internal
- */
-export interface DomainDeprecationDetails extends DeprecationsDetails {
- domainId: string;
-}
-
/**
+ * Base properties shared by all types of deprecations
+ *
* @public
*/
-export interface DeprecationsDetails {
+export interface BaseDeprecationDetails {
/**
* The title of the deprecation.
* Check the README for writing deprecations in `src/core/server/deprecations/README.mdx`
@@ -82,6 +76,33 @@ export interface DeprecationsDetails {
};
}
+/**
+ * @public
+ */
+export interface ConfigDeprecationDetails extends BaseDeprecationDetails {
+ configPath: string;
+ deprecationType: 'config';
+}
+
+/**
+ * @public
+ */
+export interface FeatureDeprecationDetails extends BaseDeprecationDetails {
+ deprecationType?: 'feature' | undefined;
+}
+
+/**
+ * @public
+ */
+export type DeprecationsDetails = ConfigDeprecationDetails | FeatureDeprecationDetails;
+
+/**
+ * @internal
+ */
+export type DomainDeprecationDetails = DeprecationsDetails & {
+ domainId: string;
+};
+
/**
* @public
*/
diff --git a/src/core/server/elasticsearch/elasticsearch_config.ts b/src/core/server/elasticsearch/elasticsearch_config.ts
index f5d44a87d5404..71b9f87c14fa3 100644
--- a/src/core/server/elasticsearch/elasticsearch_config.ts
+++ b/src/core/server/elasticsearch/elasticsearch_config.ts
@@ -145,6 +145,7 @@ const deprecations: ConfigDeprecationProvider = () => [
}
if (es.username === 'elastic') {
addDeprecation({
+ configPath: `${fromPath}.username`,
message: `Setting [${fromPath}.username] to "elastic" is deprecated. You should use the "kibana_system" user instead.`,
correctiveActions: {
manualSteps: [`Replace [${fromPath}.username] from "elastic" to "kibana_system".`],
@@ -152,6 +153,7 @@ const deprecations: ConfigDeprecationProvider = () => [
});
} else if (es.username === 'kibana') {
addDeprecation({
+ configPath: `${fromPath}.username`,
message: `Setting [${fromPath}.username] to "kibana" is deprecated. You should use the "kibana_system" user instead.`,
correctiveActions: {
manualSteps: [`Replace [${fromPath}.username] from "kibana" to "kibana_system".`],
@@ -160,6 +162,7 @@ const deprecations: ConfigDeprecationProvider = () => [
}
if (es.ssl?.key !== undefined && es.ssl?.certificate === undefined) {
addDeprecation({
+ configPath: `${fromPath}.ssl.key`,
message: `Setting [${fromPath}.ssl.key] without [${fromPath}.ssl.certificate] is deprecated. This has no effect, you should use both settings to enable TLS client authentication to Elasticsearch.`,
correctiveActions: {
manualSteps: [
@@ -169,6 +172,7 @@ const deprecations: ConfigDeprecationProvider = () => [
});
} else if (es.ssl?.certificate !== undefined && es.ssl?.key === undefined) {
addDeprecation({
+ configPath: `${fromPath}.ssl.certificate`,
message: `Setting [${fromPath}.ssl.certificate] without [${fromPath}.ssl.key] is deprecated. This has no effect, you should use both settings to enable TLS client authentication to Elasticsearch.`,
correctiveActions: {
manualSteps: [
@@ -178,6 +182,7 @@ const deprecations: ConfigDeprecationProvider = () => [
});
} else if (es.logQueries === true) {
addDeprecation({
+ configPath: `${fromPath}.logQueries`,
message: `Setting [${fromPath}.logQueries] is deprecated and no longer used. You should set the log level to "debug" for the "elasticsearch.queries" context in "logging.loggers" or use "logging.verbose: true".`,
correctiveActions: {
manualSteps: [
diff --git a/src/core/server/index.ts b/src/core/server/index.ts
index a9f2f00707646..92c758f7e6980 100644
--- a/src/core/server/index.ts
+++ b/src/core/server/index.ts
@@ -387,7 +387,10 @@ export { EventLoopDelaysMonitor } from './metrics';
export type { I18nServiceSetup } from './i18n';
export type {
+ BaseDeprecationDetails,
DeprecationsDetails,
+ ConfigDeprecationDetails,
+ FeatureDeprecationDetails,
RegisterDeprecationsConfig,
GetDeprecationsContext,
DeprecationsServiceSetup,
diff --git a/src/core/server/kibana_config.ts b/src/core/server/kibana_config.ts
index ead3f2cc2776a..859f25d7082f1 100644
--- a/src/core/server/kibana_config.ts
+++ b/src/core/server/kibana_config.ts
@@ -17,6 +17,7 @@ const deprecations: ConfigDeprecationProvider = () => [
const kibana = settings[fromPath];
if (kibana?.index) {
addDeprecation({
+ configPath: 'kibana.index',
title: i18n.translate('core.kibana.index.deprecationTitle', {
defaultMessage: `Setting "kibana.index" is deprecated`,
}),
diff --git a/src/core/server/saved_objects/saved_objects_config.ts b/src/core/server/saved_objects/saved_objects_config.ts
index 0c27f170f590b..c9b4b4499fa80 100644
--- a/src/core/server/saved_objects/saved_objects_config.ts
+++ b/src/core/server/saved_objects/saved_objects_config.ts
@@ -27,6 +27,7 @@ const migrationDeprecations: ConfigDeprecationProvider = () => [
const migrationsConfig = settings[fromPath];
if (migrationsConfig?.enableV2 !== undefined) {
addDeprecation({
+ configPath: `${fromPath}.enableV2`,
message:
'"migrations.enableV2" is deprecated and will be removed in an upcoming release without any further notice.',
documentationUrl: 'https://ela.st/kbn-so-migration-v2',
diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md
index a1e5d61744648..958083ae06899 100644
--- a/src/core/server/server.api.md
+++ b/src/core/server/server.api.md
@@ -33,6 +33,7 @@ import { LoggerFactory } from '@kbn/logging';
import { LogLevel } from '@kbn/logging';
import { LogMeta } from '@kbn/logging';
import { LogRecord } from '@kbn/logging';
+import { MaybePromise } from '@kbn/utility-types';
import { ObjectType } from '@kbn/config-schema';
import { Observable } from 'rxjs';
import { PackageInfo } from '@kbn/config';
@@ -156,6 +157,27 @@ export interface AuthToolkit {
} & ResponseHeaders) => AuthResult;
}
+// @public
+export interface BaseDeprecationDetails {
+ correctiveActions: {
+ api?: {
+ path: string;
+ method: 'POST' | 'PUT';
+ body?: {
+ [key: string]: any;
+ };
+ omitContextFromBody?: boolean;
+ };
+ manualSteps: string[];
+ };
+ deprecationType?: 'config' | 'feature';
+ documentationUrl?: string;
+ level: 'warning' | 'critical' | 'fetch_error';
+ message: string;
+ requireRestart?: boolean;
+ title: string;
+}
+
// @public
export class BasePath {
// @internal
@@ -250,6 +272,14 @@ export { ConfigDeprecation }
export { ConfigDeprecationContext }
+// @public (undocumented)
+export interface ConfigDeprecationDetails extends BaseDeprecationDetails {
+ // (undocumented)
+ configPath: string;
+ // (undocumented)
+ deprecationType: 'config';
+}
+
export { ConfigDeprecationFactory }
export { ConfigDeprecationProvider }
@@ -782,25 +812,7 @@ export interface DeprecationsClient {
}
// @public (undocumented)
-export interface DeprecationsDetails {
- correctiveActions: {
- api?: {
- path: string;
- method: 'POST' | 'PUT';
- body?: {
- [key: string]: any;
- };
- omitContextFromBody?: boolean;
- };
- manualSteps: string[];
- };
- deprecationType?: 'config' | 'feature';
- documentationUrl?: string;
- level: 'warning' | 'critical' | 'fetch_error';
- message: string;
- requireRestart?: boolean;
- title: string;
-}
+export type DeprecationsDetails = ConfigDeprecationDetails | FeatureDeprecationDetails;
// @public
export interface DeprecationSettings {
@@ -951,6 +963,12 @@ export interface FakeRequest {
headers: Headers;
}
+// @public (undocumented)
+export interface FeatureDeprecationDetails extends BaseDeprecationDetails {
+ // (undocumented)
+ deprecationType?: 'feature' | undefined;
+}
+
// @public
export type GetAuthHeaders = (request: KibanaRequest) => AuthHeaders | undefined;
@@ -1676,8 +1694,6 @@ export type RedirectResponseOptions = HttpResponseOptions & {
// @public (undocumented)
export interface RegisterDeprecationsConfig {
- // Warning: (ae-forgotten-export) The symbol "MaybePromise" needs to be exported by the entry point index.d.ts
- //
// (undocumented)
getDeprecations: (context: GetDeprecationsContext) => MaybePromise;
}
diff --git a/src/core/server/server.ts b/src/core/server/server.ts
index 59cde6835c519..b6f263f0c22ff 100644
--- a/src/core/server/server.ts
+++ b/src/core/server/server.ts
@@ -51,7 +51,7 @@ import {
ServiceConfigDescriptor,
} from './internal_types';
import { CoreUsageDataService } from './core_usage_data';
-import { DeprecationsService } from './deprecations';
+import { DeprecationsService, config as deprecationConfig } from './deprecations';
import { CoreRouteHandlerContext } from './core_route_handler_context';
import { config as externalUrlConfig } from './external_url';
import { config as executionContextConfig } from './execution_context';
@@ -206,7 +206,7 @@ export class Server {
executionContext: executionContextSetup,
});
- const deprecationsSetup = this.deprecations.setup({
+ const deprecationsSetup = await this.deprecations.setup({
http: httpSetup,
});
@@ -388,6 +388,7 @@ export class Server {
statusConfig,
pidConfig,
i18nConfig,
+ deprecationConfig,
];
this.configService.addDeprecationProvider(rootConfigPath, coreDeprecationProvider);
diff --git a/src/plugins/kibana_legacy/server/index.ts b/src/plugins/kibana_legacy/server/index.ts
index 90c9c2888c9da..15ae8547c73e1 100644
--- a/src/plugins/kibana_legacy/server/index.ts
+++ b/src/plugins/kibana_legacy/server/index.ts
@@ -27,6 +27,7 @@ export const config: PluginConfigDescriptor = {
return;
}
addDeprecation({
+ configPath: 'kibana.defaultAppId',
message: `kibana.defaultAppId is deprecated and will be removed in 8.0. Please use the \`defaultRoute\` advanced setting instead`,
correctiveActions: {
manualSteps: [
diff --git a/src/plugins/telemetry/server/config/deprecations.test.ts b/src/plugins/telemetry/server/config/deprecations.test.ts
index 7807cd21916d5..567ef69e8991c 100644
--- a/src/plugins/telemetry/server/config/deprecations.test.ts
+++ b/src/plugins/telemetry/server/config/deprecations.test.ts
@@ -158,6 +158,7 @@ describe('deprecateEndpointConfigs', () => {
expect(mockAddDeprecation.mock.calls[0]).toMatchInlineSnapshot(`
Array [
Object {
+ "configPath": "telemetry.url",
"correctiveActions": Object {
"manualSteps": Array [
"Remove \\"telemetry.url\\" from the Kibana configuration.",
@@ -180,6 +181,7 @@ describe('deprecateEndpointConfigs', () => {
expect(mockAddDeprecation.mock.calls[0]).toMatchInlineSnapshot(`
Array [
Object {
+ "configPath": "telemetry.optInStatusUrl",
"correctiveActions": Object {
"manualSteps": Array [
"Remove \\"telemetry.optInStatusUrl\\" from the Kibana configuration.",
diff --git a/src/plugins/telemetry/server/config/deprecations.ts b/src/plugins/telemetry/server/config/deprecations.ts
index 013ee51a2ddd9..38553be7d5774 100644
--- a/src/plugins/telemetry/server/config/deprecations.ts
+++ b/src/plugins/telemetry/server/config/deprecations.ts
@@ -35,6 +35,7 @@ export const deprecateEndpointConfigs: ConfigDeprecation = (
}
addDeprecation({
+ configPath: fullConfigPath,
title: i18n.translate('telemetry.endpointConfigs.deprecationTitle', {
defaultMessage: 'Setting "{configPath}" is deprecated',
values: { configPath: fullConfigPath },
diff --git a/test/plugin_functional/plugins/core_plugin_deprecations/server/config.ts b/test/plugin_functional/plugins/core_plugin_deprecations/server/config.ts
index 650567f761aa3..5b9145be52661 100644
--- a/test/plugin_functional/plugins/core_plugin_deprecations/server/config.ts
+++ b/test/plugin_functional/plugins/core_plugin_deprecations/server/config.ts
@@ -22,6 +22,7 @@ type ConfigType = TypeOf;
const configSecretDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => {
if (get(settings, 'corePluginDeprecations.secret') !== 42) {
addDeprecation({
+ configPath: 'corePluginDeprecations.secret',
documentationUrl: 'config-secret-doc-url',
message:
'Kibana plugin functional tests will no longer allow corePluginDeprecations.secret ' +
diff --git a/test/plugin_functional/test_suites/core/deprecations.ts b/test/plugin_functional/test_suites/core/deprecations.ts
index dbaf10008e35e..d8dc82a56cb55 100644
--- a/test/plugin_functional/test_suites/core/deprecations.ts
+++ b/test/plugin_functional/test_suites/core/deprecations.ts
@@ -19,6 +19,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
const CorePluginDeprecationsPluginDeprecations: DomainDeprecationDetails[] = [
{
+ configPath: 'corePluginDeprecations.oldProperty',
title: 'Setting "corePluginDeprecations.oldProperty" is deprecated',
level: 'critical',
message:
@@ -33,6 +34,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
requireRestart: true,
},
{
+ configPath: 'corePluginDeprecations.noLongerUsed',
title: 'Setting "corePluginDeprecations.noLongerUsed" is deprecated',
level: 'critical',
message: 'You no longer need to configure "corePluginDeprecations.noLongerUsed".',
@@ -46,6 +48,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
requireRestart: true,
},
{
+ configPath: 'corePluginDeprecations.secret',
title: 'corePluginDeprecations has a deprecated setting',
level: 'critical',
message:
diff --git a/x-pack/plugins/actions/server/index.ts b/x-pack/plugins/actions/server/index.ts
index 26f7da073223d..b3e019a1bf46d 100644
--- a/x-pack/plugins/actions/server/index.ts
+++ b/x-pack/plugins/actions/server/index.ts
@@ -69,6 +69,7 @@ export const config: PluginConfigDescriptor = {
)
) {
addDeprecation({
+ configPath: 'xpack.actions.customHostSettings.ssl.rejectUnauthorized',
message:
`"xpack.actions.customHostSettings[].ssl.rejectUnauthorized" is deprecated.` +
`Use "xpack.actions.customHostSettings[].ssl.verificationMode" instead, ` +
@@ -96,6 +97,7 @@ export const config: PluginConfigDescriptor = {
const actions = get(settings, fromPath);
if (actions?.hasOwnProperty('rejectUnauthorized')) {
addDeprecation({
+ configPath: `${fromPath}.rejectUnauthorized`,
message:
`"xpack.actions.rejectUnauthorized" is deprecated. Use "xpack.actions.verificationMode" instead, ` +
`with the setting "verificationMode:full" eql to "rejectUnauthorized:true", ` +
@@ -122,6 +124,7 @@ export const config: PluginConfigDescriptor = {
const actions = get(settings, fromPath);
if (actions?.hasOwnProperty('proxyRejectUnauthorizedCertificates')) {
addDeprecation({
+ configPath: `${fromPath}.proxyRejectUnauthorizedCertificates`,
message:
`"xpack.actions.proxyRejectUnauthorizedCertificates" is deprecated. Use "xpack.actions.proxyVerificationMode" instead, ` +
`with the setting "proxyVerificationMode:full" eql to "rejectUnauthorized:true",` +
@@ -148,6 +151,7 @@ export const config: PluginConfigDescriptor = {
const actions = get(settings, fromPath);
if (actions?.enabled === false || actions?.enabled === true) {
addDeprecation({
+ configPath: 'xpack.actions.enabled',
message: `"xpack.actions.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`,
correctiveActions: {
manualSteps: [`Remove "xpack.actions.enabled" from your kibana configs.`],
diff --git a/x-pack/plugins/alerting/server/index.ts b/x-pack/plugins/alerting/server/index.ts
index 3b4688173e9b5..b7a510a37661b 100644
--- a/x-pack/plugins/alerting/server/index.ts
+++ b/x-pack/plugins/alerting/server/index.ts
@@ -62,6 +62,7 @@ export const config: PluginConfigDescriptor = {
const alerting = get(settings, fromPath);
if (alerting?.enabled === false || alerting?.enabled === true) {
addDeprecation({
+ configPath: 'xpack.alerting.enabled',
message: `"xpack.alerting.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`,
correctiveActions: {
manualSteps: [`Remove "xpack.alerting.enabled" from your kibana configs.`],
diff --git a/x-pack/plugins/banners/server/config.ts b/x-pack/plugins/banners/server/config.ts
index 37b4c57fc2ce1..18c6dc7c04687 100644
--- a/x-pack/plugins/banners/server/config.ts
+++ b/x-pack/plugins/banners/server/config.ts
@@ -44,6 +44,8 @@ export const config: PluginConfigDescriptor = {
const pluginConfig = get(rootConfig, fromPath);
if (pluginConfig?.placement === 'header') {
addDeprecation({
+ configPath: 'xpack.banners.placement',
+ level: 'critical',
message: 'The `header` value for xpack.banners.placement has been replaced by `top`',
correctiveActions: {
manualSteps: [
diff --git a/x-pack/plugins/event_log/server/index.ts b/x-pack/plugins/event_log/server/index.ts
index deeee970ce68a..b643060415b19 100644
--- a/x-pack/plugins/event_log/server/index.ts
+++ b/x-pack/plugins/event_log/server/index.ts
@@ -33,6 +33,7 @@ export const config: PluginConfigDescriptor = {
settings?.xpack?.eventLog?.enabled === true
) {
addDeprecation({
+ configPath: 'xpack.eventLog.enabled',
message: `"xpack.eventLog.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`,
correctiveActions: {
manualSteps: [`Remove "xpack.eventLog.enabled" from your kibana configs.`],
diff --git a/x-pack/plugins/fleet/server/index.ts b/x-pack/plugins/fleet/server/index.ts
index 897f160810e29..cc754b87686e6 100644
--- a/x-pack/plugins/fleet/server/index.ts
+++ b/x-pack/plugins/fleet/server/index.ts
@@ -89,6 +89,7 @@ export const config: PluginConfigDescriptor = {
delete fullConfig.xpack.fleet.agents.elasticsearch.host;
fullConfig.xpack.fleet.agents.elasticsearch.hosts = [oldValue];
addDeprecation({
+ configPath: 'xpack.fleet.agents.elasticsearch.host',
message: `Config key [xpack.fleet.agents.elasticsearch.host] is deprecated and replaced by [xpack.fleet.agents.elasticsearch.hosts]`,
correctiveActions: {
manualSteps: [
diff --git a/x-pack/plugins/maps/server/index.ts b/x-pack/plugins/maps/server/index.ts
index 4e5dfcf1f94c4..6a846bc245824 100644
--- a/x-pack/plugins/maps/server/index.ts
+++ b/x-pack/plugins/maps/server/index.ts
@@ -34,6 +34,7 @@ export const config: PluginConfigDescriptor = {
return completeConfig;
}
addDeprecation({
+ configPath: 'xpack.maps.showMapVisualizationTypes',
message: i18n.translate('xpack.maps.deprecation.showMapVisualizationTypes.message', {
defaultMessage:
'xpack.maps.showMapVisualizationTypes is deprecated and is no longer used',
@@ -59,6 +60,7 @@ export const config: PluginConfigDescriptor = {
return completeConfig;
}
addDeprecation({
+ configPath: 'map.proxyElasticMapsServiceInMaps',
documentationUrl: `https://www.elastic.co/guide/en/kibana/${branch}/maps-connect-to-ems.html#elastic-maps-server`,
message: i18n.translate('xpack.maps.deprecation.proxyEMS.message', {
defaultMessage: 'map.proxyElasticMapsServiceInMaps is deprecated and is no longer used',
@@ -86,6 +88,7 @@ export const config: PluginConfigDescriptor = {
return completeConfig;
}
addDeprecation({
+ configPath: 'map.regionmap',
message: i18n.translate('xpack.maps.deprecation.regionmap.message', {
defaultMessage: 'map.regionmap is deprecated and is no longer used',
}),
diff --git a/x-pack/plugins/monitoring/server/deprecations.ts b/x-pack/plugins/monitoring/server/deprecations.ts
index 3554abd569581..9dec7b105f2f6 100644
--- a/x-pack/plugins/monitoring/server/deprecations.ts
+++ b/x-pack/plugins/monitoring/server/deprecations.ts
@@ -55,6 +55,7 @@ export const deprecations = ({
const legacyKey = get(config, `xpack.monitoring.${CLUSTER_ALERTS_ADDRESS_CONFIG_KEY}`);
if (emailNotificationsEnabled && !updatedKey && !legacyKey) {
addDeprecation({
+ configPath: `cluster_alerts.email_notifications.enabled`,
message: `Config key [${fromPath}.${CLUSTER_ALERTS_ADDRESS_CONFIG_KEY}] will be required for email notifications to work in 8.0."`,
correctiveActions: {
manualSteps: [
@@ -70,6 +71,7 @@ export const deprecations = ({
if (es) {
if (es.username === 'elastic') {
addDeprecation({
+ configPath: 'elasticsearch.username',
message: `Setting [${fromPath}.username] to "elastic" is deprecated. You should use the "kibana_system" user instead.`,
correctiveActions: {
manualSteps: [`Replace [${fromPath}.username] from "elastic" to "kibana_system".`],
@@ -77,6 +79,7 @@ export const deprecations = ({
});
} else if (es.username === 'kibana') {
addDeprecation({
+ configPath: 'elasticsearch.username',
message: `Setting [${fromPath}.username] to "kibana" is deprecated. You should use the "kibana_system" user instead.`,
correctiveActions: {
manualSteps: [`Replace [${fromPath}.username] from "kibana" to "kibana_system".`],
@@ -91,6 +94,7 @@ export const deprecations = ({
if (ssl) {
if (ssl.key !== undefined && ssl.certificate === undefined) {
addDeprecation({
+ configPath: 'elasticsearch.ssl.key',
message: `Setting [${fromPath}.key] without [${fromPath}.certificate] is deprecated. This has no effect, you should use both settings to enable TLS client authentication to Elasticsearch.`,
correctiveActions: {
manualSteps: [
@@ -100,6 +104,7 @@ export const deprecations = ({
});
} else if (ssl.certificate !== undefined && ssl.key === undefined) {
addDeprecation({
+ configPath: 'elasticsearch.ssl.certificate',
message: `Setting [${fromPath}.certificate] without [${fromPath}.key] is deprecated. This has no effect, you should use both settings to enable TLS client authentication to Elasticsearch.`,
correctiveActions: {
manualSteps: [
diff --git a/x-pack/plugins/reporting/server/config/index.ts b/x-pack/plugins/reporting/server/config/index.ts
index a45c084131a4d..1eeafb4e0c513 100644
--- a/x-pack/plugins/reporting/server/config/index.ts
+++ b/x-pack/plugins/reporting/server/config/index.ts
@@ -25,6 +25,7 @@ export const config: PluginConfigDescriptor = {
const reporting = get(settings, fromPath);
if (reporting?.index) {
addDeprecation({
+ configPath: `${fromPath}.index`,
title: i18n.translate('xpack.reporting.deprecations.reportingIndex.title', {
defaultMessage: 'Setting "{fromPath}.index" is deprecated',
values: { fromPath },
@@ -51,6 +52,7 @@ export const config: PluginConfigDescriptor = {
if (reporting?.roles?.enabled !== false) {
addDeprecation({
+ configPath: `${fromPath}.roles.enabled`,
level: 'warning',
title: i18n.translate('xpack.reporting.deprecations.reportingRoles.title', {
defaultMessage: 'Setting "{fromPath}.roles" is deprecated',
diff --git a/x-pack/plugins/security/server/config_deprecations.test.ts b/x-pack/plugins/security/server/config_deprecations.test.ts
index 634df081d77d7..d4b18a2e1b296 100644
--- a/x-pack/plugins/security/server/config_deprecations.test.ts
+++ b/x-pack/plugins/security/server/config_deprecations.test.ts
@@ -17,6 +17,7 @@ const deprecationContext = configDeprecationsMock.createContext();
const applyConfigDeprecations = (settings: Record = {}) => {
const deprecations = securityConfigDeprecationProvider(configDeprecationFactory);
const deprecationMessages: string[] = [];
+ const configPaths: string[] = [];
const { config: migrated } = applyDeprecations(
settings,
deprecations.map((deprecation) => ({
@@ -25,10 +26,13 @@ const applyConfigDeprecations = (settings: Record = {}) => {
context: deprecationContext,
})),
() =>
- ({ message }) =>
- deprecationMessages.push(message)
+ ({ message, configPath }) => {
+ deprecationMessages.push(message);
+ configPaths.push(configPath);
+ }
);
return {
+ configPaths,
messages: deprecationMessages,
migrated,
};
@@ -356,12 +360,14 @@ describe('Config Deprecations', () => {
},
},
};
- const { messages } = applyConfigDeprecations(cloneDeep(config));
+ const { messages, configPaths } = applyConfigDeprecations(cloneDeep(config));
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"xpack.security.authc.providers.saml..maxRedirectURLSize\\" is no longer used.",
]
`);
+
+ expect(configPaths).toEqual(['xpack.security.authc.providers.saml.saml1.maxRedirectURLSize']);
});
it(`warns when 'xpack.security.authc.providers' is an array of strings`, () => {
diff --git a/x-pack/plugins/security/server/config_deprecations.ts b/x-pack/plugins/security/server/config_deprecations.ts
index ce9eb76fb1dc8..c8c8e64648c4b 100644
--- a/x-pack/plugins/security/server/config_deprecations.ts
+++ b/x-pack/plugins/security/server/config_deprecations.ts
@@ -35,6 +35,7 @@ export const securityConfigDeprecationProvider: ConfigDeprecationProvider = ({
const legacyAuditLoggerEnabled = !settings?.xpack?.security?.audit?.appender;
if (auditLoggingEnabled && legacyAuditLoggerEnabled) {
addDeprecation({
+ configPath: 'xpack.security.audit.appender',
title: i18n.translate('xpack.security.deprecations.auditLoggerTitle', {
defaultMessage: 'The legacy audit logger is deprecated',
}),
@@ -59,6 +60,7 @@ export const securityConfigDeprecationProvider: ConfigDeprecationProvider = ({
(settings, fromPath, addDeprecation) => {
if (Array.isArray(settings?.xpack?.security?.authc?.providers)) {
addDeprecation({
+ configPath: 'xpack.security.authc.providers',
title: i18n.translate('xpack.security.deprecations.authcProvidersTitle', {
defaultMessage:
'Defining "xpack.security.authc.providers" as an array of provider types is deprecated',
@@ -92,6 +94,7 @@ export const securityConfigDeprecationProvider: ConfigDeprecationProvider = ({
if (hasProviderType('basic') && hasProviderType('token')) {
addDeprecation({
+ configPath: 'xpack.security.authc.providers',
title: i18n.translate('xpack.security.deprecations.basicAndTokenProvidersTitle', {
defaultMessage:
'Both "basic" and "token" authentication providers are enabled in "xpack.security.authc.providers"',
@@ -119,8 +122,13 @@ export const securityConfigDeprecationProvider: ConfigDeprecationProvider = ({
string,
any
>;
- if (Object.values(samlProviders).find((provider) => !!provider.maxRedirectURLSize)) {
+
+ const foundProvider = Object.entries(samlProviders).find(
+ ([_, provider]) => !!provider.maxRedirectURLSize
+ );
+ if (foundProvider) {
addDeprecation({
+ configPath: `xpack.security.authc.providers.saml.${foundProvider[0]}.maxRedirectURLSize`,
title: i18n.translate('xpack.security.deprecations.maxRedirectURLSizeTitle', {
defaultMessage:
'"xpack.security.authc.providers.saml..maxRedirectURLSize" is deprecated',
@@ -143,6 +151,7 @@ export const securityConfigDeprecationProvider: ConfigDeprecationProvider = ({
(settings, fromPath, addDeprecation, { branch }) => {
if ('enabled' in (settings?.xpack?.security || {})) {
addDeprecation({
+ configPath: 'xpack.security.enabled',
title: i18n.translate('xpack.security.deprecations.enabledTitle', {
defaultMessage: 'Setting "xpack.security.enabled" is deprecated',
}),
@@ -169,6 +178,7 @@ export const securityConfigDeprecationProvider: ConfigDeprecationProvider = ({
(settings, fromPath, addDeprecation, { branch }) => {
if (settings?.xpack?.security?.session?.idleTimeout === undefined) {
addDeprecation({
+ configPath: 'xpack.security.session.idleTimeout',
level: 'warning',
title: i18n.translate('xpack.security.deprecations.idleTimeoutTitle', {
defaultMessage: 'The "xpack.security.session.idleTimeout" default is changing',
@@ -192,6 +202,7 @@ export const securityConfigDeprecationProvider: ConfigDeprecationProvider = ({
if (settings?.xpack?.security?.session?.lifespan === undefined) {
addDeprecation({
+ configPath: 'xpack.security.session.lifespan',
level: 'warning',
title: i18n.translate('xpack.security.deprecations.lifespanTitle', {
defaultMessage: 'The "xpack.security.session.lifespan" default is changing',
diff --git a/x-pack/plugins/spaces/server/config.ts b/x-pack/plugins/spaces/server/config.ts
index 4abaf4f0ca569..a8c3a1c6223da 100644
--- a/x-pack/plugins/spaces/server/config.ts
+++ b/x-pack/plugins/spaces/server/config.ts
@@ -28,6 +28,7 @@ export function createConfig$(context: PluginInitializerContext) {
const disabledDeprecation: ConfigDeprecation = (config, fromPath, addDeprecation) => {
if ('enabled' in (config?.xpack?.spaces || {})) {
addDeprecation({
+ configPath: 'xpack.spaces.enabled',
title: i18n.translate('xpack.spaces.deprecations.enabledTitle', {
defaultMessage: 'Setting "xpack.spaces.enabled" is deprecated',
}),
diff --git a/x-pack/plugins/stack_alerts/server/index.ts b/x-pack/plugins/stack_alerts/server/index.ts
index 9491f3e646c70..1ac774a2d6c3f 100644
--- a/x-pack/plugins/stack_alerts/server/index.ts
+++ b/x-pack/plugins/stack_alerts/server/index.ts
@@ -18,6 +18,7 @@ export const config: PluginConfigDescriptor = {
const stackAlerts = get(settings, fromPath);
if (stackAlerts?.enabled === false || stackAlerts?.enabled === true) {
addDeprecation({
+ configPath: 'xpack.stack_alerts.enabled',
message: `"xpack.stack_alerts.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`,
correctiveActions: {
manualSteps: [`Remove "xpack.stack_alerts.enabled" from your kibana configs.`],
diff --git a/x-pack/plugins/task_manager/server/index.ts b/x-pack/plugins/task_manager/server/index.ts
index 84bee044c4de9..2a360fc1a1d90 100644
--- a/x-pack/plugins/task_manager/server/index.ts
+++ b/x-pack/plugins/task_manager/server/index.ts
@@ -49,6 +49,7 @@ export const config: PluginConfigDescriptor = {
const taskManager = get(settings, fromPath);
if (taskManager?.index) {
addDeprecation({
+ configPath: `${fromPath}.index`,
documentationUrl: 'https://ela.st/kbn-remove-legacy-multitenancy',
message: `"${fromPath}.index" is deprecated. Multitenancy by changing "kibana.index" will not be supported starting in 8.0. See https://ela.st/kbn-remove-legacy-multitenancy for more details`,
correctiveActions: {
@@ -61,6 +62,7 @@ export const config: PluginConfigDescriptor = {
}
if (taskManager?.max_workers > MAX_WORKERS_LIMIT) {
addDeprecation({
+ configPath: `${fromPath}.max_workers`,
message: `setting "${fromPath}.max_workers" (${taskManager?.max_workers}) greater than ${MAX_WORKERS_LIMIT} is deprecated. Values greater than ${MAX_WORKERS_LIMIT} will not be supported starting in 8.0.`,
correctiveActions: {
manualSteps: [
@@ -75,6 +77,7 @@ export const config: PluginConfigDescriptor = {
const taskManager = get(settings, fromPath);
if (taskManager?.enabled === false || taskManager?.enabled === true) {
addDeprecation({
+ configPath: 'xpack.task_manager.enabled',
message: `"xpack.task_manager.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`,
correctiveActions: {
manualSteps: [`Remove "xpack.task_manager.enabled" from your kibana configs.`],
diff --git a/x-pack/plugins/triggers_actions_ui/server/index.ts b/x-pack/plugins/triggers_actions_ui/server/index.ts
index c7d363af45247..72ca584250d03 100644
--- a/x-pack/plugins/triggers_actions_ui/server/index.ts
+++ b/x-pack/plugins/triggers_actions_ui/server/index.ts
@@ -31,6 +31,7 @@ export const config: PluginConfigDescriptor = {
const triggersActionsUi = get(settings, fromPath);
if (triggersActionsUi?.enabled === false || triggersActionsUi?.enabled === true) {
addDeprecation({
+ configPath: 'xpack.trigger_actions_ui.enabled',
message: `"xpack.trigger_actions_ui.enabled" is deprecated. The ability to disable this plugin will be removed in 8.0.0.`,
correctiveActions: {
manualSteps: [`Remove "xpack.trigger_actions_ui.enabled" from your kibana configs.`],
diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/service.mock.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/service.mock.ts
index 1767143fdf527..6a3d376acecab 100644
--- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/service.mock.ts
+++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/kibana_deprecations/service.mock.ts
@@ -22,6 +22,7 @@ const kibanaDeprecations: DomainDeprecationDetails[] = [
title: 'Test deprecation title 1',
message: 'Test deprecation message 1',
deprecationType: 'config',
+ configPath: 'test',
},
{
correctiveActions: {
diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx
index 23697b00923c8..013f59a7dcf56 100644
--- a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx
+++ b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx
@@ -75,10 +75,10 @@ export interface DeprecationResolutionState {
resolveDeprecationError?: string;
}
-export interface KibanaDeprecationDetails extends DomainDeprecationDetails {
+export type KibanaDeprecationDetails = DomainDeprecationDetails & {
id: string;
filterType: DomainDeprecationDetails['deprecationType'] | 'uncategorized';
-}
+};
const getDeprecationCountByLevel = (deprecations: KibanaDeprecationDetails[]) => {
const criticalDeprecations: KibanaDeprecationDetails[] = [];
diff --git a/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts b/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts
index 63532543a418b..296a313abef38 100644
--- a/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts
+++ b/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts
@@ -20,7 +20,7 @@ const mockKibanaDeprecations: DomainDeprecationDetails[] = [
'Using Kibana role-mapping management, change all role-mappings which assing the kibana_user role to the kibana_admin role.',
],
},
- deprecationType: 'config',
+ deprecationType: 'feature',
documentationUrl: 'testDocUrl',
level: 'critical',
message: 'testMessage',