Skip to content

Fixes #34242: stop PR-scoped Actions cache writers and warm the ingestion venv under main - #34237

Merged
chirag-madlani merged 3 commits into
mainfrom
ci-cache-stop-pr-scoped-fixture-writers
Sep 30, 2026
Merged

chirag-madlani merged 3 commits into
mainfrom
ci-cache-stop-pr-scoped-fixture-writers

Conversation

@chirag-madlani

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

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #34242

Follow-up to #33095, the PR for issue #33087, which shut the merge-queue-ref cache writers; the budget problem moved to PR refs.

Measured 2026-09-29 15:44Z (gh api actions/caches):

Scope Size Entries
refs/heads/main 2.2 GB 4
refs/pull/* 11.6 GB 33
gh-readonly-queue 0.5 GB 20

Main held yarn, maven, browsers and apt only. Not one Playwright fixture. The warmer had succeeded at 12:52 and 13:16; everything it saved was evicted by 15:44. A cache saved under a PR ref is restorable only by that PR's own re-runs, so these copies serve almost nobody while costing the shared 10 GB budget the same as main's copy.

1. Summary job yarn cache → restore-only (playwright-postgresql-e2e.yml)
setup-node's built-in cache: yarn saves a node-cache-* key as a post-step and has no restore-only mode. Nothing on main writes that key family, so every PR missed and saved its own 1.4 GB copy: three PRs, 4.3 GB, 43% of the budget, to save ~1 min on a job off the critical path. Replaced with actions/cache/restore against the yarn-pkg-cache-* key the warmer already maintains under main. This is the follow-up the #33085 comment named.

2. Fixture saves gated off pull_request (playwright-e2e-reusable.yml)
Distribution, golden fixture and ingestion image. Two PRs had each saved an identical 1.27 GB ingestion image for the fingerprint main was warming at the time. Only populate-playwright-caches.yml writes these now. Cost: a full re-run of a PR that touches fixture inputs rebuilds instead of hitting its own copy.

3. Venv save gated off pull_request (setup-openmetadata-test-environment/action.yml)
Four identical 302 MB venv copies under four PR refs, none under main. Restore stays unconditional.

4. New warm-venv job (populate-playwright-caches.yml)
No push-triggered workflow ran the composite without fast-mode, so main never held a venv: every cross-run venv restore has always missed, and merge_group has always built it cold. The job calls the composite exactly as py-tests-shared.yml does, one runner per matrix Python version, on push and the 6h schedule. Without this, change 3 would make the venv cache fully dead.

Not changed, deliberately: maven combined caches only write when a batch changes a pom (zero PR-ref copies today); ui-dist is 56 MB and would need a restore/save split; spacy is 31 MB; CodeQL's 1.3 GB is repo settings.

Type of change:

  • Improvement

High-level design:

N/A — four files, one rule: PR and queue refs restore, only push/schedule writes.

Tests:

Use cases covered

  • PR run of the Playwright summary job restores yarn from main's yarn-pkg-cache-* entry and saves nothing.
  • Same-repo PR run builds fixtures on a miss and saves nothing; merge_group and fork PRT behave as before.
  • Push to main runs warm-venv ×3 and produces Linux-py3.1x.y-om-venv-* entries under refs/heads/main.

Unit / integration / Playwright tests

Not applicable (CI configuration only).

Manual testing performed

  1. actionlint on the three workflows: 11 findings, all identical on origin/main (none introduced).
  2. Composite parsed with PyYAML.
  3. Post-merge verification plan: after the first push-triggered warmer completes, gh api actions/caches should show three om-venv entries under refs/heads/main, no new node-cache-* entries under refs/pull/*, and the PR-ref share dropping as open PRs re-run.

Note on rollout: the venv key hashes the composite file, so this PR rolls the key. PR workflows that check out the head SHA keep the old composite until rebased, which is self-resolving.

UI screen recording / screenshots:

Not applicable.

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. (N/A)
  • For UI changes: I attached a screen recording and/or screenshots above. (N/A)
  • I have added tests (unit / integration / Playwright as applicable) and listed them above. (N/A, CI config)

🤖 Generated with Claude Code

Measured 2026-09-29 15:44Z: the 10 GB Actions cache budget held 13.3 GB,
of which 11.6 GB (87%) sat under refs/pull/* and only 2.2 GB under main.
Main had no Playwright fixture entries at all; the warmer's copies from
13:16 had been LRU-evicted by the PR-ref flood within ~2.5 h. A PR-ref
copy is visible only to that PR's own re-runs, so every one of those
entries cost the shared budget while serving almost nobody.

Four changes, one PR:

- playwright-postgresql-e2e.yml: the summary job used setup-node's
  built-in `cache: yarn`, whose node-cache-* key nothing on main ever
  writes. Every PR missed and saved its own 1.4 GB copy (3 x 1.4 GB, 43%
  of the budget, from three PRs in one afternoon). Replace with
  actions/cache/restore against the warmer's main-scoped yarn-pkg-cache-*
  key. Restore-only; the follow-up my own #33085 comment named.
- playwright-e2e-reusable.yml: gate the distribution, golden-fixture and
  ingestion-image saves off pull_request as well as merge_group. Only
  populate-playwright-caches.yml writes them now.
- setup-openmetadata-test-environment/action.yml: same gate on the venv
  save. Restore stays unconditional.
- populate-playwright-caches.yml: new warm-venv job (py 3.10/3.11/3.12)
  calling the composite exactly as py-tests-shared does. Until now no
  push-triggered workflow ran the composite without fast-mode, so main
  never held a venv and merge_group always built it cold.

actionlint: no new findings (the 11 reported pre-exist on main).
@github-actions

github-actions Bot commented Sep 29, 2026 •

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.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 94da6606a7a02b2c6749d7c34d222dc8fd685358 in Playwright run 36669454195, attempt 1.

✅ 551 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 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) 43m 12s

⏱️ Max setup 5m 12s · max shard execution 15m 19s · max shard-job elapsed before upload 18m 41s · reporting 5s

🌐 241.92 requests/attempt · 2.23 app boots/UI scenario · 2.72% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 241.92 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.23 per UI scenario (1270 boots / 570 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 131 0 0 0 0 0
✅ Shard chromium-02 131 0 0 0 0 0
✅ Shard chromium-03 131 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 ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

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

@chirag-madlani chirag-madlani changed the title Fixes #33087: stop PR-scoped Actions cache writers and warm the ingestion venv under main Fixes #: stop PR-scoped Actions cache writers and warm the ingestion venv under main Sep 29, 2026
@chirag-madlani chirag-madlani changed the title Fixes #: stop PR-scoped Actions cache writers and warm the ingestion venv under main Fixes #34242: stop PR-scoped Actions cache writers and warm the ingestion venv under main Sep 29, 2026
@gitar-bot

gitar-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · CI cache writers shift to main, adding Python-version warmers and changing PR restores.

CI workflow now stops PR-scoped Actions cache writers and warms the ingestion venv under main. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

@chirag-madlani
chirag-madlani added this pull request to the merge queue Sep 30, 2026
Merged via the queue into main with commit f51a455 Sep 30, 2026
124 of 125 checks passed
@chirag-madlani
chirag-madlani deleted the ci-cache-stop-pr-scoped-fixture-writers branch September 30, 2026 06:32
Chronillogical-Potato pushed a commit to Chronillogical-Potato/OpenMetadata that referenced this pull request Sep 30, 2026
…data#34283)

* ci(playwright): post merge-queue flaky tests to #pw-health

The queue only posted failures (to #ci-cleanup); a retry pass stayed a shard
warning nobody watches. On every queue run, read the shards' existing
"Retry pass in merge queue" annotations for the current attempt and post any
to #pw-health with the queued PRs, alongside the daily main-run flakes. No
artifacts: the queue keeps its no-reports design. Needs checks: read.

Also skip the summary job's yarn cache restore on merge_group (open-metadata#34237 added
it without the queue guard; queue runs have no checkout or install to use it),
which test_merge_groups_upload_no_reports catches on main.

Fixes open-metadata#33087

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

* fix(ci): one retry-pass annotation per shard; count and overflow in the queue alert

GitHub keeps only 10 warning annotations per step, so a shard with more than 10
retry passes would silently drop some before the #pw-health alert read them.
Each shard now emits one "Retry pass in merge queue" annotation holding the
whole list (workflow-command escaped), and the job summary still lists them.
The alert reads each line as a test, states the total, and says "…and N more"
past 15.

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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

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.

CI: PR-scoped Actions cache writers evict main-scoped Playwright fixtures; venv never warmed under main

3 participants