[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use#254962
Merged
dmlemeshko merged 6 commits intoelastic:mainfrom Feb 26, 2026
Merged
[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use#254962dmlemeshko merged 6 commits intoelastic:mainfrom
dmlemeshko merged 6 commits intoelastic:mainfrom
Conversation
dmlemeshko
commented
Feb 25, 2026
Comment on lines
+32
to
+36
| /** | ||
| * When true, `kbnClient` is not required and loading archives that contain | ||
| * saved-object indices (.kibana*) will throw. Intended for Scout tests and | ||
| * linked CPS projects that should only ingest pure ES data. | ||
| */ |
Contributor
Author
There was a problem hiding this comment.
to be honest we want it to be in FTR too, but many tests has to migrate to different archives and it won't happen with FTR (migrating directly to Scout is better)
csr
reviewed
Feb 25, 2026
csr
reviewed
Feb 25, 2026
csr
reviewed
Feb 25, 2026
src/platform/packages/shared/kbn-es-archiver/src/es_archiver.ts
Outdated
Show resolved
Hide resolved
csr
approved these changes
Feb 25, 2026
Member
csr
left a comment
There was a problem hiding this comment.
Overall LGTM, left some minor suggestions. This is a wonderful addition to keep tests robust and predictable!
Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
…/kibana into esArchiver/add-data-only-mode
csr
approved these changes
Feb 26, 2026
Contributor
|
Starting backport for target branches: 8.19, 9.2, 9.3 https://github.com/elastic/kibana/actions/runs/22435644359 |
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @dmlemeshko |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Feb 26, 2026
…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
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Feb 26, 2026
…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)
Contributor
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Feb 26, 2026
…54962) (#255062) # Backport This will backport the following commits from `main` to `9.3`: - [[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use (#254962)](#254962) <!--- Backport version: 9.6.6 --> ### 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-02-26T09:18:09Z","message":"[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use (#254962)\n\n## Summary\n\nrelated to https://github.com/elastic/kibana/pull/254791\n\nAdds a `dataOnly` mode to `EsArchiver` that enforces data-only ingestion\nby rejecting archives containing saved object indices (`.kibana*`) and\nremoves the requirement for `kbnClient`.\n\n### Motivation:\n- Scout tests should use `kbnArchiver` for saved objects, not\n`esArchiver`. This change makes that boundary explicit by throwing a\nclear error if a Scout test accidentally tries to load .kibana* archives\nvia esArchiver.\n- For Cross Project Search (CPS) support, the linked project's ES\ncluster has no Kibana instance, so `esArchiver` must work without\n`kbnClient`.\n\n### What changed:\n- `EsArchiver` constructor accepts a new `dataOnly?: boolean` option.\nWhen true, `kbnClient` is not required, `emptyKibanaIndex()` throws\nerror, and `load()/loadIfNeeded()` reject any archive that touches saved\nobject indices.\n- `loadAction` skips the `kbnClient.plugins.getEnabledIds()` call and\nsaved object migration when `dataOnly` is enabled.\n- Scout's `getEsArchiver` and its Playwright fixture now use `dataOnly:\ntrue` without `kbnClient`.\n- FTR and Cypress flows are unchanged -- they continue using\n`EsArchiver` without dataOnly, with full `kbnClient` support.\n\n---------\n\nCo-authored-by: Cesare de Cal <cesare.decal@elastic.co>","sha":"8500782b3fe8428598054b559fb6b83c5ed1d88f","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v9.4.0"],"title":"[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use","number":254962,"url":"https://github.com/elastic/kibana/pull/254962","mergeCommit":{"message":"[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use (#254962)\n\n## Summary\n\nrelated to https://github.com/elastic/kibana/pull/254791\n\nAdds a `dataOnly` mode to `EsArchiver` that enforces data-only ingestion\nby rejecting archives containing saved object indices (`.kibana*`) and\nremoves the requirement for `kbnClient`.\n\n### Motivation:\n- Scout tests should use `kbnArchiver` for saved objects, not\n`esArchiver`. This change makes that boundary explicit by throwing a\nclear error if a Scout test accidentally tries to load .kibana* archives\nvia esArchiver.\n- For Cross Project Search (CPS) support, the linked project's ES\ncluster has no Kibana instance, so `esArchiver` must work without\n`kbnClient`.\n\n### What changed:\n- `EsArchiver` constructor accepts a new `dataOnly?: boolean` option.\nWhen true, `kbnClient` is not required, `emptyKibanaIndex()` throws\nerror, and `load()/loadIfNeeded()` reject any archive that touches saved\nobject indices.\n- `loadAction` skips the `kbnClient.plugins.getEnabledIds()` call and\nsaved object migration when `dataOnly` is enabled.\n- Scout's `getEsArchiver` and its Playwright fixture now use `dataOnly:\ntrue` without `kbnClient`.\n- FTR and Cypress flows are unchanged -- they continue using\n`EsArchiver` without dataOnly, with full `kbnClient` support.\n\n---------\n\nCo-authored-by: Cesare de Cal <cesare.decal@elastic.co>","sha":"8500782b3fe8428598054b559fb6b83c5ed1d88f"}},"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/254962","number":254962,"mergeCommit":{"message":"[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use (#254962)\n\n## Summary\n\nrelated to https://github.com/elastic/kibana/pull/254791\n\nAdds a `dataOnly` mode to `EsArchiver` that enforces data-only ingestion\nby rejecting archives containing saved object indices (`.kibana*`) and\nremoves the requirement for `kbnClient`.\n\n### Motivation:\n- Scout tests should use `kbnArchiver` for saved objects, not\n`esArchiver`. This change makes that boundary explicit by throwing a\nclear error if a Scout test accidentally tries to load .kibana* archives\nvia esArchiver.\n- For Cross Project Search (CPS) support, the linked project's ES\ncluster has no Kibana instance, so `esArchiver` must work without\n`kbnClient`.\n\n### What changed:\n- `EsArchiver` constructor accepts a new `dataOnly?: boolean` option.\nWhen true, `kbnClient` is not required, `emptyKibanaIndex()` throws\nerror, and `load()/loadIfNeeded()` reject any archive that touches saved\nobject indices.\n- `loadAction` skips the `kbnClient.plugins.getEnabledIds()` call and\nsaved object migration when `dataOnly` is enabled.\n- Scout's `getEsArchiver` and its Playwright fixture now use `dataOnly:\ntrue` without `kbnClient`.\n- FTR and Cypress flows are unchanged -- they continue using\n`EsArchiver` without dataOnly, with full `kbnClient` support.\n\n---------\n\nCo-authored-by: Cesare de Cal <cesare.decal@elastic.co>","sha":"8500782b3fe8428598054b559fb6b83c5ed1d88f"}}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co> Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Feb 26, 2026
…54962) (#255061) # Backport This will backport the following commits from `main` to `9.2`: - [[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use (#254962)](#254962) <!--- Backport version: 9.6.6 --> ### 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-02-26T09:18:09Z","message":"[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use (#254962)\n\n## Summary\n\nrelated to https://github.com/elastic/kibana/pull/254791\n\nAdds a `dataOnly` mode to `EsArchiver` that enforces data-only ingestion\nby rejecting archives containing saved object indices (`.kibana*`) and\nremoves the requirement for `kbnClient`.\n\n### Motivation:\n- Scout tests should use `kbnArchiver` for saved objects, not\n`esArchiver`. This change makes that boundary explicit by throwing a\nclear error if a Scout test accidentally tries to load .kibana* archives\nvia esArchiver.\n- For Cross Project Search (CPS) support, the linked project's ES\ncluster has no Kibana instance, so `esArchiver` must work without\n`kbnClient`.\n\n### What changed:\n- `EsArchiver` constructor accepts a new `dataOnly?: boolean` option.\nWhen true, `kbnClient` is not required, `emptyKibanaIndex()` throws\nerror, and `load()/loadIfNeeded()` reject any archive that touches saved\nobject indices.\n- `loadAction` skips the `kbnClient.plugins.getEnabledIds()` call and\nsaved object migration when `dataOnly` is enabled.\n- Scout's `getEsArchiver` and its Playwright fixture now use `dataOnly:\ntrue` without `kbnClient`.\n- FTR and Cypress flows are unchanged -- they continue using\n`EsArchiver` without dataOnly, with full `kbnClient` support.\n\n---------\n\nCo-authored-by: Cesare de Cal <cesare.decal@elastic.co>","sha":"8500782b3fe8428598054b559fb6b83c5ed1d88f","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v9.4.0"],"title":"[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use","number":254962,"url":"https://github.com/elastic/kibana/pull/254962","mergeCommit":{"message":"[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use (#254962)\n\n## Summary\n\nrelated to https://github.com/elastic/kibana/pull/254791\n\nAdds a `dataOnly` mode to `EsArchiver` that enforces data-only ingestion\nby rejecting archives containing saved object indices (`.kibana*`) and\nremoves the requirement for `kbnClient`.\n\n### Motivation:\n- Scout tests should use `kbnArchiver` for saved objects, not\n`esArchiver`. This change makes that boundary explicit by throwing a\nclear error if a Scout test accidentally tries to load .kibana* archives\nvia esArchiver.\n- For Cross Project Search (CPS) support, the linked project's ES\ncluster has no Kibana instance, so `esArchiver` must work without\n`kbnClient`.\n\n### What changed:\n- `EsArchiver` constructor accepts a new `dataOnly?: boolean` option.\nWhen true, `kbnClient` is not required, `emptyKibanaIndex()` throws\nerror, and `load()/loadIfNeeded()` reject any archive that touches saved\nobject indices.\n- `loadAction` skips the `kbnClient.plugins.getEnabledIds()` call and\nsaved object migration when `dataOnly` is enabled.\n- Scout's `getEsArchiver` and its Playwright fixture now use `dataOnly:\ntrue` without `kbnClient`.\n- FTR and Cypress flows are unchanged -- they continue using\n`EsArchiver` without dataOnly, with full `kbnClient` support.\n\n---------\n\nCo-authored-by: Cesare de Cal <cesare.decal@elastic.co>","sha":"8500782b3fe8428598054b559fb6b83c5ed1d88f"}},"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/254962","number":254962,"mergeCommit":{"message":"[kbn/es-archiver] add 'dataOnly' arg to avoid kbnClient use (#254962)\n\n## Summary\n\nrelated to https://github.com/elastic/kibana/pull/254791\n\nAdds a `dataOnly` mode to `EsArchiver` that enforces data-only ingestion\nby rejecting archives containing saved object indices (`.kibana*`) and\nremoves the requirement for `kbnClient`.\n\n### Motivation:\n- Scout tests should use `kbnArchiver` for saved objects, not\n`esArchiver`. This change makes that boundary explicit by throwing a\nclear error if a Scout test accidentally tries to load .kibana* archives\nvia esArchiver.\n- For Cross Project Search (CPS) support, the linked project's ES\ncluster has no Kibana instance, so `esArchiver` must work without\n`kbnClient`.\n\n### What changed:\n- `EsArchiver` constructor accepts a new `dataOnly?: boolean` option.\nWhen true, `kbnClient` is not required, `emptyKibanaIndex()` throws\nerror, and `load()/loadIfNeeded()` reject any archive that touches saved\nobject indices.\n- `loadAction` skips the `kbnClient.plugins.getEnabledIds()` call and\nsaved object migration when `dataOnly` is enabled.\n- Scout's `getEsArchiver` and its Playwright fixture now use `dataOnly:\ntrue` without `kbnClient`.\n- FTR and Cypress flows are unchanged -- they continue using\n`EsArchiver` without dataOnly, with full `kbnClient` support.\n\n---------\n\nCo-authored-by: Cesare de Cal <cesare.decal@elastic.co>","sha":"8500782b3fe8428598054b559fb6b83c5ed1d88f"}}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co> Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
qn895
pushed a commit
to qn895/kibana
that referenced
this pull request
Mar 11, 2026
…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>
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.
Summary
related to #254791
Adds a
dataOnlymode toEsArchiverthat enforces data-only ingestion by rejecting archives containing saved object indices (.kibana*) and removes the requirement forkbnClient.Motivation:
kbnArchiverfor saved objects, notesArchiver. This change makes that boundary explicit by throwing a clear error if a Scout test accidentally tries to load .kibana* archives via esArchiver.esArchivermust work withoutkbnClient.What changed:
EsArchiverconstructor accepts a newdataOnly?: booleanoption. When true,kbnClientis not required,emptyKibanaIndex()throws error, andload()/loadIfNeeded()reject any archive that touches saved object indices.loadActionskips thekbnClient.plugins.getEnabledIds()call and saved object migration whendataOnlyis enabled.getEsArchiverand its Playwright fixture now usedataOnly: truewithoutkbnClient.EsArchiverwithout dataOnly, with fullkbnClientsupport.