From f9a4d86503c29b993a8274b3893f45a24178c8b0 Mon Sep 17 00:00:00 2001 From: Matthew Turner Date: Wed, 9 Apr 2025 09:49:56 -0400 Subject: [PATCH 1/2] Consolidate auth testing --- .github/workflows/test.yml | 40 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fce02d14..235e5b50 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -271,8 +271,8 @@ jobs: - name: Run UDFs WASM tests run: | cargo test --manifest-path crates/datafusion-udfs-wasm/Cargo.toml - test-auth-basic: - name: Extension / Auth-Basic + test-auth: + name: Extension / Auth-Basic-Bearer runs-on: ubuntu-latest strategy: matrix: @@ -293,38 +293,20 @@ jobs: key: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.lock') }} - name: Setup Rust Toolchain uses: ./.github/actions/setup-rust - - name: Start FlightSQL Server + - name: Start FlightSQL Server with Basic Auth run: | - cargo r --features=flightsql -- serve-flightsql --config data/configs/flightsql_basic.toml & - - name: Run auth tests + cargo r --features=flightsql -- serve-flightsql --config data/configs/flightsql_basic.toml & echo $! > server.pid + - name: Run Basic Auth tests run: | cargo t --features=flightsql extension_cases::auth_basic - test-auth-bearer: - name: Extension / Auth-Bearer - runs-on: ubuntu-latest - strategy: - matrix: - arch: [amd64] - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Cache Cargo - uses: actions/cache@v4 - with: - path: /home/runner/.cargo - key: cargo-dft-cache- - - name: Cache Rust dependencies - uses: actions/cache@v4 - with: - path: target - key: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.lock') }} - - name: Setup Rust Toolchain - uses: ./.github/actions/setup-rust - - name: Start FlightSQL Server + - name: Kill FlightSQL Server + run: | + kill $(cat server.pid) + rm server.pid + - name: Start FlightSQL Server with Bearer Auth run: | cargo r --features=flightsql -- serve-flightsql --config data/configs/flightsql_bearer.toml & - - name: Run auth tests + - name: Run Bearer Auth tests run: | cargo t --features=flightsql extension_cases::auth_bearer test-http-server: From ee142644ff3c678fd367f726dea2e96043e842ac Mon Sep 17 00:00:00 2001 From: Matthew Turner Date: Thu, 10 Apr 2025 08:15:47 -0400 Subject: [PATCH 2/2] Some cleanup --- .github/workflows/test.yml | 3 ++- crates/datafusion-app/Cargo.toml | 2 ++ crates/datafusion-app/src/extensions/mod.rs | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 235e5b50..919f7f09 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -272,7 +272,7 @@ jobs: run: | cargo test --manifest-path crates/datafusion-udfs-wasm/Cargo.toml test-auth: - name: Extension / Auth-Basic-Bearer + name: Extension / Auth runs-on: ubuntu-latest strategy: matrix: @@ -293,6 +293,7 @@ jobs: key: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.lock') }} - name: Setup Rust Toolchain uses: ./.github/actions/setup-rust + # Right now basic and bearer auth can not be used at the same time. So we serve an instance with one, then kill it, then serve an instance with another. An alternative, perhaps simpler option, would be configuring the ports used - but this would come at the cost of a more annoying local dev experience as you have to remember to keep updating the ports. - name: Start FlightSQL Server with Basic Auth run: | cargo r --features=flightsql -- serve-flightsql --config data/configs/flightsql_basic.toml & echo $! > server.pid diff --git a/crates/datafusion-app/Cargo.toml b/crates/datafusion-app/Cargo.toml index cff7f0a8..181356dc 100644 --- a/crates/datafusion-app/Cargo.toml +++ b/crates/datafusion-app/Cargo.toml @@ -3,6 +3,8 @@ edition = "2021" name = "datafusion-app" version = "0.1.0" +# Leaving Hudi and Iceberg around in case traction on those picks up. It would be better if I just remove them from main and create PRs with the diff - maybe ill get around to that. + [dependencies] arrow-flight = { version = "54.1.0", features = [ "flight-sql-experimental", diff --git a/crates/datafusion-app/src/extensions/mod.rs b/crates/datafusion-app/src/extensions/mod.rs index 5897c7d4..b25d4cca 100644 --- a/crates/datafusion-app/src/extensions/mod.rs +++ b/crates/datafusion-app/src/extensions/mod.rs @@ -62,8 +62,8 @@ pub fn enabled_extensions() -> Vec> { Arc::new(deltalake::DeltaLakeExtension::new()), // #[cfg(feature = "hudi")] // Arc::new(hudi::HudiExtension::new()), - #[cfg(feature = "iceberg")] - Arc::new(iceberg::IcebergExtension::new()), + // #[cfg(feature = "iceberg")] + // Arc::new(iceberg::IcebergExtension::new()), #[cfg(feature = "huggingface")] Arc::new(huggingface::HuggingFaceExtension::new()), ]