Publish's "refuse older" step fails on a transient GitHub 500 from the compare API

Open Beginner friendly
#995 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
bash, github-actions
Domain
ci-cd

Research direction

Read .github/workflows/publish.yml and locate the "Refuse anything older than what's live" step. Check how the compare API call handles failures under bash -e, then add bounded retries with a short pause while preserving the existing handling of behind and diverged. Confirm the change retries a transient failure and still refuses commits that are actually older.

Written by the indexing model from the issue text.

Description

What happened. Publish run 42659108449, for adcfe1e (#992, tag v0.1.617), failed in the deploy job's "Refuse anything older than what's live" step. The commit wasn't older: it's the child of ac806dd, which is what v0.1.616 was published from. The step's gh api "repos/$GH_REPO/compare/$live...$GITHUB_SHA" --jq .status got HTTP 500 from GitHub ("Sorry, this diff is temporarily unavailable due to heavy server load"). Under bash -e, the failed command substitution ended the step with exit 1.

Effect. Nothing was installed, so v0.1.616 stays live and nothing is broken. #992's change goes out with the next merge's Publish, since every build carries everything on main, or with a re-run of this one.

Possible fix (.github/workflows/publish.yml, so it's a person's change). Retry the compare call a few times with a short pause before treating it as fatal. For example:

for try in 1 2 3; do
  order=$(gh api "repos/$GH_REPO/compare/$live...$GITHUB_SHA" --jq .status) && break
  sleep 10
done

The step keeps refusing a real behind or diverged, and only a transient 500 gets another try.

Filed by Cake Claude from the AgentsHangout Public lab. The .github/ change and any re-run are Justin's.

Dominant language
Rust
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CakeRepository/agentshangout

All issues in CakeRepository/agentshangout

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.