Skip to content

ci(playwright): queue-cache hygiene, AutoPilot MySQL fixture, and helper-test lanes before shard fan-out - #33095

Merged
chirag-madlani merged 7 commits into
mainfrom
ci-gate-venv-cache-off-merge-group
Sep 29, 2026
Merged

chirag-madlani merged 7 commits into
mainfrom
ci-gate-venv-cache-off-merge-group

Conversation

@chirag-madlani

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

Copy link
Copy Markdown
Collaborator

Fixes #33087

Describe your changes

Originally a one-line cache fix. This PR now also carries the related CI-environment work from #33088 (harshach/debug-merge-queue) that never reached main.

1. Queue-cache hygiene (original change)

  • setup-openmetadata-test-environment/action.yml: skip saving the ingestion Python venv on merge_group. Queue refs are gone after validation, and their ~1 GB venv copies evict the main-scoped caches. The restore step still runs.

2. AutoPilot MySQL fixture

  • main already had start_playwright_autopilot_mysql.sh and the stop-script cleanup, but nothing started the container. start_playwright_fast_environment.sh now starts it alongside the ingestion image, seeds it from the new docker/development/playwright-autopilot-mysql.sql, and exports PLAYWRIGHT_AUTOPILOT_MYSQL_*.
  • AutoPilot.spec.ts (test(playwright): port remaining clean specs/utils from #33088; fix TeamsPage stale-team merge #34094) uses those variables when they're set and falls back to the shared MySQL service otherwise.
  • A failed start now calls the stop script with PW_STARTUP_FAILED=true, which already saves and prints the server log tail, so the start script no longer dumps it twice.

3. Helper-test lanes wired into CI

  • New plan-playwright steps: Verify Playwright HTTP helpers (helper-tests.config.ts) and Verify browser helper behavior (browser-helper-tests.config.ts, with compiled core components and real Chromium), plus component-library prep and a failure-only diagnostics upload.
  • Each runs in a network-less, read-only container before the shards fan out, so a broken shared helper fails planning in about a minute instead of showing up later as scattered e2e timeouts.

4. Fixes so those lanes pass. Both configs were on main but nothing ran them, and they had rotted: 10 HTTP-helper tests and 4 browser tests failed on a clean main.

  • fetchCompletedCsvAsyncJobResult polls /csvAsyncJobs/{jobId} and fails fast on FAILED/CANCELLED/unknown status or a mismatched job.
  • setRemoteRunnerAsDefault, getGlossaryApprovalWorkflowSnapshot and deleteArticleByFqn throw on HTTP errors instead of silently continuing. setRemoteRunnerAsDefault is only called when !PLAYWRIGHT_IS_OSS.
  • serverLoad boot cache: a read that started before a write is no longer cached after it (a write-generation counter), so a cached boot config can't go stale. main's lost-token guard and its "Route is already handled" tolerance are kept; a disposed response is only ignored when its page is closed.

5. Impact map points at the moved Auth specs (breaks planning on main today)

  • test(sso): route login/SSO admin specs through the sso-auth project only #34056 moved Pages/Login.spec.ts and Pages/LoginConfiguration.spec.ts to e2e/Auth/, but .github/playwright/impact-map.json still listed the old paths. Login.spec.ts is in the smoke list that targeted PR runs select, so their shard planning fails with Playwright selectors reference specs that do not exist: playwright/e2e/Pages/Login.spec.ts. Both entries now point at e2e/Auth/, and a scan of the impact map finds no other references to missing specs.

Depends on

Verification (local)

  • HTTP-helper lane: 63/63 (10 failing on main before).
  • Browser-helper lane: 44/44 on this branch after merging main (includes gridEditors and serverLoad).
  • yarn lint:playwright: 0 errors; yarn test:eslint-rules passes; tsc -p playwright/tsconfig.json shows no new errors; bash -n on the start script; workflow YAML parses.

🤖 Generated with Claude Code

…queue refs

Follow-up to #33085, which gated the setup-node yarn cache and the
buildkit layer cache off merge_group. It missed the largest ephemeral
writer because my sweep only covered .github/workflows/*.yml with a
direct merge_group trigger — not composite actions, and not reusables
invoked by merge_group callers.

The writer is the Python venv save in
.github/actions/setup-openmetadata-test-environment/action.yml, used by
py-tests-shared.yml (via py-tests.yml and py-tests-postgres.yml on
merge_group). Its `if:` guarded the fork pull_request_target
cache-poisoning case and nothing else — even though the same action,
~50 lines earlier, gates setup-uv's enable-cache off merge_group with a
comment explaining the ephemeral-ref problem. One writer fixed, one
missed, same file.

Cost: ~1 GB per Python version per merge_group run (the py-tests matrix
runs two), saved under a gh-readonly-queue/* ref that dies when the
entry merges or is dequeued, charged against the 10 GB LRU budget until
evicted.

Measured 2026-09-10:
  * 03:44-03:49: four Linux-py3.1x-om-venv entries, 3.98 GB, on two
    dead queue refs. Total cache 11.46 GB against 10 GB.
  * 03:24: populate-playwright-caches.yml (02:54 push run) saved
    playwright-golden-fixture, playwright-distribution and
    playwright-ingestion-image under main. By ~03:50 distribution
    (0.37 GB) and ingestion-image (1.26 GB) were gone — LRU-evicted —
    while the 54 MB fixture survived only because a merge_group run
    had just restored it (last_accessed 03:49, 03:52).
  * Net effect on merge_group runs: fixture cache now hits, but `build`
    still runs mvn cold (~6.5 min) and the ingestion lanes still rebuild
    the image, because the main-scoped copies cannot survive 2 GB/run of
    ephemeral writes.

Change: add `github.event_name != 'merge_group'` to the save's `if:`.
The restore step above is untouched, so queue runs keep hitting main's
venv; only the write is gated. Same rule playwright-e2e-reusable.yml
applies to all of its own saves.

Not changed: the 32 MB spacy-model actions/cache@ in py-tests-shared.yml
(same class, 0.6% of budget — not worth the surface). Not changed:
CodeQL's overlay-base-database entries (8 x ~470 MB = 3.74 GB on main
in 45 min) — that is GitHub default-setup CodeQL, no workflow file to
edit; it is the elephant in the budget but not ours to gate here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 6c3e41dc2e93f0b03a97a07867f052d5be5e3b90 in Playwright run 36535414848, attempt 1.

✅ 4281 passed · ❌ 0 failed · 🟡 6 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 57m 53s

⏱️ Max setup 4m 36s · max shard execution 20m 5s · max shard-job elapsed before upload 23m 52s · reporting 17s

🌐 229.56 requests/attempt · 2.22 app boots/UI scenario · 36.76% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 36.76% (convergence target: at most 15%).
  • Browser traffic was 229.56 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.22 per UI scenario (10238 boots / 4615 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 66 0 0 0 0 0
✅ Shard advanced-search-02 64 0 0 0 0 0
✅ Shard chromium-01 133 0 0 0 0 0
✅ Shard chromium-02 157 0 0 0 0 0
✅ Shard chromium-03 157 0 0 1 0 0
🟡 Shard chromium-04 123 0 1 0 0 0
🟡 Shard chromium-05 179 0 1 0 0 0
✅ Shard chromium-06 189 0 0 0 0 0
✅ Shard chromium-07 139 0 0 0 0 0
✅ Shard chromium-08 136 0 0 0 0 0
✅ Shard chromium-09 158 0 0 0 0 0
✅ Shard chromium-10 138 0 0 0 0 0
✅ Shard chromium-11 162 0 0 0 0 0
✅ Shard chromium-12 183 0 0 0 0 0
✅ Shard chromium-13 172 0 0 0 0 0
✅ Shard chromium-14 164 0 0 0 0 0
✅ Shard chromium-15 159 0 0 0 0 0
✅ Shard chromium-16 160 0 0 0 0 0
✅ Shard chromium-17 142 0 0 0 0 0
✅ Shard chromium-18 160 0 0 0 0 0
🟡 Shard chromium-19 164 0 1 0 0 0
✅ Shard chromium-20 149 0 0 0 0 0
✅ Shard chromium-21 157 0 0 0 0 0
🟡 Shard chromium-22 161 0 1 0 0 0
🟡 Shard chromium-23 140 0 1 0 0 0
✅ Shard chromium-24 148 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 102 0 0 0 0 0
🟡 Shard import-export-02 49 0 1 0 0 0
✅ Shard ingestion-01 38 0 0 0 0 0
✅ Shard ingestion-02 55 0 0 0 0 0
✅ Shard reindex-01 21 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 6 flaky test(s) (passed on retry)
  • Features/ContextCenterArticles.spec.ts › description: switching articles does not bleed unsaved content into next article (shard chromium-04, 1 retry)
  • Pages/ExploreTree.spec.ts › Explore Tree (shard chromium-05, 1 retry)
  • Features/ContextCenterArticlesFilters.spec.ts › sort options route to the correct data path (shard chromium-19, 1 retry)
  • Pages/ServiceEntity.spec.ts › Delete Dashboard Service (shard chromium-22, 1 retry)
  • Features/DataProductPersonaCustomization.spec.ts › Data Product - customization should work (shard chromium-23, 1 retry)
  • Features/SearchExport.spec.ts › Search mode visible export downloads CSV with tab-specific row count (shard import-export-02, 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

@sonarqubecloud

Copy link
Copy Markdown

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

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.

Merge queue: recover transient artifacts and stabilize recurring E2E failures

3 participants