-
Notifications
You must be signed in to change notification settings - Fork 281
ci: add TPC-H SF10 workflow #1688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
andygrove
wants to merge
3
commits into
apache:main
Choose a base branch
from
andygrove:ci/tpch-sf10-workflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,159 @@ | ||
| # 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-H SF10 | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| push: | ||
| paths-ignore: | ||
| - "docs/**" | ||
| - "**.md" | ||
| - ".github/ISSUE_TEMPLATE/**" | ||
| - ".github/pull_request_template.md" | ||
| pull_request: | ||
| paths-ignore: | ||
| - "docs/**" | ||
| - "**.md" | ||
| - ".github/ISSUE_TEMPLATE/**" | ||
| - ".github/pull_request_template.md" | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| tpch-sf10: | ||
| name: TPC-H SF10 (all queries) | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: amd64/rust | ||
| steps: | ||
| - uses: actions/checkout@v6.0.2 | ||
| with: | ||
| submodules: true | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Setup Rust toolchain | ||
| uses: ./.github/actions/setup-builder | ||
| with: | ||
| rust-version: stable | ||
|
|
||
| - name: Build Ballista binaries | ||
| run: | | ||
| cargo build --profile release-nonlto --locked \ | ||
| -p ballista-scheduler \ | ||
| -p ballista-executor \ | ||
| -p ballista-benchmarks | ||
|
|
||
| - name: Install tpchgen-cli | ||
| uses: taiki-e/install-action@de6bbd1333b8f331563d54a051e542c7dfef81c3 # v2.68.34 | ||
| with: | ||
| tool: tpchgen-cli@2.0.2 | ||
|
|
||
| - name: Generate TPC-H SF10 data | ||
| run: | | ||
| mkdir -p "$RUNNER_TEMP/tpch-data" | ||
| tpchgen-cli \ | ||
| --scale-factor 10 \ | ||
| --parts 16 \ | ||
| --format=parquet \ | ||
| --output-dir "$RUNNER_TEMP/tpch-data" | ||
|
|
||
| - name: Run TPC-H queries against Ballista cluster | ||
| env: | ||
| DATA_DIR: ${{ runner.temp }}/tpch-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/release-nonlto/ballista-scheduler \ | ||
| --bind-host 127.0.0.1 \ | ||
| > "$SCHEDULER_LOG" 2>&1 & | ||
| SCHEDULER_PID=$! | ||
|
|
||
| ./target/release-nonlto/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" \ | ||
|
martin-g marked this conversation as resolved.
|
||
| > "$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 | ||
|
|
||
| # Probe TCP readiness with bash's /dev/tcp so we don't need netcat | ||
| # in the container image. | ||
| wait_for_port() { | ||
| local host="$1" port="$2" name="$3" | ||
| echo "Waiting for $name on $host:$port..." | ||
| for _ in $(seq 1 30); do | ||
| if (exec 3<>/dev/tcp/"$host"/"$port") 2>/dev/null; then | ||
| exec 3<&- 3>&- | ||
| return 0 | ||
| fi | ||
| sleep 1 | ||
| done | ||
| echo "$name did not start" | ||
| return 1 | ||
| } | ||
| wait_for_port 127.0.0.1 50050 scheduler | ||
| wait_for_port 127.0.0.1 50051 executor | ||
|
|
||
| # q16 omitted: still unsupported (matches benchmarks/run.sh). | ||
| for q in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18 19 20 21 22; do | ||
| echo "::group::Query $q" | ||
| ./target/release-nonlto/tpch benchmark ballista \ | ||
| --host 127.0.0.1 --port 50050 \ | ||
| --query "$q" \ | ||
| --path "$DATA_DIR" \ | ||
| --format parquet \ | ||
| --partitions 16 \ | ||
| --iterations 1 \ | ||
| -c datafusion.optimizer.prefer_hash_join=false | ||
| echo "::endgroup::" | ||
| done | ||
|
|
||
| - name: Upload cluster logs on failure | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: tpch-sf10-cluster-logs | ||
| path: | | ||
| ${{ runner.temp }}/scheduler.log | ||
| ${{ runner.temp }}/executor.log | ||
| if-no-files-found: ignore | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.