[EA] Fix flaky entities_table_grouping: extend @entityStoreSearch timeout#268217
Merged
MadameSheema merged 6 commits intoelastic:mainfrom May 7, 2026
Merged
[EA] Fix flaky entities_table_grouping: extend @entityStoreSearch timeout#268217MadameSheema merged 6 commits intoelastic:mainfrom
MadameSheema merged 6 commits intoelastic:mainfrom
Conversation
…eout
After `@entityStoreStatus` resolves the page still needs to wait for
the sourcerer / data-view to finish loading before `EntitiesTableSection`
mounts and fires the POST to /internal/search/ese. In slow CI environments
this cascade routinely exceeds the default 5 s timeout, causing
cy.wait('@entityStoreSearch') to fail with "No request ever occurred"
(elastic#267794, elastic#267795, elastic#267828, elastic#267965).
Option A: raise the timeout on @entityStoreSearch to 20 s (matching
the existing @entityStoreStatus timeout).
Option B: consolidate both waits + waitForGroupingTable into a single
`waitForEntityAnalyticsPageReady` task helper so the logic lives in one
place and every beforeEach block stays consistent.
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#12170[✅] Security Solution Entity Analytics - Cypress: 25/25 tests passed. |
Contributor
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#12173[✅] [Serverless] Security Solution Entity Analytics - Cypress: 25/25 tests passed. |
|
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
tcalopes
approved these changes
May 7, 2026
maxcold
approved these changes
May 7, 2026
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
Contributor
|
Starting backport for target branches: 8.19, 9.3, 9.4 https://github.com/elastic/kibana/actions/runs/25521951668 |
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
May 7, 2026
…ch timeout (#268217) (#268309) # Backport This will backport the following commits from `main` to `9.4`: - [[EA] Fix flaky entities_table_grouping: extend @entityStoreSearch timeout (#268217)](#268217) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Gloria Hornero","email":"gloria.hornero@elastic.co"},"sourceCommit":{"committedDate":"2026-05-07T21:03:08Z","message":"[EA] Fix flaky entities_table_grouping: extend @entityStoreSearch timeout (#268217)\n\n## Summary\n\nFixes intermittent failures in `entities_table_grouping.cy.ts` reported\nin:\n- #267794\n- #267795\n- #267828\n- #267965\n\n### Root Cause\n\nPR #265125 added `interceptEntityStoreStatus('running')` +\n`cy.wait('@entityStoreStatus', { timeout: 20000 })` to every\n`beforeEach` to prevent the page from showing\n`EntityStoreDisabledEmptyPrompt`. The intent was correct, but after\n`@entityStoreStatus` resolves, the page still needs to:\n\n1. React re-render with the new status data\n2. Wait for `isSourcererLoading = false` (the sourcerer / data-view\ninitialization)\n3. Mount `EntitiesTableSection`\n4. Fire the POST to `/internal/search/ese`\n\nThis cascade can easily take **> 5 s** in slow CI environments, while\n`cy.wait('@entityStoreSearch')` was left with the default **5 s\ntimeout** — causing \"No request ever occurred\" failures.\n\n### Changes\n\n**Option A** — raise the `@entityStoreSearch` timeout to 20 s, matching\n`@entityStoreStatus`.\n\n**Option B** — consolidate `cy.wait('@entityStoreStatus')` +\n`cy.wait('@entityStoreSearch')` + `waitForGroupingTable()` into a single\n`waitForEntityAnalyticsPageReady()` task helper, so the three\n`beforeEach` blocks stay DRY and the timeout logic lives in one place.\n\nBoth options are implemented together: the helper encapsulates the\ncorrect timeouts and every `beforeEach` now calls\n`waitForEntityAnalyticsPageReady()`.\n\n## Test plan\n\n- [ ] Verify `entities_table_grouping.cy.ts` passes locally\n- [ ] Check CI on this PR for the three previously-failing suites (Group\nby Resolution, Switching grouping)\n\n## Checklist\n\n- [x] No hardcoded waits (`cy.wait(ms)`) introduced\n- [x] No `eslint-disable` introduced\n- [x] Existing tests unchanged — only `beforeEach` wiring consolidated\n\nMade with [Cursor](https://cursor.com)\n\n---------\n\nCo-authored-by: Cursor <cursoragent@cursor.com>","sha":"fd88e7fead56d2c4d274ea588c8449fbc4218534","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","Team:Entity Analytics","v9.5.0","v9.4.1"],"title":"[EA] Fix flaky entities_table_grouping: extend @entityStoreSearch timeout","number":268217,"url":"https://github.com/elastic/kibana/pull/268217","mergeCommit":{"message":"[EA] Fix flaky entities_table_grouping: extend @entityStoreSearch timeout (#268217)\n\n## Summary\n\nFixes intermittent failures in `entities_table_grouping.cy.ts` reported\nin:\n- #267794\n- #267795\n- #267828\n- #267965\n\n### Root Cause\n\nPR #265125 added `interceptEntityStoreStatus('running')` +\n`cy.wait('@entityStoreStatus', { timeout: 20000 })` to every\n`beforeEach` to prevent the page from showing\n`EntityStoreDisabledEmptyPrompt`. The intent was correct, but after\n`@entityStoreStatus` resolves, the page still needs to:\n\n1. React re-render with the new status data\n2. Wait for `isSourcererLoading = false` (the sourcerer / data-view\ninitialization)\n3. Mount `EntitiesTableSection`\n4. Fire the POST to `/internal/search/ese`\n\nThis cascade can easily take **> 5 s** in slow CI environments, while\n`cy.wait('@entityStoreSearch')` was left with the default **5 s\ntimeout** — causing \"No request ever occurred\" failures.\n\n### Changes\n\n**Option A** — raise the `@entityStoreSearch` timeout to 20 s, matching\n`@entityStoreStatus`.\n\n**Option B** — consolidate `cy.wait('@entityStoreStatus')` +\n`cy.wait('@entityStoreSearch')` + `waitForGroupingTable()` into a single\n`waitForEntityAnalyticsPageReady()` task helper, so the three\n`beforeEach` blocks stay DRY and the timeout logic lives in one place.\n\nBoth options are implemented together: the helper encapsulates the\ncorrect timeouts and every `beforeEach` now calls\n`waitForEntityAnalyticsPageReady()`.\n\n## Test plan\n\n- [ ] Verify `entities_table_grouping.cy.ts` passes locally\n- [ ] Check CI on this PR for the three previously-failing suites (Group\nby Resolution, Switching grouping)\n\n## Checklist\n\n- [x] No hardcoded waits (`cy.wait(ms)`) introduced\n- [x] No `eslint-disable` introduced\n- [x] Existing tests unchanged — only `beforeEach` wiring consolidated\n\nMade with [Cursor](https://cursor.com)\n\n---------\n\nCo-authored-by: Cursor <cursoragent@cursor.com>","sha":"fd88e7fead56d2c4d274ea588c8449fbc4218534"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/268217","number":268217,"mergeCommit":{"message":"[EA] Fix flaky entities_table_grouping: extend @entityStoreSearch timeout (#268217)\n\n## Summary\n\nFixes intermittent failures in `entities_table_grouping.cy.ts` reported\nin:\n- #267794\n- #267795\n- #267828\n- #267965\n\n### Root Cause\n\nPR #265125 added `interceptEntityStoreStatus('running')` +\n`cy.wait('@entityStoreStatus', { timeout: 20000 })` to every\n`beforeEach` to prevent the page from showing\n`EntityStoreDisabledEmptyPrompt`. The intent was correct, but after\n`@entityStoreStatus` resolves, the page still needs to:\n\n1. React re-render with the new status data\n2. Wait for `isSourcererLoading = false` (the sourcerer / data-view\ninitialization)\n3. Mount `EntitiesTableSection`\n4. Fire the POST to `/internal/search/ese`\n\nThis cascade can easily take **> 5 s** in slow CI environments, while\n`cy.wait('@entityStoreSearch')` was left with the default **5 s\ntimeout** — causing \"No request ever occurred\" failures.\n\n### Changes\n\n**Option A** — raise the `@entityStoreSearch` timeout to 20 s, matching\n`@entityStoreStatus`.\n\n**Option B** — consolidate `cy.wait('@entityStoreStatus')` +\n`cy.wait('@entityStoreSearch')` + `waitForGroupingTable()` into a single\n`waitForEntityAnalyticsPageReady()` task helper, so the three\n`beforeEach` blocks stay DRY and the timeout logic lives in one place.\n\nBoth options are implemented together: the helper encapsulates the\ncorrect timeouts and every `beforeEach` now calls\n`waitForEntityAnalyticsPageReady()`.\n\n## Test plan\n\n- [ ] Verify `entities_table_grouping.cy.ts` passes locally\n- [ ] Check CI on this PR for the three previously-failing suites (Group\nby Resolution, Switching grouping)\n\n## Checklist\n\n- [x] No hardcoded waits (`cy.wait(ms)`) introduced\n- [x] No `eslint-disable` introduced\n- [x] Existing tests unchanged — only `beforeEach` wiring consolidated\n\nMade with [Cursor](https://cursor.com)\n\n---------\n\nCo-authored-by: Cursor <cursoragent@cursor.com>","sha":"fd88e7fead56d2c4d274ea588c8449fbc4218534"}},{"branch":"9.4","label":"v9.4.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co> Co-authored-by: Cursor <cursoragent@cursor.com>
romulets
pushed a commit
to romulets/kibana
that referenced
this pull request
May 8, 2026
…eout (elastic#268217) ## Summary Fixes intermittent failures in `entities_table_grouping.cy.ts` reported in: - elastic#267794 - elastic#267795 - elastic#267828 - elastic#267965 ### Root Cause PR elastic#265125 added `interceptEntityStoreStatus('running')` + `cy.wait('@entityStoreStatus', { timeout: 20000 })` to every `beforeEach` to prevent the page from showing `EntityStoreDisabledEmptyPrompt`. The intent was correct, but after `@entityStoreStatus` resolves, the page still needs to: 1. React re-render with the new status data 2. Wait for `isSourcererLoading = false` (the sourcerer / data-view initialization) 3. Mount `EntitiesTableSection` 4. Fire the POST to `/internal/search/ese` This cascade can easily take **> 5 s** in slow CI environments, while `cy.wait('@entityStoreSearch')` was left with the default **5 s timeout** — causing "No request ever occurred" failures. ### Changes **Option A** — raise the `@entityStoreSearch` timeout to 20 s, matching `@entityStoreStatus`. **Option B** — consolidate `cy.wait('@entityStoreStatus')` + `cy.wait('@entityStoreSearch')` + `waitForGroupingTable()` into a single `waitForEntityAnalyticsPageReady()` task helper, so the three `beforeEach` blocks stay DRY and the timeout logic lives in one place. Both options are implemented together: the helper encapsulates the correct timeouts and every `beforeEach` now calls `waitForEntityAnalyticsPageReady()`. ## Test plan - [ ] Verify `entities_table_grouping.cy.ts` passes locally - [ ] Check CI on this PR for the three previously-failing suites (Group by Resolution, Switching grouping) ## Checklist - [x] No hardcoded waits (`cy.wait(ms)`) introduced - [x] No `eslint-disable` introduced - [x] Existing tests unchanged — only `beforeEach` wiring consolidated Made with [Cursor](https://cursor.com) --------- Co-authored-by: Cursor <cursoragent@cursor.com>
mgadewoll
pushed a commit
to mgadewoll/kibana
that referenced
this pull request
May 8, 2026
…eout (elastic#268217) ## Summary Fixes intermittent failures in `entities_table_grouping.cy.ts` reported in: - elastic#267794 - elastic#267795 - elastic#267828 - elastic#267965 ### Root Cause PR elastic#265125 added `interceptEntityStoreStatus('running')` + `cy.wait('@entityStoreStatus', { timeout: 20000 })` to every `beforeEach` to prevent the page from showing `EntityStoreDisabledEmptyPrompt`. The intent was correct, but after `@entityStoreStatus` resolves, the page still needs to: 1. React re-render with the new status data 2. Wait for `isSourcererLoading = false` (the sourcerer / data-view initialization) 3. Mount `EntitiesTableSection` 4. Fire the POST to `/internal/search/ese` This cascade can easily take **> 5 s** in slow CI environments, while `cy.wait('@entityStoreSearch')` was left with the default **5 s timeout** — causing "No request ever occurred" failures. ### Changes **Option A** — raise the `@entityStoreSearch` timeout to 20 s, matching `@entityStoreStatus`. **Option B** — consolidate `cy.wait('@entityStoreStatus')` + `cy.wait('@entityStoreSearch')` + `waitForGroupingTable()` into a single `waitForEntityAnalyticsPageReady()` task helper, so the three `beforeEach` blocks stay DRY and the timeout logic lives in one place. Both options are implemented together: the helper encapsulates the correct timeouts and every `beforeEach` now calls `waitForEntityAnalyticsPageReady()`. ## Test plan - [ ] Verify `entities_table_grouping.cy.ts` passes locally - [ ] Check CI on this PR for the three previously-failing suites (Group by Resolution, Switching grouping) ## Checklist - [x] No hardcoded waits (`cy.wait(ms)`) introduced - [x] No `eslint-disable` introduced - [x] Existing tests unchanged — only `beforeEach` wiring consolidated Made with [Cursor](https://cursor.com) --------- Co-authored-by: Cursor <cursoragent@cursor.com>
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
Fixes intermittent failures in
entities_table_grouping.cy.tsreported in:Root Cause
PR #265125 added
interceptEntityStoreStatus('running')+cy.wait('@entityStoreStatus', { timeout: 20000 })to everybeforeEachto prevent the page from showingEntityStoreDisabledEmptyPrompt. The intent was correct, but after@entityStoreStatusresolves, the page still needs to:isSourcererLoading = false(the sourcerer / data-view initialization)EntitiesTableSection/internal/search/eseThis cascade can easily take > 5 s in slow CI environments, while
cy.wait('@entityStoreSearch')was left with the default 5 s timeout — causing "No request ever occurred" failures.Changes
Option A — raise the
@entityStoreSearchtimeout to 20 s, matching@entityStoreStatus.Option B — consolidate
cy.wait('@entityStoreStatus')+cy.wait('@entityStoreSearch')+waitForGroupingTable()into a singlewaitForEntityAnalyticsPageReady()task helper, so the threebeforeEachblocks stay DRY and the timeout logic lives in one place.Both options are implemented together: the helper encapsulates the correct timeouts and every
beforeEachnow callswaitForEntityAnalyticsPageReady().Test plan
entities_table_grouping.cy.tspasses locallyChecklist
cy.wait(ms)) introducedeslint-disableintroducedbeforeEachwiring consolidatedMade with Cursor