Add GitHub Actions to launch benchmark machines on AWS#993
Merged
Conversation
Three workflows around the existing run-benchmark.sh launcher, using a federated IAM role via OIDC. The GitHub-hosted runner only launches the self-terminating EC2 machine; the machine runs the benchmark unattended and sends its log to the results sink as before. - benchmark-daily.yml: the six ClickHouse variants on c6a.4xlarge, daily. - benchmark-manual.yml: any system/machine/repo/branch on demand. - benchmark-pr.yml: systems whose directories a PR changes (ignoring results and *.md), from the PR's repo/branch, gated by required reviewers on the benchmark-approval environment. pull_request_target keeps the launcher scripts on the trusted base branch; PR code only runs on the disposable machine. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The role ARN and region were repository variables passed through every workflow. The role is a single fixed thing, so set it directly in the composite action; the region defaults to us-east-1 (cheaper). The variables and the skip-when-unconfigured check are gone. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…trix The composite action now takes space-separated lists of systems and machines and launches one EC2 machine per pair, sequentially, in the same job. A failed launch does not stop the rest; the failures are reported at the end. The daily workflow launches the six ClickHouse variants on nine machine types; the PR workflow loses its matrix; the manual workflow accepts lists. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Automates launching ClickBench machines with GitHub Actions. The GitHub-hosted runner is used only to launch: it assumes a federated IAM role (OIDC) and runs the existing
run-benchmark.sh, which starts a self-terminating EC2 machine. The machine clones the repository, runs<system>/benchmark.shunder cloud-init, sends its log to the results sink at play.clickhouse.com, and shuts down — exactly the current manual flow.run-benchmark.shandcloud-init.sh.inare unchanged. Collecting results will be implemented separately.Workflows
benchmark-daily.ymlbenchmark-manual.ymlbenchmark-pr.ymlAll three share a composite action (
.github/actions/launch-benchmark) that assumes the role and callsrun-benchmark.shin a loop, one launch per (machine, system) pair; a failed launch does not stop the rest and is reported at the end. The role ARN is set in the action, and the region defaults to us-east-1. The role's trust policy only admits workflow runs of this repository, so assuming it fails everywhere else, including forks.The PR workflow
pull_request_target: the workflow and launcher scripts always come from the trusted base branch, and OIDC works for PRs from forks. PR code never runs on the runner — only on the disposable benchmark machine.results/and*.mdfiles don't count) that containbenchmark.shat the PR head — so newly added systems are included, and results-only PRs launch nothing. Verified against real PRs: Add more measurements for mariadb-duckdb and Spice.ai #989 and Update ClickHouse #991 detect nothing (results-only), Revert "Revert "Add Spice.ai OSS (Cayenne, Parquet single, Parquet partitioned)"" #987 detects the three Spice.ai systems.benchmark-approvalenvironment, which must be configured with required reviewers.Setup required (see
.github/workflows/README.md)ClickBenchLauncherIAM role trusting GitHub's OIDC provider, restricted torepo:ClickHouse/ClickBench:*, withec2:RunInstances,ec2:CreateTags,ec2:DescribeImages,ec2:DescribeInstanceTypes— done.benchmark-approvalwith required reviewers.🤖 Generated with Claude Code