Skip to content

[9.2] [kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use (#254962)#255061

Merged
kibanamachine merged 1 commit intoelastic:9.2from
kibanamachine:backport/9.2/pr-254962
Feb 26, 2026
Merged

[9.2] [kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use (#254962)#255061
kibanamachine merged 1 commit intoelastic:9.2from
kibanamachine:backport/9.2/pr-254962

Conversation

@kibanamachine
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

…254962)

## Summary

related to elastic#254791

Adds a `dataOnly` mode to `EsArchiver` that enforces data-only ingestion
by rejecting archives containing saved object indices (`.kibana*`) and
removes the requirement for `kbnClient`.

### Motivation:
- Scout tests should use `kbnArchiver` for saved objects, not
`esArchiver`. This change makes that boundary explicit by throwing a
clear error if a Scout test accidentally tries to load .kibana* archives
via esArchiver.
- For Cross Project Search (CPS) support, the linked project's ES
cluster has no Kibana instance, so `esArchiver` must work without
`kbnClient`.

### What changed:
- `EsArchiver` constructor accepts a new `dataOnly?: boolean` option.
When true, `kbnClient` is not required, `emptyKibanaIndex()` throws
error, and `load()/loadIfNeeded()` reject any archive that touches saved
object indices.
- `loadAction` skips the `kbnClient.plugins.getEnabledIds()` call and
saved object migration when `dataOnly` is enabled.
- Scout's `getEsArchiver` and its Playwright fixture now use `dataOnly:
true` without `kbnClient`.
- FTR and Cypress flows are unchanged -- they continue using
`EsArchiver` without dataOnly, with full `kbnClient` support.

---------

Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
(cherry picked from commit 8500782)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Feb 26, 2026
@kibanamachine kibanamachine enabled auto-merge (squash) February 26, 2026 09:27
@kibanamachine kibanamachine merged commit b01bce8 into elastic:9.2 Feb 26, 2026
18 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.

2 participants