fix(playwright): stabilize shared AUT state and test oracles - #31788
fix(playwright): stabilize shared AUT state and test oracles#31788harshach wants to merge 65 commits into
Conversation
Auto-follow could resume two ways — the toolbar toggle or the user scrolling back to the tail — and the two left different internal state. `pauseFollow()` zeroes `viewerScrollAtRef`, and only `resumeFollowingTail()` re-armed it, so a pause followed by a scroll back to the tail resumed following with no viewer-scroll grace window. The pause decision then keyed on the direction-agnostic `userMovedTheView`, so the next report in which the library's own follow-scroll landed short of the tail — which a virtualised list emits when a second append arrives mid-scroll — was read as the user leaving the tail, and following paused itself. Extract `beginFollowingFromTail()` and use it from both resume paths so they cannot drift apart again, and gate the pause on a new direction-aware `movedTowardsTail` fact: a view that travelled towards the tail and stopped short of it is the viewer landing approximately, not the user leaving. `movedTowardsTail` is positive evidence of direction rather than the absence of `movedAwayFromTail`, so a first report — which has no previous offset to compare against — is neither, preserving the existing "log opens already scrolled up" behaviour. Also mark the covering Playwright test slow: it contains four 60s polls against a 60s budget and ran 55-57s locally, so it timed out on retry rather than reporting the real failure. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The "log content keeps growing" assertion budgeted 30s for the next batch of lines, on the assumption that a live run writes at a steady rate. It does not: the connector logs a burst, then goes silent for as long as its next phase takes. The longest gap is between the connection test and the first topic being ingested, where the Kafka consumer joins its group and blocks on an empty poll without logging anything. A measured CI run sat silent for 29.8s in that gap and the assertion gave up 0.2s before the next burst arrived — the budget was calibrated on top of the gap it had to clear, so which side it landed on was a coin flip. Widen the window to 90s. The test already carries test.slow() (180s) and ran in 33s, so there is ample room. A stream that connects but delivers nothing still fails: a healthy run does not go silent for 90s. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…lity # Conflicts: # openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArchive.spec.ts # openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts
…lity # Conflicts: # openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/OntologyExplorerFilters.spec.ts # openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/OntologyExplorerIntegration.spec.ts
# Conflicts: # openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AgentLogStreamHandover.spec.ts # openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/OntologyExplorerFilters.spec.ts # openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/OntologyExplorerIntegration.spec.ts # openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts # openmetadata-ui/src/main/resources/ui/playwright/utils/polling.ts
|
| Count | Rule |
|---|---|
| 2 | sonarjs/cyclomatic-complexity |
| 1 | openmetadata-imports/no-lower-layer-page-imports |
| 1 | openmetadata-imports/no-internal-barrel-imports |
| 1 | react/no-array-index-key |
| 1 | sonarjs/no-duplicate-string |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Explore/ExploreQuickFilters.tsx:23:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/rest/tasksAPI.ts:26:1 |
openmetadata-imports/no-internal-barrel-imports |
Import the internal module directly instead of its index barrel so unrelated siblings do not enter the bundle graph. |
| 🟡 | src/utils/FeedUtils.tsx:193:20 |
react/no-array-index-key |
Do not use Array index in keys |
| 🟡 | src/utils/FeedUtils.tsx:253:3 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 14 which is greater than 10 authorized.","cost":4,"secondaryLocations":[{"line":253,"column":2,"endLine":253,"endColumn |
| 🟡 | src/utils/FeedUtils.tsx:327:14 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 18 which is greater than 10 authorized.","cost":8,"secondaryLocations":[{"line":327,"column":13,"endLine":327,"endColum |
| 🟡 | src/utils/FeedUtils.tsx:365:23 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 5 times. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
Code Review 👍 Approved with suggestions 1 resolved / 2 findingsStabilizes Playwright test oracles and shared AUT state across nightly database lanes by resolving timing races and explicit search targets. Consider removing the tautological assertion in the ContextCenterArticles pagination branch. 💡 Quality: Tautological assertion in eager-fetch pagination branch📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts:665-669 In ContextCenterArticles.spec.ts the ✅ 1 resolved✅ Edge Case: Exact-match poll may miss entity beyond first 25 hits
🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
What
Stabilizes the Playwright failures that repeated in both database lanes of nightly AUT runs 32180256250, 32276251958, and the strict integration run 32304987037.
beforeAllfixtures in one worker for Column Bulk Operations and Platform LineagePATCHwhen changing the default personaWhy
The retained reports show deterministic test-state and locator races, not an EKS/RDS or database outage:
Radio.Groupafter the controlled popover was remounted; a fresh open passed in both lanesURLValidator; nightly Need icons for messaging services KAFKA and Pulsar #304 supplies a reachable DNS hostname insteadKnowledgePanel.Domains-85; its below-fold slot attached milliseconds after the helper's one-time check and therefore was never scrolled into viewIncreasing retries only hid these causes. The strict reference keeps retries at zero and treats retry-dependent results as failures.
Validation
git diff --checkpass for all changed Playwright filesf923065d1f13914b10038f5c70672a79b12ac4139fea7c4bf9unexpected=0,flaky=0, retries0: 32320942047unexpected=0,flaky=0, retries0: 3232146384717PostgreSQL and11MySQL unexpected,0flaky); every signature was assigned to a focused repair or the separate DAR product bug.unexpected=0,flaky=0, retries0: 32333769101unexpected=0,flaky=0, retries0: 323343862917,618expected /12unexpected /0flaky; MySQL reported7,620expected /14unexpected /0flaky. Its healthy API/database/OpenSearch telemetry ruled out a generic capacity collapse and supplied the focused failure set repaired here.116expected /0unexpected /0flaky on each database, retries04expected /0unexpected /0flaky on PostgreSQL, retries04expected /0unexpected /0flaky on MySQL, retries0; the target completed in 10 seconds5expected /0unexpected /0flaky, retries0, and the formerly failing target completed in 8.1 secondsThe focused repairs are clean. The PR remains draft until the final unfiltered, two-database, zero-retry reference confirms the combined test and product image set.
Related work
AgentLogStream is covered by #31774, merged #31764, and #31769. The exact test bundle used by nightly also includes those commits. The DAR assignee-filter product bug is covered separately by #31795 and Collate #5925. Companion test/orchestration PRs: Collate #5919 and nightly #304.