[EDR Workflows] Fix metadata transform race conditions and unskip flaky endpoint integration tests#261180
Conversation
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11373[❌] x-pack/solutions/security/test/security_solution_endpoint/configs/integrations.config.ts: 0/25 tests passed. |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11375[✅] x-pack/solutions/security/test/security_solution_endpoint/configs/integrations.config.ts: 1/1 tests passed. |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11377[❌] x-pack/solutions/security/test/security_solution_endpoint/configs/integrations.config.ts: 48/50 tests passed. |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11379[❌] x-pack/solutions/security/test/security_solution_endpoint/configs/integrations.config.ts: 46/50 tests passed. |
…n artifact_entries_list
… for Event Filters autocomplete
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#11398[✅] x-pack/solutions/security/test/security_solution_endpoint/configs/integrations.config.ts: 2/2 tests passed. |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#11399[✅] x-pack/solutions/security/test/security_solution_endpoint/configs/integrations.config.ts: 50/50 tests passed. |
|
Pinging @elastic/security-defend-workflows (Team:Defend Workflows) |
💛 Build succeeded, but was flaky
Failed CI Steps
Test Failures
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
|
…#261845) The artifacts regrouping PR (#257001) reorganized all endpoint artifacts into a unified page with tabs. This changed the page structure so that `header-page-title` now belongs to the unified "Artifacts" page and is always present, regardless of whether individual tabs have entries. Previously, `trusted_apps_list.ts` was skipped (flaky). Our PR #261180 unskipped it after fixing the underlying flakiness — but by that point the regrouping had already landed, making the `header-page-title` assertions invalid. The test immediately started failing on merge. `artifact_entries_list.ts` has the same `header-page-title` assertions for all artifact types (trusted apps, event filters, blocklist, host isolation exceptions) — these would fail for the same reason once hit. **Fix:** Replace `missingOrFail('header-page-title')` with `existOrFail('*-emptyState')` in both test files. The empty state test subject is the correct indicator that a tab has no entries. Closes #261827 Closes #261829 Closes #261833 Closes #261849 Closes #261850
Unskips two flaky endpoint integration FTR tests and fixes the underlying issues that caused them to fail.
Root causes:
startMetadataTransforms()failed withresource_not_found_exceptionorTimeoutErrorbecause transforms weren't created yet or ES was slow on CIloadEndpointData()with full transforms/alerts/response-actions setup when they didn't need it, wasting timeout budgetChanges:
transforms.ts— shared infrastructure improvements:waitForTransformsToBeCreated()that polls for transforms to exist before starting them (replaces one-shot lookup that raced with Fleet install)startTransformWithRetry()that retries on 404 and TimeoutError with backoffstartMetadataTransforms, not just the two being unskippedindex_fleet_endpoint_policy.ts:force: trueto agent policy deletion during test cleanup to avoid race with Fleet stateartifact_entries_list.ts(Closes #249124):loadEndpointData()with a single event doc indexed intologs-endpoint.events.process-defaultto seed field mappings for the Event Filters autocomplete — the only data this test actually needs from EStrusted_apps_list.ts(Closes #251545):loadEndpointData()entirely — this test only does UI CRUD with hardcoded values, no ES field queriesCloses #249124
Closes #251545