fix(ci): link-issue check must not fail on transient GitHub API errors#36611
Merged
Conversation
#36610) Three comment-maintenance steps piped raw curl -s output into jq with no HTTP or JSON guard; a 5xx/HTML brownout body made jq exit 5 and fail the merge-gating check (seen on PRs 36606/36608, 2026-07-16). Fetches now use curl -sf --retry 3 --retry-all-errors and degrade to an empty comment list on failure — cleanup is skipped or a fresh comment posted instead of the required check going red. Closes: #36610 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ogYXVeZsBVUHkwzdStYPJ
sfreudenthaler
marked this pull request as ready for review
July 16, 2026 23:06
sfreudenthaler
enabled auto-merge
July 16, 2026 23:06
dcolina
approved these changes
Jul 17, 2026
dcolina
left a comment
Member
There was a problem hiding this comment.
Looks good the fallback added to avoid the error when get API errors. 👍🏽
|
Tick the box to add this pull request to the merge queue (same as
|
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.
What
Makes the merge-gating
link-issuecheck resilient to transient GitHub API errors. Three comment-maintenance steps inissue_comp_link-issue-to-pr.ymlpiped rawcurl -soutput straight intojq; during an API brownout the 5xx/HTML error body madejqexit 5 and fail the required check even on correctly linked PRs (observed on #36606 — 3 consecutive failures — and #36608 on 2026-07-16).How
Same minimal guard at all three sites:
curl -sf --retry 3 --retry-all-errors(fail on HTTP errors, retry through brownouts)jq -evalidity check still failsThese steps are best-effort comment maintenance, so the correct degraded behavior is "skip cleanup / post a fresh comment", never "fail the check". Verified: YAML parses; guard pattern exercised against a live 502 endpoint and against non-JSON garbage — both degrade cleanly.
Closes: #36610
🤖 Generated with Claude Code
https://claude.ai/code/session_012ogYXVeZsBVUHkwzdStYPJ
This PR fixes: #36610