Skip to content

Retry transient GitHub failures in the firmware list sync - #151

Merged
thebentern merged 1 commit into
masterfrom
fix/firmware-sync-retry
Oct 14, 2026
Merged

thebentern merged 1 commit into
masterfrom
fix/firmware-sync-retry

Conversation

@thebentern

@thebentern thebentern commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

The recent failures reported on #132 were transient upstream errors, not bugs:

  • 2026-10-12: TypeError: fetch failed (network error)
  • 2026-10-14: GitHub 500 Internal Server Error fetching comments for firmware PR #12155

Every scheduled run since has passed. Each sync makes ~30 GitHub requests (one comments fetch per open firmware PR), and gh() had no retry, so a single blip failed the whole run.

Change

gh() in tools/fetch-firmware-list.mjs now retries network errors and 5xx responses up to 3 attempts, with 1s/2s backoff. 4xx responses (including rate limiting) still fail immediately.

Testing

  • Stubbed fetch: network error → 500 → success on attempt 3; 404 fails on the first call.
  • pnpm test: 62/62 passing.

Closes #132

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Reliability
    • Network failures and server errors now trigger up to three attempts, with brief pauses between retries. Other HTTP errors fail immediately.

Each sync makes ~30 GitHub requests (one comments fetch per open
firmware PR), and a single 5xx or network error failed the whole run
and filed a pipeline-alert. Retry those up to 3 attempts with backoff;
4xx responses still fail immediately.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d08d1264-b995-4a44-b5d6-6fcf28e15429
📥 Commits

Reviewing files that changed from the base of the PR and between 92b9b3f and fad6cc0.

📒 Files selected for processing: 1
  • tools/fetch-firmware-list.mjs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The firmware list fetch now retries network errors and HTTP 5xx responses up to three times. It waits one second and then two seconds between attempts. Other non-OK responses fail without retrying.

Changes: Firmware list fetching

Layer / File(s) Summary
Fetch retry handling
tools/fetch-firmware-list.mjs
The fetch path makes up to three attempts for network errors and HTTP 5xx responses, with one-second and two-second delays. Other non-OK responses fail immediately. After the final attempt, it propagates the network error or throws the GitHub status error.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to fad6c

The firmware sync retries transient network and server failures as intended; no actionable merge-blocking issue is established.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: retrying transient GitHub failures during firmware list synchronization.
Linked Issues check Passed Issue #132 has no explicit acceptance criteria. The linked PR objective is to prevent transient firmware-list sync failures. In tools/fetch-firmware-list.mjs, gh() retries network errors and HTTP …
Out of Scope Changes check Passed The reviewed change is limited to retry handling in tools/fetch-firmware-list.mjs. The retry logic supports the linked firmware-list sync objective. No unrelated change is identified in the availabl…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the list at dawn,
Then tries again when links are gone.
One second waits, then two go by,
A final status tells it why.
The firmware names arrive in view.

Comment @coderabbitai help to get the list of available commands.

@thebentern
thebentern merged commit c236367 into master Oct 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pipeline] Sync firmware list failed

1 participant