You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "7487 (via GitHub)" <gi...@apache.org> on 2026/09/02 00:36:36 UTC

[PR] chore(ci): run cargo machete to catch unused dependencies [datafusion-ballista]

7487 opened a new pull request, #2411:
URL: https://github.com/apache/datafusion-ballista/pull/2411

   # Which issue does this PR close?
   
   Closes #2410.
   
   # Rationale for this change
   
   We do not currently check for unused dependencies in CI, so dead manifest entries accumulate — they still get resolved, downloaded, and often compiled. This adds `cargo machete` to the lint surface, following what DataFusion and other Arrow subprojects already do.
   
   # What changes are included in this PR?
   
   **Removed dependencies that are genuinely unused** (no references anywhere in the source tree):
   
   - `ballista-core`: `aws-config`, `aws-credential-types` (also dropped from the `build-binary` feature; S3 support goes through `object_store`'s own builders), `md-5`, `prost-types`
   - `ballista-scheduler`: `prost-types`
   - `ballista-executor`: `tracing` (also dropped from the `build-binary` feature; `tracing-subscriber`/`tracing-appender` pull it in transitively)
   - `ballista-cli`: `tracing-appender` (also dropped from the `tui` feature)
   - `pyballista`: `async-trait`
   - root workspace: `prost-types` (no longer referenced by any member)
   
   **Moved**: scheduler's `insta` from `[dependencies]` to `[dev-dependencies]` — it is only used through `ballista_core::assert_plan!` in `cfg(test)` modules, so it no longer compiles into release scheduler builds.
   
   **Kept, with `[package.metadata.cargo-machete]` ignored entries and comments**:
   
   - `ballista-scheduler`: `insta` (macro expansion, see above) and `tonic-prost` (used by the `keda-scaler` gRPC code generated into `OUT_DIR`, which machete cannot see)
   - `ballista-executor`: `arrow` (not imported directly, but pulls arrow's `ipc_compression` feature into the build so shuffle IPC compression — lz4 by default — works through datafusion's arrow re-export)
   - `ballista-cli`: `critical-section` (provides the critical-section implementation `ratatui-core` needs at link time in the wasm32 `web` build)
   - `msrvcheck`: `time` (never imported; pins the transitive `time` version so `cargo` keeps compiling)
   
   **CI wiring**: new `ci/scripts/rust_machete.sh`, added to `dev/rust_lint.sh`, and a `cargo-machete` job in the `Ballista Rust` workflow (installs `cargo-machete@0.9.2` via the already-pinned `taiki-e/install-action`).
   
   Verified locally: `cargo machete` is clean; `taplo format --check` (0.10.0) passes; the CI clippy commands for the four touched crates pass with `-D warnings` (including `--all-features`, which exercises `keda-scaler`); `cargo check -p ballista-scheduler -p ballista-executor -p ballista-core -p ballista --no-default-features --locked` passes; scheduler tests using `assert_plan!` still pass; `python/Cargo.lock` stays in sync (`cargo metadata --locked`).
   
   # Are there any user-facing changes?
   
   The implicit `aws-config`/`aws-credential-types` cargo features of `ballista-core` no longer exist, and `ballista-core`/`ballista-executor` lose a few transitive dependencies. No API or behavior changes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] chore(ci): run cargo machete to catch unused dependencies [datafusion-ballista]

Posted by "7487 (via GitHub)" <gi...@apache.org>.
7487 commented on PR #2411:
URL: https://github.com/apache/datafusion-ballista/pull/2411#issuecomment-5539045733

   @NoahKusaba Done — merged upstream main and resolved the conflicts. Both were against the workspace-dependency refactor: `ballista-core` now takes `chrono = { workspace = true }` (aws-config/aws-credential-types stay removed — still no references in the source tree on current main), and `ballista-cli` keeps `tracing-appender` removed (still only used by the scheduler/executor binaries). Re-verified locally: `cargo machete` clean, `taplo format --check` passes, and both lockfiles are in sync.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] chore(ci): run cargo machete to catch unused dependencies [datafusion-ballista]

Posted by "milenkovicm (via GitHub)" <gi...@apache.org>.
milenkovicm commented on PR #2411:
URL: https://github.com/apache/datafusion-ballista/pull/2411#issuecomment-5592143707

   Thanks @7487 and @andygrove 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] chore(ci): run cargo machete to catch unused dependencies [datafusion-ballista]

Posted by "NoahKusaba (via GitHub)" <gi...@apache.org>.
NoahKusaba commented on PR #2411:
URL: https://github.com/apache/datafusion-ballista/pull/2411#issuecomment-5534759428

   @7487 can you resolve conflicts and update branch, if you are still managing this change?
   I think it's really important we get this merged in before the pending ballista version update.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] chore(ci): run cargo machete to catch unused dependencies [datafusion-ballista]

Posted by "7487 (via GitHub)" <gi...@apache.org>.
7487 commented on PR #2411:
URL: https://github.com/apache/datafusion-ballista/pull/2411#issuecomment-5572882249

   Merged `main` again (dd8d5cf) and pushed one small follow-up (555c1a2):
   
   - #2421 added a `tinyvec` version pin to `dev/msrvcheck` that is never imported — same shape as the existing `time` pin — so `cargo machete` on `main` + this PR reported it. Added it to the crate's `[package.metadata.cargo-machete]` ignored list. Without this the new job would have gone red right after merge.
   - Aligned the `cargo-machete` job's `taiki-e/install-action` pin with the v2.87.5 SHA the rest of `rust.yml` uses since #2429.
   
   Verified locally on the merged tree: `ci/scripts/rust_machete.sh` clean, `taplo format --check` passes.
   
   The `pull_request` workflows on this branch have been sitting at "action_required" since the 09-04 update (they all passed on the original commit), so this just needs a maintainer to approve the runs. Ready to go from my side.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] chore(ci): run cargo machete to catch unused dependencies [datafusion-ballista]

Posted by "milenkovicm (via GitHub)" <gi...@apache.org>.
milenkovicm merged PR #2411:
URL: https://github.com/apache/datafusion-ballista/pull/2411


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org