Repository navigation
fix(playwright): gate deleted-entity dropdown assertions on search-index consistency - #31909
Conversation
…dex consistency The 'Overview panel - Deleted entity verification' tests hard-delete a user/tag/glossary term via API, reload, and assert the entity is absent from a search-backed selection dropdown after a SINGLE search query. Index deletion is eventually consistent, so under CI load the query can still return the deleted entity and the not-visible assertion flakes — this family has ejected merge-queue entries at four different lines (:1048/:1092/:1142/:1532); on run 32500973433 the failed attempt's teardown then wedged for 9 minutes and took the whole shard past its wall clock. Add waitForDeletionFromSearchIndex (the inverse of the existing verifyDomainPropagation gate): poll /api/v1/search/query until the deleted entity no longer appears, then run the existing UI verification once against converged backend state. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
…tripled timeouts The suite ran EVERY test at 180s (blanket beforeEach test.slow(true)) and tripled its beforeAll hooks too. A failing attempt could grind through tripled top-level hook + tripled nested hook + tripled test body = the 9-minute failure slot observed on run 32500973433 before reporting anything. Evidence from 6 recent full merge_group runs (timing-history artifacts): 244/251 tests in this spec complete in <= 21s at p95 (max true body ~45s); the >55s slots are hook-time attribution on worker-first tests, which has its own budget and does not need the test timeout tripled. - Drop the suite-wide beforeEach slow: tests fail at the 60s default. - Replace test.slow(true) in the three beforeAll hooks with an explicit test.setTimeout(120_000) hook budget (hook-scoped; bounds a wedged setup at 2 min). - Per-test test.slow() opt-ins (lineage/data-quality tests that build real data inline) are unchanged. Worst-case failing slot drops from ~9 min to ~3 min (worker-first) or 60s (typical). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
waitForDeletionFromSearchIndex resolves its poll on false ('entity
gone') — the opposite polarity of verifyDomainPropagation — so the
non-OK fallback to an empty hit list turned a transient search 5xx into
an immediate pass, letting the test proceed against a stale index (the
exact race the gate exists to close). Return 'still present' on non-OK
responses so the poll keeps waiting.
Addresses #31909 (comment)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Code Review ✅ Approved 1 resolved / 1 findingsAdds a search-index convergence gate for deleted-entity dropdown assertions and replaces suite-wide Playwright slow-mode with bounded timeout budgets, addressing the transient search error finding. ✅ 1 resolved✅ Edge Case: Transient search error makes deletion gate pass prematurely
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Why
The
Overview panel - Deleted entity verificationfamily inExplorePageRightPanel.spec.tshas flaked at four different lines (:1048,:1092,:1142,:1532). On run 32500973433 the:1142first attempt failed after a 9-minute slot and pushed the shard past its wall clock — ejecting a PR with zero genuine test failures.Two independent defects, both fixed here:
1. Flake root cause: racing the search index (commit bfa5bbf)
Each test hard-deletes a user/tag/glossary term via API, reloads, and asserts absence from a search-backed dropdown after a single search query. Elasticsearch delete propagation is eventually consistent; under CI load the query still returns the deleted entity →
not.toBeVisible()fails → retry passes once the index catches up.Fix: new
waitForDeletionFromSearchIndexhelper (inverse of the existingverifyDomainPropagationgate) polls/api/v1/search/queryuntil the deleted entity disappears from theuser/tag/glossaryTermindex (all three deletes arehardDelete=true, so the poll converges), then the existing UI verification runs once. Poll bounded at 30 s, typically converges in seconds.2. Fail-fast: the 9-minute failure was stacked tripled timeouts (commit f65365f)
The suite ran every test at 180 s via a blanket
test.beforeEach(() => test.slow(true)), and tripled itsbeforeAllhooks withtest.slow(true)too. A failing attempt on a fresh worker ground through tripled top-level hook + tripled nested hook + tripled test body ≈ 3 × 180 s = the 9-minute slot before reporting anything.Evidence (timing-history artifacts from 6 recent full merge_group runs): 244/251 tests in this spec finish in ≤ 21 s at p95, max true body ~45 s — the 60 s default is generous. The >55 s slots are
beforeAlltime attributed to worker-first tests, which has its own separate hook budget and never needed the test timeout tripled.beforeEachslow removed → tests fail at the 60 s default.test.slow(true)in the threebeforeAllhooks → explicittest.setTimeout(120_000)hook budget (hook-scoped; bounds a wedged setup at 2 min).test.slow()opt-ins (lineage/data-quality tests building real data inline) unchanged.Worst-case failing slot: ~9 min → 60 s (typical) / ~3 min (worker-first incl. hook budgets).
Nightly infra cross-check (EKS/RDS)
Verified against openmetadata-nightly run 32560604531 (EKS/RDS MySQL, remote server) so the timeout change cannot regress there:
Overview panel CRUD and Removal operationsruns 72–84 s on nightly (~45 s on PR infra) — uniform across all 10 tests, i.e. genuine remote-server latency. That describe gets an explicittest.setTimeout(120_000)(nightly max × 1.4) instead of relying on the old suite-wide 3× slow.Tests
tscreports no errors in changed files.🤖 Generated with Claude Code
Greptile Summary
The PR makes deleted-entity Playwright checks wait for search-index convergence and replaces blanket timeout multiplication with bounded, scope-specific budgets.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (4): Last reviewed commit: "fix(playwright): treat search errors as ..." | Re-trigger Greptile