Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for hotfixes? #539

Open
paul-uz opened this issue Aug 24, 2023 · 5 comments
Open

Support for hotfixes? #539

paul-uz opened this issue Aug 24, 2023 · 5 comments

Comments

@paul-uz
Copy link

paul-uz commented Aug 24, 2023

What should we do for a hotfix? Use fix? Or can we have a specific hotfix type added?

@mentalisttraceur
Copy link

Another example of something that would be well-served by #537 .

@mentalisttraceur
Copy link

I don't think it's a common-enough use-case to go into the core spec, but some projects have good reason to make the distinction between fixes-that-can-wait and fixes-that-need-to-go-in-now. So I can see at least two good reasons to have a hotfix change type distinct from a fix type:

  1. A hotfix change type with semantics like "bypass the normal pipeline (for example, any/all of: don't do the full slow testing; don't reject if the linter complains; fire off the release pipeline; exclude all non-hotfix changes merged since last release)".

  2. A hotfix change type with semantics like "this is like fix, but it is retroactively going into the most recent version, not into the next version (so tooling which automatically increments the version should treat it differently)".

    • I've worked with teams who don't like releasing hotfixes as new versions. You release 1.2.0, discover a bug, roll out a hotfix. A machine labels that 1.2.1 without a second thought. A human versed in office politics and image games thinks 1.2.1 might look bad and prefers to re-release as 1.2.0.

@paul-uz
Copy link
Author

paul-uz commented Aug 24, 2023

For me, a hotfix only ever increments the patch version, based on gitflow.

I think it's used by enough software developers/teams that it would be a great fit inthe core spec

@mentalisttraceur
Copy link

a hotfix only ever increments the patch version, based on gitflow.

Right, which means you at most want the 1st semantic I mentioned, and never the 2nd. That makes it more like a fix, and many teams would be happy to just use fix for that.

If I was designing a CCRFI for this, I'd make the 2nd semantic optional. For example, I might propose that tools by default treat hotfix as bumping the version just like fix does, but also implement a flag or environment variable which flips on "hotfix does not bump version" behavior.

Re: core spec fit: I agree that hotfixes are a very common distinction for teams to make in their commits, and if Conventional Commits was a "thicker" spec, I'd agree that hotfix should be in it! But looking at all the context clues, I infer that Conventional Commits is intended to be the smallest-viable-foundation for two goals: a parseable commit format, and mapping commits to SemVer semantics. The core only defines feat and fix change types, actively encourages extensions, and has never merged any of the community suggestions for other change types into core.

@paul-uz
Copy link
Author

paul-uz commented Aug 25, 2023

Lets see what the repo owner/maintainers say.

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

No branches or pull requests

2 participants