Skip to content

ruby-head download failed due to bug in GitHub API/Octokit #826

@eregon

Description

@eregon

Failure: https://github.com/ruby/ruby-bench/actions/runs/19442497500/job/55628938316?pr=433

Downloading Ruby
  https://github.com/ruby/ruby-dev-builder/releases/latest/download/ruby-head-ubuntu-24.04-x64.tar.gz
  Took   0.17 seconds
Error: Error: Unavailable version head for ruby on ubuntu-24.04

Because of:
https://github.com/ruby/ruby-dev-builder/actions/runs/19441331875/job/55627444573

Step Publish Release:

Run gh release edit "v20251117.190611" --draft=false
https://github.com/ruby/ruby-dev-builder/releases/tag/v20251117.190611

Step Run eregon/keep-last-n-releases@v1:

Run eregon/keep-last-n-releases@v1
  with:
    n: 3
    remove_tags_without_release: true
    dry_run: false
  env:
    GITHUB_TOKEN: ***
Full Releases
  All 0 Full releases (oldest to newest):
  Only 0 Full releases left (<= n=3), not deleting any
  Kept Full releases:
  0 Full releases to be deleted:
Draft Releases
  All 4 Draft releases (oldest to newest):
  Release created at 2025-11-13T19:06:05Z, tag: v20251113.190605
  Release created at 2025-11-14T19:06:31Z, tag: v20251114.190627
  Release created at 2025-11-14T19:25:57Z, tag: v20251114.192648
  Release created at 2025-11-14T19:25:57Z, tag: v20251115.190552
  Kept Draft releases:
  Release created at 2025-11-14T19:06:31Z, tag: v20251114.190627
  Release created at 2025-11-14T19:25:57Z, tag: v20251114.192648
  Release created at 2025-11-14T19:25:57Z, tag: v20251115.190552
  1 Draft releases to be deleted:
  
  Deleting Release created at 2025-11-13T19:06:05Z, tag: v20251113.190605
  Deleting tag v20251113.190605
  Tag v20251113.190605 does not exist: Reference does not exist - https://docs.github.com/rest/git/refs#delete-a-reference
Removing tags without an associated release
  All tags: v20251117.190611, v20251116.190554
  All tags with a release: v20251115.190552, v20251114.192648, v20251114.190627, v20251113.190605
  2 tags to be deleted:
  Deleting tag v20251117.190611
  Deleting tag v20251116.190554

So this is wild, there is release v20251117.190611 which exists at https://github.com/ruby/ruby-dev-builder/releases/tag/v20251117.190611 but the action deleted the tag of that release (making it a draft release), because octokit.repos.listReleases didn't return that release at all! (even though it was a draft release since ~25min and just became a non-draft release).
And so the action though it's a leftover tag without a release and cleaned it up.
As a result there was no non-draft release left and the download failed.

This seems a bug in Octokit or the GitHub API so the only thing I can think of now is to force dry-run mode until this gets fixed upstream: eregon/keep-last-n-releases@be7ca8f

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions