Skip to content

Conversation

@vertex451
Copy link
Contributor

@vertex451 vertex451 commented Jan 5, 2026

Description

Closes: akash-network/support#406

I also considered using ubuntu-slim, but it has its own limitations like 1 cpu, less space that can be cleaned up and timeout for single-CPU runners is 15 minutes.

Final decision - Github Action that has 610 stars, the most popular among other solutions.

Additional issue fix is included:

Ubuntu's package repository updated and removed the old package version libudev-dev_255.4-1ubuntu8.11. The CI system is trying to fetch a specific old version that no longer exists in the repository.

Changes

  • Replaced apt install with apt-get install which is more suitable for scripts
  • added apt-get update to update cache before install
  • Added a cleanup step to free up the runner space. I remove not used staff like dotnet, android, haskell deps. In the same time I keep staff that is used by CI like golang deps and docker cache. Also, swap section is kept untouched to prevent OOM errors.

Author Checklist

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • (n/a) provided a link to the relevant issue or specification
  • (n/a) included the necessary unit and integration tests
  • (n/a) added a changelog entry to CHANGELOG.md
  • (n/a) included comments for documenting Go code
  • (n/a) updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

@vertex451 vertex451 requested a review from a team as a code owner January 5, 2026 14:46
@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

Walkthrough

Updates the Ubuntu setup action to run sudo apt-get update before sudo apt-get install in a multi-line shell block, and inserts a "Free Disk Space (Ubuntu)" pre-build step into the build-bins job to reclaim disk before build steps.

Changes

Cohort / File(s) Summary
Ubuntu setup action
​.github/actions/setup-ubuntu/action.yaml
Rewrote the "Install dependencies" step to use a multi-line shell block that runs sudo apt-get update then sudo apt-get install (replacing a single-line apt install). Check shell quoting, exit handling, and idempotence.
Workflow: build job cleanup
​.github/workflows/tests.yaml
Added "Free Disk Space (Ubuntu)" step to the build-bins job using jlumbroso/free-disk-space@v1.3.1 with flags (tool-cache, docker-images, swap-storage, android, dotnet, haskell, large-packages). Confirm insertion point (after Checkout, before setup) and CI permissions/time impact.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I hopped into CI with a curious twitch,

ran apt-get update, then fixed the glitch.
I swept disk crumbs in a tidy sweep,
now builds wake up from a restful sleep. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR successfully addresses issue #406 by implementing disk space cleanup, adding apt-get update for cache management, and introducing the free-disk-space action to prevent storage exhaustion during builds.
Out of Scope Changes check ✅ Passed All changes are directly related to resolving the disk space issue: apt-get improvements for reliability and the disk cleanup step to prevent CI failures, with no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main changes: addressing disk space issues and updating apt cache via sudo apt-get update.
Description check ✅ Passed The pull request description is clearly related to the changeset, explaining the rationale for using a free-disk-space GitHub Action, addressing a package repository issue, and documenting the specific changes made to the workflow and setup files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch artem/test-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In @.github/workflows/tests.yaml:
- Around line 48-57: The workflow currently pins the third-party action as
jlumbroso/free-disk-space@main which is a security/stability risk; update the
action reference to a specific released tag or full commit SHA (e.g.,
jlumbroso/free-disk-space@v1.3.1 or the action’s full commit SHA) in the Free
Disk Space job so the workflow uses an immutable version; ensure you replace the
string jlumbroso/free-disk-space@main with the chosen tag or SHA in the workflow
step.
🧹 Nitpick comments (1)
.github/workflows/tests.yaml (1)

48-57: Evaluate adding disk cleanup to other Ubuntu jobs if needed.

The disk cleanup step is only added to build-bins. Other jobs running on ubuntu-latest (tests, coverage, lint-go, lint-shell, sims, network-upgrade-names) might also benefit from this cleanup if they experience disk space constraints.

If other jobs encounter disk space issues, consider adding the same cleanup step to those jobs as well.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56645e3 and ae584b4.

📒 Files selected for processing (2)
  • .github/actions/setup-ubuntu/action.yaml
  • .github/workflows/tests.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build-macos
  • GitHub Check: release-dry-run
  • GitHub Check: sims
  • GitHub Check: build-bins
  • GitHub Check: network-upgrade-names
  • GitHub Check: lint-go
  • GitHub Check: coverage
  • GitHub Check: tests
🔇 Additional comments (2)
.github/workflows/tests.yaml (1)

48-57: Consider whether swap-storage removal could impact memory-intensive builds.

Setting swap-storage: true removes swap space to free disk space. If the build process (make bins, make docker-image) is memory-intensive, this could lead to OOM (out-of-memory) errors.

Monitor the build job after this change to ensure it doesn't fail due to insufficient memory. If memory issues arise, consider setting swap-storage: false.

.github/actions/setup-ubuntu/action.yaml (1)

17-19: LGTM! Improved package installation reliability.

The changes follow best practices:

  • Running apt-get update before installation ensures package lists are current
  • Using apt-get instead of apt is recommended for scripts (apt is intended for interactive use)
  • Multi-line format improves readability

These changes should improve the reliability of dependency installation in CI.

@vertex451 vertex451 changed the title ci: test cleanup GA fix: no space left on device Jan 5, 2026
@vertex451 vertex451 self-assigned this Jan 5, 2026
@vertex451 vertex451 moved this to In Progress (prioritized) in Core Product and Engineering Roadmap Jan 5, 2026
@vertex451 vertex451 changed the title fix: no space left on device fix: no space left on device + update apt cache Jan 5, 2026
@vertex451 vertex451 changed the title fix: no space left on device + update apt cache fix: address no space left on device + apt cache update Jan 5, 2026
Copy link

@chainzero chainzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding apt-get update prevents CI failures from stale package indexes when Ubuntu mirrors rotate versions. The disk space cleanup is well-targeted—removing ~27GB of unused toolchains (Android, .NET, Haskell, large-packages) while preserving Go, Docker images, and swap that the build actually needs.

@vertex451 vertex451 merged commit 7ae1a52 into main Jan 5, 2026
25 checks passed
@vertex451 vertex451 deleted the artem/test-cleanup branch January 5, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In Progress (prioritized)

Development

Successfully merging this pull request may close these issues.

fix: no space left on device error

3 participants