Skip to content

Fix latest tagging in hotfix/release - #4683

Merged
jmg-duarte merged 1 commit into
mainfrom
jmgd/fix-tagging
Jul 29, 2026
Merged

Fix latest tagging in hotfix/release#4683
jmg-duarte merged 1 commit into
mainfrom
jmgd/fix-tagging

Conversation

@jmg-duarte

Copy link
Copy Markdown
Contributor

Description

Fixes hotfix/release tagging to rely on the latest version instead of the "latest" whatever is available.
This bug led to the following being mischaracterized as part of 2.371 when we're releasing 2.372

Changes

  • Use the gh api to fetch the latest 10 releases, sort by version, use the latest one to compute the next version

How to test

Run a PR with this, candidate will be #4679

@jmg-duarte
jmg-duarte requested review from a team as code owners July 29, 2026 15:55
@claude

claude Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Claude finished @jmg-duarte's task in 2m 11s —— View job


PR Review: Fix latest tagging in hotfix/release

Nice fix — switching from releases/latest (which returns whatever GitHub flags as "latest", not the highest version) to fetching recent releases, filtering to real vX.Y.Z tags, and sort -V | tail -1 is the right approach. The stricter regex and the new "tag exists without a release" guard in hotfix.yml are good hardening. Two points below.

Inline findings

  • 🟡 per_page=10 may be too small — draft releases are listed first by the API, so a burst of drafts (or >10 recent releases) can push the true latest out of the window and produce an empty result → exit 1. Suggested widening to per_page=100. (comment)

Additional note (couldn't attach inline — outside the diff)

  • 🔵 Consistency: hotfix.yml now guards against a pre-existing tag with no release, but release.yml's Create Tag step (git tag $NEW_TAG around line 58) has no such guard. If a prior weekly run pushed the tag but failed before creating the release, this fails with a bare "tag already exists" error (only surfaced via notify-failure). Adding the same git rev-parse --verify check there would make the failure actionable. Fix this →

Everything else (token wiring, sort -V handling the v prefix, empty-result handling) looks correct.

Comment thread .github/workflows/release.yml

@MartinquaXD MartinquaXD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. 👍

@jmg-duarte
jmg-duarte added this pull request to the merge queue Jul 29, 2026
Merged via the queue into main with commit aced952 Jul 29, 2026
24 checks passed
@jmg-duarte
jmg-duarte deleted the jmgd/fix-tagging branch July 29, 2026 16:30
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
@squadgazzz

Copy link
Copy Markdown
Contributor

No strong opinion, but I guess it was a problem with the intermediate release, not the CI job, where someone just put the "latest" tag on it instead of keeping v2.372.x to be the latest.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants