[9.2] Add kbn/test-es-server package (#259064)#260140
Merged
dmlemeshko merged 3 commits intoelastic:9.2from Mar 30, 2026
Merged
[9.2] Add kbn/test-es-server package (#259064)#260140dmlemeshko merged 3 commits intoelastic:9.2from
dmlemeshko merged 3 commits intoelastic:9.2from
Conversation
## Summary Introduces `@kbn/test-es-server` as a focused package for starting/managing Elasticsearch in tests (cluster helpers, ES test config, createEsClientForTesting, cleanup, CI parallel prefix). `@kbn/test` and `@kbn/scout` depend on it and keep re-exporting the same public surface where needed so existing imports keep working. FTR-specific wiring that needs the FTR Config type stays in `@kbn/test` (e.g. `createEsClientForFtrConfig` in `ftr_es_client.ts`). `@kbn/evals` now imports `createEsClientForTesting` from `@kbn/test-es-server` instead of `@kbn/test`, aligning it with the Scout-side ES client path and trimming the implied dependency on the full test harness for that call. ### Why - Clearer boundaries: ES test-server concerns live in one place; @kbn/test stays the broader FTR/harness package. - Easier evolution: Scout and other tooling can depend on ES test infrastructure without pulling all of @kbn/test when they only need ES helpers. ### Scope - New `@kbn/test-es-server` package and repo wiring (paths, links, moon/tsconfig as required). - `@kbn/test` / `@kbn/scout`: delegate ES cluster/client/config/cleanup (and related imports) to the new package; FTR helpers remain in `@kbn/test.` - `@kbn/evals`: switch `createEsClientForTesting` to `@kbn/test-es-server` and update package references. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 592399b) # Conflicts: # x-pack/platform/packages/shared/kbn-evals/moon.yml # x-pack/platform/packages/shared/kbn-evals/src/cli/commands/compare.ts # x-pack/platform/packages/shared/kbn-evals/src/evaluate.ts # x-pack/platform/packages/shared/kbn-evals/tsconfig.json
Contributor
⏳ Build in-progress, with failures
Failed CI Steps |
csr
approved these changes
Mar 30, 2026
dmlemeshko
added a commit
that referenced
this pull request
Mar 30, 2026
# Backport This will backport the following commits from `main` to `8.19`: - [Add kbn/test-es-server package (#259064)](#259064) <!--- 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":"2026-03-26T10:39:23Z","message":"Add kbn/test-es-server package (#259064)\n\n## Summary\n\nIntroduces `@kbn/test-es-server` as a focused package for\nstarting/managing Elasticsearch in tests (cluster helpers, ES test\nconfig, createEsClientForTesting, cleanup, CI parallel prefix).\n`@kbn/test` and `@kbn/scout` depend on it and keep re-exporting the same\npublic surface where needed so existing imports keep working.\n\nFTR-specific wiring that needs the FTR Config type stays in `@kbn/test`\n(e.g. `createEsClientForFtrConfig` in `ftr_es_client.ts`).\n\n`@kbn/evals` now imports `createEsClientForTesting` from\n`@kbn/test-es-server` instead of `@kbn/test`, aligning it with the\nScout-side ES client path and trimming the implied dependency on the\nfull test harness for that call.\n\n### Why\n- Clearer boundaries: ES test-server concerns live in one place;\n@kbn/test stays the broader FTR/harness package.\n- Easier evolution: Scout and other tooling can depend on ES test\ninfrastructure without pulling all of @kbn/test when they only need ES\nhelpers.\n\n### Scope \n- New `@kbn/test-es-server` package and repo wiring (paths, links,\nmoon/tsconfig as required).\n- `@kbn/test` / `@kbn/scout`: delegate ES cluster/client/config/cleanup\n(and related imports) to the new package; FTR helpers remain in\n`@kbn/test.`\n- `@kbn/evals`: switch `createEsClientForTesting` to\n`@kbn/test-es-server` and update package references.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"592399bbf8fbb25af3b4e4aab580e1f29c546324","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v9.4.0","v9.3.3","v9.2.8"],"title":"Add kbn/test-es-server package","number":259064,"url":"https://github.com/elastic/kibana/pull/259064","mergeCommit":{"message":"Add kbn/test-es-server package (#259064)\n\n## Summary\n\nIntroduces `@kbn/test-es-server` as a focused package for\nstarting/managing Elasticsearch in tests (cluster helpers, ES test\nconfig, createEsClientForTesting, cleanup, CI parallel prefix).\n`@kbn/test` and `@kbn/scout` depend on it and keep re-exporting the same\npublic surface where needed so existing imports keep working.\n\nFTR-specific wiring that needs the FTR Config type stays in `@kbn/test`\n(e.g. `createEsClientForFtrConfig` in `ftr_es_client.ts`).\n\n`@kbn/evals` now imports `createEsClientForTesting` from\n`@kbn/test-es-server` instead of `@kbn/test`, aligning it with the\nScout-side ES client path and trimming the implied dependency on the\nfull test harness for that call.\n\n### Why\n- Clearer boundaries: ES test-server concerns live in one place;\n@kbn/test stays the broader FTR/harness package.\n- Easier evolution: Scout and other tooling can depend on ES test\ninfrastructure without pulling all of @kbn/test when they only need ES\nhelpers.\n\n### Scope \n- New `@kbn/test-es-server` package and repo wiring (paths, links,\nmoon/tsconfig as required).\n- `@kbn/test` / `@kbn/scout`: delegate ES cluster/client/config/cleanup\n(and related imports) to the new package; FTR helpers remain in\n`@kbn/test.`\n- `@kbn/evals`: switch `createEsClientForTesting` to\n`@kbn/test-es-server` and update package references.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"592399bbf8fbb25af3b4e4aab580e1f29c546324"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/259064","number":259064,"mergeCommit":{"message":"Add kbn/test-es-server package (#259064)\n\n## Summary\n\nIntroduces `@kbn/test-es-server` as a focused package for\nstarting/managing Elasticsearch in tests (cluster helpers, ES test\nconfig, createEsClientForTesting, cleanup, CI parallel prefix).\n`@kbn/test` and `@kbn/scout` depend on it and keep re-exporting the same\npublic surface where needed so existing imports keep working.\n\nFTR-specific wiring that needs the FTR Config type stays in `@kbn/test`\n(e.g. `createEsClientForFtrConfig` in `ftr_es_client.ts`).\n\n`@kbn/evals` now imports `createEsClientForTesting` from\n`@kbn/test-es-server` instead of `@kbn/test`, aligning it with the\nScout-side ES client path and trimming the implied dependency on the\nfull test harness for that call.\n\n### Why\n- Clearer boundaries: ES test-server concerns live in one place;\n@kbn/test stays the broader FTR/harness package.\n- Easier evolution: Scout and other tooling can depend on ES test\ninfrastructure without pulling all of @kbn/test when they only need ES\nhelpers.\n\n### Scope \n- New `@kbn/test-es-server` package and repo wiring (paths, links,\nmoon/tsconfig as required).\n- `@kbn/test` / `@kbn/scout`: delegate ES cluster/client/config/cleanup\n(and related imports) to the new package; FTR helpers remain in\n`@kbn/test.`\n- `@kbn/evals`: switch `createEsClientForTesting` to\n`@kbn/test-es-server` and update package references.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"592399bbf8fbb25af3b4e4aab580e1f29c546324"}},{"branch":"9.3","label":"v9.3.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/260139","number":260139,"state":"MERGED","mergeCommit":{"sha":"da06eedcf770f6a737d51d4181ff721d467e97d1","message":"[9.3] Add kbn/test-es-server package (#259064) (#260139)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.3`:\n- [Add kbn/test-es-server package\n(#259064)](https://github.com/elastic/kibana/pull/259064)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"9.2","label":"v9.2.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/260140","number":260140,"state":"MERGED","mergeCommit":{"sha":"467b441609bf4587fca013cd4c72b92e8607cb74","message":"[9.2] Add kbn/test-es-server package (#259064) (#260140)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.2`:\n- [Add kbn/test-es-server package\n(#259064)](https://github.com/elastic/kibana/pull/259064)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>"}}]}] 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.2:Questions ?
Please refer to the Backport tool documentation