Skip to content

Commit a4899fb

Browse files
Consolidate auth testing (#315)
1 parent 13e3a41 commit a4899fb

3 files changed

Lines changed: 16 additions & 31 deletions

File tree

.github/workflows/test.yml

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ jobs:
271271
- name: Run UDFs WASM tests
272272
run: |
273273
cargo test --manifest-path crates/datafusion-udfs-wasm/Cargo.toml
274-
test-auth-basic:
275-
name: Extension / Auth-Basic
274+
test-auth:
275+
name: Extension / Auth
276276
runs-on: ubuntu-latest
277277
strategy:
278278
matrix:
@@ -293,38 +293,21 @@ jobs:
293293
key: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.lock') }}
294294
- name: Setup Rust Toolchain
295295
uses: ./.github/actions/setup-rust
296-
- name: Start FlightSQL Server
296+
# 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.
297+
- name: Start FlightSQL Server with Basic Auth
297298
run: |
298-
cargo r --features=flightsql -- serve-flightsql --config data/configs/flightsql_basic.toml &
299-
- name: Run auth tests
299+
cargo r --features=flightsql -- serve-flightsql --config data/configs/flightsql_basic.toml & echo $! > server.pid
300+
- name: Run Basic Auth tests
300301
run: |
301302
cargo t --features=flightsql extension_cases::auth_basic
302-
test-auth-bearer:
303-
name: Extension / Auth-Bearer
304-
runs-on: ubuntu-latest
305-
strategy:
306-
matrix:
307-
arch: [amd64]
308-
steps:
309-
- uses: actions/checkout@v2
310-
with:
311-
submodules: true
312-
- name: Cache Cargo
313-
uses: actions/cache@v4
314-
with:
315-
path: /home/runner/.cargo
316-
key: cargo-dft-cache-
317-
- name: Cache Rust dependencies
318-
uses: actions/cache@v4
319-
with:
320-
path: target
321-
key: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.lock') }}
322-
- name: Setup Rust Toolchain
323-
uses: ./.github/actions/setup-rust
324-
- name: Start FlightSQL Server
303+
- name: Kill FlightSQL Server
304+
run: |
305+
kill $(cat server.pid)
306+
rm server.pid
307+
- name: Start FlightSQL Server with Bearer Auth
325308
run: |
326309
cargo r --features=flightsql -- serve-flightsql --config data/configs/flightsql_bearer.toml &
327-
- name: Run auth tests
310+
- name: Run Bearer Auth tests
328311
run: |
329312
cargo t --features=flightsql extension_cases::auth_bearer
330313
test-http-server:

crates/datafusion-app/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ edition = "2021"
33
name = "datafusion-app"
44
version = "0.1.0"
55

6+
# 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.
7+
68
[dependencies]
79
arrow-flight = { version = "54.1.0", features = [
810
"flight-sql-experimental",

crates/datafusion-app/src/extensions/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ pub fn enabled_extensions() -> Vec<Arc<dyn Extension>> {
6262
Arc::new(deltalake::DeltaLakeExtension::new()),
6363
// #[cfg(feature = "hudi")]
6464
// Arc::new(hudi::HudiExtension::new()),
65-
#[cfg(feature = "iceberg")]
66-
Arc::new(iceberg::IcebergExtension::new()),
65+
// #[cfg(feature = "iceberg")]
66+
// Arc::new(iceberg::IcebergExtension::new()),
6767
#[cfg(feature = "huggingface")]
6868
Arc::new(huggingface::HuggingFaceExtension::new()),
6969
]

0 commit comments

Comments
 (0)