ci: free disk space on Linux E2E runners before building Electron apps#305
Conversation
Release Preview — no release
Updated automatically by ReleaseKit |
Greptile SummaryAdds a Linux-only disk cleanup step to the E2E reusable workflow to prevent the intermittent "No space left on device" runner crashes seen on #298 and #301. The step is placed immediately after checkout — before pnpm install and artifact download — so every subsequent step benefits from the freed space.
Confidence Score: 5/5This is a safe, additive-only change to a CI workflow that cannot regress existing build or test logic. The change adds a single, well-guarded shell step that removes well-known unused toolchain directories on GitHub-hosted Linux runners. The No files require special attention.
|
| Filename | Overview |
|---|---|
| .github/workflows/_ci-e2e.reusable.yml | Adds a Linux-only "Free Disk Space" step immediately after checkout that removes unused toolchains (.NET, Android, GHC, CodeQL, Swift) and prunes Docker images; all removals guarded with ` |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[👷 Checkout Repository] --> B{runner.os == 'Linux'?}
B -- Yes --> C[🧹 Free Disk Space\nsudo rm -rf dotnet/android/ghc/CodeQL/swift\ndocker image prune]
B -- No --> D[🛠️ Setup Development Environment]
C --> D
D --> E[📦 Download Build Artifacts]
E --> F[📊 Show Build Information]
F --> G[🔒 Validate Build Command]
G --> H[🪄 Generate Build Filter]
H --> I[🏗️ Build Test Applications]
I --> J[🔗 Setup Protocol Handlers]
J --> K[🪄 Generate Test Execution Plan]
K --> L[🧪 Execute E2E Tests]
L --> M{Success?}
M -- Failure --> N[🐛 Show Logs on Failure]
M -- Always --> O[📦 Upload Test Logs]
N --> O
O --> P[🐛 Debug Build on Failure]
Reviews (3): Last reviewed commit: "ci: run the Linux free-disk step right a..." | Re-trigger Greptile
Electron Linux E2E runs intermittently crashed with "No space left on device" (#298/#301). The runner worker died mid-test before the job log blob could upload, so the failures surfaced as opaque timeouts. Add an early Linux-only "Free Disk Space" step (after the build filter is generated, before "Build Test Applications") that removes large unused preinstalled toolchains (.NET, Android, GHC/ghcup, CodeQL, Swift) and prunes Docker images. It is dependency-free plain shell — no third-party action — and every removal is guarded with `|| true` so it can never fail the job. df -h is printed before and after for observability. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses Greptile review: the cleanup previously ran after Setup Development Environment (pnpm install) and Download Build Artifacts, which can consume gigabytes before space is reclaimed. Moving it to immediately after checkout gives every subsequent step the freed headroom. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
b7256d6 to
8bb0c88
Compare
…307) Bounds session teardown with a timeout and swallows benign teardown errors (libuv UV_HANDLE_CLOSING / 0xC0000409 crashes, CDP teardown hangs) via shared @wdio/native-utils helpers, applied to the electron and dioxus worker services. Validated post-rebase onto #305/#306: Package-Electron 9/9 green. The two Windows E2E reds in the merge run are confirmed intermittent flakes (Dioxus Windows standalone was green 4x on this branch + green on main; Electron Windows forge alternates), not regressions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Electron E2E build/install footprint can fill the Linux runner disk by job
end. Tests and log upload still succeed, but the job's post-actions then fail
writing to a full disk ("the disk was full" on event.json), marking an
otherwise-passing job red. Add a final always()-guarded Linux step that
reclaims that footprint (electron caches, pnpm store, node_modules, build
output dirs) after the failure-debug steps, with df probes for visibility.
Follow-up to #305.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub runners vary in starting free space, so the Electron E2E job can hit ENOSPC either during the test (crashing the runner Worker) or at teardown (failing the post-actions on an otherwise-green job). Two layers on top of the existing free-disk step: - Free more preinstalled, unused toolchains upfront (jvm, powershell, boost, graalvm, Ruby/go/PyPy tool-caches, apt cache) for headroom during the run. - A final always() step that reclaims the build/install footprint (electron caches, pnpm store, node_modules, build output dirs) before teardown. df probes bracket both for visibility. Follow-up to #305. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two layers on top of #305's free-disk step: free more unused preinstalled toolchains upfront (jvm, powershell, boost, graalvm, Ruby/go/PyPy tool-caches, apt cache; Node+Python kept), and a final always() step that reclaims the build/install footprint before teardown. Validated: both Linux E2E script jobs green (the prior during-test ENOSPC is gone); the lone red is an unrelated Windows pnpm-setup flake on a Linux-only change.
The flake
E2E - Electron [Linux] - scripthas intermittently failed because the GitHub-hosted Linux runner runs out of disk space mid-test. The runner's own worker crashes withSystem.IO.IOException: No space left on device, so the test step never finishes and the job log blob is never uploaded — the failure surfaces as an opaque dead job rather than a test error.Observed on #298 and #301.
The fix
Add an early Linux-only "Free Disk Space" step to the E2E reusable workflow, placed after the build filter is generated and before "Build Test Applications", so the build/test phase has headroom.
jlumbroso/free-disk-space) — zero new supply-chain surface, nothing for dependabot to track.if: runner.os == 'Linux'.df -h /before and after, thensudo rm -rflarge preinstalled toolchains unused by these Electron/web tests (.NET, Android SDK, GHC/ghcup, CodeQL, Swift) and prunes Docker images.|| true, so a missing path or prune failure can never fail the job.Scope
Only
.github/workflows/_ci-e2e.reusable.ymlis touched — the observed crashes were E2E-only. The same step could be lifted into the package/build workflows later if disk pressure shows up there.Validation
Locally validated as parseable YAML and passes
actionlint. CI will exercise the step on the next Linux E2E run.🤖 Generated with Claude Code