fix(pnpm-install): skip swap setup on ARM64 runners#276
Merged
Conversation
`pierotofy/set-swap-space@v1.0` runs:
SWAP_FILE=$(swapon --show=NAME | tail -n 1)
sudo swapoff $SWAP_FILE
On ARM64 GitHub runners (`ubuntu-22.04-arm64`, `ubuntu-22.04-N-core-arm64`,
etc.) there is no pre-allocated swap, so `swapon --show` returns empty,
`SWAP_FILE` is empty, and `swapoff` exits with `bad usage` (exit 16).
Every job using this composite action then fails before pnpm install
even runs.
x86_64 runners ship with an existing swap file, so the action works there.
Skip the swap step on ARM64; install runs fine with the runner's default
memory (apify-core's monorepo uses ~30 GB RAM ARM64 boxes). x86_64
behaviour is unchanged.
Discovered while migrating apify/apify-core to pnpm. The full CI suite
runs on ARM64 there, so every job in apify-core PRs that uses this action
fails on the swap step.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vladfrangu
approved these changes
May 5, 2026
Member
|
If only Claude didn't drop such a massive comment block to say "arm64 runners don't have swap but they have plenty of ram" xD |
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 free
to 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.
Summary
pnpm-install/action.yamlcallspierotofy/set-swap-space@v1.0unconditionally on Linux. That action runs:On ARM64 GitHub runners (
ubuntu-22.04-arm64,ubuntu-22.04-N-core-arm64, etc.) there's no pre-allocated swap, soswapon --showis empty,SWAP_FILEis empty, andswapoffexits withbad usage(exit code 16). Every job that uses this composite action then fails before pnpm install runs.Repro
Pretty much any workflow on an ARM64 runner that does
uses: apify/workflows/pnpm-install@main. Hit this while migrating apify/apify-core to pnpm — its entire CI suite uses ARM64 boxes, so every job in the migration PR was red on the same swap step.Failure log on ARM64:
Change
Skip the swap step when
runner.arch == 'ARM64'. x86_64 runners ship with an existing swap file so the action keeps working there. ARM64 runners typically have plenty of memory (apify-core CI uses 30 GB ARM64 boxes); not adding 10 GB of swap is fine.