Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,26 @@
# (or 'taplo format') locally to fix the formatting, then commit the result.
ci/scripts/rust_toml_fmt.sh

cargo-machete:
name: Check for unused dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 1
- name: Install cargo-machete
uses: taiki-e/install-action@742a3317eac7bd62f91cd888b4eead5e784ba833 # v2.87.1
with:
tool: cargo-machete@0.9.2

- name: Check for unused dependencies
run: |
# if a reported dependency is a false positive (e.g. only referenced
# through macros or generated code), add it to the crate's
# `[package.metadata.cargo-machete]` ignored list with a comment.
ci/scripts/rust_machete.sh

datafusion-proto-sync-check:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Check vendored DataFusion proto is in sync
runs-on: ubuntu-latest
steps:
Expand Down
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ object_store = "0.13.2"
ordered-float = "5"
pastey = "0.2.3"
prost = "0.14"
prost-types = "0.14"
rstest = { version = "0.26" }
tonic = { version = "0.14" }
tonic-build = { version = "0.14", default-features = false, features = [
Expand Down
9 changes: 7 additions & 2 deletions ballista-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ readme = "README.md"
[lib]
crate-type = ["cdylib", "rlib"]

[package.metadata.cargo-machete]
ignored = [
# not imported directly; provides the `critical-section` implementation that
# ratatui-core needs at link time in the wasm32 `web` build
"critical-section",
]

[dependencies]
# CLI-only deps (DataFusion/Ballista) — gated by `cli` feature
ballista = { path = "../ballista/client", version = "54.0.0", features = ["standalone"], optional = true }
Expand Down Expand Up @@ -59,7 +66,6 @@ url-escape = { workspace = true, optional = true }

# Native-only TUI deps
crossterm = { version = "0.29.0", features = ["event-stream"], optional = true }
tracing-appender = { version = "0.2", optional = true }

# Web-only deps (WASM)
console_error_panic_hook = { version = "0.1", optional = true }
Expand Down Expand Up @@ -102,7 +108,6 @@ tui = [
"dep:reqwest",
"dep:serde",
"dep:serde_json",
"dep:tracing-appender",
"dep:tui-shimmer",
"ratatui/crossterm",
"ratatui/all-widgets",
Expand Down
6 changes: 1 addition & 5 deletions ballista/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ rustc-args = ["--cfg", "docsrs"]

[features]
arrow-ipc-optimizations = []
build-binary = ["aws-config", "aws-credential-types", "clap", "object_store"]
build-binary = ["clap", "object_store"]
default = ["arrow-ipc-optimizations"]
docsrs = []
# Used for testing ONLY: causes all values to hash to the same value (test for collisions)
Expand All @@ -46,8 +46,6 @@ spark-compat = ["dep:datafusion-spark"]
[dependencies]
arrow-flight = { workspace = true }
async-trait = { workspace = true }
aws-config = { version = "1.8.18", optional = true }
aws-credential-types = { version = "1.2.0", optional = true }
chrono = { version = "0.4", default-features = false }
clap = { workspace = true, optional = true }
datafusion = { workspace = true }
Expand All @@ -57,12 +55,10 @@ datafusion-spark = { workspace = true, optional = true, features = ["datafusion"
futures = { workspace = true }
itertools = "0.15"
log = { workspace = true }
md-5 = { version = "^0.11.0" }
object_store = { workspace = true, features = ["aws", "http"], optional = true }
parking_lot = { workspace = true }
pastey = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }
rand = { workspace = true }
serde = { workspace = true, features = ["derive"] }
tokio = { workspace = true, features = ["rt-multi-thread"] }
Expand Down
9 changes: 7 additions & 2 deletions ballista/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ authors = ["Apache DataFusion <dev@datafusion.apache.org>"]
edition = { workspace = true }
rust-version = { workspace = true }

[package.metadata.cargo-machete]
ignored = [
# not imported directly; pulls in arrow's `ipc_compression` feature so the arrow
# crates used through datafusion can compress shuffle IPC data
"arrow",
]

[[bin]]
name = "ballista-executor"
path = "src/bin/main.rs"
Expand All @@ -38,7 +45,6 @@ build-binary = [
"clap",
"tracing-subscriber",
"tracing-appender",
"tracing",
"ballista-core/build-binary",
"mimalloc",
"dep:axum",
Expand Down Expand Up @@ -70,7 +76,6 @@ tokio = { workspace = true, features = ["full"] }
tokio-stream = { workspace = true, features = ["net"] }
tokio-util = { version = "0.7", features = ["io-util"] }
tonic = { workspace = true }
tracing = { workspace = true, optional = true }
tracing-appender = { workspace = true, optional = true }
tracing-subscriber = { workspace = true, optional = true }
uuid = { workspace = true }
Expand Down
11 changes: 9 additions & 2 deletions ballista/scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ authors = ["Apache DataFusion <dev@datafusion.apache.org>"]
edition = { workspace = true }
rust-version = { workspace = true }

[package.metadata.cargo-machete]
ignored = [
# used via the `ballista_core::assert_plan!` macro, which expands to `insta::assert_snapshot!`
"insta",
# used by the `keda-scaler` gRPC code generated into OUT_DIR by build.rs
"tonic-prost",
]

[[bin]]
name = "ballista-scheduler"
path = "src/bin/main.rs"
Expand Down Expand Up @@ -66,15 +74,13 @@ ferroid = { version = "2.0", features = ["alloc", "std", "snowflake", "atomic",
futures = { workspace = true }
graphviz-rust = { version = "0.9", optional = true }
http = "1.4"
insta = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
object_store = { workspace = true }
once_cell = { version = "1.21.4", optional = true }
parking_lot = { workspace = true }
prometheus = { version = "0.14", features = ["process"], optional = true }
prost = { workspace = true }
prost-types = { workspace = true }
rand = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { version = "1", optional = true }
Expand All @@ -94,6 +100,7 @@ name = "tpch_plan_stability"
path = "tests/tpch_plan_stability/main.rs"

[dev-dependencies]
insta = { workspace = true }
regex = "1"
rstest = { workspace = true }
serde_json = "1"
Expand Down
26 changes: 26 additions & 0 deletions ci/scripts/rust_machete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Checks for unused dependencies. Install with `cargo install cargo-machete`.
# False positives can be added to the `[package.metadata.cargo-machete]`
# `ignored` list of the crate's Cargo.toml, with a comment explaining why
# the dependency is needed.

set -ex
cargo machete
6 changes: 6 additions & 0 deletions dev/msrvcheck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ edition = "2024"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[package.metadata.cargo-machete]
ignored = [
# not imported; pins the transitive `time` version so `cargo` keeps compiling
"time",
]

[dependencies]
cargo = "0.97.1"
time = "=0.3.47" # time 0.3.48 introduced an associated-type From impl that conflicts with cargo-credential's blanket From impl
1 change: 1 addition & 0 deletions dev/rust_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ set -e
ci/scripts/rust_fmt.sh
ci/scripts/rust_clippy.sh
ci/scripts/rust_toml_fmt.sh
ci/scripts/rust_machete.sh
1 change: 0 additions & 1 deletion python/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ include = ["/src", "/ballista", "/LICENSE.txt", "pyproject.toml", "Cargo.toml",
publish = false

[dependencies]
async-trait = "0.1.89"
# ballista = { path = "../ballista/client", version = "54.0.0" }
# ballista-core = { path = "../ballista/core", version = "54.0.0" }
# ballista-executor = { path = "../ballista/executor", version = "54.0.0", default-features = false }
Expand Down
Loading