Skip to content

Cherry-pick #30822 to 2.0: stop GlossaryPagination nested-search hang from eating shard budget - #30920

Merged
siddhant1 merged 1 commit into
2.0from
cherry-2.0-30822
Aug 4, 2026
Merged

siddhant1 merged 1 commit into
2.0from
cherry-2.0-30822

Conversation

@siddhant1

Copy link
Copy Markdown
Contributor

Cherry-pick of #30822 (1ebcdcb610) onto 2.0. Applied cleanly, no conflicts.

Why

should check for nested glossary term search is hard-failing on the 2.0 Automated Upgrade Tests. It burned all three attempts (3 × ~3.0 min) in AUT PostgreSQL 1.11.13 ➡ 2.0 run 30816454253, and recurs on MySQL.

Test timeout of 180000ms exceeded.
Error: page.waitForResponse: Test timeout of 180000ms exceeded.
waiting for response "**/api/v1/glossaryTerms?*"
> 170 |     const clearRes1 = page.waitForResponse('**/api/v1/glossaryTerms?*');

main has carried the fix since 2026-08-03; 2.0 was never updated, so it still has all four getByPlaceholder(/search.*term/i) locators and test.slow(true).

What the fix does

  • Waits for [data-testid="glossary-terms-scroll-container"] after clicking the Terms tab — GlossaryTermTab mounts lazily, and the fill was landing before the child-terms input existed.
  • Replaces the ambiguous getByPlaceholder(/search.*term/i) with getByTestId('search-glossary-terms-input') in all four tests.
  • Drops 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 named ChildSearchTerm*, 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:1259
  • glossary-terms-scroll-container — GlossaryTermTab.component.tsx:1795

After this cherry-pick, GlossaryPagination.spec.ts is byte-identical to main's version (git diff origin/main HEAD -- <file> is empty), which is the same file that passed CI on #30822.

🤖 Generated with Claude Code

…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)
@siddhant1
siddhant1 requested a review from a team as a code owner August 4, 2026 06:15
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot

gitar-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Cherry-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.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🔴 Playwright Results — workflow failed

Validated commit f7b4783f7df3e50c2d4ae833048bd4e87e31010f in Playwright run 30883389156, attempt 1.

✅ 0 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Pipeline and setup failures (6)

  • The build job finished with status failure.
  • Duration-aware shard planning finished with status skipped.
  • Fixture cache restoration finished with status skipped.
  • Seeded fixture preparation finished with status skipped.
  • The Playwright shard matrix was unexpectedly skipped.
  • No expected Playwright shards were declared.

Performance

⚪ Performance metrics unavailable; see the CI and reporting failures above.

Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@siddhant1
siddhant1 merged commit 79766da into 2.0 Aug 4, 2026
60 of 65 checks passed
@siddhant1
siddhant1 deleted the cherry-2.0-30822 branch August 4, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants