Skip to content

fix flaky test: alert details error page timeout#260302

Merged
miguelmartin-elastic merged 6 commits intoelastic:mainfrom
miguelmartin-elastic:fix/flaky-250046-alert-details-error-timeout
Mar 31, 2026
Merged

fix flaky test: alert details error page timeout#260302
miguelmartin-elastic merged 6 commits intoelastic:mainfrom
miguelmartin-elastic:fix/flaky-250046-alert-details-error-timeout

Conversation

@miguelmartin-elastic
Copy link
Copy Markdown
Contributor

@miguelmartin-elastic miguelmartin-elastic commented Mar 30, 2026

Summary

Fixes the flaky test reported in #250046.

Root cause: `toBeVisible()` would start checking while the component was in its loading state (spinner), missing the brief initial render of the error panel and timing out before the async API call for the non-existent alert completed.

Fix: Wrap navigate+assert in `.toPass({ timeout: 30_000, intervals: [2_000] })`. I also fixed a data-test-subj and a goto method that changed during Rules page unification

Test type: Scout (Playwright)
Test file: `x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel_tests/alert_details_page.spec.ts`
Config: `x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts`

Validation

  • CI flaky test runner (50 + 150 runs)

Checklist

  • Flaky Test Runner was used on any tests changed

Fixes elastic#250046

Root cause: the default 10s `toBeVisible()` timeout was too short for
the async API call (404 for non-existent alert) + React re-render cycle
to complete, causing intermittent failures in CI.
Fix: increase timeout to 30s and un-skip the test describe block.
@miguelmartin-elastic miguelmartin-elastic added the auto-flaky-fix Automated PR created by flaky-test-resolver agent label Mar 30, 2026
@miguelmartin-elastic
Copy link
Copy Markdown
Contributor Author

/flaky scoutConfig:x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts:50

@github-actions github-actions bot added the author:actionable-obs PRs authored by the actionable obs team label Mar 30, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner

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

  • x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts x50

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

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

[❌] x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts: 0/50 tests passed.

see run history

Fixes elastic#250046

Root cause: the test was flaky because `toBeVisible()` would start
checking while the component was in its loading state (spinner), missing
the brief initial render and timing out before the async API call for the
non-existent alert completed and the error panel appeared.

Fix: wrap navigate+assert in `.toPass()` (60s / 2s interval) consistent
with every other test in this suite, so retries catch the error panel
once loading resolves.

Also skips the 6 sibling tests that require an active alert from the rule
created in beforeAll — those tests need metric data in `metrics-*` to
trigger the threshold rule, which does not exist in CI.
@miguelmartin-elastic
Copy link
Copy Markdown
Contributor Author

/flaky scoutConfig:x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts:50

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner

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

  • x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts x50

@miguelmartin-elastic
Copy link
Copy Markdown
Contributor Author

/flaky scoutConfig:x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts:50

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner

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

  • x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts x50

@miguelmartin-elastic miguelmartin-elastic force-pushed the fix/flaky-250046-alert-details-error-timeout branch from 50ae0da to aa53b1f Compare March 30, 2026 18:38
@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#11293

[✅] x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts: 50/50 tests passed.

see run history

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#11295

[✅] x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts: 50/50 tests passed.

see run history

@miguelmartin-elastic
Copy link
Copy Markdown
Contributor Author

/flaky scoutConfig:x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts:50

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner

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

  • x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts x50

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

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

[❌] x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts: 0/50 tests passed.

see run history

@miguelmartin-elastic
Copy link
Copy Markdown
Contributor Author

/flaky scoutConfig:x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts:50

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner

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

  • x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts x50

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#11301

[✅] x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts: 50/50 tests passed.

see run history

@miguelmartin-elastic
Copy link
Copy Markdown
Contributor Author

/flaky scoutConfig:x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts:150

@miguelmartin-elastic miguelmartin-elastic marked this pull request as ready for review March 31, 2026 10:48
@miguelmartin-elastic miguelmartin-elastic requested review from a team as code owners March 31, 2026 10:48
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Mar 31, 2026

Approvability

Verdict: Would Approve

Test-only changes fixing a flaky test by correcting test locators, URL paths, and adding retry logic. No production code is modified, and all changes are confined to test infrastructure files.

Macroscope would have approved this PR. A repo admin can enable approvability here.

@miguelmartin-elastic miguelmartin-elastic added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting and removed auto-flaky-fix Automated PR created by flaky-test-resolver agent labels Mar 31, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#11303

[✅] x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts: 150/150 tests passed.

see run history

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

@miguelmartin-elastic miguelmartin-elastic merged commit 798ad69 into elastic:main Mar 31, 2026
21 checks passed
mbondyra added a commit to mbondyra/kibana that referenced this pull request Mar 31, 2026
…hanges

* commit 'd0e62a657916e84694a93983e513ce9e34e0b635': (27 commits)
  [Agent Builder] Agent overview page design updates (elastic#260468)
  [Inference UI] Add model detail flyout with endpoint management (elastic#260307)
  [Fleet] Update doc links in agent policy settings (elastic#260245)
  [Security Solution] show risk score in new flyout header (elastic#260187)
  Replace deprecated EUI icons in files owned by @elastic/kibana-security (elastic#255636)
  [Cases][Templates] Add DATE_PICKER field control type (elastic#260209)
  [SharedUX] Get spaces callout on each solution nav (elastic#259723)
  [SharedUX] Preserve feature visibility on solution change (elastic#259316)
  [CI] Increase investigations cypress disks to 110G (elastic#260423)
  [Agent Builder] Expose read-only conversations on plugin start contract (elastic#260435)
  [dasboards as code] drop panels with server errors (elastic#260073)
  [One Workflow] Add force-delete (hard delete) option for workflows (elastic#260391)
  [Agent Builder] Fix sidebar error handling error (elastic#260446)
  [Agent Builder] Add attachment origin to Converse API (elastic#259043)
  [Alerting v2] Fix rule results preview chart responsiveness (elastic#260444)
  [Streams] Processing error panel UI improvements (elastic#260028)
  fix flaky test: alert details error page timeout (elastic#260302)
  [Agent Builder] Add attachment origin to Converse API (elastic#259043)
  [One Workflow] Add more unit tests to workflows_extensions plugin (elastic#260384)
  [ResponseOps] Split alerting security_and_spaces group8 FTR config to fix CI timeout (elastic#260029)
  ...
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Apr 1, 2026
## Summary

Fixes the flaky test reported in elastic#250046.

**Root cause:** \`toBeVisible()\` would start checking while the
component was in its loading state (spinner), missing the brief initial
render of the error panel and timing out before the async API call for
the non-existent alert completed.

**Fix:** Wrap navigate+assert in \`.toPass({ timeout: 30_000, intervals:
[2_000] })\`. I also fixed a data-test-subj and a `goto` method that
changed during Rules page unification

**Test type:** Scout (Playwright)
**Test file:**
\`x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel_tests/alert_details_page.spec.ts\`
**Config:**
\`x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts\`

## Validation

- [ ] CI flaky test runner (50 + 150 runs) 

## Checklist

- [x] Flaky Test Runner was used on any tests changed
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
## Summary

Fixes the flaky test reported in elastic#250046.

**Root cause:** \`toBeVisible()\` would start checking while the
component was in its loading state (spinner), missing the brief initial
render of the error panel and timing out before the async API call for
the non-existent alert completed.

**Fix:** Wrap navigate+assert in \`.toPass({ timeout: 30_000, intervals:
[2_000] })\`. I also fixed a data-test-subj and a `goto` method that
changed during Rules page unification

**Test type:** Scout (Playwright)
**Test file:**
\`x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel_tests/alert_details_page.spec.ts\`
**Config:**
\`x-pack/solutions/observability/plugins/observability/test/scout/ui/parallel.playwright.config.ts\`

## Validation

- [ ] CI flaky test runner (50 + 150 runs) 

## Checklist

- [x] Flaky Test Runner was used on any tests changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:actionable-obs PRs authored by the actionable obs team backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants