Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
0913da2
Redesign: GKE Autopilot + Rust controller + K8s benchmark jobs
adriangb Feb 28, 2026
e61e886
Fix CI: cargo fmt, secrets->vars, pulumi/auth-actions
adriangb Feb 28, 2026
044d65d
Fix clippy, k8s-openapi v0.24, WIF repo name
adriangb Feb 28, 2026
a3278a6
Refactor insert_job to use JobInsert struct
adriangb Feb 28, 2026
f64d983
Commit lockfiles, fix Docker builds, fix npm ci
adriangb Feb 28, 2026
640d7c7
Add bootstrap script
adriangb Feb 28, 2026
e98f444
Refactor controller: JobStatus enum, dedup helpers, doc comments
adriangb Feb 28, 2026
42b5e87
Scope IAM to Pulumi-managed resources, improve workflows and docs
adriangb Feb 28, 2026
9b19354
Fix Pulumi auth and Docker push in GHA workflows
adriangb Feb 28, 2026
6587b87
refactor
adriangb Feb 28, 2026
0633c68
Add unit and integration tests to controller (65 tests)
adriangb Feb 28, 2026
dbcc0d0
Fix CI: cargo fmt and WIF bootstrap project number
adriangb Feb 28, 2026
30295b4
Fix Pulumi auth: use personal token type for non-enterprise org
adriangb Feb 28, 2026
82f29f7
Add scope parameter to Pulumi personal token auth
adriangb Feb 28, 2026
73e6615
Fix Pulumi.yaml: add value attributes to namespaced config keys
adriangb Feb 28, 2026
36b91ab
Fix Pulumi.yaml: use value instead of default for namespaced config
adriangb Feb 28, 2026
59581e8
Fix Pulumi stack init: upsert stack, set config from GHA variables
adriangb Feb 28, 2026
2eb8401
Remove invalid namespaced config from Pulumi.yaml, update bootstrap docs
adriangb Feb 28, 2026
f28b6a0
Scope to pydantic/datafusion, add githubToken to deploy-services
adriangb Feb 28, 2026
616c347
Unify build and deploy into single pipeline with SHA-pinned images
adriangb Feb 28, 2026
2ac999b
Add concurrency group to deploy job to prevent Pulumi conflicts
adriangb Feb 28, 2026
e0a330a
Update WATCHED_REPOS to adriangb/datafusion
adriangb Feb 28, 2026
9ec8cfa
Add health probes, graceful shutdown, and DB cleanup to controller
adriangb Feb 28, 2026
a876bdb
Add DB cleanup, polling overlap, and faster poll interval
adriangb Feb 28, 2026
2d21f1c
Harden controller: retry, pagination, error resilience, fail-fast
adriangb Feb 28, 2026
5e57789
Remove duplicate GitHub failure posting from reconcile_active
adriangb Feb 28, 2026
2cdbe20
Add adriangb/datafusion to RepoConfig known repos
adriangb Feb 28, 2026
38aefc1
Replace hardcoded repo/user configs with BENCHMARK_CONFIG JSON env var
adriangb Feb 28, 2026
2cdd69f
Fix mark_seen ordering and error logging in github_poller
adriangb Feb 28, 2026
6f5e9a8
Fix poll error logging to show full error chain
adriangb Feb 28, 2026
28f0d68
updates
adriangb Feb 28, 2026
d7c4c45
fmt
adriangb Feb 28, 2026
ab7b518
Fix FK violation: mark_seen before insert_job for valid triggers
adriangb Feb 28, 2026
06cad71
Add Logfire token as K8s secret and inject via deploy workflow
adriangb Feb 28, 2026
a2a8790
Add RBAC Role/RoleBinding for controller to create batch Jobs
adriangb Feb 28, 2026
8342833
add link to logfire
adriangb Feb 28, 2026
cb6a0ff
Parallelize compilation in criterion benchmark scripts
adriangb Feb 28, 2026
627394c
Add hyperdisk-balanced StorageClass for benchmark runner workspace vo…
adriangb Feb 28, 2026
8b3ff2e
Fix runner crash: remove gh auth login conflicting with GITHUB_TOKEN …
adriangb Feb 28, 2026
daae7f3
Add comment ID to K8s jobs and link all PR comments to triggering req…
adriangb Feb 28, 2026
37900d8
Retry failed benchmark jobs up to 3 times and reduce deadline to 1 hour
adriangb Feb 28, 2026
c6e51dd
Suppress detached HEAD warnings in runner scripts
adriangb Feb 28, 2026
443d100
Use REPO env var for git clone URLs instead of hardcoded repo paths
adriangb Feb 28, 2026
c328dd2
fmt
adriangb Mar 1, 2026
eacb64e
delete unused scripts
adriangb Mar 1, 2026
9928b89
Fix PR branch checkout failing in shallow clones
adriangb Mar 1, 2026
469df7b
Simplify PR checkout: let gh handle fetching, only fetch main separately
adriangb Mar 1, 2026
d389a7a
Print build logs on failure instead of silently dropping them
adriangb Mar 1, 2026
a3de2dd
Use direct PR ref fetching instead of gh pr checkout
adriangb Mar 1, 2026
6dfc313
Change default job pod to c4a ARM: 12 CPUs, 65Gi RAM, 128Gi ephemeral
adriangb Mar 1, 2026
d697074
Set rustup profile to minimal to fix toolchain install conflicts
adriangb Mar 1, 2026
13b68b2
Use machine family (c4a/c4) instead of raw arch for node selection
adriangb Mar 1, 2026
39b7e3f
fmt
adriangb Mar 1, 2026
dea6597
Build runner image for both amd64 and arm64
adriangb Mar 1, 2026
f6664f2
Reinstall stable toolchain with minimal profile to fix rustup conflicts
adriangb Mar 1, 2026
384f8b0
Use RUSTUP_TOOLCHAIN=stable to skip rust-toolchain.toml conflicts
adriangb Mar 1, 2026
cd84bd0
Use cargo build instead of cargo run for dfbench pre-compilation
adriangb Mar 1, 2026
998f467
Add tpchgen-cli and uv to runner image
adriangb Mar 1, 2026
54fe4a6
Build runner image natively on ARM instead of QEMU cross-compilation
adriangb Mar 1, 2026
00f08df
Use buildx imagetools for multi-arch manifest merge
adriangb Mar 1, 2026
6a5be4c
Add sccache with GCS backend for Rust compilation caching
adriangb Mar 1, 2026
d673ccd
Bake TPC-H answer files into runner image
adriangb Mar 1, 2026
f888381
Add roles/storage.admin to gha-deployer SA for GCS bucket creation
adriangb Mar 1, 2026
a9ce036
Cache benchmark data in GCS to skip regeneration on cache hits
adriangb Mar 1, 2026
30289ef
Use multi-stage build with cargo-binstall for faster runner image builds
adriangb Mar 1, 2026
4b22bad
Fix controller Dockerfile for runner workspace member
adriangb Mar 1, 2026
1f4d39f
Fix rustup race condition in parallel cargo builds
adriangb Mar 1, 2026
7de40ba
Rewrite runner bash scripts in Rust with observability and resource m…
adriangb Mar 1, 2026
243b484
Use GitHub comment IDs instead of internal SQLite IDs in external-fac…
adriangb Mar 1, 2026
9542d5d
Fix cargo fmt formatting across controller crate
adriangb Mar 1, 2026
f16c051
Fix runner Dockerfile build context to include controller sources
adriangb Mar 1, 2026
66eaee2
Fix bench-cache GCS path encoding that broke TPC-H data downloads
adriangb Mar 1, 2026
aad2ee4
Remove unnecessary percent-encoding dependency from bench-cache
adriangb Mar 1, 2026
f2bde3b
Reduce benchmark noise with CPU limits and compare_detail
adriangb Mar 1, 2026
6ce39f0
Reduce poll and reconcile intervals for faster scheduling
adriangb Mar 1, 2026
14e921b
Fix empty BENCHMARKS env var causing no benchmarks to run
adriangb Mar 1, 2026
2b277cb
Add per-side env vars and custom commit selection for benchmark runs
adriangb Mar 2, 2026
c959b88
Fix formatting (cargo fmt)
adriangb Mar 2, 2026
aed35f7
Replace state machine parser with serde_yaml parsing
adriangb Mar 2, 2026
1eec5fa
Reject unknown YAML fields with helpful error and fix results dir mis…
adriangb Mar 3, 2026
e297420
Fix nested backtick fences in help text
adriangb Mar 3, 2026
41c7529
Fix rustup cross-device link error in container overlay filesystem
adriangb Mar 9, 2026
1e3d89c
add apache/datafusion
adriangb Mar 12, 2026
6a12b1c
Support wildcard "*" criterion config and add apache/arrow-rs
adriangb Mar 12, 2026
a24bf73
Support branch-only criterion benchmarks when baseline build fails
adriangb Mar 13, 2026
7d00b1e
Reduce benchmark noise: disable K8s retries and remove redundant comment
adriangb Mar 13, 2026
569176d
Add kosiew to list of authorized users
alamb Mar 16, 2026
028cc2c
Merge pull request #1 from alamb/alamb/add_kosiew
adriangb Mar 16, 2026
5ce87cd
Set up clickbench data for criterion benchmarks (fixes sql_planner)
adriangb Mar 23, 2026
3810a15
Add "File an issue" link to all benchmark PR comments
adriangb Mar 24, 2026
fc63bcd
Add smj (sort-merge join) to allowed benchmarks
Dandandan Mar 26, 2026
200c202
Merge pull request #2 from Dandandan/add-smj-benchmark
adriangb Mar 26, 2026
43956fc
fmt
adriangb Mar 26, 2026
7de3f3a
Add top 15 recent contributors from datafusion and arrow-rs as author…
adriangb Mar 27, 2026
82a094d
Include instance type, pod resources, and lscpu in benchmark PR comments
adriangb Mar 27, 2026
97ea4bc
Add sort_pushdown to allowed standard benchmarks
adriangb Mar 30, 2026
df44753
Fix clippy type_complexity lint on parse_sections return type
adriangb Mar 30, 2026
11337b8
Add sort_pushdown_sorted to allowed standard benchmarks
adriangb Apr 2, 2026
7ff24ae
Replace cgroup disk I/O metrics with spill directory monitoring
adriangb Apr 4, 2026
6eb898b
Document branch/commit comparison and per-side env var configuration
adriangb Apr 12, 2026
79c67a7
Fetch PR ref into clones before checking out custom baseline/changed …
adriangb Apr 12, 2026
8be8ef2
Fix formatting (cargo fmt)
adriangb Apr 12, 2026
5fab970
Add mkleen to authorized benchmark runners
adriangb Apr 15, 2026
795358e
Add sort pushdown inexact benchmarks
adriangb Apr 17, 2026
f8254a5
Fix CI failures on fork PRs
adriangb Apr 17, 2026
0ba6010
Allow io_uring in benchmark pods via custom seccomp profile (#4)
Dandandan Apr 17, 2026
48494a1
Proxy runner PR comments through controller; cap per-user concurrency
adriangb Apr 17, 2026
2dfff38
Fix runner-side GitHub dependencies after dropping GITHUB_TOKEN
adriangb Apr 17, 2026
e019042
Add topk_tpch benchmark to allowlist
adriangb Apr 19, 2026
6632644
Add runner hang diagnostics for long-running jobs
adriangb Apr 19, 2026
96097a5
Enable deterministic gdb dumps in runner jobs
adriangb Apr 19, 2026
5060687
Keep release debug symbols in benchmark jobs
adriangb Apr 20, 2026
3cf4469
Survive controller restarts in runner comment posting
adriangb Apr 20, 2026
f627ff0
Fix runner comment race for newly started jobs
adriangb Apr 20, 2026
974fe72
Raise benchmark job deadline back to 2h and surface deadline hits on …
adriangb Apr 21, 2026
3bc58ea
Apply cargo fmt to reconcile_active
adriangb Apr 21, 2026
ce317d1
Bypass bench.sh for tpch variants to keep dfbench-based timings
adriangb Apr 30, 2026
080cbb2
Add coderfender to benchmark allowlist
adriangb May 5, 2026
9b165e4
Add GCP auth and Pulumi stack config to CI preview jobs (#6)
adriangb May 8, 2026
0457ad8
Update trigger comment in place instead of posting new comments (#5)
adriangb May 8, 2026
090970a
Revert "Update trigger comment in place instead of posting new commen…
adriangb May 10, 2026
15d58b2
Enhance README with benchmark running instructions (#8)
alamb May 28, 2026
db14d78
Add wide_schema to standard benchmark allowlist
adriangb Jun 8, 2026
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
122 changes: 122 additions & 0 deletions .github/workflows/benchmark-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Benchmark DataFusion Main

on:
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
inputs:
benchmarks:
description: 'Benchmarks to run (space-separated)'
required: false
default: 'clickbench_1'

permissions:
id-token: write
contents: read

env:
REGION: us-central1
REGISTRY: us-central1-docker.pkg.dev/${{ vars.GCP_PROJECT_ID }}/benchmarking

jobs:
trigger-benchmark:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }}

- uses: google-github-actions/setup-gcloud@v2

- name: Install gke-gcloud-auth-plugin
run: gcloud components install gke-gcloud-auth-plugin

- name: Get cluster credentials
run: gcloud container clusters get-credentials benchmark-cluster --region ${{ env.REGION }}

- name: Create benchmark job
run: |
BENCHMARKS="${{ github.event.inputs.benchmarks || 'clickbench_1' }}"
JOB_NAME="bench-main-$(date +%s)"

cat <<EOF | kubectl apply -f -
apiVersion: batch/v1
kind: Job
metadata:
name: ${JOB_NAME}
namespace: benchmarking
spec:
backoffLimit: 3
activeDeadlineSeconds: 3600
ttlSecondsAfterFinished: 3600
template:
spec:
serviceAccountName: benchmark-runner
restartPolicy: Never
nodeSelector:
cloud.google.com/compute-class: Performance
cloud.google.com/machine-family: c4a
kubernetes.io/arch: arm64
tolerations:
- key: cloud.google.com/gke-spot
operator: Exists
effect: NoSchedule
containers:
- name: runner
image: ${{ env.REGISTRY }}/runner:latest
securityContext:
seccompProfile:
# Unconfined so the DataFusion runner can use
# io_uring (blocked by the default containerd seccomp
# profile). Justified here because the main-tracking
# workflow runs trusted apache/datafusion main.
type: Unconfined
env:
- name: BENCH_TYPE
value: main_tracking
- name: PR_URL
value: "https://github.com/apache/datafusion"
- name: BENCHMARKS
value: "${BENCHMARKS}"
- name: REPO
value: apache/datafusion
- name: GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: github-token
key: token
- name: SCCACHE_GCS_BUCKET
value: ${{ vars.GCP_PROJECT_ID }}-sccache
- name: RUSTC_WRAPPER
value: sccache
- name: SCCACHE_GCS_RW_MODE
value: READ_WRITE
- name: DATA_CACHE_BUCKET
value: ${{ vars.GCP_PROJECT_ID }}-benchdata
resources:
requests:
cpu: "12"
memory: "65Gi"
ephemeral-storage: "128Gi"
volumeMounts:
- name: workspace
mountPath: /workspace
volumes:
- name: workspace
ephemeral:
volumeClaimTemplate:
spec:
storageClassName: hyperdisk-balanced
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 128Gi
EOF

echo "Created job: ${JOB_NAME}"

- name: Wait for job to start
run: |
kubectl wait --for=condition=complete --timeout=10s job -l app=benchmark-runner -n benchmarking 2>/dev/null || true
echo "Job submitted. Results will be posted when complete."
196 changes: 196 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
name: Build and Deploy

on:
push:
branches: [main]
paths:
- 'controller/**'
- 'runner/**'
- 'services/**'
- 'Cargo.toml'
- 'Cargo.lock'
workflow_dispatch:
inputs:
target:
description: 'Which image to build'
required: false
default: 'both'
type: choice
options: [both, controller, runner]

permissions:
id-token: write
contents: read

env:
REGION: us-central1
REGISTRY: us-central1-docker.pkg.dev/${{ vars.GCP_PROJECT_ID }}/benchmarking

jobs:
build-controller:
if: >
github.event_name == 'push' ||
github.event.inputs.target == 'both' ||
github.event.inputs.target == 'controller'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: google-github-actions/auth@v2
id: auth
with:
workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }}
token_format: access_token

- uses: docker/login-action@v3
with:
registry: ${{ env.REGION }}-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- uses: docker/setup-buildx-action@v3

- name: Build and push controller
uses: docker/build-push-action@v6
with:
context: .
file: controller/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/controller:${{ github.sha }}
cache-from: type=gha,scope=controller
cache-to: type=gha,mode=max,scope=controller

# Build per-platform runner images natively (no QEMU).
build-runner-platform:
if: >
github.event_name == 'push' ||
github.event.inputs.target == 'both' ||
github.event.inputs.target == 'runner'
strategy:
matrix:
include:
- runner: ubuntu-latest
platform: linux/amd64
scope: runner-amd64
- runner: ubuntu-24.04-arm
platform: linux/arm64
scope: runner-arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4

- uses: google-github-actions/auth@v2
id: auth
with:
workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }}
token_format: access_token

- uses: docker/login-action@v3
with:
registry: ${{ env.REGION }}-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- name: Extract TPC-H answer files
run: |
docker create --name tpch-answers --platform linux/amd64 ghcr.io/scalytics/tpch-docker:main
docker cp tpch-answers:/opt/tpch/2.18.0_rc2/dbgen/answers/ runner/tpch-answers/
docker rm tpch-answers

- uses: docker/setup-buildx-action@v3

- name: Build and push runner (${{ matrix.platform }})
uses: docker/build-push-action@v6
with:
context: .
file: runner/Dockerfile
push: true
platforms: ${{ matrix.platform }}
tags: ${{ env.REGISTRY }}/runner:${{ github.sha }}-${{ matrix.scope }}
cache-from: type=gha,scope=${{ matrix.scope }}
cache-to: type=gha,mode=max,scope=${{ matrix.scope }}

# Merge per-platform images into a single multi-arch manifest.
build-runner:
needs: build-runner-platform
if: >
github.event_name == 'push' ||
github.event.inputs.target == 'both' ||
github.event.inputs.target == 'runner'
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/auth@v2
id: auth
with:
workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }}
token_format: access_token

- uses: docker/login-action@v3
with:
registry: ${{ env.REGION }}-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- uses: docker/setup-buildx-action@v3

- name: Create multi-arch manifest
run: |
docker buildx imagetools create -t \
${{ env.REGISTRY }}/runner:${{ github.sha }} \
${{ env.REGISTRY }}/runner:${{ github.sha }}-runner-amd64 \
${{ env.REGISTRY }}/runner:${{ github.sha }}-runner-arm64

deploy:
needs: [build-controller, build-runner]
if: always() && !failure() && !cancelled()
concurrency:
group: pulumi-deploy-services
cancel-in-progress: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }}

- uses: google-github-actions/setup-gcloud@v2
with:
install_components: gke-gcloud-auth-plugin

- name: Install dependencies
run: npm ci

- uses: pulumi/auth-actions@v1
with:
organization: ${{ vars.PULUMI_ORG }}
requested-token-type: urn:pulumi:token-type:access_token:personal
scope: user:${{ vars.PULUMI_USER }}

- name: Configure Pulumi stack
working-directory: services
run: |
pulumi stack select --create ${{ vars.PULUMI_ORG }}/dev
pulumi config set gcp:project ${{ vars.GCP_PROJECT_ID }}
pulumi config set gcp:region ${{ vars.GCP_REGION }}
pulumi config set --secret githubToken '${{ secrets.GH_CONTROLLER_TOKEN }}'
if [ -n "${{ secrets.LOGFIRE_TOKEN }}" ]; then
pulumi config set --secret logfireToken '${{ secrets.LOGFIRE_TOKEN }}'
fi
pulumi config set imageTag ${{ github.sha }}
pulumi config set runnerRepoUrl '${{ github.server_url }}/${{ github.repository }}'

- uses: pulumi/actions@v5
with:
command: up
stack-name: ${{ vars.PULUMI_ORG }}/dev
work-dir: services
Loading