Skip to content

test: Playwright + ingestion flake-hardening batch (11 fixes across 10 files) - #33830

Merged
chirag-madlani merged 13 commits into
mainfrom
chirag-madlani/playwright-test-hardening-batch1
Sep 23, 2026
Merged

chirag-madlani merged 13 commits into
mainfrom
chirag-madlani/playwright-test-hardening-batch1

Conversation

@chirag-madlani

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

Copy link
Copy Markdown
Collaborator

Describe your changes:

Batch cherry-pick from #33088 — 11 self-contained test-hardening fixes grouped into one PR so CI runs once instead of eleven times.

All commits are authored by @harshach; all fixes target flakes/gaps in existing tests or scripts, no runtime code changes.

Commits

# Commit Fix
1 490361d207 fix(test): scroll to the child before asserting it is in the hierarchy (ContextCenterArticles)
2 406541eea9 fix(test): stop the glossaryTerms route handler crashing on a non-listing body (OntologyStudioIsolatedToggle)
3 4a5cdb8817 fix(test): fit the platform lineage scene instead of zooming out of it
4 2f556b6d85 test: make the deny permission check actually check something
5 e4ad3308a8 fix(e2e): restore the KnowledgeGraph guardrail fixes the merge reverted
6 6ccf7004b6 docs(e2e): correct the soak-lane claim in QUARANTINE.md
7 0b6de758fb ci(script): pull the two compose images together, not one after the other
8 84ebeeecf9 fix(test): let the permission affordance check wait for the buttons
9 bdec618b80 fix(test): type into the quick-link comboboxes instead of filling them
10 30d1c9807a test(ingestion): retry docker image pulls through a transient registry error
11 0bafe94192 fix(test): resend an API request that died with its connection

Type of change:

  • Test / CI hardening (removes flake sources, no product code change)

Files touched (10)

  • .github/scripts/start_playwright_fast_environment.sh
  • ingestion/tests/integration/conftest.py
  • openmetadata-ui/src/main/resources/ui/playwright/QUARANTINE.md
  • openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts
  • openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/KnowledgeGraph.spec.ts
  • openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/OntologyStudioIsolatedToggle.spec.ts
  • openmetadata-ui/src/main/resources/ui/playwright/utils/KnowledgeCenter.ts
  • openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  • openmetadata-ui/src/main/resources/ui/playwright/utils/entityPermissionUtils.ts
  • openmetadata-ui/src/main/resources/ui/playwright/utils/lineage.ts

Notes

Cherry-picked from #33088 to land as one reviewable, atomic batch instead of 11 separate PRs. Each commit preserved with @harshach as git author; commit #1 required a trivial indentation-only conflict resolution against the current main. Deliberately excluded from this batch: the PW_E2E_BUILD runtime gate on LineageMap.component.tsx (call it out as a separate PR — it modifies runtime behavior conditionally on a build flag and deserves its own review).

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no outstanding correctness, security, or repository-rule violations remain.

Summary

This PR hardens Playwright and ingestion integration tests against known CI flakes without changing product runtime behavior.

  • Runs PostgreSQL and OpenSearch image pulls concurrently while preserving failure propagation.
  • Retries transient Docker registry failures during integration-test fixture setup.
  • Improves Playwright synchronization for hierarchy scrolling, RDF projection, permission affordances, React Aria comboboxes, and lineage framing.
  • Safely retries connection-reset API requests only for idempotent GET, HEAD, and PUT methods.
  • Corrects quarantine documentation to distinguish test inventory from actual execution.

Reviews (2) · Last reviewed commit: "Merge branch 'main' into chirag-madlani/..."

harshach and others added 11 commits September 22, 2026 20:53
The test scrolled the left hierarchy to the parent, expanded it, then asserted
the child node was visible without scrolling to the child. The hierarchy is an
infinite-scroll list, so expanding a node says nothing about whether its child
landed inside the rendered window.

That was survivable while the Context Center held few articles. It stopped being
survivable in the same run that first split this suite across 28 shards, each
re-running a beforeAll that creates its own articles: the list got long enough
that the child fell outside the window and the assertion found nothing.

scrollHierarchyToNode already walks an infinite-scroll list to a named node, and
the test already uses it for the parent. Use it for the child too.

(cherry picked from commit 039ce38)
…ting body

This shard has failed twice now (chromium-17 on 2fb7aab, chromium-05
on c054c02) with `TypeError: Cannot read properties of undefined
(reading 'map')` inside the route handler, followed by the ontology graph
never leaving its loader.

Those are one fault, not two. `**/api/v1/glossaryTerms?*` catches every
call to the collection rather than only the listing this test rewrites,
and an error body carries no `data`. Mapping over it throws, so
`route.fulfill` never runs, so the request hangs and the page sits on its
loading state -- the report then blames a TypeError and a stuck loader,
neither of which names the response that actually came back.

Bodies that are not the listing are now passed straight through, as is
anything that will not parse as JSON. Whatever the page does with a real
error response is then the test's own business: it fails on that, or
passes, instead of on the handler falling over.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit b13314d)
chromium-10 and chromium-14 both spent 60s in expectLineageNodeVisible
with "element(s) not found" for the downstream entity. The screenshot
shows why: the node is there as "pw-ml-model-service-… · 1 model", a
collapsed service, with the layer control reading "Container Level".

Zooming is not just framing on this page. LineageMap's `handleMove` reads
the new zoom, asks `getSemanticZoomBand` whether it has crossed into
another band, and on a shallower one calls `getParentSceneRequest` and
navigates to the parent scene -- so `performZoomOut` walked the scene up
to service level and folded the entity under assertion into its service
node. The retries inside expectLineageNodeVisible then made it worse:
they fit or zoom out again, never back in.

`fit-screen` routes through `fitViewWithoutSemanticZoom`, which calls
`suppressSemanticZoom` before moving the camera, so it frames the scene
without changing band. It is present on this page -- 86 of the trace's
snapshots carry the testid -- which also means expectLineageNodeVisible
takes its fitToScreen branch here rather than the performZoomOut one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 31193cb)
The multiple-containers deny case read `.all()` and asserted
`.every(visible => !visible)`. That is vacuously true on an empty list, so the
check passed whenever the containers had not mounted -- and measuring it across
fourteen entity types showed the list resolving to zero elements every single
time. The assertion has never once separated a denied page from an unrendered
one; it has been passing for free since it was written.

Anchor it on the containers, which render regardless of permission
(GlossaryTermsSection emits glossary-container from both of its branches), and
then assert the button is absent. Absence is the right test rather than
invisibility: TagsContainerV2 renders add-tag behind
`permission && isEmpty(tags)`, so under deny it is never in the DOM at all,
which the same measurement confirms.

Both assertions auto-wait, so this also drops the hand-rolled `.all()` read that
made the allow case need an explicit retry.

Verified two ways: the seventeen deny tests pass against the new assertion, and
pointing the button selector at the containers instead makes it fail with
"Expected: 0, Received: 16" -- so it can now actually fail.

(cherry picked from commit 26ccb5f)
Taking main's KnowledgeGraph.spec.ts wholesale in 65d9333 also took back
two guardrail fixes this branch had made there, and the Playwright
guardrail check failed on exactly those two, as errors rather than
warnings:

  310:11  om-playwright/no-implicit-navigation-load
  420:57  om-playwright/no-status-filtered-response

Both are restored. `open()` navigates with an explicit
waitUntil: 'domcontentloaded' again, and the RDF explore wait matches on
the request alone and asserts the status afterwards, so a failing call
names its HTTP error instead of looking like a call that never happened.

The status-independent wait comes back inside the drain poll it belongs
to: the fixture table reaches the RDF store as a bare node before its
relationships follow, so the test reopens until the drain catches up.
Diffed the two bodies first -- that block is the only thing main changed
in this test, and the poll already asserts the edge count main checks at
the end, so nothing of main's is lost.

Guardrails now pass locally: suppressions prune exits 0 with 0 errors and
the baseline unchanged at 1121, yarn test:eslint-rules reports fail 0, and
generate-playwright-rule-table.mjs --check exits 0.

(cherry picked from commit 6f0dde6)
This PR added an "Inventory existing quarantined coverage" step that sets
PLAYWRIGHT_RUN_QUARANTINED=true, which made the doc's "nothing under
.github/ sets PLAYWRIGHT_RUN_QUARANTINED" false. The substance is
unchanged and worth stating precisely, because a reviewer reasonably read
the inventory step as a soak lane: that step runs `playwright test --list`,
so it counts the dropped coverage without executing any of it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit b0d5252)
…ther

import-export-02 on run 34826046448 died with exit 124 before a single
test ran. The whole of this script runs under a 5m `timeout` in
setup-openmetadata-test-environment, and the pulls are nearly all of it:
postgres finished 22s in, opensearch 3m44s later, leaving 54s for compose
up and the health waits. It was killed at 5m03s.

Overlapping them would have brought that run in under the budget, though
only just -- the opensearch pull alone was 224s of the 300s available, so
this narrows the window rather than closing it. The pulls already retry
(three attempts, doubling backoff); what bites here is Docker Hub being
slow rather than failing.

`wait` is checked per job so a failed pull still exits non-zero with its
own message instead of being swallowed by the other one succeeding.
Verified against a stub: both-ok exits 0 in the time of the slower pull,
and either pull failing exits 1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 7624d73)
The multiple-containers allow case read `.all()` on the container locators and
called `.isVisible()` on the result. `.all()` resolves against the DOM as it is
at that instant -- it has none of the auto-waiting `expect(locator)` gives you
-- so when the containers had not mounted yet the list came back empty,
`.some()` was false, and the assertion failed with no retry. That is
chromium-14's "Topic allow common operations permissions": the buttons are in
the failure snapshot, they just were not there yet when the check ran. The test
passes locally on the same build, which is the tell.

Retry the whole read via toPass so the assertion measures the settled page.

Leaves the deny case alone deliberately: `.every(v => !v)` is vacuously true on
the same empty list, so the race makes it pass early rather than fail. That is
a weak assertion rather than a flaky one, and tightening it needs a separate
look at whether the containers render at all under deny.

(cherry picked from commit ba17ce1)
chromium-09 failed waiting 15s for `option "pw-topic-entity-class-..."`
in the Add Quick Link modal. It was not search lag: the trace's response
body shows the query returned that exact entity, one hit.

The trace timeline shows what actually happened. A `listbox` is in the
snapshot taken as the combobox click finishes, and no snapshot after the
`fill` contains one again; the error-context snapshot has the combobox
focused with the text in it and no listbox or option anywhere. `fill`
sets `.value` and dispatches a single synthetic input event, which
react-aria's combobox treats as grounds to close its popover -- the
onChange still fires, so the request goes out, but the results have
nowhere to render.

`pressSequentially` sends real keystrokes, which is what the library
expects and what the rest of this suite already uses for comboboxes
(customProperty.ts, domain.ts). Applied to the tags combobox in the same
modal too: it has not failed yet, but it is the same widget reached the
same way.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 9289a7a)
…y error

Three integration-test shards failed today on the pull, not on anything
under test: two `connection reset by peer` reaching registry-1.docker.io
and one 502 Bad Gateway behind a 500 from the daemon, each followed by
`ImageNotFound: No such image` when the create retried against an image
that never landed.

testcontainers reaches the registry through `ContainerCollection.run`,
which creates, catches `ImageNotFound`, pulls, and creates again — so a
single patch at `ImageCollection.pull` covers every container the suite
starts. The retry only fires for failures whose text names a registry
transport problem; an image that genuinely does not exist still fails on
the first attempt.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit bc30e59)
A shard failed in fixture setup with `apiRequestContext.post: socket hang
up` on `POST /api/v1/services/databaseServices` — no status, no response,
the connection simply went away.

`conf/openmetadata.yaml` closes idle connections after
`SERVER_IDLE_TIMEOUT` (60s) while this context asks for
`Connection: keep-alive`, so a request handed to a connection the server
is closing in the same instant is lost. Nothing tells the client the
close is coming, so there is no way to avoid the race — only to notice it
and send the request again on a fresh connection.

The retry is scoped to errors that prove the server never saw the
request: anything it did see comes back as a status code and is left
alone. Applied at `getAuthContext`, which every API context in the suite
is built from, so entity fixtures and direct calls are covered alike
rather than one helper at a time.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 2fb7aab)
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Sep 22, 2026
@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.

@sonarqubecloud

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
test — 7ea5044f Deployed Sep 23, 2026 by chirag-madlani via RDF Playwright execution #16374
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.

4 participants