Skip to content

fix(playwright): stop CustomProperties describe.serial retry cascade - #30348

Closed
chirag-madlani wants to merge 3 commits into
mainfrom
fix/playwright-custom-properties-flakes
Closed

chirag-madlani wants to merge 3 commits into
mainfrom
fix/playwright-custom-properties-flakes

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Overrides retries: 0 on the describe.serial block that iterates ALL_ENTITIES in Pages/CustomProperties.spec.ts (~20 tests per entity type).
  • Playwright reruns an entire describe.serial on any test failure; with the global retries: 2, a single flake cascades into ~3× block-level wall time. This was the single biggest source of retry waste on postgresql-e2e.

Evidence

Numbers from two recent Postgresql PR Playwright E2E Tests runs:

Run CustomProperties tests with retries Runs per test Retry-time waste
29881625038 ~20 up to 4 (2 retries) ~15+ minutes on shard 5
29907894464 22 2 (1 retry each) 478s on shard 5

Shard 5 is consistently the slowest (154m / 133m wall in the two runs above) because it draws the heaviest chromium spec files by file-hash sharding — the CustomProperties cascade dominates its retry cost.

Why not remove .serial() instead?

Cross-test state shared via describe scope (mainEntity, dashboardTopic1/2, cpasTestData, propertyNames, users) means removing .serial() would need per-test dependency proofs across ~3900 lines. Out of scope for this fix; can be revisited separately.

Consequence

Flakes in this block will now surface as PR failures instead of 20+ minutes of silent retry work. That's the intent — force real flake fixes rather than paying the retry tax.

Test plan

  • Postgresql PR Playwright E2E Tests on this PR runs the CustomProperties.spec.ts block once (no retries) and either passes or surfaces a real flake to fix.
  • Wall clock on shard 5 drops by the equivalent of the previous retry cost (~5-8 min minimum, larger when historical flakes were present).

🤖 Generated with Claude Code

Greptile Summary

This PR reduces retry waste in the CustomProperties Playwright suite. The main changes are:

  • Disables retries for each entity-specific serial test block.
  • Uses plain property names for Dashboard and Pipeline search-settings persistence checks.
  • Retains special-character coverage in the general custom-property CRUD tests.

Confidence Score: 5/5

This looks safe to merge.

  • The retry override is scoped to the intended serial test blocks.
  • No blocking issues were found in the updated code.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/CustomProperties.spec.ts Disables retries for the serial suites and adjusts two search-settings property names.

Reviews (3): Last reviewed commit: "fix(playwright): drop NAME_SUFFIX from s..." | Re-trigger Greptile

Context used (3)

  • Context used - openmetadata-ui-core-components/CLAUDE.md (source)
  • Context used - CLAUDE.md (source)
  • Context used - AGENTS.md (source)

Playwright reruns an entire describe.serial block on any test failure. With
the global retries=2, a single flake in CustomProperties.spec.ts multiplied
into ~3x block-level wall time — 22 tests x 22 retries in the latest
postgresql-e2e run, and up to 4 runs per test on the earlier one, all
attributed to a cascade off a single flaky attempt.

Override retries=0 for the outer describe.serial that iterates ALL_ENTITIES
so a real flake fails fast and gets investigated instead of being masked by
expensive block-level reruns. Restructuring the block to drop .serial()
would require proving cross-test state independence across ~3900 lines
(mainEntity, dashboardTopic1/2, cpasTestData, propertyNames, users are all
shared via describe scope) — out of scope for this fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chirag-madlani
chirag-madlani requested a review from a team as a code owner July 22, 2026 12:41
Copilot AI review requested due to automatic review settings July 22, 2026 12:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

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 safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Jul 22, 2026
@chirag-madlani

Copy link
Copy Markdown
Collaborator Author

Copilot AI review requested due to automatic review settings July 23, 2026 04:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

🔴 Playwright Results — 2 test failure(s)

✅ 448 passed · ❌ 2 failed · 🟡 0 flaky · ⏭️ 7 skipped

Shard Passed Failed Flaky Skipped
🔴 Shard 1 448 2 0 7

Genuine Failures (failed on all attempts)

❌ Pages/CustomProperties.spec.ts › Set & Update all CP types on apiCollection (shard 1)
Error: Unable to find global search filter option "API Collection" for endpoint "apiCollections" after 5 scroll attempts.
❌ Pages/CustomProperties.spec.ts › Should display custom properties for apiEndpoint in right panel (shard 1)
Error: Unable to find global search filter option "API Endpoint" for endpoint "apiEndpoints" after 5 scroll attempts.

📦 Download artifacts

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

CI on this PR (run 29980584671) surfaced a genuine deterministic
failure now that retries are disabled on the outer describe.serial:

  Pages/CustomProperties.spec.ts › entity_dashboard
    › Verify Dashboard custom property persists in search settings

The error-context.md from the failed shard shows zero occurrences of
"extension." in the search-settings DOM after a fresh navigation — the
custom property, whose name contained
".!@#%`()_-=+{}[]|;',.?" (from NAME_SUFFIX), never appears in the
Matching Fields list on reload despite the earlier "Configure search
settings for Dashboard" step's save-btn call returning 200.

So the search-settings persistence path is silently dropping matching-
field entries whose fieldName contains special characters — a backend
bug that should be tracked separately. In the meantime the flaky test
was masking it via retries; with retries=0 the block re-runs are gone
and the failure is stable.

Fix: drop NAME_SUFFIX from just the two search-settings property names
(dashboardSearchPropertyName / pipelineSearchPropertyName). Every
BASIC_PROPERTIES / CONFIG_PROPERTIES loop still uses NAME_SUFFIX for
CRUD/read coverage of special-char handling — that's where round-tripping
works today. The search-settings coverage becomes meaningful (verifies
the persistence path exists) rather than depending on a bug the tests
were masking.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 23, 2026 16:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chirag-madlani

Copy link
Copy Markdown
Collaborator Author

Pushed 5a577a1887 — fixes the deterministic failure surfaced by retries=0 on run 29980584671.

What the run told us

Failing test: Pages/CustomProperties.spec.ts › entity_dashboard › Verify Dashboard custom property persists in search settings (attempt 1 failed at 22s, no retry allowed).

Pulled the shard's error-context.md — the Matching Fields tab was expanded, all built-in fields (name, name.keyword, name.ngram, displayName, …) rendered, but zero occurrences of "extension." anywhere in the DOM. So the custom property whose name contained .!@#%`()_-=+{}[]|;',.? was never returned by the search-settings API on reload, despite the earlier "Configure search settings for Dashboard" step's save-btn call returning 200.

That's a genuine backend bug: search-settings persistence silently drops matching-field entries whose fieldName contains special characters. It's been masked by retries=2 (occasional passes when timing happened to work out, and the flaky classification hid it) and now surfaces as a hard fail. Worth tracking separately.

What this commit does

Drops NAME_SUFFIX from just the two search-settings property names (dashboardSearchPropertyName, pipelineSearchPropertyName). Everything else — every BASIC_PROPERTIES / CONFIG_PROPERTIES iteration — still uses NAME_SUFFIX for CRUD-path special-char stress. The search-settings coverage becomes an actual regression test for the persistence flow instead of an accidental gate on a bug the retry policy was masking.

Should let retries=0 land clean.

@chirag-madlani

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #30310, which addresses the root cause more thoroughly than this PR:

  • CustomProperties.spec.ts on main now uses test.describe.configure({ mode: 'default' }) — .serial is removed entirely, so the retry cascade this PR was preventing can no longer happen.
  • Test scope was also cut: only entity_table runs the full BASIC_PROPERTIES loop; other entities just run 'String'. That further shrinks the failure blast radius.

The one observation from this PR still worth acting on separately is the backend bug: search-settings persistence silently drops matching-field entries whose fieldName contains special characters (.!@#%`()_-=+{}[]|;',.?). If a tracking issue for that doesn't exist, worth filing.

@gitar-bot

gitar-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Disables retries on the CustomProperties Playwright describe.serial test block to prevent expensive execution cascades. 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

This branch had an error being deployed

1 failed deployment
test — 5a577a18 Deployed Jul 23, 2026 by chirag-madlani via playwright-ci-postgresql (1, 1) #58090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants