Commit 2eae4d2
# 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>
1 parent 32b305b commit 2eae4d2
2 files changed
Lines changed: 21 additions & 9 deletions
File tree
- x-pack/solutions/security/test/security_solution_cypress/cypress
- e2e/entity_analytics/entity_analytics_home
- tasks/entity_analytics
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 67 | + | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
| |||
116 | 115 | | |
117 | 116 | | |
118 | 117 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 118 | + | |
122 | 119 | | |
123 | 120 | | |
124 | 121 | | |
| |||
152 | 149 | | |
153 | 150 | | |
154 | 151 | | |
155 | | - | |
156 | | - | |
157 | | - | |
| 152 | + | |
158 | 153 | | |
159 | 154 | | |
160 | 155 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
62 | 79 | | |
63 | 80 | | |
64 | 81 | | |
| |||
0 commit comments