Skip to content

Flaky(UI): Customize Detail Page spec - #25650

Merged
dhruvjsx merged 12 commits into
open-metadata:mainfrom
dhruvjsx:persona-failure
Feb 6, 2026
Merged

dhruvjsx merged 12 commits into
open-metadata:mainfrom
dhruvjsx:persona-failure

Conversation

@dhruvjsx

@dhruvjsx dhruvjsx commented Jan 30, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

This one error is timeout since I was running it on 3000 with multiple workers
Screenshot 2026-02-03 at 1 18 57 PM

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Summary by Gitar

  • E2E test stability improvements:
    • Added explicit visibility assertions and enabled state checks before element interactions to prevent race conditions
  • Element reference management:
    • Extracted selectors into variables and added modal state waits for hidden and detached states
  • Timing optimization:
    • Added strategic timeouts and widget visibility waits to handle UI rendering delays

This will update automatically on new commits.


@github-actions

github-actions Bot commented Jan 30, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
65.84% (56032/85108) 45.18% (29334/64923) 47.95% (8848/18454)

await expect(adminPage.getByRole('dialog')).toBeVisible();

await adminPage
const dialogTextbox = adminPage.getByRole('dialog').getByRole('textbox');

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.

Can we look for testid here? There can be multiple textboxes.

await expect(adminPage.getByRole('dialog')).toBeVisible();

await adminPage
const dialogTextbox = adminPage.getByRole('dialog').getByRole('textbox');

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.

Can we look for testid here? There can be multiple textboxes.

@gitar-bot

gitar-bot Bot commented Feb 6, 2026 •

Copy link
Copy Markdown
🔍 CI failure analysis for 86f3f31: Job 3 failed with 1 unrelated NotificationAlerts test (run attempt 2). Job 2 succeeded for the 5th consecutive time, confirming CustomizeDetailPage fix is stable.

Issue

CI Run for commit 86f3f31 - Run Attempt 2 (auto-retry)

ALL 6 JOBS COMPLETE: 1 job failed with 1 unrelated test failure

Root Cause

Job 3: NotificationAlerts Test Failure - Unrelated to PR

Failed Test: NotificationAlerts.spec.ts:245 - "Multiple Filters Alert"

Stats: 1 failed, 12 flaky, 620 passed (99.8% pass rate)

Completely unrelated to CustomizeDetailPage PR. Does not modify NotificationAlerts or filtering functionality.

Context: This is the second failure in Job 3 for this commit:

  • Run Attempt 1: AuditLogs.spec.ts:734 failed (search functionality)
  • Run Attempt 2: NotificationAlerts.spec.ts:245 failed (alert filtering)

Different tests failing across retries indicates pre-existing flakiness, not code regression.

BREAKTHROUGH: Fifth Consecutive Job 2 SUCCESS!

JOB 2: SUCCESS! ✅✅✅✅✅

FIVE CONSECUTIVE SUCCESSFUL JOB 2 RUNS!

Pattern Confirmation:

  • Commit b0bb35f: Job 2 SUCCESS (breakthrough!)
  • Commit 87b57f3: Job 2 SUCCESS (2nd!)
  • Commit 219e638: Job 2 SUCCESS (3rd!)
  • Commit 86f3f31 (Run 1): Job 2 SUCCESS (4th!)
  • Commit 86f3f31 (Run 2): Job 2 SUCCESS (5th!)

Historical Context:

  • Previous runs: Persistent Job 2 CustomizeDetailPage failures
  • Recent 5 CI runs: 100% success rate in Job 2
  • Zero CustomizeDetailPage failures across 5 consecutive CI runs
  • Fix consistently stable through multiple merges from main AND retries

Details

Complete Results (ALL 6 JOBS) - Run Attempt 2:

  • Job 1: ✅ SUCCESS
  • Job 2: ✅ SUCCESS (5th consecutive!)
  • Job 3: ❌ FAILED (1 NotificationAlerts test - unrelated, 99.8% pass rate)
  • Job 4: ✅ SUCCESS
  • Job 5: ✅ SUCCESS
  • Job 6: ✅ SUCCESS

Success Metrics:

  • 83% complete job success (5 of 6 jobs)
  • 99.8% test pass rate in failed job
  • 100% CustomizeDetailPage success across 5 consecutive runs
  • Zero infrastructure failures in this run
  • Different failures across retries = pre-existing flakiness, not PR issue
Code Review 👍 Approved with suggestions 2 resolved / 3 findings

Good test stability improvements with proper wait patterns and visibility assertions. One inconsistency remains: the second test block still lacks explicit dialog close waits present in the first block.

💡 Quality: Missing dialog close waits may cause test flakiness

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts:590-591

The second test block (around line 590) is missing the explicit dialog close waits that are present in the first test block (lines 443-445).

In the first block, before getting the addWidgetButton locator, there are explicit waits:

await adminPage.getByRole('dialog').waitFor({ state: 'hidden' });
await adminPage.locator('.ant-modal-wrap').waitFor({ state: 'detached' });

In the second block, these waits are missing after addButton.click() and before accessing the addWidgetButton. This inconsistency could lead to continued flakiness in this test case if the dialog doesn't close fast enough.

Suggested fix: Add the same dialog close waits before line 591:

// Wait for dialog to close before interacting with grid layout
await adminPage.getByRole('dialog').waitFor({ state: 'hidden' });
await adminPage.locator('.ant-modal-wrap').waitFor({ state: 'detached' });
✅ 2 resolved
✅ Quality: Hardcoded timeouts may cause flakiness or slow tests

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts:436 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts:446 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts:584 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts:594 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts:336
Multiple hardcoded waitForTimeout() calls have been added throughout the tests (500ms, 1000ms). While these may temporarily fix flakiness, they introduce two problems:

  1. Can still be flaky: If the system is slow, the timeout may not be enough
  2. Unnecessarily slow: On fast systems, tests wait longer than needed

Suggestion: Replace fixed timeouts with explicit condition-based waits. For example:

  • Instead of await adminPage.waitForTimeout(1000) before checking addButton.toBeEnabled(), the expect().toBeEnabled() call itself retries with auto-waiting in Playwright.
  • The waitForTimeout(500) before waitFor({ state: 'visible' }) is redundant since waitFor already waits.

Consider removing these redundant timeouts or replacing them with more specific condition waits like waitForLoadState('domcontentloaded') or waiting for specific network requests to complete.

✅ Quality: Force click may mask underlying timing issues

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/CustomizeDetailPage.spec.ts:592
Using click({force:true}) bypasses Playwright's actionability checks (visibility, stability, enabled state). While it may make the test pass, it can:

  1. Hide real bugs where the element isn't properly interactable
  2. Click on the wrong element if another element overlays it
  3. Make the test behavior inconsistent with real user interactions

Suggestion: Investigate why the normal click fails. The waitFor({ state: 'detached' }) on the modal wrapper should ensure it's gone. Consider waiting for any animations to complete or checking if there are other overlays. If force click is truly needed, add a comment explaining why.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

sonarqubecloud Bot commented Feb 6, 2026

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
test — 86f3f312 Deployed Feb 6, 2026 by dhruvjsx via playwright-ci-postgresql (3, 6) #33197
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants