Skip to content

ci: make the release workflow retryable#3

Closed
AlinsRan wants to merge 1 commit into
masterfrom
ci/release-retryable
Closed

ci: make the release workflow retryable#3
AlinsRan wants to merge 1 commit into
masterfrom
ci/release-retryable

Conversation

@AlinsRan

@AlinsRan AlinsRan commented Jul 9, 2026

Copy link
Copy Markdown

The v4.1.6 release run (log) created the GitHub release and tag, then failed at luarocks upload: LUAROCKS_TOKEN was empty, so luarocks built the API URL as api/1//check_rockspec and got an opaque API failure.

Root cause is environmental — LUAROCKS_TOKEN is an org-level secret that is granted to api7/lua-resty-healthcheck but not to this repository. That has to be fixed in the org settings.

But the workflow also left no way to retry once that's done:

  • Re-running the failed job aborts at gh release create, because v4.1.6 already exists.
  • The push trigger only fires on a rockspecs/** change, so there is nothing to re-trigger.

Changes

  • Idempotent release creation — skip gh release create when the release already exists.
  • workflow_dispatch trigger taking the version as input, so a failed publish can be retried without inventing a new rockspec commit.
  • Fail fast when LUAROCKS_TOKEN is empty, with a message naming the actual problem instead of the api/1//check_rockspec symptom.
  • Fail fast when the rockspec for the version is missing.

Recovering v4.1.6

  1. Grant the org secret LUAROCKS_TOKEN to this repository.
  2. Merge this PR.
  3. Run the Release workflow via workflow_dispatch with version 4.1.6. The release already exists so it is skipped; only the luarocks upload runs.

Template expansion stays confined to env: blocks — no ${{ }} inside any run: body.

The v4.1.6 release run created the GitHub release but failed at the
luarocks upload because LUAROCKS_TOKEN was empty, leaving no way to retry:
re-running the job would abort on 'gh release create' since the release
already exists, and the push trigger only fires on a rockspec change.

- skip release creation when the release already exists
- add a workflow_dispatch trigger taking the version as input, so a failed
  publish can be retried without a new rockspec commit
- fail fast with a clear message when LUAROCKS_TOKEN is unavailable, rather
  than surfacing an opaque 'api/1//check_rockspec' API failure
- fail fast when the rockspec for the version is missing
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 319db9fb-0f96-4629-ac76-18a6cbf802a8

📥 Commits

Reviewing files that changed from the base of the PR and between bd4d34a and 5304a50.

📒 Files selected for processing (1)
  • .github/workflows/release.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-retryable

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

@AlinsRan

AlinsRan commented Jul 9, 2026

Copy link
Copy Markdown
Author

Dropping the workflow_dispatch approach — re-triggering by amending the release commit on master and force-pushing instead.

@AlinsRan AlinsRan closed this Jul 9, 2026
@AlinsRan AlinsRan deleted the ci/release-retryable branch July 9, 2026 07:00
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.

1 participant