[build] monitor disk and cache usage throughout a bazel job#17569
Conversation
Review Summary by QodoRefactor disk monitoring and cleanup into reusable scripts
WalkthroughsDescription• Refactor disk cleanup into dedicated scripts for better reusability • Add comprehensive disk and cache usage monitoring throughout CI job • Consolidate disk space checks with standardized reporting format • Support both Ubuntu (bash) and Windows (PowerShell) platforms Diagramflowchart LR
A["Inline cleanup code"] -->|Extract| B["free-disk-space.sh<br/>free-disk-space.ps1"]
C["Scattered disk checks"] -->|Consolidate| D["disk-status.sh"]
B -->|Called from| E["bazel.yml workflow"]
D -->|Called from| E
E -->|Provides| F["Standardized monitoring<br/>at key checkpoints"]
File Changes1. scripts/github-actions/disk-status.sh
|
Code Review by Qodo
1.
|
|
Persistent review updated to latest commit 3fa553c |
|
Persistent review updated to latest commit f471125 |
|
Persistent review updated to latest commit 61b962f |
|
Persistent review updated to latest commit 0afe908 |
|
Persistent review updated to latest commit 7d7fb92 |
|
Persistent review updated to latest commit 962cb10 |
|
Persistent review updated to latest commit bebf1b5 |
* [build] monitor disk and cache usage throughout a bazel job * make the build not need android
This is all about gathering more info from the logs about how much space and cache are in use throughout a bazel job.
🔗 Related Issues
One alternative to #17568 is to enable caching on RBE runs, but I want to see what the sizes look like. I have another PR lined up for bazel-setup to restrict the newer repository contents cache which is less useful on CI, but I also want to see the real numbers before submitting it.
On one of my runs today the "Remove extra tools to free disk space" step took 10 minutes, which, thankfully turned out to be a major outlier, but the total time for this step adds up with how many bazel jobs we run right now.
💥 What does this PR do?
🔧 Implementation Notes
free-disk-space.shand added a couple things from that🤖 AI assistance