Skip to content

ci: narrow macOS scope to datafusion-ffi, cover benchmarks on amd64#22047

Closed
blaginin wants to merge 1 commit intomainfrom
speed-up-ci-macos-scope
Closed

ci: narrow macOS scope to datafusion-ffi, cover benchmarks on amd64#22047
blaginin wants to merge 1 commit intomainfrom
speed-up-ci-macos-scope

Conversation

@blaginin
Copy link
Copy Markdown
Member

@blaginin blaginin commented May 6, 2026

Which issue does this PR close?

  • Closes #.

Rationale for this change

The cargo test (macos-aarch64) job is the slowest job in Rust CI (~22 min vs 1–6 min for everything else; ~68% of that is compile, ~25% is test execution). I audited 1000 failed PR runs over Mar–May 2026 to figure out what unique signal it actually provides.

Findings (full breakdown of the 30 PR runs where macOS was the sole failing job):

Bucket Count Notes
explain_analyze.slt 12 flaky — platform-dependent scan_efficiency_ratio / pushdown_rows metrics
push_down_filter_*.slt 8 same — flaky metrics
benchmark_runner::cli::tests 3 real bugs, but live in datafusion-benchmarks, which amd64 was --excludeing
statistics::tpcds_* 2 same PR, also in datafusion-benchmarks
tests::test_ffi_udaf etc. 1 real, macOS-specific — FFI cdylib loading (.dylib vs .so resolution in datafusion/ffi/src/tests/utils.rs)
Build / network / cancellation 4 environment noise

So in 2 months on >1000 failed PR runs, exactly one real bug was caught only by macOS that amd64 couldn't have caught with the right scope. Everything else was either flake noise or datafusion-benchmarks coverage that amd64 was skipping.

What changes are included in this PR?

  1. linux-test (amd64): drop --exclude datafusion-benchmarks. amd64 now runs benchmark crate tests, which historically only macOS was running.
  2. macos-aarch64: scope down to cargo test -p datafusion-ffi --features integration-tests. This is the only place where the platform itself matters (cdylib path resolution).

Net effect:

  • macOS job drops from ~22 min to an estimated ~10–13 min on a cold cache (compile of the datafusion-ffi dependency tree dominates; 9 test binaries run in <1 s combined).
  • datafusion-benchmarks is now covered on the fast 16-CPU amd64 runner instead of the 3-core macos-15 runner.
  • Required-checks list (.asf.yaml) is unchanged — same job names.

Are these changes tested?

Verified locally that cargo test --profile ci -p datafusion-ffi --lib --tests --features integration-tests builds all 9 FFI test binaries and they pass. CI on this PR will exercise both the new amd64 scope and the new macOS scope.

Are there any user-facing changes?

No.

🤖 Generated with Claude Code

The macos-aarch64 job took ~22 min — 68% compile, 25% test. An audit of
macos-only PR failures over Mar–May 2026 (1000 failed PR runs, 30 with
macOS as the sole signal) found that nearly all the unique signal was
either:
  - flaky sqllogictest metrics (~67%, e.g. push_down_filter / explain_analyze
    .slt files with platform-dependent scan_efficiency_ratio numbers),
  - real bugs in datafusion-benchmarks (which amd64 was excluding), or
  - one genuinely macOS-specific FFI cdylib loading bug
    (datafusion/ffi/src/tests/utils.rs path resolution).

So the only thing macOS uniquely catches is FFI dylib loading. Scope the
macOS job down to `cargo test -p datafusion-ffi --features integration-tests`
and let amd64 pick up the datafusion-benchmarks coverage that was being
dropped by the linux-test --exclude list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the development-process Related to development process of DataFusion label May 6, 2026
@blaginin blaginin closed this May 6, 2026
@blaginin blaginin deleted the speed-up-ci-macos-scope branch May 6, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Related to development process of DataFusion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant