Skip to content

Do not provide primary key constraints when no mutations #644

Do not provide primary key constraints when no mutations

Do not provide primary key constraints when no mutations #644

Workflow file for this run

---
name: pr
on:
merge_group:
types: [checks_requested]
pull_request:
branches:
- trunk
workflow_dispatch:
inputs:
num_query_clients:
description: Number of query clients to run (maps to spicebench --concurrency)
required: false
default: '1'
type: string
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CARGO_NET_RETRY: 10
CARGO_HTTP_TIMEOUT: 60
CARGO_INCREMENTAL: 0
jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
rust: ${{ steps.filter.outputs.rust }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
rust:
- '**/*.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- 'rust-toolchain.toml'
- '.github/workflows/pr.yml'
check:
name: cargo check + test
runs-on: spiceai-macos
timeout-minutes: 60
needs: changes
if: needs.changes.outputs.rust == 'true'
steps:
- uses: actions/checkout@v6
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.91
- name: cargo check
run: make check
- name: cargo test
run: make test
lint-fix:
name: cargo fmt + clippy fix
runs-on: spiceai-macos
timeout-minutes: 60
needs: changes
if: needs.changes.outputs.rust == 'true' && github.event_name == 'pull_request'
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.91
- name: cargo fmt + clippy fix
run: make fix
- name: Commit fixes
run: |
git diff --quiet && exit 0
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "chore: auto-fix cargo fmt + clippy"
git push
validation-run:
name: Validation run (Spice Cloud TPCH sf0.001)
runs-on: spiceai-dev-runners
timeout-minutes: 30
needs: changes
if: needs.changes.outputs.rust == 'true'
concurrency:
group: spicebench-run
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-cc
- uses: ./.github/actions/management-login
with:
client-id: ${{ secrets.SPICE_MANAGEMENT_CLIENT_ID }}
client-secret: ${{ secrets.SPICE_MANAGEMENT_CLIENT_SECRET }}
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull spidapter image
run: docker pull ghcr.io/spiceai/spidapter:latest
- uses: ./.github/actions/build-spicebench
- name: Generate test data (sf 0.001)
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
RUST_LOG: info
run: |
~/.spice/bin/spicebench generate \
--dataset tpch \
--scenario tpch \
--scale-factor 0.001 \
--bucket spiceai-public-datasets \
--prefix pr-validation \
--region us-east-1
- name: Install ADBC driver
uses: columnar-tech/setup-dbc@v1
with:
drivers: flightsql
- name: Run spicebench
if: ${{ false }}
env:
SPICEAI_API_KEY: ${{ env.SPICEAI_API_KEY }}
SPICE_CLOUD_API_URL: https://dev-api.spice.ai
NUM_QUERY_CLIENTS: ${{ github.event.inputs.num_query_clients || '1' }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SPIDAPTER_ICEBERG_REGION: us-west-1
SPIDAPTER_ICEBERG_CATALOG_FROM: iceberg:https://glue.us-west-1.amazonaws.com/iceberg/v1/catalogs/211125479522/namespaces
RUST_LOG: info
run: |
~/.spice/bin/spicebench run \
--concurrency "${NUM_QUERY_CLIENTS}" \
--scenario tpch \
--etl-bucket spiceai-public-datasets \
--etl-prefix pr-validation \
--scale-factor 0.001 \
--etl-region us-east-1 \
--system-adapter-stdio-cmd docker \
--system-adapter-stdio-args "run -i -e SPICEAI_API_KEY -e SPICE_CLOUD_API_URL -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e SPIDAPTER_ICEBERG_REGION -e SPIDAPTER_ICEBERG_CATALOG_FROM ghcr.io/spiceai/spidapter:latest stdio --verbose --channel nightly"