Skip to content

ci: reclaim runner disk before tests - #1047

Merged
jlucaso1 merged 2 commits into
mainfrom
fix/ci-runner-disk
Jul 16, 2026
Merged

ci: reclaim runner disk before tests#1047
jlucaso1 merged 2 commits into
mainfrom
fix/ci-runner-disk

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #1046.

Why

Build & Test started running out of disk on the Ubuntu 20260714.240.1 image. Main failed once and PR #1045 failed twice at different rustc targets, always with No space left on device. The previous image completed the same matrix.

Change

Remove the unused hosted Android SDK at the start of the two disk-heavy Rust jobs and print disk usage before and after. This leaves the Rust target cache, debug information, commands, and coverage unchanged.

Validation

  • Cleanup increased free space from 89 GiB to 99 GiB in about 20 seconds.
  • Build & Test passed in 10m17s; Build & Lint all-features passed in 8m41s.
  • All 14 executable checks passed, including E2E, WASM, Binary Size, and CodSpeed.
  • Binary size and LLVM-lines metrics are unchanged.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The test workflow now removes the unused Android SDK directory in two jobs while reporting disk usage before and after cleanup. The stable wacore test command remains unchanged.

Changes

CI disk reclamation

Layer / File(s) Summary
Runner cleanup and test validation
.github/workflows/main.yml
The test and test-all-features jobs delete /usr/local/lib/android with disk usage checks before and after removal; the stable wacore test command remains unchanged.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The workflow cleanup removes the unused Android SDK and prints disk usage as requested by #1046.
Out of Scope Changes check ✅ Passed The diff only adds the disk-reclaim step and related logging, with no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly matches the CI disk-space cleanup before tests.
Description check ✅ Passed The description is directly about reclaiming runner disk space and validating the CI fix.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-runner-disk

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.

@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown

Greptile Summary

This CI fix adds an Android SDK disk reclaim step (sudo rm -rf --one-file-system /usr/local/lib/android) with before/after df -h output to both the test and test-all-features jobs, addressing No space left on device failures introduced by the Ubuntu 20260714.240.1 runner image. It also fixes a missing trailing newline at the end of the workflow file.

  • The two heaviest jobs — test (full build + tests) and test-all-features (full build + clippy + voip tests with WebRTC/opus) — both receive the reclaim step, which directly addresses the reported failures.
  • The test-stable job builds only three lightweight no-default-features crates and is unlikely to be affected; format is trivially light. The clippy job compiles --all-targets on the same image and does not yet have the reclaim step.

Confidence Score: 5/5

Safe to merge — the change is a narrowly scoped CI step that frees the Android SDK on the two jobs that were actually failing, with --one-file-system guarding against accidental cross-mount deletion.

Both previously failing jobs (test and test-all-features) now reclaim the Android SDK space before compilation begins. The rm -rf --one-file-system flag is correct. The only open question is whether the clippy job (also --all-targets) will eventually hit the same pressure, but it has not been reported as failing and its disk profile is lighter than the test jobs.

.github/workflows/main.yml — specifically whether the clippy job needs the same reclaim step in a follow-up.

Important Files Changed

Filename Overview
.github/workflows/main.yml Adds Android SDK disk reclaim step to test and test-all-features jobs; also fixes missing trailing newline. The clippy job, which also compiles --all-targets on ubuntu-latest, does not receive the same step.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph CI ["Rust CI — ubuntu-latest jobs"]
        F["format\n(cargo fmt --check)"]
        C["clippy\n(--all-targets)\n⚠️ no reclaim step"]
        T["test\nBuild & Test\n✅ reclaim step added"]
        TAF["test-all-features\nBuild & Lint (--all-features)\n✅ reclaim step added"]
        TS["test-stable\n(no-default-features, 3 crates)"]
    end

    subgraph Reclaim ["Reclaim step (new)"]
        R["df -h /\nsudo rm -rf --one-file-system\n  /usr/local/lib/android\ndf -h /"]
    end

    R -->|"applied to"| T
    R -->|"applied to"| TAF
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph CI ["Rust CI — ubuntu-latest jobs"]
        F["format\n(cargo fmt --check)"]
        C["clippy\n(--all-targets)\n⚠️ no reclaim step"]
        T["test\nBuild & Test\n✅ reclaim step added"]
        TAF["test-all-features\nBuild & Lint (--all-features)\n✅ reclaim step added"]
        TS["test-stable\n(no-default-features, 3 crates)"]
    end

    subgraph Reclaim ["Reclaim step (new)"]
        R["df -h /\nsudo rm -rf --one-file-system\n  /usr/local/lib/android\ndf -h /"]
    end

    R -->|"applied to"| T
    R -->|"applied to"| TAF
Loading

Reviews (2): Last reviewed commit: "ci: protect all-features disk headroom" | Re-trigger Greptile

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

📦 Binary size report

Metric main PR Δ
bin size (stripped) 10.93 MiB 10.93 MiB 0
bin .text 8.91 MiB 8.91 MiB 0
bin allocated (text+data+bss) 10.93 MiB 10.93 MiB 0
llvm-lines wacore 514,458 514,458 0
llvm-lines wacore copies 17,564 17,564 0
llvm-lines whatsapp-rust lib 777,560 777,560 0
llvm-lines whatsapp-rust lib copies 25,297 25,297 0
deps crates (Cargo.lock) 472 472 0
.text per crate
Crate main PR Δ
.text whatsapp_rust 1.69 MiB 1.69 MiB 0
.text wacore 537.22 KiB 537.22 KiB 0
.text wacore_binary 148.45 KiB 148.45 KiB 0
.text wacore_libsignal 203.49 KiB 203.49 KiB 0
.text wacore_appstate 158.31 KiB 158.31 KiB 0
.text wacore_noise 26.03 KiB 26.03 KiB 0
.text waproto 1.60 MiB 1.60 MiB 0
.text whatsapp_rust_sqlite_storage 513.08 KiB 513.08 KiB 0
.text whatsapp_rust_tokio_transport 43.79 KiB 43.79 KiB 0
.text whatsapp_rust_ureq_http_client 10.47 KiB 10.47 KiB 0
.text std 1.02 MiB 1.02 MiB 0
.text other deps 2.95 MiB 2.95 MiB 0

Baseline: 0e1f391d9 (latest main run) · Head: 217a9008d · Graphs

@jlucaso1

Copy link
Copy Markdown
Collaborator Author

Addressed in 405d95f. Build & Lint had remained green on the new image, but it is the other disk-heavy job and does not use Android either, so it now gets the same headroom without changing its build or test coverage.

@jlucaso1
jlucaso1 merged commit 652d25d into main Jul 16, 2026
16 checks passed
@jlucaso1
jlucaso1 deleted the fix/ci-runner-disk branch July 16, 2026 16:03
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.

CI: reclaim unused Android SDK space before Rust tests

1 participant