Add runner update channels for canary field testing on Bencher Cloud#927
Conversation
🤖 Claude Code ReviewPR: #927 I now have a thorough understanding of the PR. Let me verify one edge in the canary caching logic around the documented "downgrade" window before finalizing. The code and tests are consistent. Here is my review. Code Review: Runner Update Channels (canary field testing)SummaryThis PR adds a Overall this is high-quality, well-tested work that closely follows the project conventions. Findings below are minor. Strengths
Minor observations
Correctness spot-checks (all pass)
RecommendationApprove. Clean, conservative, thoroughly tested. Consider (optionally) a single-flight guard or shorter propagation note if the canary fleet ever scales, but nothing here is blocking. Note: I was unable to run Model: claude-opus-4-8 |
|
| Branch | claude/runner-canary-channel |
| Testbed | intel-v1 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| Adapter::Json | 📈 view plot 🚷 view threshold | 4.76 µs(+2.41%)Baseline: 4.64 µs | 4.90 µs (97.03%) |
| Adapter::Magic (JSON) | 📈 view plot 🚷 view threshold | 4.55 µs(+0.83%)Baseline: 4.52 µs | 4.72 µs (96.40%) |
| Adapter::Magic (Rust) | 📈 view plot 🚷 view threshold | 25.92 µs(+1.18%)Baseline: 25.62 µs | 26.76 µs (96.88%) |
| Adapter::Rust | 📈 view plot 🚷 view threshold | 3.51 µs(+0.47%)Baseline: 3.49 µs | 3.60 µs (97.39%) |
| Adapter::RustBench | 📈 view plot 🚷 view threshold | 3.50 µs(+0.24%)Baseline: 3.49 µs | 3.60 µs (97.21%) |
c950ca2 to
8007428
Compare
8007428 to
ac0615a
Compare
ac0615a to
5eb0526
Compare
5eb0526 to
db4f747
Compare
db4f747 to
a6717dc
Compare
a6717dc to
701758a
Compare
|
Review follow-up on the five observations:
|
701758a to
58bef5c
Compare
Runners can now opt into a canary update channel that tracks a rolling prerelease rebuilt whenever the runner changes on a cloud branch deploy, so runner changes are field-tested on Bencher Cloud before a versioned release. Canary runners report the SHA-256 of their own binary and the server converges them on the published build by content, not version. Checksum fetch failures now skip the update offer instead of dropping the WebSocket channel into a reconnect loop.
58bef5c to
7c7c98e
Compare
|
Follow-up on the latest review round:
Local gates confirmed: |
|
On observation 4: confirmed locally. In |
What
Adds runner update channels so
runnerchanges can be field-tested on Bencher Cloud before a versioned release, mirroring how the API server is dogfooded viacloudbranch deploys.runner up --update-channel <stable|canary>flag (envBENCHER_UPDATE_CHANNEL, defaultstable, conflicts with--no-auto-update)stablechannel keeps today's behavior: exact version match against the server, updates from versioned GitHub Releasescanarychannel converges by content: the runner reports the SHA-256 of its own binary inReadymetadata, and the server compares it against the published checksum of a rollingcanaryprerelease (TTL-cached per architecture), sending the existingUpdatedirective on mismatchHow
JsonRunnerMetadatagains optionalchannelandchecksumfields; absent meansstable, so old runners and old servers interoperate unchanged and the stable wire format is byte-identicalRunnerUpdatecontext (URL construction + canary checksum cache with injectableClock), channel-awarehandle_readywith an injectable checksum fetcher for unit testing, and a newrunners.update_base_urlconfig knob. Checksum fetch failures now log, count (runner.self_update.check.failed; updates count asrunner.self_update.sent), and skip the update offer instead of erroring the channel into a reconnect loop (this also fixes the stable path when GitHub is unreachable)cloudpushes (path-filtered,build-onlyskips the KVM scenario tests already run on devel) and is versionedcanary; a newpublish_runner_canaryjob clobbers the assets on a rollingcanaryprerelease, binaries before checksums so a partial upload never advertises a missing binary. The tag iscanaryrather thancloudbecause a tag named like the branch is ambiguous in git ref resolution and would breakgit checkout cloudinrebase_cloud.ymlcargo ops deploy|start --update-channeland an optionalupdate_channelfield inrunners.jsonwriteBENCHER_UPDATE_CHANNELinto the systemd drop-inrunner upreference, Runner Protocol reference, and the Self-Hosted Runners explanation updated in all 9 languages; changelog entries added underPending v0.6.9Self-update remains idle-only on both sides (server sends
Updateonly fromwait_for_ready; the runner handles it only inAwaitingJob), so a canary rollout never interrupts a running benchmark.Field testing flow
devel, resetcloudtodevel, and push--clobberor pushing a revert tocloud