Skip to content

chore: Reclaim disk space in GitHub runners#1004

Open
jannfis wants to merge 1 commit into
argoproj-labs:mainfrom
jannfis:chore/free-more-space
Open

chore: Reclaim disk space in GitHub runners#1004
jannfis wants to merge 1 commit into
argoproj-labs:mainfrom
jannfis:chore/free-more-space

Conversation

@jannfis

@jannfis jannfis commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do / why we need it:

We're running into some disk space issues with race condition builds enabled (see https://github.com/argoproj-labs/argocd-agent/actions/runs/27678558719/job/81859858614?pr=793 from #793)

This change removes some unused space hogs from the disk of the GitHub action's runner machines. This is brute-force (removing the directories instead of using apt to uninstall the packages), but it should be fine in our case.

Before this change:

Filesystem       Size  Used Avail Use% Mounted on
/dev/root         73G   58G   16G  79% /
tmpfs            7.9G  172K  7.9G   1% /dev/shm
tmpfs            3.2G  1.0M  3.2G   1% /run
tmpfs            5.0M     0  5.0M   0% /run/lock
/dev/nvme0n1p15  105M  6.1M   99M   6% /boot/efi
tmpfs            1.6G   12K  1.6G   1% /run/user/1001

After this change:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       146G   33G  113G  23% /
tmpfs           7.9G  172K  7.9G   1% /dev/shm
tmpfs           3.2G 1020K  3.2G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
efivarfs        128M   34K  128M   1% /sys/firmware/efi/efivars
/dev/sda15      105M  6.1M   99M   6% /boot/efi
tmpfs           1.6G   12K  1.6G   1% /run/user/1001

Which issue(s) this PR fixes:

Fixes #?

How to test changes / Special notes to the reviewer:

Checklist

  • Documentation update is required by this PR (and has been updated) OR no documentation update is required.

Summary by CodeRabbit

  • Chores
    • Enhanced CI/CD pipeline reliability by improving disk space management in end-to-end testing. The workflow cleanup process now removes additional preinstalled system components to free up storage capacity before test execution, reducing the risk of disk space-related failures during continuous integration builds and automated testing.

Signed-off-by: jannfis <jann@mistrust.net>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 67460237-c1fe-4a1a-b37d-e7d57664a2e4

📥 Commits

Reviewing files that changed from the base of the PR and between 1bf8d9f and d044595.

📒 Files selected for processing (1)
  • .github/workflows/ci.yaml

📝 Walkthrough

Walkthrough

The test-e2e job in the CI workflow gains six additional sudo rm -rf commands in its disk-space cleanup step, targeting preinstalled toolchain directories for Java (/usr/lib/jvm), Haskell GHCup (/usr/local/.ghcup), Android (/usr/local/lib/android), PowerShell (/usr/local/share/powershell), .NET (/usr/share/dotnet), and Swift (/usr/share/swift).

Changes

CI E2E Disk Cleanup

Layer / File(s) Summary
Additional toolchain directory removal in test-e2e job
.github/workflows/ci.yaml
Six sudo rm -rf commands are added to the existing disk-space cleanup step, removing Java, GHCup, Android, PowerShell, .NET, and Swift directories before the end-to-end test setup proceeds.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • argoproj-labs/argocd-agent#680: Directly modifies the same test-e2e job disk-space cleanup step in .github/workflows/ci.yaml, adding/adjusting similar runner space-freeing commands.

Suggested reviewers

  • jgwest
  • chetan-rns
  • mikeshng

Poem

🐇 Hop hop, clear the floor!
Java, Swift, and dotnet — gone!
More disk space to store
our end-to-end marathon.
A tidy runner makes tests run bright,
the rabbit tidies left and right! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: reclaiming disk space in GitHub runners by removing unused directories.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@jannfis jannfis marked this pull request as ready for review June 17, 2026 20:02
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.07%. Comparing base (4797313) to head (d044595).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1004      +/-   ##
==========================================
+ Coverage   48.04%   48.07%   +0.03%     
==========================================
  Files         123      125       +2     
  Lines       18599    18701     +102     
==========================================
+ Hits         8935     8990      +55     
- Misses       8851     8896      +45     
- Partials      813      815       +2     
Flag Coverage Δ
unit-tests 48.07% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants