Skip to content

fix(ci): link-issue check must not fail on transient GitHub API errors#36611

Merged
sfreudenthaler merged 1 commit into
mainfrom
issue-36610-linkissue-jq-guard
Jul 17, 2026
Merged

fix(ci): link-issue check must not fail on transient GitHub API errors#36611
sfreudenthaler merged 1 commit into
mainfrom
issue-36610-linkissue-jq-guard

Conversation

@sfreudenthaler

@sfreudenthaler sfreudenthaler commented Jul 16, 2026

Copy link
Copy Markdown
Member

What

Makes the merge-gating link-issue check resilient to transient GitHub API errors. Three comment-maintenance steps in issue_comp_link-issue-to-pr.yml piped raw curl -s output straight into jq; during an API brownout the 5xx/HTML error body made jq exit 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)
  • fall back to an empty JSON array if the fetch or a jq -e validity check still fails

These 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

#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

@dcolina dcolina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good the fallback added to avoid the error when get API errors. 👍🏽

@github-actions github-actions Bot added the Area : CI/CD PR changes GitHub Actions/workflows label Jul 17, 2026
@sfreudenthaler
sfreudenthaler added this pull request to the merge queue Jul 17, 2026
@mergify

mergify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Merged via the queue into main with commit 5d50248 Jul 17, 2026
41 of 43 checks passed
@sfreudenthaler
sfreudenthaler deleted the issue-36610-linkissue-jq-guard branch July 17, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area : CI/CD PR changes GitHub Actions/workflows

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

link-issue check fails on transient GitHub API errors — unguarded curl|jq in comment-maintenance steps

2 participants