diff --git a/Cargo.toml b/Cargo.toml index a43b60416..f92064585 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,9 +39,9 @@ tonic-build = { version = "0.12", default-features = false, features = [ "transport", "prost" ] } -tracing = "0.1.36" +tracing = "0.1" tracing-appender = "0.2.2" -tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } +tracing-subscriber = { version = "0.3", features = ["env-filter"] } ctor = { version = "0.2" } mimalloc = { version = "0.1" } diff --git a/ballista-cli/Cargo.toml b/ballista-cli/Cargo.toml index 2f1ddeb0f..9b527e56d 100644 --- a/ballista-cli/Cargo.toml +++ b/ballista-cli/Cargo.toml @@ -25,7 +25,6 @@ keywords = ["ballista", "cli"] license = "Apache-2.0" homepage = "https://github.com/apache/arrow-ballista" repository = "https://github.com/apache/arrow-ballista" -rust-version = "1.72" readme = "README.md" [dependencies] diff --git a/ballista/client/Cargo.toml b/ballista/client/Cargo.toml index 9614412f8..e462367a6 100644 --- a/ballista/client/Cargo.toml +++ b/ballista/client/Cargo.toml @@ -25,7 +25,6 @@ repository = "https://github.com/apache/arrow-ballista" readme = "README.md" authors = ["Apache DataFusion "] edition = "2021" -rust-version = "1.72" [dependencies] async-trait = { workspace = true } @@ -33,11 +32,8 @@ ballista-core = { path = "../core", version = "0.12.0" } ballista-executor = { path = "../executor", version = "0.12.0", optional = true } ballista-scheduler = { path = "../scheduler", version = "0.12.0", optional = true } datafusion = { workspace = true } -datafusion-proto = { workspace = true } -futures = { workspace = true } log = { workspace = true } -parking_lot = { workspace = true } -tempfile = { workspace = true } + tokio = { workspace = true } url = { workspace = true } @@ -45,8 +41,10 @@ url = { workspace = true } ballista-executor = { path = "../executor", version = "0.12.0" } ballista-scheduler = { path = "../scheduler", version = "0.12.0" } ctor = { workspace = true } +datafusion-proto = { workspace = true } env_logger = { workspace = true } rstest = { version = "0.23" } +tempfile = { workspace = true } tonic = { workspace = true } [features] diff --git a/ballista/core/Cargo.toml b/ballista/core/Cargo.toml index b49241c56..1bf888582 100644 --- a/ballista/core/Cargo.toml +++ b/ballista/core/Cargo.toml @@ -34,17 +34,17 @@ exclude = ["*.proto"] rustc-args = ["--cfg", "docsrs"] [features] +build-binary = ["configure_me", "clap"] docsrs = [] # Used for testing ONLY: causes all values to hash to the same value (test for collisions) force_hash_collisions = ["datafusion/force_hash_collisions"] - [dependencies] arrow-flight = { workspace = true } async-trait = { workspace = true } chrono = { version = "0.4", default-features = false } -clap = { workspace = true } -configure_me = { workspace = true } +clap = { workspace = true, optional = true } +configure_me = { workspace = true, optional = true } datafusion = { workspace = true } datafusion-proto = { workspace = true } datafusion-proto-common = { workspace = true } @@ -65,5 +65,5 @@ url = { workspace = true } tempfile = { workspace = true } [build-dependencies] -rustc_version = "0.4.0" +rustc_version = "0.4.1" tonic-build = { workspace = true } diff --git a/ballista/core/src/config.rs b/ballista/core/src/config.rs index 20b018ce3..cb7f7c5d7 100644 --- a/ballista/core/src/config.rs +++ b/ballista/core/src/config.rs @@ -18,8 +18,6 @@ //! Ballista configuration -use clap::ValueEnum; -use core::fmt; use std::collections::HashMap; use std::result; @@ -252,30 +250,33 @@ impl datafusion::config::ConfigExtension for BallistaConfig { // an enum used to configure the scheduler policy // needs to be visible to code generated by configure_me -#[derive(Clone, ValueEnum, Copy, Debug, serde::Deserialize, Default)] +#[derive(Clone, Copy, Debug, serde::Deserialize, Default)] +#[cfg_attr(feature = "build-binary", derive(clap::ValueEnum))] pub enum TaskSchedulingPolicy { #[default] PullStaged, PushStaged, } +#[cfg(feature = "build-binary")] impl std::str::FromStr for TaskSchedulingPolicy { type Err = String; fn from_str(s: &str) -> std::result::Result { - ValueEnum::from_str(s, true) + clap::ValueEnum::from_str(s, true) } } - +#[cfg(feature = "build-binary")] impl configure_me::parse_arg::ParseArgFromStr for TaskSchedulingPolicy { - fn describe_type(mut writer: W) -> fmt::Result { + fn describe_type(mut writer: W) -> core::fmt::Result { write!(writer, "The scheduler policy for the scheduler") } } // an enum used to configure the log rolling policy // needs to be visible to code generated by configure_me -#[derive(Clone, ValueEnum, Copy, Debug, serde::Deserialize, Default)] +#[derive(Clone, Copy, Debug, serde::Deserialize, Default)] +#[cfg_attr(feature = "build-binary", derive(clap::ValueEnum))] pub enum LogRotationPolicy { Minutely, Hourly, @@ -284,16 +285,18 @@ pub enum LogRotationPolicy { Never, } +#[cfg(feature = "build-binary")] impl std::str::FromStr for LogRotationPolicy { type Err = String; fn from_str(s: &str) -> std::result::Result { - ValueEnum::from_str(s, true) + clap::ValueEnum::from_str(s, true) } } +#[cfg(feature = "build-binary")] impl configure_me::parse_arg::ParseArgFromStr for LogRotationPolicy { - fn describe_type(mut writer: W) -> fmt::Result { + fn describe_type(mut writer: W) -> core::fmt::Result { write!(writer, "The log rotation policy") } } diff --git a/ballista/executor/Cargo.toml b/ballista/executor/Cargo.toml index f3ae49f1e..6a2dfa619 100644 --- a/ballista/executor/Cargo.toml +++ b/ballista/executor/Cargo.toml @@ -35,7 +35,7 @@ path = "src/bin/main.rs" required-features = ["build-binary"] [features] -build-binary = ["configure_me", "tracing-subscriber", "tracing-appender", "tracing"] +build-binary = ["configure_me", "tracing-subscriber", "tracing-appender", "tracing", "ballista-core/build-binary"] default = ["build-binary", "mimalloc"] [dependencies] diff --git a/ballista/scheduler/Cargo.toml b/ballista/scheduler/Cargo.toml index d49f7684f..fc3ca09a8 100644 --- a/ballista/scheduler/Cargo.toml +++ b/ballista/scheduler/Cargo.toml @@ -35,9 +35,9 @@ path = "src/bin/main.rs" required-features = ["build-binary"] [features] -build-binary = ["configure_me", "tracing-subscriber", "tracing-appender", "tracing"] +build-binary = ["configure_me", "clap", "tracing-subscriber", "tracing-appender", "tracing", "ballista-core/build-binary"] default = ["build-binary"] -flight-sql = [] +flight-sql = ["base64"] keda-scaler = [] prometheus-metrics = ["prometheus", "once_cell"] rest-api = [] @@ -47,14 +47,13 @@ arrow-flight = { workspace = true } async-trait = { workspace = true } axum = "0.7.7" ballista-core = { path = "../core", version = "0.12.0" } -base64 = { version = "0.22" } -clap = { workspace = true } +base64 = { version = "0.22", optional = true } +clap = { workspace = true, optional = true } configure_me = { workspace = true, optional = true } dashmap = { workspace = true } datafusion = { workspace = true } datafusion-proto = { workspace = true } futures = { workspace = true } -graphviz-rust = "0.9.0" http = "1.1" log = { workspace = true } object_store = { workspace = true } @@ -74,7 +73,6 @@ tracing-subscriber = { workspace = true, optional = true } uuid = { workspace = true } [dev-dependencies] -ballista-core = { path = "../core", version = "0.12.0" } [build-dependencies] configure_me_codegen = { workspace = true } diff --git a/ballista/scheduler/src/config.rs b/ballista/scheduler/src/config.rs index 5d229c640..b221ecb65 100644 --- a/ballista/scheduler/src/config.rs +++ b/ballista/scheduler/src/config.rs @@ -20,7 +20,6 @@ use crate::SessionBuilder; use ballista_core::{config::TaskSchedulingPolicy, ConfigProducer}; -use clap::ValueEnum; use datafusion_proto::logical_plan::LogicalExtensionCodec; use datafusion_proto::physical_plan::PhysicalExtensionCodec; use std::sync::Arc; @@ -211,7 +210,8 @@ pub enum ClusterStorageConfig { /// Policy of distributing tasks to available executor slots /// /// It needs to be visible to code generated by configure_me -#[derive(Clone, ValueEnum, Copy, Debug, serde::Deserialize)] +#[derive(Clone, Copy, Debug, serde::Deserialize)] +#[cfg_attr(feature = "build-binary", derive(clap::ValueEnum))] pub enum TaskDistribution { /// Eagerly assign tasks to executor slots. This will assign as many task slots per executor /// as are currently available @@ -226,11 +226,12 @@ pub enum TaskDistribution { ConsistentHash, } +#[cfg(feature = "build-binary")] impl std::str::FromStr for TaskDistribution { type Err = String; fn from_str(s: &str) -> std::result::Result { - ValueEnum::from_str(s, true) + clap::ValueEnum::from_str(s, true) } } diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 4701e9c3c..941ec8498 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -25,7 +25,6 @@ homepage = "https://github.com/apache/arrow-ballista" repository = "https://github.com/apache/arrow-ballista" license = "Apache-2.0" publish = false -rust-version = "1.72" [features] ci = [] diff --git a/examples/Cargo.toml b/examples/Cargo.toml index bf9d51548..743ff8264 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -26,7 +26,6 @@ license = "Apache-2.0" keywords = ["arrow", "distributed", "query", "sql"] edition = "2021" publish = false -rust-version = "1.72" [[example]] name = "standalone_sql" diff --git a/python/Cargo.toml b/python/Cargo.toml index 7123ccc05..f70838226 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -25,7 +25,6 @@ description = "Apache Arrow Ballista Python Client" readme = "README.md" license = "Apache-2.0" edition = "2021" -rust-version = "1.72" include = ["/src", "/ballista", "/LICENSE.txt", "pyproject.toml", "Cargo.toml", "Cargo.lock"] publish = false