-
Notifications
You must be signed in to change notification settings - Fork 1.9k
github: workflows: Clean up needless resources on GHA workers #11288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
github: workflows: Clean up needless resources on GHA workers #11288
Conversation
WalkthroughA "Free disk space" step was added to three GitHub Actions jobs in the staging-release workflow to monitor disk usage, remove large pre-installed toolchains, run apt-get clean, and verify disk reclamation before deploying packages. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 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 |
dd2251b to
ce5cff5
Compare
Signed-off-by: Hiroshi Hatake <[email protected]>
ce5cff5 to
34bbf5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/staging-release.yaml (1)
203-218: Consider extracting duplicate cleanup logic into a reusable action.This cleanup step is identical to the one in
staging-release-yum-packages(lines 113-128). While the implementation is correct, the code duplication increases maintenance burden if cleanup requirements change in the future.Consider creating a reusable composite action (e.g.,
./.github/actions/free-disk-space/action.yaml) to consolidate the cleanup logic:# .github/actions/free-disk-space/action.yaml name: Free Disk Space description: Remove unnecessary toolchains and clean package cache to free disk space runs: using: composite steps: - name: Remove unused toolchains and clean cache run: | echo "::group::Disk usage before cleanup" df -h echo "::endgroup::" sudo rm -rf /usr/share/dotnet || true sudo rm -rf /usr/local/lib/android || true sudo rm -rf /opt/ghc || true sudo rm -rf /usr/lib/jvm || true sudo apt-get clean || true echo "::group::Disk usage after cleanup" df -h echo "::endgroup::" shell: bashThen replace both cleanup steps with:
- uses: ./.github/actions/free-disk-space
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/staging-release.yaml(2 hunks)
🔇 Additional comments (1)
.github/workflows/staging-release.yaml (1)
113-128: Good approach to address disk space constraints.The cleanup step is well-placed, uses appropriate error handling with
|| true, and provides observability with disk usage before/after. The targeted removal of unused toolchains (dotnet, Android SDK, GHC, JVM) is appropriate for a C-based project.
The 4.2.1 release stops by no left device error here:
https://github.com/fluent/fluent-bit/actions/runs/20195480292/job/57978848260
So, we need to wipe out at first to make more device space to put S3 blobs for updating repos.
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.