Repository navigation
feat(results): make Arrow LZ4 compression configurable #1476
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (c) 2026 Databricks, Inc. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # End-to-end tests against a live Databricks workspace. | |
| # | |
| # The `e2e` job covers the v0 surface (Session::open, execute, | |
| # submit, await_result, metadata) via PAT + OAuth M2M. OAuth U2M is | |
| # intentionally absent: it requires a browser flow that can't run in | |
| # CI; `tests/oauth_u2m_integration.rs` covers it on developer | |
| # machines. | |
| # | |
| # The `tls` job covers `TlsConfig` (custom CA + accept-self-signed) | |
| # end-to-end through an intercepting mitmproxy. Full HTTP proxy | |
| # coverage (driving `SessionBuilder::proxy` directly) lands with the | |
| # v0.1 work that fleshes out the reserved `ProxyConfig` in | |
| # `src/config.rs`. Tracked in `docs/migration-plan.md` §7. | |
| name: Rust E2E Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "tests/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/rust-e2e.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "tests/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/rust-e2e.yml" | |
| concurrency: | |
| group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-rust-e2e | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| id-token: write | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| e2e: | |
| name: "v0 E2E surface" | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: | |
| group: databricks-protected-runner-group | |
| labels: linux-ubuntu-latest | |
| environment: azure-prod | |
| env: | |
| DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} | |
| DATABRICKS_HTTP_PATH: ${{ secrets.DATABRICKS_HTTP_PATH }} | |
| DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} | |
| DATABRICKS_TEST_CLIENT_ID: ${{ secrets.DATABRICKS_TEST_CLIENT_ID }} | |
| DATABRICKS_TEST_CLIENT_SECRET: ${{ secrets.DATABRICKS_TEST_CLIENT_SECRET }} | |
| RUST_LOG: databricks_sql_kernel=debug | |
| RUST_BACKTRACE: 1 | |
| RUSTC_WRAPPER: sccache | |
| SCCACHE_GHA_ENABLED: "true" | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup-jfrog | |
| with: | |
| cargo: "true" | |
| - uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 | |
| - name: Setup sccache | |
| uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - name: Run v0 E2E tests | |
| run: | | |
| for suite in v0_session_e2e v0_execute_e2e v0_async_execute_e2e v0_metadata_e2e v0_query_tags_headers_e2e; do | |
| echo "::group::cargo test --test ${suite}" | |
| cargo test --test "${suite}" -- --ignored --nocapture | |
| echo "::endgroup::" | |
| done | |
| # TLS end-to-end coverage: drive the v0 `Session` surface through an | |
| # intercepting HTTPS proxy (mitmproxy) so the kernel's `TlsConfig` | |
| # plumbing is exercised against a REAL TLS handshake to a live | |
| # workspace, not just unit-level reqwest-builder construction. | |
| # | |
| # mitmproxy re-signs every connection with its own CA. A default | |
| # (strict) client sees an untrusted cert and fails; supplying the | |
| # CA via `TlsConfig::custom_ca_cert` — or disabling validation via | |
| # `accept_self_signed` — makes the round-trip succeed. The three | |
| # `#[ignore]`d tests in `tests/v0_tls_e2e.rs` cover exactly those | |
| # outcomes. Ported from `adbc-drivers/databricks`'s `tls_e2e.rs`. | |
| # | |
| # The v0 public `ProxyConfig` is still reserved, so we route traffic | |
| # by setting `HTTPS_PROXY` (which reqwest honours by default) rather | |
| # than through `SessionBuilder::proxy`. When the v0 proxy surface | |
| # lands, drive the proxy explicitly and add a fourth test. | |
| tls: | |
| name: "v0 TLS (mitmproxy)" | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: | |
| group: databricks-protected-runner-group | |
| labels: linux-ubuntu-latest | |
| environment: azure-prod | |
| env: | |
| DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} | |
| DATABRICKS_HTTP_PATH: ${{ secrets.DATABRICKS_HTTP_PATH }} | |
| DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} | |
| DATABRICKS_TEST_CLIENT_ID: ${{ secrets.DATABRICKS_TEST_CLIENT_ID }} | |
| DATABRICKS_TEST_CLIENT_SECRET: ${{ secrets.DATABRICKS_TEST_CLIENT_SECRET }} | |
| RUST_LOG: databricks_sql_kernel=debug | |
| RUST_BACKTRACE: 1 | |
| RUSTC_WRAPPER: sccache | |
| SCCACHE_GHA_ENABLED: "true" | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup-jfrog | |
| with: | |
| cargo: "true" | |
| - uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 | |
| - name: Setup sccache | |
| uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - name: Start mitmproxy | |
| run: | | |
| docker run -d --name mitmproxy \ | |
| -p 8080:8080 \ | |
| mitmproxy/mitmproxy:12.2.1@sha256:743b6cdc817211d64bc269f5defacca8d14e76e647fc474e5c7244dbcb645141 \ | |
| mitmdump --set stream_large_bodies=0 | |
| for i in $(seq 1 15); do | |
| if docker exec mitmproxy test -f /home/mitmproxy/.mitmproxy/mitmproxy-ca-cert.pem 2>/dev/null; then | |
| echo "mitmproxy CA cert is ready" | |
| break | |
| fi | |
| echo "Waiting for mitmproxy CA cert... ($i/15)" | |
| sleep 1 | |
| done | |
| - name: Extract mitmproxy CA certificate | |
| run: | | |
| docker cp mitmproxy:/home/mitmproxy/.mitmproxy/mitmproxy-ca-cert.pem /tmp/mitmproxy-ca-cert.pem | |
| echo "MITMPROXY_CA_CERT=/tmp/mitmproxy-ca-cert.pem" >> "$GITHUB_ENV" | |
| echo "Extracted mitmproxy CA cert:" | |
| openssl x509 -in /tmp/mitmproxy-ca-cert.pem -noout -subject -issuer | |
| # Compile the test binary BEFORE the proxy is in scope. The | |
| # protected runner reaches crates via the JFrog proxy, so cargo's | |
| # registry fetch must NOT be routed through mitmproxy (which can't | |
| # reach the internal registry and would intercept it with an | |
| # untrusted cert). We set HTTPS_PROXY only on the run step below. | |
| - name: Build v0 TLS E2E test binary | |
| run: cargo test --test v0_tls_e2e --no-run | |
| - name: Run v0 TLS E2E tests | |
| # HTTPS_PROXY is scoped to THIS step so only the test's own HTTP | |
| # traffic flows through mitmproxy. `--no-run` already fetched + | |
| # compiled everything, so cargo needs no registry access here. | |
| env: | |
| HTTPS_PROXY: http://localhost:8080 | |
| run: cargo test --test v0_tls_e2e -- --ignored --nocapture | |
| - name: Verify traffic flowed through mitmproxy | |
| if: always() | |
| run: | | |
| echo "=== mitmproxy logs (tail) ===" | |
| docker logs mitmproxy 2>&1 | tail -50 | |
| echo "=== checking for proxied-connection entries ===" | |
| docker logs mitmproxy 2>&1 \ | |
| | grep -i "CONNECT\|clientconnect\|<<" \ | |
| || (echo "FAIL: no traffic in mitmproxy logs — proxy was not used" && exit 1) | |
| - name: Cleanup mitmproxy | |
| if: always() | |
| run: docker rm -f mitmproxy 2>/dev/null || true |