Skip to content

ci: polish workflow by reduce cache size and remove not needed actions#4139

Merged
Xuanwo merged 3 commits intolance-format:mainfrom
Xuanwo:polish-ci
Aug 7, 2025
Merged

ci: polish workflow by reduce cache size and remove not needed actions#4139
Xuanwo merged 3 commits intolance-format:mainfrom
Xuanwo:polish-ci

Conversation

@Xuanwo
Copy link
Copy Markdown
Collaborator

@Xuanwo Xuanwo commented Jul 4, 2025

close #4134

@github-actions github-actions Bot added the ci Github Action or Test issues label Jul 4, 2025
Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo Xuanwo requested a review from jackye1995 July 4, 2025 08:26
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 4, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4139      +/-   ##
==========================================
+ Coverage   80.59%   81.74%   +1.15%     
==========================================
  Files         301      301              
  Lines      108249   121661   +13412     
  Branches   108249   121661   +13412     
==========================================
+ Hits        87238    99447   +12209     
- Misses      17899    18458     +559     
- Partials     3112     3756     +644     
Flag Coverage Δ
unittests 81.74% <ø> (+1.15%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

Comment thread .github/workflows/java.yml
Copy link
Copy Markdown
Contributor

@jackye1995 jackye1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart from the question, looks good to me

Copy link
Copy Markdown
Member

@westonpace westonpace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think cache-targets: false and cache-workspace-crates: false is good. But why remove setup-rust-toolchain?

Comment thread .github/workflows/java.yml
Comment thread .github/workflows/rust.yml
@Xuanwo Xuanwo merged commit 6d0a414 into lance-format:main Aug 7, 2025
26 checks passed
wjones127 added a commit that referenced this pull request Nov 14, 2025
…#5236)

In #4139, we stopped caching built dependencies. Since then, we've had
to wait 20 minutes for the test to build, before we even run any tests.

This PR re-enables the build cache and implements a different mitigation
to avoid large caches: we disable debug info in dependencies and only
keep it in our crates. This is inspired by DataFusion's CI:
https://github.com/apache/datafusion/blob/377c0fce481d561d58e3a6fad2dca18cb1d58384/Cargo.toml#L247-L259

Below are the reductions in size of the target directory. Previously,
Rust jobs were running with `debuginfo=1`, so the target directory was
about 16GB. With these changes, it's down to 7.6GB. If we decided later
we wanted it even smaller, we could enable `-C opt-level=s`, which gets
us down to 2.1GB.

| Profile | Flags | `target/` size | % reduction |
|--------|--------|-------:|------:|
| dev |  | 25.0GB | - |
| dev | `-C debuginfo=1` | 16.0GB | 36% |
| dev | `-C debuginfo=line-tables-only` | 12.0GB | 52% | 
| ci | | 7.6GB | 70% | 
| ci | `-C opt-level=s` | 2.1GB | 92% |

Other optimizations added:

* Removed `CARGO_BUILD_JOBS`, which was preventing parallelism in
builds. We can add this back to specific runners if we find it's
necessary. This will speed up cold builds.
* Align profile across all builds in CI.

Thanks to reduction in disk space, closes #5218.

### Performance improvement

Most of the speed improvement probably comes from removing
`CARGO_BUILD_JOBS`. Jobs that run tests aren't much faster since the
tests take a while.

| Case | Before | After (cold) | mul | After (cached) | mul |
|--------|-------:|---:|---:|---:|---:|
| linux-arm | 38m 58s |  20m 5s | **1.9x** | 18m 33s | **2.1x** |
| MSRV Check | 11m 46s | 5m 17s | **2.3x** | 2m 8s | **5.5x** |
| Clippy | 13m 16s | 5m 26s | **2.4x** | 2m 25s | **5.4x** |
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
…lance-format#5236)

In lance-format#4139, we stopped caching built dependencies. Since then, we've had
to wait 20 minutes for the test to build, before we even run any tests.

This PR re-enables the build cache and implements a different mitigation
to avoid large caches: we disable debug info in dependencies and only
keep it in our crates. This is inspired by DataFusion's CI:
https://github.com/apache/datafusion/blob/377c0fce481d561d58e3a6fad2dca18cb1d58384/Cargo.toml#L247-L259

Below are the reductions in size of the target directory. Previously,
Rust jobs were running with `debuginfo=1`, so the target directory was
about 16GB. With these changes, it's down to 7.6GB. If we decided later
we wanted it even smaller, we could enable `-C opt-level=s`, which gets
us down to 2.1GB.

| Profile | Flags | `target/` size | % reduction |
|--------|--------|-------:|------:|
| dev |  | 25.0GB | - |
| dev | `-C debuginfo=1` | 16.0GB | 36% |
| dev | `-C debuginfo=line-tables-only` | 12.0GB | 52% | 
| ci | | 7.6GB | 70% | 
| ci | `-C opt-level=s` | 2.1GB | 92% |

Other optimizations added:

* Removed `CARGO_BUILD_JOBS`, which was preventing parallelism in
builds. We can add this back to specific runners if we find it's
necessary. This will speed up cold builds.
* Align profile across all builds in CI.

Thanks to reduction in disk space, closes lance-format#5218.

### Performance improvement

Most of the speed improvement probably comes from removing
`CARGO_BUILD_JOBS`. Jobs that run tests aren't much faster since the
tests take a while.

| Case | Before | After (cold) | mul | After (cached) | mul |
|--------|-------:|---:|---:|---:|---:|
| linux-arm | 38m 58s |  20m 5s | **1.9x** | 18m 33s | **2.1x** |
| MSRV Check | 11m 46s | 5m 17s | **2.3x** | 2m 8s | **5.5x** |
| Clippy | 13m 16s | 5m 26s | **2.4x** | 2m 25s | **5.4x** |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Github Action or Test issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python CI out of disk space

4 participants