[Infra UI] Stabilize Infra Custom Dashboards stateful API tests#265679
[Infra UI] Stabilize Infra Custom Dashboards stateful API tests#265679awahab07 merged 2 commits into
Conversation
…ing flips and wait for propagation so stateful cloud runs do not read stale cached values.
|
Pinging @elastic/obs-presentation-team (Team:obs-presentation) |
Catch flakiness early (recommended)Recommended before merge: run the flaky test runner against this PR to catch flakiness early. The new Trigger a run with the Flaky Test Runner UI or post this comment on the PR: Share feedback in the #appex-qa channel. Posted via Macroscope — Flaky Test Runner nudge |
ApprovabilityVerdict: Needs human review Test-only changes reorganizing API integration tests and adding retry logic for multi-node environment stability. However, the modified file is owned by @elastic/obs-presentation-team and the author is not a designated owner, so designated reviewers should verify the test reorganization. You can customize Macroscope's approvability policy. Learn more. |
💚 Build Succeeded
Metrics [docs]
|
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#11925[✅] x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.stateful.config.ts: 30/30 tests passed. |
| if (Date.now() - startedAt < CUSTOM_DASHBOARDS_SETTING_PROPAGATION_DELAY_MS) { | ||
| throw new Error('Waiting for custom dashboards setting propagation'); | ||
| } |
There was a problem hiding this comment.
Can we avoid having conditions in the tests?
| ? `/api/infra/${assetType}/custom-dashboards/${dashboardSavedObjectId}` | ||
| : `/api/infra/${assetType}/custom-dashboards`; | ||
|
|
||
| // TDDO: Ideally we should have a deterministic way to know when settings updates are propagated to the UI. |
There was a problem hiding this comment.
Q: Any way this could be done here instead of leaving the comment. If not maybe we should link an issue so we don't forget about it
|
@jennypavlova thanks for the review. Does it make sense to let this PR merge, to test if it mitigates the recurring test failures. Once confirmed, we can move forward with the follow up PR and a robust solution tracked by #265720. |
Summary
The Deployment Agnostic Infra Custom Dashboards API tests lately got many test failures in the scheduled stateful runs.
The most probably cause is a result of #262618, which introduced caching layer around
uiSettings. As a result, Infra Custom Dashboards stateful API test suite which frequently updates and retrieves dashboard settings, faced server-side eventual consistency for settings in multi-node setups.The suite was updating
observability:enableInfrastructureAssetCustomDashboardsand immediately asserting route behavior. In scheduled cloud runs, the follow-up request can observe a stale cached value on another Kibana node, which flips expected status codes.Example failure:

This PR: