Skip to content

fix(release): keep the latest alias on the highest version when a hotfix ships - #1262

Merged
BryanFRD merged 1 commit into
mainfrom
fix/latest-tag-no-backward
Oct 3, 2026
Merged

BryanFRD merged 1 commit into
mainfrom
fix/latest-tag-no-backward

Conversation

@BryanFRD

@BryanFRD BryanFRD commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Closes #1232

Releasing 1.2.4 after 2.0.0 moved latestTag to 1.2.4. Following the decision on the issue, latest now means the highest released version, like the major and minor floating tags since #1226.

The behaviour differs from those tags on one point: a backward latest does not fail the release. A hotfix on a maintenance line is routine, and failing it would force --force, which would then drag latest backward, the very thing being prevented. So the release goes through, latest stays where it is, and the package output says Kept latest on 2.0.0: 1.2.4 is older. --force still moves it backward, with a warning, for anyone who wants the old behaviour.

This changes what users who relied on "most recently released" see, which is why the issue asked for a decision first. The config docs (EN and FR) said latestTag was exempt from the guard; they now describe the new rule.

Tests: a hotfix leaves latest and its remote ref alone while v1 still follows; --force moves it back. The first fails without the fix.

@BryanFRD
BryanFRD enabled auto-merge (squash) October 3, 2026 10:55

@ferrfleet ferrfleet Bot 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.

Looks correct. latest_moves reuses backward_from, so the alias stays put on an older-line release, still moves with --force, and still moves when the existing tag message isn't one FerrFlow wrote. Skipping the alias with a status line instead of an error is the right call, because a hotfix shouldn't fail the release. Both tests cover the skip path and the force path, and the EN/FR docs match.

Nit: the pkg_outputs.iter_mut().rev().find(...) lookup is now duplicated in move_floating_tag and latest_moves. A small push_line(plan, pkg, line) helper would remove the copy.

Test and Coverage were still running when I reviewed, so I haven't seen them pass.

@BryanFRD
BryanFRD merged commit 4928ce4 into main Oct 3, 2026
33 checks passed
@BryanFRD
BryanFRD deleted the fix/latest-tag-no-backward branch October 3, 2026 10:58
ferrflow Bot added a commit that referenced this pull request Oct 3, 2026
## [7.27.3] - 2026-10-03

### Bug Fixes

- fix(release): keep the latest alias on the highest version when a hotfix ships (#1262)
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.

fix(release): latestTag alias moves backward on a hotfix

1 participant