Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
77 changes: 65 additions & 12 deletions .github/workflows/rust-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ env:
jobs:
test:
runs-on: ubuntu-24.04
# The focused HA suite builds a second feature graph after workspace tests;
# cold native dependency builds can exhaust 30 minutes before HA tests run.
# Keep workspace tests independent of the optional feature build graphs.
timeout-minutes: 60
strategy:
matrix:
Expand Down Expand Up @@ -60,18 +59,30 @@ jobs:
# regression test was dead weight in CI. `--workspace` covers the crates
# that were silently untested (api, server, client, metrics, the facade).
run: cargo test --workspace --all-targets

wal-tests:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup rust toolchain
run: |
rustup toolchain install stable
rustup default stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: "lance-context-wal-deps"
workspaces: "."
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y clang libclang-dev protobuf-compiler
- name: WAL component correctness smoke tests
run: |
cargo run -p lance-context-wal --features lab --bin context-wal-lab -- codec --payload-bytes 1024 --rows 8 --iterations 2
cargo test -p lance-context-wal --features lab --bin context-wal-lab
cargo test -p lance-context-wal --features lab --test engine_cache
cargo run -p lance-context-wal --features lab --bin context-wal-lab -- disk --directory "$RUNNER_TEMP/wal-disk-smoke" --payload-bytes 1024 --batch 4 --writers 2 --groups-per-writer 2 --rounds 8
- name: Optional Lance object-store metrics
run: |
cargo test -p lance-context-core --features lance-io-metrics --test lance_io_metrics
cargo test -p lance-context-core --all-features --lib latency_histograms_carry_only_bounded_labels
cargo check -p lance-context-server --features lance-io-metrics
cargo check -p lance-context-core --no-default-features
- name: WAL placement, admission, record, contract and IPC decoding tests
run: |
cargo test -p lance-context-wal --features placement,admission,ipc,record,arrow-contract,vectored-io --lib
Expand All @@ -90,10 +101,6 @@ jobs:
run: |
cargo clippy -p lance-context-wal --features peer-transport --all-targets -- -D warnings
cargo test -p lance-context-wal --features peer-transport --lib --test replication_process
- name: Prepared WAL descriptors with real Lance files and process recovery
run: |
cargo test -p lance-context-wal --features lance-integration --lib replication::publication::lance
cargo test -p lance-context-wal --features lance-integration --test replication_process lance_publication
- name: WAL resource observation in a container cgroup namespace
run: |
cargo test -p lance-context-wal --features runner --test resource --no-run --message-format=json > "$RUNNER_TEMP/wal-resource-build.jsonl"
Expand All @@ -105,6 +112,52 @@ jobs:
mount -t cgroup2 cgroup2 /sys/fs/cgroup
exec setpriv --reuid "$1" --regid "$2" --clear-groups --no-new-privs "$3"
' sh "$(id -u)" "$(id -g)" "$wal_resource_test"

lance-tests:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup rust toolchain
run: |
rustup toolchain install stable
rustup default stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: "lance-context-lance-deps"
workspaces: "."
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y clang libclang-dev protobuf-compiler
- name: Optional Lance object-store metrics
run: |
cargo test -p lance-context-core --features lance-io-metrics --test lance_io_metrics
cargo test -p lance-context-core --all-features --lib latency_histograms_carry_only_bounded_labels
cargo check -p lance-context-server --features lance-io-metrics
cargo check -p lance-context-core --no-default-features
- name: Prepared WAL descriptors with real Lance files and process recovery
run: |
cargo test -p lance-context-wal --features lance-integration --lib replication::publication::lance
cargo test -p lance-context-wal --features lance-integration --test replication_process lance_publication

ha-tests:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup rust toolchain
run: |
rustup toolchain install stable
rustup default stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: "lance-context-ha-deps"
workspaces: "."
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y clang libclang-dev protobuf-compiler
- name: Start etcd for HA scheduler test
run: |
ETCD_VERSION=3.7.0
Expand Down
6 changes: 4 additions & 2 deletions crates/lance-context-wal/src/replication/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use super::{producer, publication as p, query, source, Node, Outcome, Packet, St
use crate::record::{Batch, RecordKind};
use anyhow::{ensure, Context, Result};
use protobuf::Message as _;
use serde::Serialize;
use serde::{Deserialize, Serialize};
use std::{
collections::BTreeMap,
future::Future,
Expand All @@ -28,6 +28,8 @@ use std::{
};
use tokio::sync::{mpsc as async_mpsc, oneshot, OwnedSemaphorePermit, Semaphore};

#[cfg(feature = "peer-transport")]
pub mod client;
mod images;
#[cfg(feature = "peer-transport")]
pub mod peer;
Expand Down Expand Up @@ -85,7 +87,7 @@ impl Options {

/// Typed commands preserve Node's existing validation and durable formats.
/// This scheduling enum is not a network or persisted wire format.
#[derive(Debug, Serialize)]
#[derive(Clone, Debug, Serialize, Deserialize)]
pub enum Command {
Append { group: u64, batch: Batch },
Acquire(p::Acquire),
Expand Down
Loading
Loading