Skip to content

Conversation

@cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 commented Dec 15, 2025

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:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

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

  • Chores
    • Optimized staging release workflow disk space management to improve build efficiency.

✏️ Tip: You can customize this high-level summary in your review settings.

@cosmo0920 cosmo0920 changed the title github: workflows: CLean up needless resources on GHA workers github: workflows: Clean up needless resources on GHA workers Dec 15, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Walkthrough

A "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

Cohort / File(s) Summary
Staging Release Workflow Disk Space Management
\.github/workflows/staging-release\.yaml
Added disk space monitoring and cleanup step to three jobs (staging-release-yum-packages, staging-release-apt-packages, and package-matrix workflow block) that prints disk usage before/after cleanup, removes large toolchain directories (/usr/share/dotnet, /usr/local/lib/android, /opt/ghc, /usr/lib/jvm), and runs apt-get clean

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Repetitive pattern applied consistently across three workflow jobs with identical cleanup logic
  • Configuration/workflow modification without functional code logic changes
  • Straightforward disk space management implementation

Possibly related PRs

  • PR #11184: Adds an identical "Free disk space" step to unit-tests workflow with the same toolchain removal and apt-get clean operations, indicating consistent disk management improvements across multiple workflows.

Suggested reviewers

  • niedbalski
  • patrick-stephens
  • celalettin1286

Poem

🐰 Hops through workflows with glee,
Sweeping dust bunnies (so three!),
dotnet and android go bye-bye,
More disk space under the sky!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding disk cleanup steps to GitHub Actions workflows by removing unnecessary resources on GHA workers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cosmo0920-cleanup-needless-resources-on-gha-workers

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.

@cosmo0920 cosmo0920 force-pushed the cosmo0920-cleanup-needless-resources-on-gha-workers branch 2 times, most recently from dd2251b to ce5cff5 Compare December 15, 2025 05:27
@cosmo0920 cosmo0920 force-pushed the cosmo0920-cleanup-needless-resources-on-gha-workers branch from ce5cff5 to 34bbf5b Compare December 15, 2025 05:28
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

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: 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: bash

Then replace both cleanup steps with:

- uses: ./.github/actions/free-disk-space
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c06c124 and 34bbf5b.

📒 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.

@patrick-stephens patrick-stephens merged commit 71d931c into master Dec 16, 2025
17 checks passed
@patrick-stephens patrick-stephens deleted the cosmo0920-cleanup-needless-resources-on-gha-workers branch December 16, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants