Repository navigation
CI: retry transient GitHub API failures in the Build profile diff master walk - #125807
alexey-milovidov merged 1 commit into
Conversation
…ter walk `_list_commits_page` ran one `gh api repos/ClickHouse/ClickHouse/commits` call and raised on the first non-zero exit or timeout, and the per-TU master first-parent walk makes ~20 such calls per job. GitHub fails single requests (HTTP 503 and 504, a body cut short so `--jq` reports `unexpected end of JSON input`, a stalled body) while the requests around them succeed, so one blip errored the whole check: 9 jobs on 9 PRs between 2026-10-03 and 2026-10-14, the failing anchors 11-15 days deep in walks whose earlier fetches had just succeeded, and the same commits passing on other runs. Retry the listing up to 3 times (after 5 s, then 10 s), keeping the 120 s per-call timeout. A timeout, an HTTP 5xx or 429, or a failure whose stderr names no HTTP status is retried; any other 4xx (unknown sha, permissions) fails at once, since `gh` reports an HTTP error as `gh: <message> (HTTP <status>)`. After the last attempt the error propagates as before, so the walk stays fail-close as the `extend_master_shas` docstring requires. The praktika `GH` helpers retry but pass no subprocess timeout, which ClickHouse#115201 kept on this call site on purpose. CI reports: - https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=124959&sha=1d61eebf3fe5ed809d4811ea947169074a3e1712&name_0=PR&name_1=Build%20profile%20diff (ClickHouse#124959) - https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125328&sha=ab772cc3b97c2e6777f2ef60723bcbeb5a5f29e3&name_0=PR&name_1=Build%20profile%20diff (ClickHouse#125328) - https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=122585&sha=bf8b2d2470663e1b5703c2014b7887fe2d5dd239&name_0=PR&name_1=Build%20profile%20diff (ClickHouse#122585) - https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=119371&sha=88edddd16dcd4250ac56e1642f964a03763097f4&name_0=PR&name_1=Build%20profile%20diff (ClickHouse#119371) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (3 nits, no blocker or major).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261014-135500 |
|
cc @leshikus, could you review this? |
|
Workflow [PR], commit [0b4fff1] Summary: ✅ AI ReviewSummaryAdds bounded retries to Final VerdictStatus: ✅ Approve |
579f4da
Related: #115201
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Build profile differrors when a singlegh api repos/ClickHouse/ClickHouse/commitscall of its master first-parent walk fails: HTTP 503 on #124959 and #125328,unexpected end of JSON inputon #122585, HTTP 504 on #119371. CIDB has 9 such jobs on 9 PRs since 2026-10-03.These are single-request blips:
_list_commits_pageraised on the first failure and the walk makes ~20 calls per job. In 7 of the 9 the failing anchor sits 11-15 days deep in a walk whose earlier fetches had just succeeded, and the same commits passed on other runs.The listing is now retried up to 3 times (after 5 s, then 10 s), keeping the 120 s per-call timeout. A timeout, an HTTP 5xx or 429, or a failure that names no HTTP status (a cut response) is retried; any other 4xx fails at once. A failure that outlasts the retries still fails the job, as the walk's fail-close contract requires. praktika's retrying
GHhelpers are not reused: they pass no subprocess timeout, which #115201 kept on purpose.Validated locally with a fake
ghreplaying the CI error strings in front of the real one (every transient class recovers, a 404 fails after one call, three 503s raise the last error), and against GitHub: the walk over the #124959 window returns the same 1547 commits as before.Workflow [PR]
Sync PR [sync-upstream/pr/125807]
Version info
26.11.1.198-master(included in26.11and later)