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
11 changes: 11 additions & 0 deletions .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Go CI

on:
workflow_call:
inputs:
use_local_sdk:
description: 'Override databricks-zerobus-ingest-sdk with the local path dep (for integration testing unreleased Rust changes)'
type: boolean
default: false

jobs:
fmt:
Expand Down Expand Up @@ -75,6 +80,10 @@ jobs:
with:
targets: x86_64-pc-windows-gnu

- name: Patch Rust workspace to use local SDK
if: inputs.use_local_sdk
run: printf '\n[patch.crates-io]\ndatabricks-zerobus-ingest-sdk = { path = "sdk" }\n' >> ../rust/Cargo.toml

- name: Build Rust FFI
run: make build-rust

Expand All @@ -88,6 +97,8 @@ jobs:
run: make examples

user-experience:
# Skip when testing local SDK — this job tests the published release download flow
if: ${{ !inputs.use_local_sdk }}
strategy:
fail-fast: false
matrix:
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/ci-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: Java CI

on:
workflow_call:
inputs:
use_local_sdk:
description: 'Override databricks-zerobus-ingest-sdk with the local path dep (for integration testing unreleased Rust changes)'
type: boolean
default: false
artifact_suffix:
description: 'Suffix to append to artifact names to avoid conflicts when called multiple times in one workflow run'
type: string
default: ''

jobs:
fmt:
Expand Down Expand Up @@ -49,6 +58,11 @@ jobs:
java-version: ${{ matrix.javaVersion }}
distribution: 'temurin'
cache: 'maven'
- name: Patch Rust workspace to use local SDK
if: inputs.use_local_sdk
shell: bash
run: printf '\n[patch.crates-io]\ndatabricks-zerobus-ingest-sdk = { path = "sdk" }\n' >> ../rust/Cargo.toml

- name: Build with Maven
run: mvn clean compile
- name: Run tests
Expand All @@ -57,7 +71,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}-java-${{ matrix.javaVersion }}
name: test-results-${{ matrix.os }}-java-${{ matrix.javaVersion }}${{ inputs.artifact_suffix }}
path: |
java/target/surefire-reports/
java/target/test-classes/
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Python CI

on:
workflow_call:
inputs:
use_local_sdk:
description: 'Override databricks-zerobus-ingest-sdk with the local path dep (for integration testing unreleased Rust changes)'
type: boolean
default: false

jobs:
test:
Expand Down Expand Up @@ -29,6 +34,12 @@ jobs:
- name: Copy root LICENSE for maturin
run: cp ../LICENSE LICENSE

- name: Patch Cargo.toml to use local Rust SDK
if: inputs.use_local_sdk
working-directory: python/rust
run: |
printf '\n[patch.crates-io]\ndatabricks-zerobus-ingest-sdk = { path = "../../rust/sdk" }\n' >> Cargo.toml

- name: Run tests
run: make dev test

Expand Down
29 changes: 28 additions & 1 deletion .github/workflows/ci-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: TypeScript CI

on:
workflow_call:
inputs:
use_local_sdk:
description: 'Override databricks-zerobus-ingest-sdk with the local path dep (for integration testing unreleased Rust changes)'
type: boolean
default: false
artifact_suffix:
description: 'Suffix to append to artifact names to avoid conflicts when called multiple times in one workflow run'
type: string
default: ''

jobs:
build:
Expand Down Expand Up @@ -67,6 +76,15 @@ jobs:
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

- name: Patch Cargo.toml to use local Rust SDK (Unix)
if: inputs.use_local_sdk && runner.os != 'Windows'
run: printf '\n[patch.crates-io]\ndatabricks-zerobus-ingest-sdk = { path = "../rust/sdk" }\n' >> Cargo.toml

- name: Patch Cargo.toml to use local Rust SDK (Windows)
if: inputs.use_local_sdk && runner.os == 'Windows'
run: Add-Content -Path Cargo.toml -Value "`n[patch.crates-io]`ndatabricks-zerobus-ingest-sdk = { path = `"../rust/sdk`" }`n"
shell: powershell

- name: Install dependencies
run: npm ci

Expand All @@ -78,7 +96,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
name: bindings-${{ matrix.settings.target }}${{ inputs.artifact_suffix }}
path: 'typescript/*.node'
if-no-files-found: error

Expand Down Expand Up @@ -120,6 +138,15 @@ jobs:
echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: powershell

- name: Patch Cargo.toml to use local Rust SDK (Unix)
if: inputs.use_local_sdk && runner.os != 'Windows'
run: printf '\n[patch.crates-io]\ndatabricks-zerobus-ingest-sdk = { path = "../rust/sdk" }\n' >> Cargo.toml

- name: Patch Cargo.toml to use local Rust SDK (Windows)
if: inputs.use_local_sdk && runner.os == 'Windows'
run: Add-Content -Path Cargo.toml -Value "`n[patch.crates-io]`ndatabricks-zerobus-ingest-sdk = { path = `"../rust/sdk`" }`n"
shell: powershell

- name: Install dependencies
run: npm ci

Expand Down
57 changes: 47 additions & 10 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ jobs:
if: always()
steps:
- run: |
if [[ "${{ needs.rust.result }}" == "failure" ]] || \
[[ "${{ needs.java.result }}" == "failure" ]] || \
[[ "${{ needs.typescript.result }}" == "failure" ]] || \
[[ "${{ needs.python.result }}" == "failure" ]] || \
[[ "${{ needs.go.result }}" == "failure" ]]; then
exit 1
fi
for result in \
"${{ needs.rust.result }}" \
"${{ needs.java.result }}" \
"${{ needs.typescript.result }}" \
"${{ needs.python.result }}" \
"${{ needs.go.result }}"; do
if [[ "$result" != "success" && "$result" != "skipped" ]]; then
echo "Job failed or was cancelled: $result"
exit 1
fi
done

changes:
runs-on:
Expand Down Expand Up @@ -55,6 +59,7 @@ jobs:
- 'go/**'
- '.github/workflows/ci-go.yml'

# Blocking jobs — required for merge
rust:
needs: changes
if: needs.changes.outputs.rust == 'true'
Expand All @@ -69,14 +74,46 @@ jobs:
needs: changes
if: needs.changes.outputs.typescript == 'true'
uses: ./.github/workflows/ci-typescript.yml

python:
needs: changes
if: needs.changes.outputs.python == 'true'
uses: ./.github/workflows/ci-python.yml

go:
needs: changes
if: needs.changes.outputs.go == 'true'
uses: ./.github/workflows/ci-go.yml


# Non-blocking cross-SDK jobs — run all SDK tests against the local Rust
# source when rust/** changes, to catch breakage before a new FFI release.
# These are intentionally excluded from `gate` so they don't block merging.
cross-sdk-go:
needs: changes
if: needs.changes.outputs.rust == 'true'
uses: ./.github/workflows/ci-go.yml
with:
use_local_sdk: true

cross-sdk-python:
needs: changes
if: needs.changes.outputs.rust == 'true'
uses: ./.github/workflows/ci-python.yml
with:
use_local_sdk: true

cross-sdk-typescript:
needs: changes
if: needs.changes.outputs.rust == 'true'
uses: ./.github/workflows/ci-typescript.yml
with:
use_local_sdk: true
artifact_suffix: '-local-sdk'

cross-sdk-java:
needs: changes
if: needs.changes.outputs.rust == 'true'
uses: ./.github/workflows/ci-java.yml
with:
use_local_sdk: true
artifact_suffix: '-local-sdk'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# IDE
.idea/
*/flycheck*
*.iml
*.iws
*.ipr
Expand Down
2 changes: 1 addition & 1 deletion rust/ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["staticlib"]

[dependencies]
# Core SDK logic - use local path dependency
databricks-zerobus-ingest-sdk = { path = "../sdk", features = ["arrow-flight", "testing"] }
databricks-zerobus-ingest-sdk = { version="1.0.1", features = ["arrow-flight", "testing"] }

# Arrow IPC for serializing/deserializing RecordBatches across the FFI boundary
arrow-ipc = { version = "56.2.0", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion rust/jni/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ crate-type = ["cdylib"]
name = "zerobus_jni"

[dependencies]
databricks-zerobus-ingest-sdk = { path = "../sdk", features = ["arrow-flight"] }
databricks-zerobus-ingest-sdk = { version = "1.0.1", features = ["arrow-flight"] }
jni = "0.21"
tokio = { version = "1.42", features = ["rt-multi-thread", "sync"] }
prost = "0.13"
Expand Down
Loading