Repository navigation
Cherry-pick #30822 to 2.0: stop GlossaryPagination nested-search hang from eating shard budget - #30920
Conversation
…ng shard budget (#30822) `should check for nested glossary term search` was recorded at 10.9 s in timing-baseline.json but hit the 3-minute per-test wall in chromium-18 / run 30734964054 (exit 124 on the shard). Root cause was a race between clicking the "Terms" tab and filling the search input: await page.click('[data-testid="terms"]'); // switch tabs const searchInput = page.getByPlaceholder(/search.*term/i); const searchRes1 = page.waitForResponse('.../search?*'); await searchInput.fill('ChildSearchTerm'); // may fill wrong/stale input await searchRes1; // hangs → 180 s `GlossaryTermTab` mounts lazily when the tab activates, and the placeholder regex is broad enough to match a stale input from the parent term page. Under load the fill lands before the child-terms input exists, no search API fires, and `waitForResponse` runs out the `test.slow(true)` window — burning six shard-minutes with retries. Fixes: - Wait for `[data-testid="glossary-terms-scroll-container"]` after clicking the terms tab — that node only renders once `GlossaryTermTab` is on the page. - Swap `getByPlaceholder(/search.*term/i)` for `getByTestId('search-glossary-terms-input')` in all four tests. Same testid, no localization coupling, no ambiguity. - Drop `test.slow(true)` on both timing-sensitive tests. The project's default per-test timeout is 60 s (playwright.config.ts:412) — that is the correct ceiling for these tests. `test.slow(true)` tripled it to 180 s, which is what let the hang consume the shard budget. Sequential `beforeAll` term creation is preserved as-is — the serialization matters because child terms need the parent's FQN and API-visible creation order to remain deterministic across projects. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> (cherry picked from commit 1ebcdcb)
❌ 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 |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedCherry-picks the fix from main for GlossaryPagination nested-search hangs by adding proper container waiting, replacing ambiguous locators, and removing test.slow(true). No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
🔴 Playwright Results — workflow failedValidated commit ✅ 0 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky Pipeline and setup failures (6)
Performance⚪ Performance metrics unavailable; see the CI and reporting failures above.
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Cherry-pick of #30822 (
1ebcdcb610) onto2.0. Applied cleanly, no conflicts.Why
should check for nested glossary term searchis hard-failing on the 2.0 Automated Upgrade Tests. It burned all three attempts (3 × ~3.0 min) inAUT PostgreSQL 1.11.13 ➡ 2.0run 30816454253, and recurs on MySQL.mainhas carried the fix since 2026-08-03;2.0was never updated, so it still has all fourgetByPlaceholder(/search.*term/i)locators andtest.slow(true).What the fix does
[data-testid="glossary-terms-scroll-container"]after clicking the Terms tab —GlossaryTermTabmounts lazily, and the fill was landing before the child-terms input existed.getByPlaceholder(/search.*term/i)withgetByTestId('search-glossary-terms-input')in all four tests.test.slow(true), which tripled the per-test budget to 180 s and is what let the hang consume the shard.Worth noting: because the fill never landed,
clear()was a no-op on an already-empty input, so React suppressed the change event and no request ever fired. The assertions before it passed vacuously — the parent's 5 children are all namedChildSearchTerm*, so an unfiltered table is indistinguishable from a filtered one. This fix makes the test actually exercise nested search for the first time.Verification on 2.0
Both testids the fix depends on are present in 2.0's UI, so the change is semantically valid here:
search-glossary-terms-input—GlossaryTermTab.component.tsx:1259glossary-terms-scroll-container—GlossaryTermTab.component.tsx:1795After this cherry-pick,
GlossaryPagination.spec.tsis byte-identical tomain's version (git diff origin/main HEAD -- <file>is empty), which is the same file that passed CI on #30822.🤖 Generated with Claude Code