Repository navigation
Retry gh auth token validation on transient GitHub API errors - #110769
Conversation
praktika's GH-auth pre-step runs `gh auth login --with-token`, which validates the token against api.github.com. A single transient 5xx there (e.g. HTTP 503 Service Unavailable) hard-failed the whole job with "GH auth failed - required by job" (seen on a 40+ min LLVM Coverage job). Retry the token-validation call up to 4 times with exponential backoff, but only on transport-class errors (5xx/429/timeouts/connection resets). Non-transient auth errors (e.g. HTTP 401 bad credentials) stay fatal and fail fast. Reuses the existing Shell.check retries/retry_errors mechanism, mirroring the docker buildx and wget retry patterns already in the repo. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-1:20260717-010100 |
|
cc @maxknv @leshikus — could you review this small praktika fix? The GH-auth pre-step ( |
|
Workflow [PR], commit [1502ba9] Summary: ✅ AI ReviewSummaryThis PR makes Praktika retry Tests
Final Verdict
|
| stdin_str=f"{access_token}\n", | ||
| strict=True, | ||
| retries=4, | ||
| retry_errors=_GH_AUTH_RETRY_ERRORS, |
There was a problem hiding this comment.
The new contract here is "retry transient gh auth login --with-token failures, but still fail fast on auth-class errors". None of that is pinned in ci/tests yet. Because this pre-step gates every Praktika job and we already have executable-level regression tests for similar stderr-driven retry loops, please add a small fake-gh test that proves both sides: transient HTTP 503/timeout output is retried, while a permanent HTTP 401 still fails on the first attempt.
…th-retry-503 Retry gh auth token validation on transient GitHub API errors
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
praktika's GH-auth pre-step runs
gh auth login --with-token, which validates the token againstapi.github.com. A single transient GitHub API 5xx there (e.g.HTTP 503 Service Unavailable) hard-failed the entire job withGH auth failed - required by job.Observed on a 40+ min
LLVM Coveragejob (PR #110674, commit fd47e5f):This retries the token-validation call up to 4 times with exponential backoff, but only on transport-class errors (5xx / 429 / timeouts / connection resets). Non-transient auth errors (e.g.
HTTP 401 Bad credentials) stay fatal and fail fast. It reuses the existingShell.checkretries/retry_errorsmechanism, mirroring the docker buildx (BUILDX_RETRY_ERRORS) and wget retry patterns already in the repo.Verified with a fake
ghemitting the exact 503 line: without retry a single 503 hard-fails; with the fix it survives 2 transient 503s and succeeds on the 3rd attempt; a non-transient 401 still fails fast after 1 attempt (no wasted retries).Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110674&sha=fd47e5fd4a17fd5d2e8718015c62a288d297fb33&name_0=PR&name_1=LLVM%20Coverage
Version info
26.7.1.1110(included in26.7and later)