Uh oh!
There was an error while loading. Please reload this page.
ci: share a bench setup action and stop evicting the browser cache - #305
Merged
Conversation
The Playwright job usually took ~5 min but spiked to ~15. The variance was entirely the "Install Playwright" step (16s vs 624s): the repo sits at GitHub's 10 GB Actions cache cap, >8 GB of it yarn, so the 249 MB browser cache kept getting evicted and chromium re-downloaded. The yarn caches grew without bound because `restore-keys` restored the previous cache, the build added to it, and the union was saved under a new key. Both test workflows now use setup-node's built-in yarn cache with no restore-keys, sharing one entry with the two dashboard workflows. Also extracts the provisioning both workflows duplicated into a composite action, and overlaps the parts that share no state: apt with the bench install, and `bench build` with `bench new-site`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Uh oh!
There was an error while loading. Please reload this page.
harshtandiya added a commit
that referenced
this pull request
Jul 29, 2026
harshtandiya added a commit
that referenced
this pull request
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Playwright job usually ran ~5 min but spiked to ~15. The variance was one step:
Install Playwright, 16s on a good run vs 624s on a bad one (runs30474649946/30473372443). Tests themselves are stable at ~110s.Cause:
gh cache listshows the repo at GitHub's 10 GB cache cap with >8 GB of it yarn (Linux-yarn-*at 1.17 GB, 1.18 GB, 0.90 GB ×2, 0.77 GB). LRU eviction kills the 249 MB Playwright cache, so chromium re-downloads. The yarn caches grew forever becauserestore-keysrestored the previous cache,bench buildadded to it, and the union got saved under a new key.Fix: both test workflows now use setup-node's built-in yarn cache, no
restore-keys, sharing one entry with typecheck/unit-tests. Playwright cache keys onyarn.lockinstead ofhashFiles('**/package.json')—dashboard/package.jsonchanged 5× in the last 50 commits and was busting it for unrelated reasons.Also extracts the provisioning both workflows duplicated into
.github/actions/setup-bench, and overlaps what shares no state: apt withuv tool install frappe-bench, andbench buildwithbench new-site. Plus mariadb 10.6 → 11.8 with tmpfs and durability off, andbench builddropped from the server job.Non-obvious bits a reviewer can't get from the diff:
bench buildruns rootpackage.json's"build": "cd dashboard && yarn build"via frappe's esbuild--run-build-command. It's a full vite build — that's why overlapping it withnew-siteis the win, not a micro-opt.NODE_ENV: production, though frappe sets it.vite,tailwindcss,@vitejs/plugin-vueand@playwright/testare all devDependencies here; it would break the build and the tests.dashboard/src/main.ts:44callsinitSocket()on boot.--ignore-scripts— the rootpostinstalliscd dashboard && yarn install.bench setup requirements --devinstalls only python dev deps (bench/commands/setup.py, theelsebranch), so running it alongside--nodeis not a race.bench get-app's NAME arg isnargs=-1and documented "Dummy argument for backward compatibility" — a bare URL is enough.Not done: sharding Playwright (110s of tests vs ~100s provisioning per shard),
workers > 1(projects share server state,playwright.config.ts:20), caching all of~/frappe-bench(1–2 GB into the budget that caused this).Deferred: the oversized
Linux-yarn-*cache entries still needgh cache delete. Pointless before this merges — develop's current workflows would recreate them on the next run.Checks: actionlint clean, YAML parses, shellcheck clean on every
runblock, composite inputs cross-checked against both callers. Not run: the workflows themselves — they only execute on GitHub, so CI on this PR is the first real test. Expect the first run to be slow (cold caches); the second is the measurement.