mirror of
https://github.com/semver/semver.git
synced 2026-07-11 04:52:47 -05:00
[GH-ISSUE #917] How to approach hotfix versions? #5693
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kelso on GitHub (Feb 8, 2023).
Original GitHub issue: https://github.com/semver/semver/issues/917
Situation gets unclear, when your release workflow includes these:
Each version tested on staging is then promoted (copied) to the production.
Only suffix mentioned on semver docs is a Pre-release, but is not suitable for the workflow and naming of hotfixes. it's quite the opposite. Docs say:
But -hotfix would have higher precedence than normal version.
Example scenario:
1.1.0- version deployed to staging server, tested by testers, then released to production server too1.1.1- bugfix deployed to staging server, not yet tested nor released to production serverLet's say, then on the production, still running
1.1.0, is discovered a critical bug.Now we need to release a hotfix version to the production - including only fixes of the critical bug, excluding changes (bugfixes) in 1.1.1 (it is still on staging server only and this version needs to be "approved" by testers confirming the fixes actually work; public didn't see it on production yet)
What is the proper way to name that hotfix version, if the "1.1.1" is already taken?
What about
1.1.0.1? (hotfix for the verion 1.1.0)I think Ruby on Rails is following the same versioning of 4th number, for releasing security vulnerabilities fixes. Despite they not have the staging/production situation I mentioned.
https://rubygems.org/gems/rails/versions
Or should be staging versions marked as .pre-release, before it goes to production? But, in our case, when staging is promoted to production, nothing is changed. Why mark some 1.5.1.pre-release later as 1.5.1 if it's the same code base.
Thanks for any advice.
@ljharb commented on GitHub (Feb 8, 2023):
1.1.2, which includes all the changes in 1.1.1.
which server it's deployed to is irrelevant imo, once you've cut the version number that's what's published.
@budd3r commented on GitHub (Feb 8, 2023):
I have been wrestling with the same situation, and am interested in how others are handling it.
I don't feel that 1.1.2 satisfies the situation that the author describes.
For example, if the 1.1.0 version was released from a release branch, but the 1.1.1 version (and possibly others for that matter) already exist (possibly due to releasing from a tag on the mainline branch) -- there needs to be a way to include a hotfix on the release branch that is supported by semver.
@ljharb commented on GitHub (Feb 8, 2023):
The only way would be indeed shipping prereleases and promoting them later, even if it's the same code, because then what the non-prerelease status is indicating is "deployed to production".
Either way I don't think semver makes as much sense at the deployed application level; it's more for software that other software consumes imo.
@steveklabnik commented on GitHub (Feb 9, 2023):
Yes, the way to do this officially is 1.1.2.
You could like try and do something where you only push "prereleases" to staging and then they become "releases" when they hit production, but that seems like a lot of work.
I would also agree with this, which is certainly why this feels a bit awkward.
@kelso commented on GitHub (Feb 14, 2023):
Thank you for all your comments.