[9.1] [scout] support custom servers configuration (#244306)#245996
Merged
dmlemeshko merged 5 commits intoelastic:9.1from Dec 11, 2025
Merged
[9.1] [scout] support custom servers configuration (#244306)#245996dmlemeshko merged 5 commits intoelastic:9.1from
dmlemeshko merged 5 commits intoelastic:9.1from
Conversation
## Summary part of elastic/appex-qa-team#562 This PR adds support for custom server configurations by creating a scout directory with the name matching the directory with configuration files under `kbn-scout/src/servers/configs/custom`. ### Usage 1. Define custom configurations under `kbn-scout/src/servers/configs/custom` by creating a new directory e.g. `uiam_local` and adding configs for modes it should support (e.g. `es.serverless.config`, **check kbn-scout/src/servers/configs/default for naming** ): ```ts // custom/uiam_local/serverless/es.serverless.config.ts import type { ScoutServerConfig } from '../../../types'; import { defaultConfig } from '../../default/serverless/serverless.base.config'; export const servers: ScoutServerConfig = { ...defaultConfig, // Your custom configuration }; ``` 2. Create a new test directory under <plugin|package>/test/scout_`<dir_name_with_custom_configs>`: `x-pack/platform/plugins/shared/security/test/scout_uiam_local` 3. Keep the `<ui|api>tests` & `playwright.config.ts` design as in the regular `scout` dir, use the same tags in spec files. 4. Run your tests as usual: ```bash node scripts/scout run-tests --serverless=es --config x-pack/platform/plugins/shared/security/test/scout_uiam_local/ui/playwright.config.ts // to only start the server using configs from custom directory node scripts/scout start-server --serverless=es --config-dir uiam_local ``` ### Important - Tests defined in `scout_<config_dir_name>` directory are not included in the main scout builder CI step, but rather in its own for custom configs (to be added as a follow-up) - They do not benefit from smart test balancing due to custom server setup. - **The tests won't be run in Cloud** due to custom servers setup requirement, keep it in mind and mitigate the risks (cherry picked from commit 0b42c31) # Conflicts: # src/platform/packages/shared/kbn-scout/src/cli/config_discovery.test.ts # src/platform/packages/shared/kbn-scout/src/cli/config_discovery.ts # src/platform/packages/shared/kbn-scout/src/config/utils/get_config_file.ts # src/platform/packages/shared/kbn-scout/src/playwright/runner/flags.ts # src/platform/packages/shared/kbn-scout/src/playwright/runner/run_tests.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/config.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/default/serverless/es.serverless.config.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/default/serverless/oblt.serverless.config.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/default/serverless/oblt_logs_essentials.serverless.config.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/default/serverless/security.serverless.config.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/default/serverless/serverless.base.config.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/default/stateful/base.config.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/default/stateful/stateful.config.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/loader/read_config_file.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/utils/load_servers_config.test.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/utils/load_servers_config.ts # src/platform/packages/shared/kbn-scout/src/servers/configs/utils/save_scout_test_config.ts # src/platform/packages/shared/kbn-scout/src/servers/flags.ts # src/platform/packages/shared/kbn-scout/src/servers/run_kibana_server.ts # src/platform/packages/shared/kbn-scout/src/servers/start_servers.ts # x-pack/solutions/observability/plugins/slo/test/scout/ui/tests/slos_overview.spec.ts
Contributor
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
dmlemeshko
commented
Dec 11, 2025
Comment on lines
+10
to
+13
| import { defaultConfig } from './serverless.base.config'; | ||
| import type { ScoutServerConfig } from '../../../../types'; | ||
|
|
||
| export const servers: ScoutServerConfig = { |
Contributor
Author
There was a problem hiding this comment.
I think it is ok to backport it to 9.1 and avoid conflicts in the future. It won't be run, but at least persist in branch
csr
approved these changes
Dec 11, 2025
Contributor
💚 Build Succeeded
Metrics [docs]
History
|
dmlemeshko
added a commit
that referenced
this pull request
Dec 12, 2025
# Backport This will backport the following commits from `main` to `8.19`: - [[scout] support custom servers configuration (#244306)](#244306) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-12-08T15:25:50Z","message":"[scout] support custom servers configuration (#244306)\n\n## Summary\n\npart of https://github.com/elastic/appex-qa-team/issues/562\n\nThis PR adds support for custom server configurations by creating a\nscout directory with the name matching the directory with configuration\nfiles under `kbn-scout/src/servers/configs/custom`.\n\n\n### Usage\n\n\n1. Define custom configurations under\n`kbn-scout/src/servers/configs/custom` by creating a new directory e.g.\n`uiam_local` and adding configs for modes it should support (e.g.\n`es.serverless.config`, **check kbn-scout/src/servers/configs/default\nfor naming** ):\n```ts\n // custom/uiam_local/serverless/es.serverless.config.ts\n import type { ScoutServerConfig } from '../../../types';\n import { defaultConfig } from '../../default/serverless/serverless.base.config';\n \n export const servers: ScoutServerConfig = {\n ...defaultConfig,\n // Your custom configuration\n };\n```\n\n2. Create a new test directory under\n<plugin|package>/test/scout_`<dir_name_with_custom_configs>`:\n`x-pack/platform/plugins/shared/security/test/scout_uiam_local`\n3. Keep the `<ui|api>tests` & `playwright.config.ts` design as in the\nregular `scout` dir, use the same tags in spec files.\n4. Run your tests as usual:\n\n```bash\nnode scripts/scout run-tests --serverless=es --config x-pack/platform/plugins/shared/security/test/scout_uiam_local/ui/playwright.config.ts\n\n// to only start the server using configs from custom directory\nnode scripts/scout start-server --serverless=es --config-dir uiam_local\n```\n\n### Important\n- Tests defined in `scout_<config_dir_name>` directory are not included\nin the main scout builder CI step, but rather in its own for custom\nconfigs (to be added as a follow-up)\n- They do not benefit from smart test balancing due to custom server\nsetup.\n- **The tests won't be run in Cloud** due to custom servers setup\nrequirement, keep it in mind and mitigate the risks","sha":"0b42c313bb20fb502573065537199f976381bb73","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.3.0","Team:obs-ux-management","v9.2.3","v9.1.9"],"title":"[scout] support custom servers configuration","number":244306,"url":"https://github.com/elastic/kibana/pull/244306","mergeCommit":{"message":"[scout] support custom servers configuration (#244306)\n\n## Summary\n\npart of https://github.com/elastic/appex-qa-team/issues/562\n\nThis PR adds support for custom server configurations by creating a\nscout directory with the name matching the directory with configuration\nfiles under `kbn-scout/src/servers/configs/custom`.\n\n\n### Usage\n\n\n1. Define custom configurations under\n`kbn-scout/src/servers/configs/custom` by creating a new directory e.g.\n`uiam_local` and adding configs for modes it should support (e.g.\n`es.serverless.config`, **check kbn-scout/src/servers/configs/default\nfor naming** ):\n```ts\n // custom/uiam_local/serverless/es.serverless.config.ts\n import type { ScoutServerConfig } from '../../../types';\n import { defaultConfig } from '../../default/serverless/serverless.base.config';\n \n export const servers: ScoutServerConfig = {\n ...defaultConfig,\n // Your custom configuration\n };\n```\n\n2. Create a new test directory under\n<plugin|package>/test/scout_`<dir_name_with_custom_configs>`:\n`x-pack/platform/plugins/shared/security/test/scout_uiam_local`\n3. Keep the `<ui|api>tests` & `playwright.config.ts` design as in the\nregular `scout` dir, use the same tags in spec files.\n4. Run your tests as usual:\n\n```bash\nnode scripts/scout run-tests --serverless=es --config x-pack/platform/plugins/shared/security/test/scout_uiam_local/ui/playwright.config.ts\n\n// to only start the server using configs from custom directory\nnode scripts/scout start-server --serverless=es --config-dir uiam_local\n```\n\n### Important\n- Tests defined in `scout_<config_dir_name>` directory are not included\nin the main scout builder CI step, but rather in its own for custom\nconfigs (to be added as a follow-up)\n- They do not benefit from smart test balancing due to custom server\nsetup.\n- **The tests won't be run in Cloud** due to custom servers setup\nrequirement, keep it in mind and mitigate the risks","sha":"0b42c313bb20fb502573065537199f976381bb73"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/244306","number":244306,"mergeCommit":{"message":"[scout] support custom servers configuration (#244306)\n\n## Summary\n\npart of https://github.com/elastic/appex-qa-team/issues/562\n\nThis PR adds support for custom server configurations by creating a\nscout directory with the name matching the directory with configuration\nfiles under `kbn-scout/src/servers/configs/custom`.\n\n\n### Usage\n\n\n1. Define custom configurations under\n`kbn-scout/src/servers/configs/custom` by creating a new directory e.g.\n`uiam_local` and adding configs for modes it should support (e.g.\n`es.serverless.config`, **check kbn-scout/src/servers/configs/default\nfor naming** ):\n```ts\n // custom/uiam_local/serverless/es.serverless.config.ts\n import type { ScoutServerConfig } from '../../../types';\n import { defaultConfig } from '../../default/serverless/serverless.base.config';\n \n export const servers: ScoutServerConfig = {\n ...defaultConfig,\n // Your custom configuration\n };\n```\n\n2. Create a new test directory under\n<plugin|package>/test/scout_`<dir_name_with_custom_configs>`:\n`x-pack/platform/plugins/shared/security/test/scout_uiam_local`\n3. Keep the `<ui|api>tests` & `playwright.config.ts` design as in the\nregular `scout` dir, use the same tags in spec files.\n4. Run your tests as usual:\n\n```bash\nnode scripts/scout run-tests --serverless=es --config x-pack/platform/plugins/shared/security/test/scout_uiam_local/ui/playwright.config.ts\n\n// to only start the server using configs from custom directory\nnode scripts/scout start-server --serverless=es --config-dir uiam_local\n```\n\n### Important\n- Tests defined in `scout_<config_dir_name>` directory are not included\nin the main scout builder CI step, but rather in its own for custom\nconfigs (to be added as a follow-up)\n- They do not benefit from smart test balancing due to custom server\nsetup.\n- **The tests won't be run in Cloud** due to custom servers setup\nrequirement, keep it in mind and mitigate the risks","sha":"0b42c313bb20fb502573065537199f976381bb73"}},{"branch":"9.2","label":"v9.2.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/245930","number":245930,"state":"MERGED","mergeCommit":{"sha":"a9ed3093530e0328760a1d9d09a684af27a2e7e6","message":"[9.2] [scout] support custom servers configuration (#244306) (#245930)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.2`:\n- [[scout] support custom servers configuration\n(#244306)](https://github.com/elastic/kibana/pull/244306)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"9.1","label":"v9.1.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/245996","number":245996,"state":"MERGED","mergeCommit":{"sha":"ff8fffff27fc7874524e22ff36c486c2612238a1","message":"[9.1] [scout] support custom servers configuration (#244306) (#245996)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.1`:\n- [[scout] support custom servers configuration\n(#244306)](https://github.com/elastic/kibana/pull/244306)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}}]}] BACKPORT-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.1:Questions ?
Please refer to the Backport tool documentation