Skip to content

fix(release): fail the release step on GitHub API errors - #83

Merged
jdx merged 1 commit into
mainfrom
fix/release-fail-on-api-errors
Nov 27, 2026
Merged

jdx merged 1 commit into
mainfrom
fix/release-fail-on-api-errors

Conversation

@jdx

@jdx jdx commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Before: when the GitHub API rate-limited the Release workflow's "Create releases" step, the step carried on. The release listing printed its error body, the for loop treated each word of it as a release id, and || true hid every failed delete. The old floating release survived, a second draft with the same name was created next to it, and upload-assets then failed with release not found. This is what broke the Ruby 4.0.6 rebuild in run 46076408887.

After: an API error while listing or deleting the floating release fails the step right away, before any release is created, so a rerun starts clean. Deleting the floating tag still ignores a missing ref (404/422) but fails on anything else.

How: the listing is captured into a variable first, so bash -e stops on a non-zero gh api; the || true on release deletes is dropped; the tag delete only tolerates a missing ref.


Generated by Claude Code


Note

Low Risk
CI-only release workflow scripting; behavior is stricter on API errors with no production runtime impact.

Overview
Tightens Create releases cleanup so GitHub API failures stop the job instead of leaving a broken half-created release state (the failure mode that broke the Ruby 4.0.6 rebuild).

Floating release IDs are listed into release_ids first, so a failed gh api (e.g. rate limit) aborts under bash -e instead of feeding the error text into the delete loop. Release deletes no longer use || true, so a failed delete fails the step. Tag deletion still tolerates a missing ref (404/422) but surfaces and exits on any other API error.

Reviewed by Cursor Bugbot for commit 653f500. Bugbot is set up for automated code reviews on this repo. Configure here.

A rate-limited release listing printed its error body, the loop word-split
it into release ids, and `|| true` hid every failed delete. The old floating
release survived, a duplicate draft was created, and upload-assets failed
with "release not found" (Ruby 4.0.6 rebuild).

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

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3f0bd8fe-80d5-4e75-9474-51cb33bc57df
Commits

Reviewing files that changed from the base of the PR and between ea856bd and 653f500.

Files selected for processing: 1

  • .github/workflows/release.yml
  • 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

@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The release step now stops when listing or deleting floating releases fails.

  • Release cleanup errors stop draft creation.

jdx explicitly intends release-delete errors, including 404 responses, to stop the step.

Reviews (1) · Last reviewed commit: "fix(release): fail the release step on G..." · Reviewed by Greptile

@jdx
jdx merged commit 80880b8 into main Nov 27, 2026
12 checks passed
@jdx
jdx deleted the fix/release-fail-on-api-errors branch November 27, 2026 23:07
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.

2 participants