Skip to content

[9.2] Add kbn/test-es-server package (#259064)#260140

Merged
dmlemeshko merged 3 commits intoelastic:9.2from
dmlemeshko:backport/9.2/pr-259064
Mar 30, 2026
Merged

[9.2] Add kbn/test-es-server package (#259064)#260140
dmlemeshko merged 3 commits intoelastic:9.2from
dmlemeshko:backport/9.2/pr-259064

Conversation

@dmlemeshko
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.2:

Questions ?

Please refer to the Backport tool documentation

## 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
@dmlemeshko dmlemeshko added the backport This PR is a backport of another PR label Mar 28, 2026
@dmlemeshko dmlemeshko enabled auto-merge (squash) March 28, 2026 09:31
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

@dmlemeshko dmlemeshko requested a review from a team March 30, 2026 04:55
@dmlemeshko dmlemeshko merged commit 467b441 into elastic:9.2 Mar 30, 2026
14 checks passed
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-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants