Skip to content

Fixes 28394: Cut Playwright CI shard runtime - #30310

Merged
chirag-madlani merged 60 commits into
mainfrom
harshach/research-playwright-runtime
Jul 24, 2026
Merged

chirag-madlani merged 60 commits into
mainfrom
harshach/research-playwright-runtime

Conversation

@harshach

@harshach harshach commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #28394

I replaced static full-suite sharding with PR impact selection and p75 duration-balanced plans, and added a single golden PostgreSQL/OpenSearch fixture cloned into /dev/shm so standard shards skip rebuilds, migrations, Airflow, sample ingestion, and reindexing. The workflow also uses worker-scoped API setup, CI-only coarse bundling, isolated ingestion/global lanes, bounded failure artifacts, and request/timing/coverage SLO gates. CI-only fast-stack controls preserve production backend, database, search, and normal Vite bundle defaults; the production-facing UI request-reduction and CSV export changes are documented separately below.

Type of change:

  • Improvement

High-level design:

  • One preparation job builds and seeds PostgreSQL, OpenSearch, OpenMetadata, authentication, and shared entity state; every shard restores an immutable RAM-backed clone.
  • Pull requests run smoke, changed specs, impact-mapped suites, and project canaries; merge queue, nightly, and manual full runs use historical p75 timings and LPT balancing.
  • The full plan currently covers 4,377 unique test IDs across 24 common three-worker shards plus isolated ingestion, search, reindex, global-state, domain, and permission lanes.
  • Stable-ID timing, retry cost, request/byte counts, app boots, hot endpoints, exact coverage, failure-only traces, and merged reports enforce the rollout SLOs.
  • CI-only controls leave production database, search, logging, protocol, bundle, and existing non-planned reporter behavior unchanged.

Production-facing UI changes and review focus:

The database/search fast stack, HTTP/2 rejected experiment, access logging, ETag opt-out, app-boot beacon, and coarse Vite bundle are CI-only. Normal production database/search/server settings and normal Vite CSS splitting, Brotli compression, and chunking defaults are unchanged.

This PR also changes shipped UI behavior:

  • Static-asset loading: Authenticated idle prefetch of Explore and EntityRouter was removed, service-configuration utility modules now load on demand, and Data Asset logos use the centralized icon registry. This reduces background/static requests and the initial import graph. The tradeoff is a possible extra chunk wait on the first cold visit to Explore, an entity page, or service settings. All 97 previous icon mappings are retained; IBMDB2 and Sklearn use explicit aliases.
  • CSV async export recovery: Persisted jobs are correlated by jobId; completion events received before the create request resolves are buffered; unrelated or stale WebSocket events are ignored; status polling recovers completion events missed by the socket; and completed jobs without inline CSV fetch their result separately. Once started, polling and result requests are aborted on success, replacement, and provider unmount.
  • Current blocker — legacy job compatibility: Lineage exports still return UUID, WebSocket-only job IDs, while GET /csvAsyncJobs/{jobId} accepts persisted numeric job IDs. Unconditional polling therefore fails for lineage and can mark an export taking more than about 25 seconds as failed before its valid WebSocket completion arrives. Polling must be gated by an explicit pollable-job contract (or, minimally, numeric IDs) and covered by a UUID lineage regression test.
  • Current blocker — transport failure is not job failure: Six consecutive status-request failures currently synthesize FAILED after about 25 seconds for immediate errors or 55 seconds for five-second timeouts. The backend job may still be running, and its later completion is then ignored. This needs a recoverable “status unavailable” state that retains the active job and WebSocket correlation.
  • Load and lifecycle tradeoff: The fallback starts immediately and settles at one status GET every 10 seconds indefinitely, even while the WebSocket is healthy. Closing the modal leaves polling active, and an onExport request that resolves after provider unmount can start a new poll after cleanup has already run. Review should consider a WebSocket-silence watchdog, jittered fallback polling, a mounted/generation guard, and explicit close/background handoff semantics.

HTTP/2 A/B decision and shard capacity:

  • The matched full-suite control H1 run 30070163148 and H2 run 30071701671 used the same SHA and the same 4,377 unique planned test IDs.
  • H1 completed 32/32 lanes successfully. H2 completed only 6/32 lanes successfully; 26 lanes failed and only 1,008 tests executed before the 21-minute caps.
  • The strict transport comparison rejected H2: matched navigation p75 regressed from 1,410.52 ms to 1,475.73 ms (+4.62%), boot p75 regressed by 0.32%, and static request count remained 46 per cold boot.
  • H2 also returned 400 Ambiguous URI path encoding for valid quoted FQNs containing %. Dropwizard applies the configured URI compliance to its H1 connection factory but not the HTTP2ServerConnectionFactory. This is a deterministic product-compatibility regression, not test flakiness.
  • Decision: all H2 experiment and follow-on stabilization commits were reverted. Current commit c5b0708138 is byte-for-byte identical to golden tree 968508bb38; no H2 production or CI enablement is retained.
  • The 32 full-run jobs are 24 common shards with three workers, one three-worker Data Asset Rules lane, and seven one-worker isolation lanes. Only the 24 common shards are used to buy speed; the isolated lanes protect shared search, reindex, ingestion, domain, permission, and global-state behavior.
  • Current weighted common work is about 1,185.8 worker-minutes. The agreed capacity formula is ceil(1,185.8 / (3 workers × 20 minutes × 0.85 efficiency)) = 24 common shards. Reducing to 20 before lowering per-test work projects more than 23 minutes of browser execution before setup, skew, retries, and reporting, so the sub-30-minute signal would no longer be reliable.
  • This is intentionally a resource-heavy peak (32 runners and up to 82 browser workers), but the successful control completed in 28m36s. Future full runs should reduce the common shard count automatically only after timing history shows lower total weighted work.

Tests:

Use cases covered

  • PR smoke, changed-spec, impact-map, canary, delegated, unmapped, and deleted-spec routing.
  • Exact no-missing/no-duplicate test assignment, dependency expansion, p75 history fallback, LPT balancing, and automatic shard growth when atomic groups exceed a plan.
  • Golden fixture manifest validation, RAM-backed Compose overrides, request/app-boot aggregation, and full-run SLO evaluation.
  • Custom Property widget coverage on a representative Table with String smoke coverage on remaining entity types.

Unit tests

  • Added 16 planner, selector, coverage, classifier, and request-metric tests in .github/scripts/tests/test_playwright_ci_planning.py.
  • Ruff check and format validation passed for all changed Python CI tooling.

Backend integration tests

  • Not applicable; no backend API or schema changes.

Ingestion integration tests

  • Not applicable; no ingestion product changes.

Playwright (UI) tests

  • Updated Playwright setup and matrix coverage; the production-facing behavior and review blockers are documented above.
  • Full discovery produced 4,377 unique IDs; representative Chromium/Basic, ingestion, and chained DataAsset shard replays matched 164/164, 16/16, and 90/90 planned IDs.

Manual testing performed

  1. Ran actionlint, ShellCheck, Bash syntax validation, Docker Compose rendering, JSON validation, ESLint, Prettier, and git diff --check.
  2. Built the CI-only coarse Vite bundle successfully and verified a single app-*.js entry; the local cold-shell benchmark reduced static requests from 144 to 22.
  3. Generated the full plan at 18.82–18.84 predicted minutes per common shard with 0.12% skew, and rehearsed the current targeted selection below the 20-minute execution budget.
  4. yarn tsc:playwright still reports 183 existing repository-wide diagnostics and zero diagnostics in files changed by this PR.
  5. The exact-head full workflow run 30049103556 planned and executed 4,377/4,377 unique test IDs with zero missing or duplicates: 4,270 passed, 12 retry-passed, 95 skipped, and zero failed. Workflow wall time was 28m23s; the slowest shard execution was 18m42s and the slowest shard job was 23m03s. It recorded 806,484 browser requests, or 187.55 per test attempt.

UI screen recording / screenshots:

No visual design changes. The shipped UI performance and CSV async-behavior changes are documented above; automated coverage is listed below.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • 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.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • I have added tests around the new logic.

Greptile Summary

This PR restructures Playwright CI to reduce shard runtime. The main changes are:

  • Impact-based test selection for pull requests.
  • Duration-balanced shard planning for full runs.
  • Reusable PostgreSQL and OpenSearch fixtures restored in memory.
  • Isolated lanes for ingestion and global-state tests.
  • CI performance, coverage, timing, and artifact controls.

Confidence Score: 5/5

This looks safe to merge.

  • Global-state projects are isolated in single-worker fixture-backed jobs.
  • Legacy runs retain explicit project ordering.
  • Fixture creation uses valid cached image digests without an unnecessary registry pull.
  • No blocking issues remain in the reviewed fixes.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright.config.ts Adds planned-shard configuration while retaining ordered dependencies for legacy runs.
.github/scripts/build_playwright_shards.py Builds duration-balanced plans and assigns global-state projects to single-worker lanes.
.github/scripts/create_playwright_fixture.sh Creates the reusable fixture and resolves valid local image digests before pulling.
.github/workflows/playwright-postgresql-e2e.yml Coordinates fixture preparation, independent shard restoration, execution, and result gates.

Reviews (21): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | 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)

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Jul 22, 2026
@harshach
harshach marked this pull request as ready for review July 22, 2026 03:36
@harshach
harshach requested review from a team, akash-jain-10 and tutte as code owners July 22, 2026 03:36
Copilot AI review requested due to automatic review settings July 22, 2026 03: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.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

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.

Copilot AI review requested due to automatic review settings July 22, 2026 03:51

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 22, 2026 •

Copy link
Copy Markdown
Contributor

🔴 Playwright Results — 16 test failure(s)

✅ 4261 passed · ❌ 16 failed · 🟡 11 flaky · ⏭️ 95 skipped

Shard Passed Failed Flaky Skipped
🔴 Shard 1 421 16 4 16
✅ Shard 2 11 0 0 0
🟡 Shard 3 775 0 1 7
🟡 Shard 4 770 0 2 13
🟡 Shard 5 744 0 3 57
✅ Shard 6 785 0 0 0
🟡 Shard 7 755 0 1 2

Genuine Failures (failed on all attempts)

❌ Pages/Login.spec.ts › Refresh should work (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoHaveText�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator: getByTestId('user-display-name')
Expected: �[32m"Quiet2b470bfdLeoparde6798eab"�[39m
Timeout: 15000ms
Error: element(s) not found

Call log:
�[2m  - Expect "toHaveText" with timeout 15000ms�[22m
�[2m  - waiting for getByTestId('user-display-name')�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-api-endpoint-3fb1aeb8' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-api-endpoint-3fb1aeb8' })�[22m
�[2m    19 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw table 97d863ff-d583-4a95-b6e1-c6d63704b7c5' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw table 97d863ff-d583-4a95-b6e1-c6d63704b7c5' })�[22m
�[2m    19 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-stored-procedure-398a6e0c' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-stored-procedure-398a6e0c' })�[22m
�[2m    18 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-dashboard-815cd878' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-dashboard-815cd878' })�[22m
�[2m    19 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-pipeline-a7bd6240' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-pipeline-a7bd6240' })�[22m
�[2m    19 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-topic-entity-class-9d4b5ad1' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-topic-entity-class-9d4b5ad1' })�[22m
�[2m    18 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-mlmodel-98b4662b' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-mlmodel-98b4662b' })�[22m
�[2m    19 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-container-0c071b37' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-container-0c071b37' })�[22m
�[2m    19 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-search-index-4b259fd3' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-search-index-4b259fd3' })�[22m
�[2m    19 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-dashboard-data-model-12a0b6bc' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-dashboard-data-model-12a0b6bc' })�[22m
�[2m    19 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › User without permission (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoBeAttached�[2m(�[22m�[2m)�[22m failed

Locator:  locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'playwright-metric-f96e9cd0' })
Expected: not attached
Received: attached
Timeout:  15000ms

Call log:
�[2m  - Expect "not toBeAttached" with timeout 15000ms�[22m
�[2m  - waiting for locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'playwright-metric-f96e9cd0' })�[22m
�[2m    18 × locator resolved to <span data-testid="entity-header-display-name" class="ant-typography text-lg font-medium text-link-color break-word whitespace-normal">…</span>�[22m
�[2m       - unexpected value "attached"�[22m

❌ Flow/SearchRBAC.spec.ts › a table-scoped user sees tables but never dashboards (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoHaveCount�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator:  getByTestId('search-container').locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-dashboard-9293ce0d' })
Expected: �[32m0�[39m
Received: �[31m1�[39m
Timeout:  45000ms

Call log:
�[2m  - Expect "toHaveCount" with timeout 45000ms�[22m
�[2m  - waiting for getByTestId('search-container').locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw-dashboard-9293ce0d' })�[22m
�[2m    49 × locator resolved to 1 element�[22m
�[2m       - unexpected value "1"�[22m

❌ Flow/SearchRBAC.spec.ts › a dashboard-scoped user sees dashboards but never tables (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoHaveCount�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator:  getByTestId('search-container').locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw table 80f6b0cb-c87b-4f4e-9c06-a1ba46464310' })
Expected: �[32m0�[39m
Received: �[31m1�[39m
Timeout:  45000ms

Call log:
�[2m  - Expect "toHaveCount" with timeout 45000ms�[22m
�[2m  - waiting for getByTestId('search-container').locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw table 80f6b0cb-c87b-4f4e-9c06-a1ba46464310' })�[22m
�[2m    49 × locator resolved to 1 element�[22m
�[2m       - unexpected value "1"�[22m

❌ Flow/SearchRBAC.spec.ts › a fully denied user sees neither asset type when browsing (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoHaveCount�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator:  getByTestId('search-container').locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw table bb956002-9769-418d-95ed-03fd0a4cad9d' })
Expected: �[32m0�[39m
Received: �[31m1�[39m
Timeout:  45000ms

Call log:
�[2m  - Expect "toHaveCount" with timeout 45000ms�[22m
�[2m  - waiting for getByTestId('search-container').locator('[data-testid="entity-header-display-name"]').filter({ hasText: 'pw table bb956002-9769-418d-95ed-03fd0a4cad9d' })�[22m
�[2m    49 × locator resolved to 1 element�[22m
�[2m       - unexpected value "1"�[22m

❌ Flow/SearchRBAC.spec.ts › the browse tree only shows the asset-type categories a user can access (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoHaveCount�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator:  getByTestId('explore-tree-title-Dashboards')
Expected: �[32m0�[39m
Received: �[31m1�[39m
Timeout:  2000ms

Call log:
�[2m  - Expect "toHaveCount" with timeout 2000ms�[22m
�[2m  - waiting for getByTestId('explore-tree-title-Dashboards')�[22m
�[2m    6 × locator resolved to 1 element�[22m
�[2m      - unexpected value "1"�[22m


Call Log:
- Timeout 20000ms exceeded while waiting on the predicate
🟡 11 flaky test(s) (passed on retry)
  • Features/Glossary/GlossaryPagination.spec.ts › should check for nested glossary term search (shard 1, 1 retry)
  • Features/NavigationBlocker.spec.ts › should not show navigation blocker after saving changes (shard 1, 1 retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Flow/SearchRBAC.spec.ts › User with permission (shard 1, 1 retry)
  • Features/ContextCenterArticles.spec.ts › description: switching articles does not bleed unsaved content into next article (shard 3, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should move term with children to different glossary (shard 4, 1 retry)
  • Features/SearchExport.spec.ts › Export queues a background job and downloads from the jobs tray (shard 4, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should show "Active recently" for users active within last hour (shard 5, 1 retry)
  • Flow/CustomizeWidgets.spec.ts › Total Data Assets Widget (shard 5, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 5, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify Impact Analysis service filter selection (shard 7, 1 retry)

📦 Download artifacts

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

Copilot AI review requested due to automatic review settings July 22, 2026 03:53

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.

Copilot AI review requested due to automatic review settings July 22, 2026 03:55

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.

@harshach harshach added the skip-pr-checks Bypass PR metadata validation check label Jul 22, 2026
…ywright-runtime

# Conflicts:
#	.github/workflows/playwright-postgresql-e2e.yml
Copilot AI review requested due to automatic review settings July 22, 2026 04:03

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 wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

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 wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

pmbrull
pmbrull previously approved these changes Jul 24, 2026
chirag-madlani
chirag-madlani previously approved these changes Jul 24, 2026

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 wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@gitar-bot

gitar-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 5 resolved / 6 findings

Restructures Playwright CI test execution with impact-based selection, duration-balanced sharding, and memory-backed fixtures to significantly reduce shard runtimes. Address the uncleaned table2 leakage in EntityDataClass to prevent cross-test state pollution.

💡 Edge Case: table2 leaked into shared EntityDataClass schema, no cleanup

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TableSorting.spec.ts:143-157

The refactor drops the try/finally that previously deleted the throwaway table1 and now creates table2 inside the shared EntityDataClass.table1 schema without ever deleting it. Because table1's schema is a global, run-scoped fixture reused by other specs, the orphaned table2 persists for the rest of the run and can perturb any later test that lists/counts/sorts tables in that schema. Restore cleanup by deleting table2 in a finally block (or via afterAction) after the sorting assertion.

✅ 5 resolved
✅ Quality: Cached rejected admin-context promise is never reset on failure

📄 openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts:140-144 📄 openmetadata-ui/src/main/resources/ui/playwright/fixtures/testNamespace.ts:59-65
getWorkerAdminAPIContext() memoizes the promise with workerAdminAPIContext ??= .... If the initial getSavedAdminToken()/getAuthContext() rejects (e.g. transient read/network error), the rejected promise is cached for the lifetime of the worker. createNewPage() catches it and builds a per-call context, but every subsequent call re-awaits the same rejected promise and re-creates its own context, silently losing the shared-context optimization the PR is built around. Worse, the testNamespace worker fixture awaits it directly with no fallback, so one transient failure fails all tests in that worker. Reset the cache to undefined on rejection so it can be retried.

✅ Bug: Timing baseline merges per-project durations under one spec id

📄 .github/scripts/import_playwright_json_timings.py:34-48
import_playwright_json_timings.py keys timing by spec['id'] and sums durationMs across all of a spec's per-project tests entries into a single record, while taking project only from the first test. A spec that runs under several projects (e.g. chromium + Basic) therefore reports an inflated combined duration. The planner's per-id lookup won't match (PerformanceReporter emits per-project test ids), so it falls back to the (file, title) identity weight — which is the same inflated value — potentially skewing p75-based shard balancing. Emit one record per (project, spec) so baseline weights match how tests actually execute.

✅ Edge Case: Golden-fixture admin token can expire before late shards run

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/auth.setup.ts:127-139 📄 openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts:132-144
auth.setup.ts captures a single admin bearer token (the comment notes its expiry is set to 4 hours) into admin-api-token.json, which is baked into the immutable /dev/shm fixture and reused by every shard via getWorkerAdminAPIContext(). For a full nightly/merge run (24 common shards plus isolated lanes) the wall-clock time from fixture creation to the last shard starting can approach or exceed the token lifetime under runner contention, causing 401s across an entire late shard rather than a single flaky test. Consider minting a longer-lived bot/service token for the fixture, or re-issuing the token per shard from the restored auth state instead of reusing the captured one.

✅ Edge Case: Flaky poll endpoint prematurely fails a healthy export

📄 openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityExportModalProvider/EntityExportModalProvider.component.tsx:452-466
In startCSVExportPolling, after CSV_EXPORT_MAX_CONSECUTIVE_POLL_FAILURES (6) consecutive failures of the getCsvAsyncJob REST endpoint, the loop breaks and calls applyCSVExportJobUpdate({status: 'FAILED'}), which clears csvExportJobRef and fires onError. Polling is intended as a redundant fallback to the websocket, but if only the status REST endpoint is transiently unavailable (e.g. 5xx) while the export is still progressing and the websocket is delivering IN_PROGRESS updates, the guard (csvExportPollingRef.current === pollingState && csvExportJobRef.current?.jobId === jobId) still passes and the still-running job is reported as failed to the user. Consider having exhausted polling failures stop polling silently (leaving the websocket authoritative) rather than forcing a terminal FAILED state.

✅ Bug: Aborted poll request can produce an unhandled rejection

📄 openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityExportModalProvider/EntityExportModalProvider.component.tsx:385-399
In getPolledJob, Promise.race([getCsvAsyncJob(jobId, signal), requestTimeout]) is used. When requestTimeout fires it calls requestAbortController.abort() and rejects, so the race settles via the timeout. The underlying getCsvAsyncJob promise then rejects separately (with the abort/cancel error) with no attached handler, which surfaces as an unhandled promise rejection. Attach a no-op .catch() to the getCsvAsyncJob call (or await it in a try/catch that swallows post-abort errors) so the losing promise's rejection is handled.

🤖 Prompt for agents
Code Review: Restructures Playwright CI test execution with impact-based selection, duration-balanced sharding, and memory-backed fixtures to significantly reduce shard runtimes. Address the uncleaned table2 leakage in EntityDataClass to prevent cross-test state pollution.

1. 💡 Edge Case: table2 leaked into shared EntityDataClass schema, no cleanup
   Files: openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TableSorting.spec.ts:143-157

   The refactor drops the try/finally that previously deleted the throwaway table1 and now creates table2 inside the shared EntityDataClass.table1 schema without ever deleting it. Because table1's schema is a global, run-scoped fixture reused by other specs, the orphaned table2 persists for the rest of the run and can perturb any later test that lists/counts/sorts tables in that schema. Restore cleanup by deleting table2 in a finally block (or via afterAction) after the sorting assertion.

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 was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests Dashboard & Auto-balancing Playwright Shards

6 participants