ci: resilient protoc install to fix flaky release-CDN 504s - #557
Conversation
|
Warning Review limit reached
More reviews will be available in 2 minutes and 39 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
Note 🎁 Summarized by CodeRabbit FreeYour organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above. Comment |
arduino/setup-protoc@v3.0.0 downloads protoc-23.4 from the GitHub release CDN (objects.githubusercontent.com), which intermittently returns HTTP 504. The asset download is plain CDN traffic — repo-token (already set on all four steps) only authenticates the GitHub API release lookup, not the download — so the existing token does not prevent the flake. It hits whichever protoc-needing job loses the lottery (lint / schema-drift / rust-unit / build-bin), failing unrelated PRs; when build-bin is the loser, the dependent e2e + coverage jobs are skipped, so a green-code PR shows red CI. Replace it with a local composite action .github/actions/setup-protoc that downloads the SAME pinned protoc 23.4 with hard retries (curl --retry plus an outer 5x loop, 15s backoff) and installs it under $HOME (no sudo), exposing it via $GITHUB_PATH and pinning $PROTOC for prost/tonic build scripts. Keeps the exact version (no build risk from a distro protoc that may lack proto3 'optional') and DRYs the four call sites behind one action. Refs #550 (whose instrumented build kept losing the 504 lottery).
b38cdf6 to
aefb179
Compare
Problem
arduino/setup-protoc@v3.0.0flakes intermittently withon
protoc-23.4-linux-x86_64.zipfrom the GitHub release CDN (objects.githubusercontent.com). It hits whichever of the four protoc-needing jobs (lint,schema drift,rust unit + coverage,build aisix (instrumented)) loses the lottery, failing unrelated PRs. Whenbuild aisix (instrumented)is the loser, the dependente2e+coverage >= 90%jobs are skipped, so a green-code PR shows red CI (this blocked #550 across three reruns).repo-tokenis already set on all four steps — but it only authenticates the GitHub API release lookup, not the asset download, so it does not prevent the 504.Fix
A local composite action
.github/actions/setup-protocthat downloads the same pinned protoc 23.4 with hard retries (curl --retry 5 --retry-all-errorsinside an outer 5× loop, 15 s backoff) and installs it under$HOME(nosudo), exposed to later steps via$GITHUB_PATH. Drop-in replacement at all four call sites (−12/+4inci.yml).protoc(e.g. the apt package on ubuntu-22.04 lacks proto3optional) silently changing build behavior.sudo— installs under$HOME/.local, pinsPROTOCfor prost/tonic build scripts.Validation
This PR modifies the workflow, so its own CI runs every job through the new install path — if they go green (incl.
build aisix (instrumented)→e2e), the fix is proven against the real flake.Why not apt / a retry-action
protobuf-compileris the simplest "never touch the CDN" fix but changes the protoc version (version-dependent build risk) — rejected to stay zero-risk.Integrity note: the asset is fetched over HTTPS from GitHub's official release CDN (TLS-authenticated), matching the integrity guarantee of the action it replaces (neither verifies a SHA-256). A pinned checksum can be added later if desired.