-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Chore(UI): Fix AUT flaky tests in main #25459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ExploreQuickFilters.spec.ts
Show resolved
Hide resolved
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ImpactAnalysis.spec.ts
Show resolved
Hide resolved
openmetadata-ui/src/main/resources/ui/playwright/utils/customProperty.ts
Show resolved
Hide resolved
🔍 CI failure analysis for 91aa272: Multiple CI jobs failed: Job (3,6) has 3 ColumnBulkOperations hard failures + 4 flaky; Job (5,6) had infrastructure failure (runner shutdown after 2h) with 6 test timeouts before terminationIssueMultiple CI jobs from the same commit (91aa272 "Fix flaky tests") failed with different patterns. Job 61394948970: playwright-ci-postgresql (3, 6) - 181/188 passed (30.4 min) Root CauseJob (3,6) - ColumnBulkOperations Issues (3 hard failures):
All concentrated in one test file, suggesting systemic issues with bulk operations feature. Job (5,6) - Infrastructure Failure: Primary Issue: Runner received shutdown signal at 10:56:11 UTC after running for 2h 3m
Test Failures Before Shutdown (6 tests):
Flaky Tests in Job (3,6):
DetailsCritical Infrastructure Issue:
Common Patterns:
Key Observation: Both jobs show different failure modes, suggesting widespread test stability and performance problems rather than isolated issues. Code Review 👍 Approved with suggestions 8 resolved / 10 findingsGood test reliability improvements with API-based setup, proper async waits, and code clarity refactors. One minor edge case with undefined displayName handling. 💡 Bug: Missing await on visitEntityPage call📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ServiceCreationPermissions.spec.ts:301 In The line at 301 shows the fix: - userOwnedService.visitEntityPage(otherPage)
+ await userOwnedService.visitEntityPage(otherPage);This is actually a good fix and improves reliability. 💡 Edge Case: verifyPipelineDataInDrawer may fail if displayName undefined📄 openmetadata-ui/src/main/resources/ui/playwright/utils/lineage.ts:434-443 In const fromNodeDisplayName = get(fromNode.entity, 'displayName');
const toNodeDisplayName = get(toNode.entity, 'displayName');
...
await expect(
page.locator('.overview-section').getByTestId('Source-value')
).toHaveText(fromNodeDisplayName); // Will fail if undefinedConsider providing a default value: const fromNodeDisplayName = get(fromNode.entity, 'displayName', '');
const toNodeDisplayName = get(toNode.entity, 'displayName', '');Or using optional chaining with nullish coalescing like other parts of the PR do ( ✅ 8 resolved✅ Bug: Removed sqlQuery validation from custom property test
✅ Bug: Missing await on async visitEntityPage call
✅ Bug: Filtering without assertion in verifyPipelineDataInDrawer
✅ Edge Case: Potential undefined access on displayName in drawer verification
✅ Bug: Missing await on visitEntityPage call was fixed
...and 3 more resolved from earlier reviews Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|



This pull request refactors and improves Playwright E2E tests for the OpenMetadata UI, focusing on code maintainability, test reliability, and clarity. The main changes include replacing UI-based entity setup with direct API patching, removing unnecessary cleanup steps, improving test synchronization with API responses, and refactoring repeated string constructions for clarity and maintainability.
Test setup and teardown improvements:
ExploreQuickFilters.spec.ts, entity setup inbeforeAllnow uses direct API patching for tags, tier, and domain assignments, replacing UI interactions for faster and more reliable test initialization. Unnecessary cleanup steps inafterAllare removed.ImpactAnalysis.spec.ts, redundantafterAllcleanup code is removed since entity lifecycle is now managed more efficiently.Test reliability and synchronization:
ImpactAnalysis.spec.tsto ensure assertions only occur after data is loaded, reducing flakiness. [1] [2] [3]Code clarity and maintainability:
Lineage.spec.tsby introducing variables and using them in edge ID generation, reducing repetition and improving readability. [1] [2] [3] [4] [5] [6]Minor test logic fixes:
replaceAllfor consistency inExploreQuickFilters.spec.ts.