Skip to content

Commit

Permalink
Disable search sessions by default (elastic#203927)
Browse files Browse the repository at this point in the history
## Summary

Part of elastic#203925.
Resolves elastic#205812.

Changes the default for search sessions to be disabled.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
  • Loading branch information
lukasolson authored Jan 16, 2025
1 parent 94660cf commit c5bacd4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/platform/plugins/shared/data/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const searchSessionsConfigSchema = schema.object({
/**
* Turns the feature on \ off (incl. removing indicator and management screens)
*/
enabled: schema.boolean({ defaultValue: true }),
enabled: schema.boolean({ defaultValue: false }),

/**
* notTouchedTimeout controls how long user can save a session after all searches completed.
Expand Down
7 changes: 7 additions & 0 deletions x-pack/test/api_integration/apis/search/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,12 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
return {
...baseIntegrationTestsConfig.getAll(),
testFiles: [require.resolve('.')],
kbnTestServer: {
...baseIntegrationTestsConfig.get('kbnTestServer'),
serverArgs: [
...baseIntegrationTestsConfig.get('kbnTestServer.serverArgs'),
'--data.search.sessions.enabled=true', // enable search sessions
],
},
};
}
2 changes: 2 additions & 0 deletions x-pack/test/examples/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...xpackFunctionalConfig.get('kbnTestServer.serverArgs'),
// Required to load new platform plugins via `--plugin-path` flag.
'--env.name=development',
// Needed for search_examples tests
'--data.search.sessions.enabled=true',
...findTestPluginPaths([
resolve(KIBANA_ROOT, 'examples'),
resolve(KIBANA_ROOT, 'x-pack/examples'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
'objects',
'aiAssistantManagementSelection',
'tags',
'search_sessions',
'spaces',
'settings',
],
Expand Down
1 change: 1 addition & 0 deletions x-pack/test/search_sessions_integration/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...xpackFunctionalConfig.get('kbnTestServer'),
serverArgs: [
...xpackFunctionalConfig.get('kbnTestServer.serverArgs'),
'--data.search.sessions.enabled=true', // enable search sessions
'--data.search.sessions.management.refreshInterval=10s', // enable automatic refresh for sessions management screen
],
},
Expand Down

0 comments on commit c5bacd4

Please sign in to comment.