Skip to content

Commit

Permalink
Deprecate Search Sessions config (#188037)
Browse files Browse the repository at this point in the history
## Summary

Part of #186334.

Deprecates the config settings for the Search Sessions feature.


![image](https://github.com/elastic/kibana/assets/1178348/3ae9ec39-1a66-468c-86bc-dd9dfe6d6ef8)

### Release note

Config related to Search Sessions (`data.search.sessions.*`) is
deprecated and will be removed in a future version.
  • Loading branch information
lukasolson authored Jul 23, 2024
1 parent 1d08044 commit 9be68ee
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/plugins/data/server/config_deprecations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
]
`);
});
Expand Down Expand Up @@ -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.",
]
`);
});
Expand Down Expand Up @@ -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.",
]
`);
});
Expand Down
27 changes: 20 additions & 7 deletions src/plugins/data/server/config_deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
];

0 comments on commit 9be68ee

Please sign in to comment.