feat: embedded flight proxy explicit config entry (#2288) #547
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
| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you 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. | |
| name: TPC-DS SF1 | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "ballista/**" | |
| - "benchmarks/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - "rust-toolchain.toml" | |
| - ".github/workflows/tpcds.yml" | |
| - ".github/actions/setup-builder/**" | |
| # docs-only changes cannot affect this job; exclusions are applied last | |
| - "!**/*.md" | |
| pull_request: | |
| paths: | |
| - "ballista/**" | |
| - "benchmarks/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - "rust-toolchain.toml" | |
| - ".github/workflows/tpcds.yml" | |
| - ".github/actions/setup-builder/**" | |
| # docs-only changes cannot affect this job; exclusions are applied last | |
| - "!**/*.md" | |
| workflow_dispatch: | |
| jobs: | |
| tpcds-sf1: | |
| name: TPC-DS SF1 (static planner, ${{ matrix.label }}) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: amd64/rust | |
| # A passing leg takes ~7 minutes. Cap the job well under the 6-hour | |
| # default so a hung query fails fast and frees the runner rather than | |
| # sitting for hours with no useful signal. | |
| timeout-minutes: 45 | |
| strategy: | |
| # One red leg must not cancel the other; the two task-packing modes are | |
| # independent signals. | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - label: "1 partition per task" | |
| task_args: "" | |
| slug: "mpt1" | |
| # 4 rather than a larger cap because the scheduler clamps the slice to | |
| # the executor's free vcores (`budget.vcores.min(cap)`), and the | |
| # executor below runs `--concurrent-tasks 4`. A higher cap would be | |
| # unreachable and the label would overstate what is covered. | |
| - label: "4 partitions per task" | |
| task_args: "-c ballista.scheduler.max_partitions_per_task=4" | |
| slug: "mpt4" | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y netcat-traditional | |
| - uses: actions/checkout@v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Rust toolchain | |
| uses: ./.github/actions/setup-builder | |
| with: | |
| rust-version: stable | |
| - uses: swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 #2.9.2 | |
| with: | |
| # Share the build cache across all matrix legs — the compiled | |
| # binaries are identical; only the per-suite CLI args differ. | |
| shared-key: tpcds-sf1 | |
| - name: Build Ballista binaries | |
| run: | | |
| cargo build --profile tpch-ci --locked \ | |
| -p ballista-scheduler \ | |
| -p ballista-executor \ | |
| -p ballista-benchmarks | |
| - name: Install tpcgen-cli | |
| run: | | |
| cargo install --git https://github.com/clflushopt/tpchgen-rs \ | |
| --rev 573fd0018dd1b41e52880162f615e9903418c397 --locked tpcgen-cli | |
| - name: Generate TPC-DS SF1 data | |
| run: | | |
| mkdir -p "$RUNNER_TEMP/tpcds-data" | |
| tpcgen-cli tpcds parquet \ | |
| --scale-factor 1 \ | |
| --output-dir "$RUNNER_TEMP/tpcds-data" | |
| - name: Run TPC-DS queries against Ballista cluster | |
| # Primary timeout, on the step rather than the job, so that a hang | |
| # still runs the log-upload step below and leaves something to | |
| # diagnose. The job-level cap is only a backstop. | |
| timeout-minutes: 30 | |
| env: | |
| DATA_DIR: ${{ runner.temp }}/tpcds-data | |
| WORK_DIR: ${{ runner.temp }}/work | |
| SCHEDULER_LOG: ${{ runner.temp }}/scheduler.log | |
| EXECUTOR_LOG: ${{ runner.temp }}/executor.log | |
| run: | | |
| set -euo pipefail | |
| mkdir -p "$WORK_DIR" | |
| ./target/tpch-ci/ballista-scheduler \ | |
| --bind-host 127.0.0.1 \ | |
| > "$SCHEDULER_LOG" 2>&1 & | |
| SCHEDULER_PID=$! | |
| ./target/tpch-ci/ballista-executor \ | |
| --bind-host 127.0.0.1 \ | |
| --bind-port 50051 \ | |
| --scheduler-host 127.0.0.1 \ | |
| --scheduler-connect-timeout-seconds 10 \ | |
| --concurrent-tasks 4 \ | |
| --memory-pool-size 2GB \ | |
| --work-dir "$WORK_DIR" \ | |
| > "$EXECUTOR_LOG" 2>&1 & | |
| EXECUTOR_PID=$! | |
| cleanup() { | |
| echo "::group::scheduler log (tail)" | |
| tail -n 200 "$SCHEDULER_LOG" || true | |
| echo "::endgroup::" | |
| echo "::group::executor log (tail)" | |
| tail -n 200 "$EXECUTOR_LOG" || true | |
| echo "::endgroup::" | |
| kill "$SCHEDULER_PID" "$EXECUTOR_PID" 2>/dev/null || true | |
| wait "$SCHEDULER_PID" "$EXECUTOR_PID" 2>/dev/null || true | |
| } | |
| trap cleanup EXIT | |
| echo "Waiting for scheduler on 127.0.0.1:50050..." | |
| for _ in $(seq 1 30); do | |
| if nc -z 127.0.0.1 50050; then | |
| break | |
| fi | |
| sleep 1 | |
| done | |
| nc -z 127.0.0.1 50050 || { echo "scheduler did not start"; exit 1; } | |
| echo "Waiting for executor on 127.0.0.1:50051..." | |
| for _ in $(seq 1 30); do | |
| if nc -z 127.0.0.1 50051; then | |
| break | |
| fi | |
| sleep 1 | |
| done | |
| nc -z 127.0.0.1 50051 || { echo "executor did not start"; exit 1; } | |
| # This matrix leg runs the suite under the default (static) planner at | |
| # one task-packing setting. The tpcds binary internally loops all | |
| # non-skipped queries and exits non-zero on any failure, so a single | |
| # invocation covers the whole suite. The other leg runs in parallel. | |
| # | |
| # Coverage for the adaptive planner (AQE on) is being added | |
| # separately; it currently fails on pre-existing bugs. | |
| echo "::group::[static planner, ${{ matrix.label }}] TPC-DS suite" | |
| ./target/tpch-ci/tpcds \ | |
| --host 127.0.0.1 --port 50050 \ | |
| --path "$DATA_DIR" \ | |
| --partitions 16 \ | |
| --verify \ | |
| -c datafusion.optimizer.prefer_hash_join=false \ | |
| ${{ matrix.task_args }} | |
| echo "::endgroup::" | |
| - name: Upload cluster logs on failure | |
| # `!success()` rather than `failure()` so a timed-out or cancelled | |
| # run still surfaces its scheduler/executor logs — the hang case is | |
| # exactly when they are most worth having. | |
| if: ${{ !success() }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tpcds-sf1-cluster-logs-${{ matrix.slug }} | |
| retention-days: 14 | |
| path: | | |
| ${{ runner.temp }}/scheduler.log | |
| ${{ runner.temp }}/executor.log | |
| if-no-files-found: ignore |