fix: address no space left on device + apt cache update#2033
Conversation
WalkthroughUpdates the Ubuntu setup action to run Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 onubuntu-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
📒 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: trueremoves 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 updatebefore installation ensures package lists are current- Using
apt-getinstead ofaptis 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.
chainzero
left a comment
There was a problem hiding this comment.
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.
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
apt installwithapt-get installwhich is more suitable for scriptsAuthor Checklist
I have...
!to the type prefix if API or client breaking changeCHANGELOG.md