Skip to content

[Lens] Wait for ignore-global-filters indicator with existOrFail - #290344

Merged
kibanamachine merged 1 commit into
mainfrom
fix/flaky-289597-ignore-global-filters-wait-225fd2d86dcf22a8
Sep 11, 2026
Merged

[Lens] Wait for ignore-global-filters indicator with existOrFail#290344
kibanamachine merged 1 commit into
mainfrom
fix/flaky-289597-ignore-global-filters-wait-225fd2d86dcf22a8

Conversation

@kibanamachine

@kibanamachine kibanamachine commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #289597

Summary

  • The test should expose the ignore global filters control for a data layer failed with expected false to equal true at layer_actions.ts:71-73: after toggling lns-layerSettings-ignoreGlobalFilters, the boolean testSubjects.exists('lns-layerPanel-0 > lnsChangeIndexPatternIgnoringFilters') returned false.
  • exists() only polls for its default 2.5s waitForExists window, which races the React re-render of the indicator under CI load.
  • This patch replaces that assertion with existOrFail(...), which waits up to timeouts.try (2 min) for the displayed indicator — the terminal readiness signal the assertion reads.

Context

  • Follows the failed-test investigator's proposed fix verbatim; the analysis is fresh (posted today, after the latest failure) so no re-investigation was needed.
  • The awaited state is deterministically reachable: the toggle sets layer.ignoreGlobalFilters and the layer panel conditionally renders the indicator (layerpanel.tsx), so this is a test-timing issue, not a product bug.
  • existOrFail is already the pattern used for the same indicator elsewhere in this file (e.g. line 59), and it checks the displayed element via existsByDisplayedByCssSelector.
  • Both reported failures are on kibana-on-merge (main): build 108914 (2026-09-07) and build 109337 (2026-09-10), same assertion and signature.
Verification

Verified locally

  • ✅ Passed: node scripts/eslint x-pack/platform/test/functional/apps/lens/group2/layer_actions.ts

Not verified locally

  • This is an FTR test requiring a live Elasticsearch + Kibana stack, which cannot run in this environment. The assertion change is exercised by the PR's CI.

Note

Requested by @kibanamachine. Share feedback in #kibana-qa. Mention @copilot to make quick changes.

Generated by Flaky Test Fixer for #289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K ·

Fixes #289597

Replace a boolean testSubjects.exists() assertion (2.5s window) with
existOrFail(), which waits up to timeouts.try for the displayed indicator.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
@kibanamachine

Copy link
Copy Markdown
Contributor Author

/flaky ftrConfig:x-pack/platform/test/functional/apps/lens/group2/config.ts:30

Generated by Flaky Fix Verifier for #290344 · claude · opus · 128.2 AIC · ⌖ 60.6 AIC · ⊞ 15.8K ·

@github-actions github-actions Bot added the flaky-fix-check:started Flaky fix verifier: a flaky test runner check has been triggered; in progress. label Sep 10, 2026
@kibanamachine

Copy link
Copy Markdown
Contributor Author

Flaky Test Runner

✅ Build triggered - kibana-flaky-test-suite-runner#14310

  • x-pack/platform/test/functional/apps/lens/group2/config.ts x30

@kibanamachine

Copy link
Copy Markdown
Contributor Author

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#14310

[❌] x-pack/platform/test/functional/apps/lens/group2/config.ts: 29/30 tests passed.

see run history

@github-actions github-actions Bot added backport:all-open Backport to all branches that could still receive a release flaky-fix-check:passed Flaky fix verifier: targeted test held across the run(s); fix confirmed. release_note:skip Skip the PR/issue when compiling release notes and removed flaky-fix-check:started Flaky fix verifier: a flaky test runner check has been triggered; in progress. labels Sep 10, 2026
@kibanamachine

Copy link
Copy Markdown
Contributor Author

🏷️ Release and backport labels

The targeted should expose the ignore global filters control for a data layer test held across all 30 runs. The one failed run in kibana-flaky-test-suite-runner#14310 was 11 unrelated table.ts datatable tests (coloring/sorting data races — lane pollution this PR can't affect), not the targeted test. Applied release_note:skip and backport:all-open.

How release-note and backport labels were chosen

Applied release_note:skip because the change only swaps one FTR test assertion (exists()existOrFail()) with no user-facing effect.

  • v9.5.4 → included; the same layer_actions.ts block exists on 9.5 and the patch applies unchanged.
  • v9.4.7 → included; the file on 9.4 is identical and the patch applies unchanged.
  • v8.19.22 → included; the targeted block is present on 8.19 and the patch applies unchanged.

Generated by Flaky Fix Verifier for #290344 · claude · opus · 240.7 AIC · ⌖ 67.2 AIC · ⊞ 16K ·

@kibanamachine
kibanamachine marked this pull request as ready for review September 10, 2026 16:51
@kibanamachine
kibanamachine requested a review from a team as a code owner September 10, 2026 16:51
@kibanamachine
kibanamachine enabled auto-merge (squash) September 10, 2026 16:51
@kibanamachine

Copy link
Copy Markdown
Contributor Author

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

Test Failures

  • [job] [logs] FTR Configs #77 / Actions and Triggers app create alert "before all" hook for "should delete the right action when the same action has been added twice"

@kibanamachine
kibanamachine merged commit 98a7dda into main Sep 11, 2026
81 checks passed
@kibanamachine
kibanamachine deleted the fix/flaky-289597-ignore-global-filters-wait-225fd2d86dcf22a8 branch September 11, 2026 10:34
@kibanamachine

Copy link
Copy Markdown
Contributor Author

Starting backport for target branches: 8.19, 9.4, 9.5

https://github.com/elastic/kibana/actions/runs/34589856655

@kibanamachine

Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19
9.4
9.5

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 11, 2026
#290344) (#290513)

# Backport

This will backport the following commits from `main` to `9.5`:
- [[Lens] Wait for ignore-global-filters indicator with existOrFail
(#290344)](#290344)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Kibana
Machine","email":"42973632+kibanamachine@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-09-11T10:34:08Z","message":"[Lens]
Wait for ignore-global-filters indicator with existOrFail
(#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the
ignore global filters control for a data\nlayer` failed with `expected
false to equal true` at\n`layer_actions.ts:71-73`: after
toggling\n`lns-layerSettings-ignoreGlobalFilters`, the
boolean\n`testSubjects.exists('lns-layerPanel-0
>\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n-
`exists()` only polls for its default 2.5s `waitForExists`
window,\nwhich races the React re-render of the indicator under CI
load.\n- This patch replaces that assertion with `existOrFail(...)`,
which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator
— the\nterminal readiness signal the assertion reads.\n\n### Context\n-
Follows the [failed-test investigator's
proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim;
the analysis is fresh (posted today, after the latest failure)\nso no
re-investigation was needed.\n- The awaited state is deterministically
reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer
panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this
is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already
the pattern used for the same indicator\nelsewhere in this file (e.g.
line 59), and it checks the *displayed*\nelement via
`existsByDisplayedByCssSelector`.\n- Both reported failures are on
`kibana-on-merge` (`main`):
[build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07)
and
[build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10),
same assertion and
signature.\n\n<details>\n<summary>Verification</summary>\n\n####
Verified locally\n\n- ✅ Passed: `node
scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n####
Not verified locally\n\n- This is an FTR test requiring a live
Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The
assertion change is exercised\nby the PR's CI.\n\n</details>\n\n>
[!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa.
Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky
Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285)
for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K
·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by:
Claude Opus 4 (1M context)
<noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2","branchLabelMapping":{"^v9.6.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","flaky-test-fixer","flaky-fix-check:passed","v9.6.0"],"title":"[Lens]
Wait for ignore-global-filters indicator with
existOrFail","number":290344,"url":"https://github.com/elastic/kibana/pull/290344","mergeCommit":{"message":"[Lens]
Wait for ignore-global-filters indicator with existOrFail
(#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the
ignore global filters control for a data\nlayer` failed with `expected
false to equal true` at\n`layer_actions.ts:71-73`: after
toggling\n`lns-layerSettings-ignoreGlobalFilters`, the
boolean\n`testSubjects.exists('lns-layerPanel-0
>\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n-
`exists()` only polls for its default 2.5s `waitForExists`
window,\nwhich races the React re-render of the indicator under CI
load.\n- This patch replaces that assertion with `existOrFail(...)`,
which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator
— the\nterminal readiness signal the assertion reads.\n\n### Context\n-
Follows the [failed-test investigator's
proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim;
the analysis is fresh (posted today, after the latest failure)\nso no
re-investigation was needed.\n- The awaited state is deterministically
reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer
panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this
is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already
the pattern used for the same indicator\nelsewhere in this file (e.g.
line 59), and it checks the *displayed*\nelement via
`existsByDisplayedByCssSelector`.\n- Both reported failures are on
`kibana-on-merge` (`main`):
[build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07)
and
[build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10),
same assertion and
signature.\n\n<details>\n<summary>Verification</summary>\n\n####
Verified locally\n\n- ✅ Passed: `node
scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n####
Not verified locally\n\n- This is an FTR test requiring a live
Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The
assertion change is exercised\nby the PR's CI.\n\n</details>\n\n>
[!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa.
Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky
Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285)
for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K
·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by:
Claude Opus 4 (1M context)
<noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.6.0","branchLabelMappingKey":"^v9.6.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/290344","number":290344,"mergeCommit":{"message":"[Lens]
Wait for ignore-global-filters indicator with existOrFail
(#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the
ignore global filters control for a data\nlayer` failed with `expected
false to equal true` at\n`layer_actions.ts:71-73`: after
toggling\n`lns-layerSettings-ignoreGlobalFilters`, the
boolean\n`testSubjects.exists('lns-layerPanel-0
>\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n-
`exists()` only polls for its default 2.5s `waitForExists`
window,\nwhich races the React re-render of the indicator under CI
load.\n- This patch replaces that assertion with `existOrFail(...)`,
which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator
— the\nterminal readiness signal the assertion reads.\n\n### Context\n-
Follows the [failed-test investigator's
proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim;
the analysis is fresh (posted today, after the latest failure)\nso no
re-investigation was needed.\n- The awaited state is deterministically
reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer
panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this
is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already
the pattern used for the same indicator\nelsewhere in this file (e.g.
line 59), and it checks the *displayed*\nelement via
`existsByDisplayedByCssSelector`.\n- Both reported failures are on
`kibana-on-merge` (`main`):
[build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07)
and
[build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10),
same assertion and
signature.\n\n<details>\n<summary>Verification</summary>\n\n####
Verified locally\n\n- ✅ Passed: `node
scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n####
Not verified locally\n\n- This is an FTR test requiring a live
Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The
assertion change is exercised\nby the PR's CI.\n\n</details>\n\n>
[!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa.
Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky
Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285)
for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K
·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by:
Claude Opus 4 (1M context)
<noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}}]}]
BACKPORT-->

Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
kibanamachine added a commit that referenced this pull request Sep 11, 2026
#290344) (#290512)

# Backport

This will backport the following commits from `main` to `9.4`:
- [[Lens] Wait for ignore-global-filters indicator with existOrFail
(#290344)](#290344)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Kibana
Machine","email":"42973632+kibanamachine@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-09-11T10:34:08Z","message":"[Lens]
Wait for ignore-global-filters indicator with existOrFail
(#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the
ignore global filters control for a data\nlayer` failed with `expected
false to equal true` at\n`layer_actions.ts:71-73`: after
toggling\n`lns-layerSettings-ignoreGlobalFilters`, the
boolean\n`testSubjects.exists('lns-layerPanel-0
>\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n-
`exists()` only polls for its default 2.5s `waitForExists`
window,\nwhich races the React re-render of the indicator under CI
load.\n- This patch replaces that assertion with `existOrFail(...)`,
which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator
— the\nterminal readiness signal the assertion reads.\n\n### Context\n-
Follows the [failed-test investigator's
proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim;
the analysis is fresh (posted today, after the latest failure)\nso no
re-investigation was needed.\n- The awaited state is deterministically
reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer
panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this
is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already
the pattern used for the same indicator\nelsewhere in this file (e.g.
line 59), and it checks the *displayed*\nelement via
`existsByDisplayedByCssSelector`.\n- Both reported failures are on
`kibana-on-merge` (`main`):
[build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07)
and
[build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10),
same assertion and
signature.\n\n<details>\n<summary>Verification</summary>\n\n####
Verified locally\n\n- ✅ Passed: `node
scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n####
Not verified locally\n\n- This is an FTR test requiring a live
Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The
assertion change is exercised\nby the PR's CI.\n\n</details>\n\n>
[!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa.
Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky
Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285)
for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K
·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by:
Claude Opus 4 (1M context)
<noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2","branchLabelMapping":{"^v9.6.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","flaky-test-fixer","flaky-fix-check:passed","v9.6.0"],"title":"[Lens]
Wait for ignore-global-filters indicator with
existOrFail","number":290344,"url":"https://github.com/elastic/kibana/pull/290344","mergeCommit":{"message":"[Lens]
Wait for ignore-global-filters indicator with existOrFail
(#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the
ignore global filters control for a data\nlayer` failed with `expected
false to equal true` at\n`layer_actions.ts:71-73`: after
toggling\n`lns-layerSettings-ignoreGlobalFilters`, the
boolean\n`testSubjects.exists('lns-layerPanel-0
>\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n-
`exists()` only polls for its default 2.5s `waitForExists`
window,\nwhich races the React re-render of the indicator under CI
load.\n- This patch replaces that assertion with `existOrFail(...)`,
which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator
— the\nterminal readiness signal the assertion reads.\n\n### Context\n-
Follows the [failed-test investigator's
proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim;
the analysis is fresh (posted today, after the latest failure)\nso no
re-investigation was needed.\n- The awaited state is deterministically
reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer
panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this
is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already
the pattern used for the same indicator\nelsewhere in this file (e.g.
line 59), and it checks the *displayed*\nelement via
`existsByDisplayedByCssSelector`.\n- Both reported failures are on
`kibana-on-merge` (`main`):
[build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07)
and
[build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10),
same assertion and
signature.\n\n<details>\n<summary>Verification</summary>\n\n####
Verified locally\n\n- ✅ Passed: `node
scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n####
Not verified locally\n\n- This is an FTR test requiring a live
Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The
assertion change is exercised\nby the PR's CI.\n\n</details>\n\n>
[!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa.
Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky
Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285)
for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K
·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by:
Claude Opus 4 (1M context)
<noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.6.0","branchLabelMappingKey":"^v9.6.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/290344","number":290344,"mergeCommit":{"message":"[Lens]
Wait for ignore-global-filters indicator with existOrFail
(#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the
ignore global filters control for a data\nlayer` failed with `expected
false to equal true` at\n`layer_actions.ts:71-73`: after
toggling\n`lns-layerSettings-ignoreGlobalFilters`, the
boolean\n`testSubjects.exists('lns-layerPanel-0
>\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n-
`exists()` only polls for its default 2.5s `waitForExists`
window,\nwhich races the React re-render of the indicator under CI
load.\n- This patch replaces that assertion with `existOrFail(...)`,
which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator
— the\nterminal readiness signal the assertion reads.\n\n### Context\n-
Follows the [failed-test investigator's
proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim;
the analysis is fresh (posted today, after the latest failure)\nso no
re-investigation was needed.\n- The awaited state is deterministically
reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer
panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this
is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already
the pattern used for the same indicator\nelsewhere in this file (e.g.
line 59), and it checks the *displayed*\nelement via
`existsByDisplayedByCssSelector`.\n- Both reported failures are on
`kibana-on-merge` (`main`):
[build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07)
and
[build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10),
same assertion and
signature.\n\n<details>\n<summary>Verification</summary>\n\n####
Verified locally\n\n- ✅ Passed: `node
scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n####
Not verified locally\n\n- This is an FTR test requiring a live
Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The
assertion change is exercised\nby the PR's CI.\n\n</details>\n\n>
[!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa.
Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky
Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285)
for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K
·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by:
Claude Opus 4 (1M context)
<noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}}]}]
BACKPORT-->

Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
kibanamachine added a commit that referenced this pull request Sep 11, 2026
…il (#290344) (#290511)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Lens] Wait for ignore-global-filters indicator with existOrFail
(#290344)](#290344)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Kibana
Machine","email":"42973632+kibanamachine@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-09-11T10:34:08Z","message":"[Lens]
Wait for ignore-global-filters indicator with existOrFail
(#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the
ignore global filters control for a data\nlayer` failed with `expected
false to equal true` at\n`layer_actions.ts:71-73`: after
toggling\n`lns-layerSettings-ignoreGlobalFilters`, the
boolean\n`testSubjects.exists('lns-layerPanel-0
>\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n-
`exists()` only polls for its default 2.5s `waitForExists`
window,\nwhich races the React re-render of the indicator under CI
load.\n- This patch replaces that assertion with `existOrFail(...)`,
which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator
— the\nterminal readiness signal the assertion reads.\n\n### Context\n-
Follows the [failed-test investigator's
proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim;
the analysis is fresh (posted today, after the latest failure)\nso no
re-investigation was needed.\n- The awaited state is deterministically
reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer
panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this
is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already
the pattern used for the same indicator\nelsewhere in this file (e.g.
line 59), and it checks the *displayed*\nelement via
`existsByDisplayedByCssSelector`.\n- Both reported failures are on
`kibana-on-merge` (`main`):
[build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07)
and
[build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10),
same assertion and
signature.\n\n<details>\n<summary>Verification</summary>\n\n####
Verified locally\n\n- ✅ Passed: `node
scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n####
Not verified locally\n\n- This is an FTR test requiring a live
Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The
assertion change is exercised\nby the PR's CI.\n\n</details>\n\n>
[!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa.
Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky
Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285)
for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K
·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by:
Claude Opus 4 (1M context)
<noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2","branchLabelMapping":{"^v9.6.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","flaky-test-fixer","flaky-fix-check:passed","v9.6.0"],"title":"[Lens]
Wait for ignore-global-filters indicator with
existOrFail","number":290344,"url":"https://github.com/elastic/kibana/pull/290344","mergeCommit":{"message":"[Lens]
Wait for ignore-global-filters indicator with existOrFail
(#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the
ignore global filters control for a data\nlayer` failed with `expected
false to equal true` at\n`layer_actions.ts:71-73`: after
toggling\n`lns-layerSettings-ignoreGlobalFilters`, the
boolean\n`testSubjects.exists('lns-layerPanel-0
>\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n-
`exists()` only polls for its default 2.5s `waitForExists`
window,\nwhich races the React re-render of the indicator under CI
load.\n- This patch replaces that assertion with `existOrFail(...)`,
which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator
— the\nterminal readiness signal the assertion reads.\n\n### Context\n-
Follows the [failed-test investigator's
proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim;
the analysis is fresh (posted today, after the latest failure)\nso no
re-investigation was needed.\n- The awaited state is deterministically
reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer
panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this
is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already
the pattern used for the same indicator\nelsewhere in this file (e.g.
line 59), and it checks the *displayed*\nelement via
`existsByDisplayedByCssSelector`.\n- Both reported failures are on
`kibana-on-merge` (`main`):
[build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07)
and
[build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10),
same assertion and
signature.\n\n<details>\n<summary>Verification</summary>\n\n####
Verified locally\n\n- ✅ Passed: `node
scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n####
Not verified locally\n\n- This is an FTR test requiring a live
Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The
assertion change is exercised\nby the PR's CI.\n\n</details>\n\n>
[!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa.
Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky
Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285)
for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K
·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by:
Claude Opus 4 (1M context)
<noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.6.0","branchLabelMappingKey":"^v9.6.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/290344","number":290344,"mergeCommit":{"message":"[Lens]
Wait for ignore-global-filters indicator with existOrFail
(#290344)\n\nFixes #289597\n\n### Summary\n- The test `should expose the
ignore global filters control for a data\nlayer` failed with `expected
false to equal true` at\n`layer_actions.ts:71-73`: after
toggling\n`lns-layerSettings-ignoreGlobalFilters`, the
boolean\n`testSubjects.exists('lns-layerPanel-0
>\nlnsChangeIndexPatternIgnoringFilters')` returned `false`.\n-
`exists()` only polls for its default 2.5s `waitForExists`
window,\nwhich races the React re-render of the indicator under CI
load.\n- This patch replaces that assertion with `existOrFail(...)`,
which\nwaits up to `timeouts.try` (2 min) for the *displayed* indicator
— the\nterminal readiness signal the assertion reads.\n\n### Context\n-
Follows the [failed-test investigator's
proposed\nfix](https://github.com/elastic/kibana/issues/289597#issuecomment-5620996781)\nverbatim;
the analysis is fresh (posted today, after the latest failure)\nso no
re-investigation was needed.\n- The awaited state is deterministically
reachable: the toggle sets\n`layer.ignoreGlobalFilters` and the layer
panel conditionally renders\nthe indicator (`layerpanel.tsx`), so this
is a test-timing issue, not a\nproduct bug.\n- `existOrFail` is already
the pattern used for the same indicator\nelsewhere in this file (e.g.
line 59), and it checks the *displayed*\nelement via
`existsByDisplayedByCssSelector`.\n- Both reported failures are on
`kibana-on-merge` (`main`):
[build\n108914](https://buildkite.com/elastic/kibana-on-merge/builds/108914#01a07bbf-c448-4796-925b-01fe75d01d9e)\n(2026-09-07)
and
[build\n109337](https://buildkite.com/elastic/kibana-on-merge/builds/109337#01a08bb5-0222-42b7-b96e-3bce30399cbd)\n(2026-09-10),
same assertion and
signature.\n\n<details>\n<summary>Verification</summary>\n\n####
Verified locally\n\n- ✅ Passed: `node
scripts/eslint\nx-pack/platform/test/functional/apps/lens/group2/layer_actions.ts`\n\n####
Not verified locally\n\n- This is an FTR test requiring a live
Elasticsearch + Kibana stack,\nwhich cannot run in this environment. The
assertion change is exercised\nby the PR's CI.\n\n</details>\n\n>
[!NOTE]\n> Requested by @kibanamachine. Share feedback in #kibana-qa.
Mention\n`@copilot` to make quick changes.\n\n> Generated by [Flaky
Test\nFixer](https://github.com/elastic/kibana/actions/runs/34494526285)
for\n#289597 · claude · opus · 139.5 AIC · ⌖ 60.2 AIC · ⊞ 14.5K
·\n[◷](https://github.com/search?q=repo%3Aelastic%2Fkibana+%22gh-aw-workflow-id%3A+flaky-test-fixer%22&type=pullrequests)\n\n\n\n\n\n\nCo-authored-by:
Claude Opus 4 (1M context)
<noreply@anthropic.com>","sha":"98a7ddabdb4835a64ebd5f9977350bd3982882a2"}}]}]
BACKPORT-->

Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release flaky-fix-check:passed Flaky fix verifier: targeted test held across the run(s); fix confirmed. flaky-test-fixer Automated PR created by the flaky test fixer workflow release_note:skip Skip the PR/issue when compiling release notes v8.19.22 v9.4.7 v9.5.4 v9.6.0

Projects

None yet

2 participants