Skip to content

fix(helm-deploy-eks): pass makeLatest=legacy so GH re-evaluates latest on prod#155

Merged
pdodgen-revparts merged 1 commit into
mainfrom
devex-1655-make-latest-legacy
Jul 13, 2026
Merged

fix(helm-deploy-eks): pass makeLatest=legacy so GH re-evaluates latest on prod#155
pdodgen-revparts merged 1 commit into
mainfrom
devex-1655-make-latest-legacy

Conversation

@pdodgen-revparts

Copy link
Copy Markdown
Contributor

Symptom

encodium/batch's releases page shows an older rc as 'latest' even though newer rc iters were successfully promoted to prod after it (all have prerelease: false).

Root cause

GitHub REST PATCH /releases/{id} only reevaluates the 'latest' designation if the request explicitly includes make_latest. Per GH docs: 'If not defined, the release will not be reevaluated.'

The ncipollo/release-action documents makeLatest: legacy as its default, but when the input is omitted it doesn't include the field in the outgoing PATCH — so we hit the no-reevaluation case. Every promoted rc keeps the flag from the FIRST one that had it, regardless of what came after.

Fix

Pass makeLatest: legacy explicitly. GitHub then re-evaluates on every prod deploy:

  • rc.9 promoted first → latest
  • rc.10 promoted → GH sees rc.10 > rc.9 by semver → rc.10 becomes latest
  • rc.11 promoted → rc.11 becomes latest
  • rc.12 promoted → rc.12 becomes latest

Rollback safety: legacy NEVER downgrades. If prod is on rc.12 and someone deploys rc.7 as a rollback, GH sees rc.7 < rc.12 and leaves rc.12 as latest. That's the semantic we want.

Companion

A one-time API repair of encodium/batch's current state is planned to nudge GH into re-evaluating rc.12 — not part of this PR.

…t on prod

Surfaced 2026-07-13 on encodium/batch: rc.9 stayed pinned as 'latest'
even after later rc iters were successfully promoted (all had prerelease
flipped to false).

Root cause: GH REST PATCH /releases/{id} only reevaluates the 'latest'
designation if the request explicitly includes make_latest. Per GH docs:
'If not defined, the release will not be reevaluated.' The ncipollo/
release-action documents makeLatest=legacy as its default but when the
input is omitted it doesn't include the field in the outgoing PATCH.

Fix: pass makeLatest=legacy explicitly. GitHub then compares this
release against the current latest by semver + creation date and
re-designates if higher. For RT v2 tag shape (vX.Y.Z-rc.<date>.<iter>),
every promoted rc becomes latest when semver-higher than the previous
latest. Rollback deploys of older rc's correctly leave the newer rc
as latest (legacy doesn't downgrade).
@pdodgen-revparts
pdodgen-revparts marked this pull request as ready for review July 13, 2026 17:48
@pdodgen-revparts
pdodgen-revparts requested a review from a team as a code owner July 13, 2026 17:48
@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
CI-only change to release metadata on prod deploys; no runtime or application behavior.

Overview
Prod deploys in helm-deploy-eks now pass makeLatest: legacy to ncipollo/release-action when updating the GitHub release, so each promotion triggers GitHub to recompute which release is Latest instead of leaving the first promoted rc pinned.

Without that field on PATCH /releases, GitHub does not re-evaluate latest even though the action documents legacy as the default but omits it from the API call. Semver-higher promoted rcs become latest; rolling prod back to an older tag does not demote a newer semver latest.

Reviewed by Cursor Bugbot for commit 67f0fb4. Bugbot is set up for automated code reviews on this repo. Configure here.

@pdodgen-revparts
pdodgen-revparts merged commit 0024a7e into main Jul 13, 2026
2 checks passed
@pdodgen-revparts
pdodgen-revparts deleted the devex-1655-make-latest-legacy branch July 13, 2026 17:48
pdodgen-revparts added a commit that referenced this pull request Jul 13, 2026
…on rc tags) (#156)

fix(helm-deploy-eks): switch makeLatest legacy → true (legacy semver broken)

Follow-up to #155. Tested `legacy` against encodium/batch rc.9 vs
rc.12 on 2026-07-13 and it did NOT re-designate. GH's semver
comparator appears to treat `2026-07-09` in the prerelease identifier
as an alphanumeric segment (hyphens present), then compares subsequent
segments incorrectly — so `-rc.2026-07-09.12` does not rank above
`-rc.2026-07-09.9` in its impl.

Switching to `make_latest: true`. Semantic under RT v2: 'latest
release' = whatever is currently running in prod. Every successful
prod deploy re-designates latest. Rollback deploys of older rc's
correctly move latest backwards to reflect what's actually deployed —
which is what you want during an incident anyway (latest = truth of
what's live).

Main-branch clean tags (`vX.Y.Z`) go through a different action on
create (not PATCH) and use normal semver ordering — not affected by
this change.
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