Skip to content

Commit

Permalink
cleanup features & fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lewiszlw committed Jan 2, 2024
1 parent 5826f54 commit 186378a
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 68 deletions.
46 changes: 1 addition & 45 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion ballista/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 3 additions & 10 deletions ballista/scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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"
Expand All @@ -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 }
Expand Down
3 changes: 0 additions & 3 deletions ballista/scheduler/src/cluster/kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand All @@ -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)
Expand All @@ -708,7 +706,6 @@ mod test {
Ok(())
}

#[cfg(feature = "sled")]
fn make_sled_state() -> Result<KeyValueState<SledClient>> {
Ok(KeyValueState::new(
"",
Expand Down
2 changes: 0 additions & 2 deletions ballista/scheduler/src/cluster/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions ballista/scheduler/src/cluster/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion ballista/scheduler/src/cluster/storage/sled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 0 additions & 2 deletions ballista/scheduler/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ impl SchedulerConfig {
#[derive(Clone, Debug)]
pub enum ClusterStorageConfig {
Memory,
#[cfg(feature = "etcd")]
Etcd(Vec<String>),
#[cfg(feature = "sled")]
Sled(Option<String>),
}

Expand Down
2 changes: 1 addition & 1 deletion ballista/scheduler/src/scheduler_server/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan> SchedulerGrpc
}
}

#[cfg(all(test, feature = "sled"))]
#[cfg(test)]
mod test {
use std::sync::Arc;
use std::time::Duration;
Expand Down
2 changes: 1 addition & 1 deletion ballista/scheduler/src/scheduler_server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 186378a

Please sign in to comment.