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 tags as fromBranch parameter for hotfix-start #362

Open
FichteFoll opened this issue Sep 30, 2022 · 4 comments
Open

Support tags as fromBranch parameter for hotfix-start #362

FichteFoll opened this issue Sep 30, 2022 · 4 comments

Comments

@FichteFoll
Copy link

FichteFoll commented Sep 30, 2022

In our workflow, we do not maintain support branches but instead just tag releases when they are out (and then build a release from them). Unfortunately, starting a hotfix branch from a tag that does not have a branch does not work and the plugin refuses to complete the goal because it only expects a branch name in this field.

I would actually go ahead and suggest to rename fromBranch to or add an additional fromRef parameter that would accept any git ref, including a commit SHA-1, because that way you can use this goal inside CI and have it start a hotfix branch from any specific commit.

@aleksandr-m
Copy link
Owner

Hotfix start works only for production or one of the support branches, and hotfix finish acts differently if hotfix was started from support branch.
How finish goal will look if hotfix was started from the tag?

@FichteFoll
Copy link
Author

Good question. The successful Git branching model does not consider hotfix releases for older minor releases at all and only allows creating hotfix branches from master. That becomes a problem when your latest version is 2.1.0 but you need to provide a fix for the previous major version 1.10.1. The target hotfix version would be 1.10.2 but the model does not consider this case.

For a different toolchain (npm), we simply start a hotfix branch from the 1.10.1 tag and when finishing up the hotfix, we do not merge the hotfix automatically and instead leave that decision and action to the developer. The advantage of that is that you can easily resolve merge conflicts that an automatic merge would not be able to (and for older releases we always have those due to our in-repo changelog) and you'd also need to manually determine whether the fix needs to be upstreamed to one or multiple later minor/major branches, e.g. whether 2.0.x also needs a hotfix with the same change.

@aleksandr-m
Copy link
Owner

@FichteFoll So, no hotfix finish goal for hotfix branches started from a tag?
Do you need this plugin at all to create branch from a tag? Seems that is all you get from hotfix start goal, right?

@FichteFoll
Copy link
Author

The plugin is also responsible for updating the version in pom.xml, but that is indeed the only thing we need it for when doing hotfixes.

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