Skip to content

[9.3] move kbn-client into its own package (#258963)#259147

Merged
dmlemeshko merged 8 commits intoelastic:9.3from
dmlemeshko:backport/9.3/pr-258963
Mar 27, 2026
Merged

[9.3] move kbn-client into its own package (#258963)#259147
dmlemeshko merged 8 commits intoelastic:9.3from
dmlemeshko:backport/9.3/pr-258963

Conversation

@dmlemeshko
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.3:

Questions ?

Please refer to the Backport tool documentation

## Summary

Extracts the Kibana tooling HTTP client (`KbnClient` and related
helpers) from `@kbn/test` into a dedicated `@kbn/kbn-client` package.
`@kbn/test` continues to re-export the same symbols so existing `import
{ … } from '@kbn/test'` call sites keep working.

### Why

- Smaller, clearer dependency graph for tools that only need a Kibana
HTTP client (e.g. `Scout`, `Cypress` helpers, `evals`) without pulling
in the full FTR/Jest/Mocha surface of `@kbn/test`.
- Single public entry for client APIs instead of deep imports like
`@kbn/test/src/kbn_client/...`, which aligns with package boundaries and
makes types like UiSettingValues and ReqOptions part of a stable export
surface.
- Easier next steps to peel off other focused pieces (e.g. SAML session
management) on top of `@kbn/kbn-client` instead of growing `@kbn/test`
further.

### Notes
- New package is `devOnly` like @kbn/test.
- Jest/unit tests for the client live under `@kbn/kbn-client`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit c701e38)

# Conflicts:
#	.github/CODEOWNERS
#	src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_requester_error.test.ts
#	x-pack/platform/packages/shared/kbn-evals/moon.yml
#	x-pack/platform/packages/shared/kbn-evals/src/utils/evaluations_kbn_client.test.ts
#	x-pack/platform/packages/shared/kbn-evals/src/utils/evaluations_kbn_client.ts
#	x-pack/platform/packages/shared/kbn-evals/src/utils/kbn_client_with_retries.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 23, 2026
@dmlemeshko dmlemeshko enabled auto-merge (squash) March 23, 2026 15:50
@dmlemeshko dmlemeshko requested a review from csr March 25, 2026 13:16
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

@dmlemeshko dmlemeshko merged commit 6e982cb into elastic:9.3 Mar 27, 2026
14 checks passed
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.

3 participants