Skip to content

bench-runner: support org-level runner registration (default SCOPE=org) - #419

Merged
kriszyp merged 1 commit into
mainfrom
kris/bench-runner-org-scope
Jun 19, 2026
Merged

bench-runner: support org-level runner registration (default SCOPE=org)#419
kriszyp merged 1 commit into
mainfrom
kris/bench-runner-org-scope

Conversation

@kriszyp

@kriszyp kriszyp commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary

The ephemeral bench-runner host loop (benchmarks/ycsb/runner/run-bench-runner.sh) was hard-coded to a repo-scoped registration on HarperFast/harper-pro, so only harper-pro workflows could use the harper-bench self-hosted host. This adds a SCOPE switch (default org) that registers at org scope instead — org registration token + org URL — so a single host loop serves every HarperFast repo's bench workflow.

Why

harper core's new perf-benchmarks-nightly workflow (harper#1379) needs the same harper-bench runner. Org-scoping it (vs. standing up a second runner) keeps one loop running one container at a time, which preserves comparable night-to-night perf numbers — harper's and harper-pro's bench jobs simply serialize.

SCOPE=repo ./run-bench-runner.sh restores the previous single-repo behavior.

Notes for the reviewer

  • Org-token minting requires the gh token to carry the admin:org scope (gh auth refresh -h github.com -s admin:org) — documented in the script header.
  • Already deployed live: the running harper-bench host has been switched to org scope and verified (org runner online, old repo-scoped registration removed). This PR just brings the checked-in copy in sync.

Generated by Claude Opus 4.8 (1M context) via Claude Code.

The ephemeral bench runner was hard-coded to a repo-scoped registration on
HarperFast/harper-pro, so only harper-pro workflows could use the harper-bench
host. Register at org scope by default (org URL + org registration token) so a
single host loop — and thus a single job at a time, preserving comparable perf
numbers — serves every HarperFast repo's bench workflow (e.g. harper's new
perf-benchmarks-nightly). SCOPE=repo restores the previous single-repo behavior.

Requires the gh token to carry the admin:org scope for org-token minting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kriszyp
kriszyp requested a review from a team as a code owner June 19, 2026 00:10
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@claude

claude Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Reviewed; no blockers found.

@kriszyp
kriszyp merged commit 24818b1 into main Jun 19, 2026
30 checks passed
@kriszyp
kriszyp deleted the kris/bench-runner-org-scope branch June 19, 2026 00:22
kriszyp added a commit that referenced this pull request Jun 22, 2026
…upervisor (#423)

#419 added org-scoped registration so the harper-bench host could serve both
harper and harper-pro from one runner. That doesn't work: org/enterprise-level
self-hosted runners are not routed jobs for these repos (the org's runner groups
are inherited from the GitHub Enterprise level), so an org runner sits idle while
a matching job queues indefinitely — verified empirically, a repo-scoped runner
binds the same job in ~15s.

Replace run-bench-runner.sh with bench-runner-supervisor.sh: it polls each repo
for a queued job targeting the harper-bench label and, when it finds one,
registers a throwaway repo-scoped --ephemeral runner that drains exactly that job
and exits. Draining blocks, so at most one job runs at a time across all repos —
strictly serial, no lock needed, and no always-idle runners. Adds an example
systemd --user unit and rewrites the README for the multi-repo model.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant