diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 74a18514c..7d8390a18 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -213,7 +213,7 @@ jobs: export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data cd ballista # snmalloc requires cmake so build without default features - cargo test --no-default-features --features sled + cargo test env: CARGO_HOME: "/github/home/.cargo" CARGO_TARGET_DIR: "/github/home/target" @@ -270,50 +270,6 @@ jobs: # do not produce debug symbols to keep memory usage down RUSTFLAGS: "-C debuginfo=0" - # verify that the benchmark queries return the correct results - verify-benchmark-results: - name: verify benchmark results (amd64) - needs: [linux-build-lib] - runs-on: ubuntu-latest - strategy: - matrix: - arch: [amd64] - rust: [stable] - container: - image: ${{ matrix.arch }}/rust - env: - # Disable full debug symbol generation to speed up CI build and keep memory down - # "1" means line tables only, which is useful for panic tracebacks. - RUSTFLAGS: "-C debuginfo=1" - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Install protobuf compiler - shell: bash - run: | - apt-get -qq update && apt-get -y -qq install protobuf-compiler - protoc --version - - name: Cache Cargo - uses: actions/cache@v3 - with: - path: /github/home/.cargo - # this key equals the ones on `linux-build-lib` for re-use - key: cargo-cache- - - name: Cache Rust dependencies - uses: actions/cache@v3 - with: - path: /github/home/target - # this key equals the ones on `linux-build-lib` for re-use - key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }} - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: ${{ matrix.rust }} - - name: Verify that benchmark queries return expected results - run: | - cargo test --package ballista-benchmarks --profile release-nonlto --features=ci -- --test-threads=1 - lint: name: Lint runs-on: ubuntu-latest diff --git a/ballista/core/Cargo.toml b/ballista/core/Cargo.toml index f7a4873fb..a06dd5014 100644 --- a/ballista/core/Cargo.toml +++ b/ballista/core/Cargo.toml @@ -53,7 +53,6 @@ hashbrown = "0.14" itertools = "0.12" log = "0.4" md-5 = { version = "^0.10.0" } -once_cell = "1.9.0" parking_lot = "0.12" parse_arg = "0.1.3" diff --git a/ballista/scheduler/Cargo.toml b/ballista/scheduler/Cargo.toml index 91a9d9cee..1d0e5ace7 100644 --- a/ballista/scheduler/Cargo.toml +++ b/ballista/scheduler/Cargo.toml @@ -33,12 +33,6 @@ scheduler = "scheduler_config_spec.toml" name = "ballista-scheduler" path = "src/bin/main.rs" -[features] -default = ["etcd", "sled"] -etcd = ["etcd-client"] -sled = ["sled_package", "tokio-stream"] - - [dependencies] anyhow = "1" arrow-flight = { workspace = true } @@ -51,7 +45,7 @@ configure_me = { workspace = true } dashmap = "5.4.0" datafusion = { workspace = true } datafusion-proto = { workspace = true } -etcd-client = { version = "0.12", optional = true } +etcd-client = { version = "0.12" } flatbuffers = { version = "23.5.26" } futures = "0.3" graphviz-rust = "0.6.1" @@ -61,16 +55,15 @@ hyper = "0.14.4" itertools = "0.12.0" log = "0.4" object_store = { workspace = true } -once_cell = { version = "1.16.0", optional = true } parking_lot = "0.12" parse_arg = "0.1.3" prost = "0.12" prost-types = { version = "0.12.0" } rand = "0.8" serde = { version = "1", features = ["derive"] } -sled_package = { package = "sled", version = "0.34", optional = true } +sled = { version = "0.34" } tokio = { version = "1.0", features = ["full"] } -tokio-stream = { version = "0.1", features = ["net"], optional = true } +tokio-stream = { version = "0.1", features = ["net"] } tonic = { workspace = true } tower = { version = "0.4" } tracing = { workspace = true } diff --git a/ballista/scheduler/src/cluster/kv.rs b/ballista/scheduler/src/cluster/kv.rs index 9ba1af9ca..db07a752d 100644 --- a/ballista/scheduler/src/cluster/kv.rs +++ b/ballista/scheduler/src/cluster/kv.rs @@ -683,7 +683,6 @@ mod test { use ballista_core::serde::BallistaCodec; use ballista_core::utils::default_session_builder; - #[cfg(feature = "sled")] #[tokio::test] async fn test_sled_job_lifecycle() -> Result<()> { test_job_lifecycle(make_sled_state()?, test_aggregation_plan(4).await).await?; @@ -693,7 +692,6 @@ mod test { Ok(()) } - #[cfg(feature = "sled")] #[tokio::test] async fn test_in_memory_job_planning_failure() -> Result<()> { test_job_planning_failure(make_sled_state()?, test_aggregation_plan(4).await) @@ -708,7 +706,6 @@ mod test { Ok(()) } - #[cfg(feature = "sled")] fn make_sled_state() -> Result> { Ok(KeyValueState::new( "", diff --git a/ballista/scheduler/src/cluster/mod.rs b/ballista/scheduler/src/cluster/mod.rs index 04a37ab1f..128f62873 100644 --- a/ballista/scheduler/src/cluster/mod.rs +++ b/ballista/scheduler/src/cluster/mod.rs @@ -128,7 +128,6 @@ impl BallistaCluster { let scheduler = config.scheduler_name(); match &config.cluster_storage { - #[cfg(feature = "etcd")] ClusterStorageConfig::Etcd(urls) => { let etcd = etcd_client::Client::connect(urls.as_slice(), None) .await @@ -146,7 +145,6 @@ impl BallistaCluster { )) } - #[cfg(feature = "sled")] ClusterStorageConfig::Sled(dir) => { if let Some(dir) = dir.as_ref() { info!("Initializing Sled database in directory {}", dir); diff --git a/ballista/scheduler/src/cluster/storage/mod.rs b/ballista/scheduler/src/cluster/storage/mod.rs index 6aa049c09..8d40237f5 100644 --- a/ballista/scheduler/src/cluster/storage/mod.rs +++ b/ballista/scheduler/src/cluster/storage/mod.rs @@ -15,9 +15,7 @@ // specific language governing permissions and limitations // under the License. -#[cfg(feature = "etcd")] pub mod etcd; -#[cfg(feature = "sled")] pub mod sled; use async_trait::async_trait; diff --git a/ballista/scheduler/src/cluster/storage/sled.rs b/ballista/scheduler/src/cluster/storage/sled.rs index 6be4c504e..bd7580455 100644 --- a/ballista/scheduler/src/cluster/storage/sled.rs +++ b/ballista/scheduler/src/cluster/storage/sled.rs @@ -24,7 +24,6 @@ use crate::cluster::storage::KeyValueStore; use async_trait::async_trait; use futures::{FutureExt, Stream}; use log::warn; -use sled_package as sled; use tokio::sync::Mutex; use crate::cluster::storage::{Keyspace, Lock, Operation, Watch, WatchEvent}; diff --git a/ballista/scheduler/src/config.rs b/ballista/scheduler/src/config.rs index 2162205c7..e3010c6de 100644 --- a/ballista/scheduler/src/config.rs +++ b/ballista/scheduler/src/config.rs @@ -180,9 +180,7 @@ impl SchedulerConfig { #[derive(Clone, Debug)] pub enum ClusterStorageConfig { Memory, - #[cfg(feature = "etcd")] Etcd(Vec), - #[cfg(feature = "sled")] Sled(Option), } diff --git a/ballista/scheduler/src/scheduler_server/grpc.rs b/ballista/scheduler/src/scheduler_server/grpc.rs index d5f96e066..6db3176dc 100644 --- a/ballista/scheduler/src/scheduler_server/grpc.rs +++ b/ballista/scheduler/src/scheduler_server/grpc.rs @@ -540,7 +540,7 @@ impl SchedulerGrpc } } -#[cfg(all(test, feature = "sled"))] +#[cfg(test)] mod test { use std::sync::Arc; use std::time::Duration; diff --git a/ballista/scheduler/src/scheduler_server/mod.rs b/ballista/scheduler/src/scheduler_server/mod.rs index 39a67bffd..b7b0ce1af 100644 --- a/ballista/scheduler/src/scheduler_server/mod.rs +++ b/ballista/scheduler/src/scheduler_server/mod.rs @@ -330,7 +330,7 @@ pub fn timestamp_millis() -> u64 { .as_millis() as u64 } -#[cfg(all(test, feature = "sled"))] +#[cfg(test)] mod test { use std::sync::Arc;