ci: bound the Verify proto syntax step so an apt stall fails fast - #168
Merged
Merged
Conversation
Relates to #156. The step ran apt-get update/install with no timeout, so a stalled mirror held the runner (one PR run sat ~45 min on 2026-09-30). - timeout-minutes: 5 on the step - apt: Acquire::Retries=3 and Acquire::http::Timeout=30 on update and install, DEBIAN_FRONTEND=noninteractive - explicit error if protoc is missing after install - timeout-minutes: 40 on the "Go Build & Test" job (normal 16-22 min)
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.
Relates to #156.
Problem
The
Verify proto syntaxstep inGo Build & Testranapt-get update/installwith no timeout. A stalled mirror could hold the runner until the workflow-level limits kicked in (one PR run sat about 45 minutes in this step on 2026-09-30).Change
Only
.github/workflows/deploy.yml, 8 insertions and 2 deletions:timeout-minutes: 5on theVerify proto syntaxstep.-o Acquire::Retries=3 -o Acquire::http::Timeout=30on bothupdateandinstall, plusDEBIAN_FRONTEND=noninteractive.::error::and exit 1 ifprotocis missing after the install.timeout-minutes: 40on thego-testjob.The loop that runs
protocover everyproto/*.protois unchanged. Triggers, permissions, other jobs, concurrency and fork guards are untouched.Job timeout rationale
Go Build & Testtook 15.8 to 21.9 minutes (median about 20.7) over the last 12 completed runs. 40 minutes is roughly 1.8x the slowest observed run, so ordinary variance will not trip it, and it is far below the 6 hour GitHub default. The 5 minute step timeout is what actually bounds the apt hang. The proto step itself took 9 to 19 seconds in those runs.Alternative considered
Download a pinned
protocrelease and check its sha256. That removes apt entirely and is cacheable, but it adds a version and checksum to maintain and a new download dependency. Bounded apt with retries plus a step timeout meets the acceptance criteria with the smallest diff, so I chose that.Verification
github.repository == 'Kpa-clawbot/CoreScope'is 9 before and after, and the diff of the guard lines is empty.sudo apt-getlines removed: allproto/*.protovalidate and exit is 0.proto/with an invalid.protoadded makes the step exit 1 with the protoc error.protocoffPATHthe step exits 1 withprotoc not found after install.Not verified
A real apt hang cannot be provoked in CI, so the fail-fast behaviour on a genuine stall is reasoned from the timeouts, not observed.
🤖 Generated with Claude Code