diff --git a/src/plugins/data/server/config_deprecations.test.ts b/src/plugins/data/server/config_deprecations.test.ts index 674e1e9a6435b..d275561674e33 100644 --- a/src/plugins/data/server/config_deprecations.test.ts +++ b/src/plugins/data/server/config_deprecations.test.ts @@ -61,6 +61,7 @@ describe('Config Deprecations', () => { expect(messages).toMatchInlineSnapshot(` Array [ "Setting \\"xpack.data_enhanced.search.sessions\\" has been replaced by \\"data.search.sessions\\"", + "Configuring \\"data.search.sessions.enabled\\" is deprecated and will be removed in 9.0.0.", ] `); }); @@ -101,6 +102,7 @@ describe('Config Deprecations', () => { "You no longer need to configure \\"data.search.sessions.expireInterval\\".", "You no longer need to configure \\"data.search.sessions.monitoringTaskTimeout\\".", "You no longer need to configure \\"data.search.sessions.notTouchedInProgressTimeout\\".", + "Configuring \\"data.search.sessions.enabled\\" is deprecated and will be removed in 9.0.0.", ] `); }); @@ -144,6 +146,7 @@ describe('Config Deprecations', () => { "You no longer need to configure \\"data.search.sessions.expireInterval\\".", "You no longer need to configure \\"data.search.sessions.monitoringTaskTimeout\\".", "You no longer need to configure \\"data.search.sessions.notTouchedInProgressTimeout\\".", + "Configuring \\"data.search.sessions.enabled\\" is deprecated and will be removed in 9.0.0.", ] `); }); diff --git a/src/plugins/data/server/config_deprecations.ts b/src/plugins/data/server/config_deprecations.ts index 3adbcf1c2178d..481c5e3e2e8f0 100644 --- a/src/plugins/data/server/config_deprecations.ts +++ b/src/plugins/data/server/config_deprecations.ts @@ -8,17 +8,30 @@ import type { ConfigDeprecationProvider } from '@kbn/core/server'; +const level = 'warning'; + export const configDeprecationProvider: ConfigDeprecationProvider = ({ renameFromRoot, unusedFromRoot, + deprecateFromRoot, }) => [ renameFromRoot('xpack.data_enhanced.search.sessions', 'data.search.sessions', { - level: 'warning', + level, }), - unusedFromRoot('data.search.sessions.pageSize', { level: 'warning' }), - unusedFromRoot('data.search.sessions.trackingInterval', { level: 'warning' }), - unusedFromRoot('data.search.sessions.cleanupInterval', { level: 'warning' }), - unusedFromRoot('data.search.sessions.expireInterval', { level: 'warning' }), - unusedFromRoot('data.search.sessions.monitoringTaskTimeout', { level: 'warning' }), - unusedFromRoot('data.search.sessions.notTouchedInProgressTimeout', { level: 'warning' }), + unusedFromRoot('data.search.sessions.pageSize', { level }), + unusedFromRoot('data.search.sessions.trackingInterval', { level }), + unusedFromRoot('data.search.sessions.cleanupInterval', { level }), + unusedFromRoot('data.search.sessions.expireInterval', { level }), + unusedFromRoot('data.search.sessions.monitoringTaskTimeout', { level }), + unusedFromRoot('data.search.sessions.notTouchedInProgressTimeout', { level }), + + // Search sessions config deprecations + deprecateFromRoot('data.search.sessions.enabled', '9.0.0', { level }), + deprecateFromRoot('data.search.sessions.notTouchedTimeout', '9.0.0', { level }), + deprecateFromRoot('data.search.sessions.maxUpdateRetries', '9.0.0', { level }), + deprecateFromRoot('data.search.sessions.defaultExpiration', '9.0.0', { level }), + deprecateFromRoot('data.search.sessions.management.maxSessions', '9.0.0', { level }), + deprecateFromRoot('data.search.sessions.management.refreshInterval', '9.0.0', { level }), + deprecateFromRoot('data.search.sessions.management.refreshTimeout', '9.0.0', { level }), + deprecateFromRoot('data.search.sessions.management.expiresSoonWarning', '9.0.0', { level }), ];