Skip to content

fix: ignore missing swapfile in release workflow Create swap step#234

Merged
j4rviscmd merged 1 commit into
mainfrom
fix/swap-fix
Jul 9, 2026
Merged

fix: ignore missing swapfile in release workflow Create swap step#234
j4rviscmd merged 1 commit into
mainfrom
fix/swap-fix

Conversation

@j4rviscmd

Copy link
Copy Markdown
Owner

Summary

Fixes the Release workflow failure (Run 29036254661) where the Build REH (linux-x64) job failed at the Create swap step.

Problem

swapoff: /swapfile: swapoff failed: No such file or directory
##[error]Process completed with exit code 4.

On the ubuntu-24.04 runner, swapon --show reports /swapfile but the file does not actually exist, so the conditional sudo swapoff /swapfile exited with code 4, and GitHub Actions' set -e aborted the whole step. This blocked the v1.122.0-coderm.0.29.0 release (Create Release never ran).

Fix

Replace the fragile grep guard with sudo swapoff /swapfile 2>/dev/null || true so a missing swapfile no longer aborts the step. The subsequent rm -ffallocateswapon proceeds regardless.

Verification

  • Run 29036254661 failed only at Create swap (Build REH linux-x64, 1m21s); all other jobs (Preflight, Build REH darwin/linux-arm64, Build win32/darwin) succeeded
  • code-reviewer confirmed: stderr suppression + exit code absorption via || true, safe ordering, correct YAML indentation
  • After merge, the Release workflow re-runs on push to main and publishes the v1.122.0-coderm.0.29.0 GitHub Release (preflight confirms the release does not yet exist)

🤖 Generated with Claude Code

The Build REH (linux-x64) job failed with
"swapoff: /swapfile: swapoff failed: No such file or directory"
(exit code 4) on the ubuntu-24.04 runner, where `swapon --show`
reports /swapfile but the file does not actually exist.

Replace the fragile `grep` guard with
`sudo swapoff /swapfile 2>/dev/null || true` so a missing swapfile
no longer aborts the step; rm -f /swapfile -> fallocate -> swapon
proceeds regardless.

Co-Authored-By: Claude <noreply@anthropic.com>
@j4rviscmd j4rviscmd added the bug Something isn't working label Jul 9, 2026
@j4rviscmd
j4rviscmd merged commit ee2a094 into main Jul 9, 2026
3 checks passed
@j4rviscmd
j4rviscmd deleted the fix/swap-fix branch July 9, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant