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

Breaking change introduced with 1.51.0 breaks tag workflow #211

Closed
gligorkot opened this issue Nov 22, 2022 · 6 comments · Fixed by #218
Closed

Breaking change introduced with 1.51.0 breaks tag workflow #211

gligorkot opened this issue Nov 22, 2022 · 6 comments · Fixed by #218

Comments

@gligorkot
Copy link

With 1.51.0 a breaking change was introduced to the API of this action, 2 really - the addition of the PRERELEASE setting, as well as the fact that we no longer look at the whole commit history when bumping versions.

For us, this really messed up the workflow - the prerelease is not an issue, but the version bump has really caught us off guard. We used to merge the first PR with the #minor keyword, and then every subsequent merge used to just increase the prerelease number. However now, if we miss #minor then our default patch kicks in, and often times it actually completely fails to tag.

This is our workflow:

We have 2 branches:

  • develop
  • main

Main is the "full release" branch, develop is the pre-release branch.

We squash merge PRs into develop, and make sure we add the #minor keyword to these.

So after 1.51.0 the workflow is broken because if we do a #minor bump on one PR, but we don't add a #minor on the next PR merge, it tries to do a patch but fails as the tag already exists.

Tags:

  • 1.0.0 - currently in main
  • 1.0.1-beta.0 - in develop after a previous PR merge without any keyword (default #patch used)
  • 1.1.0-beta.0 - currently where develop is after the #minor bump PR was merged

Next PR being merged before 1.51.0 would just increment the beta version to 1.1.0-beta.1 because of the previous #minor bump

After 1.51.0 it only respects the commit message for the specific commit, so the default #patch applies, however because of how the tags are ordered now as well, it tries to version it with 1.0.1-beta.0 and subsequently fails because that tag already exists.

@sbe-arg
Copy link
Collaborator

sbe-arg commented Nov 28, 2022

Sorry for the delay on this.
I'm considering rolling back to full history.

@sammcj what do you think? I think i have caused some damage with the changes.

@gligorkot
Copy link
Author

@sbe-arg I don't mind if it's a setting via an environment variable if people want to use it this way, but yeah that would be an additional functionality rather than a breaking change like it is currently.

@sbe-arg
Copy link
Collaborator

sbe-arg commented Nov 29, 2022

100% agree.
Let me first sort the tag bumps of this repo first #216

Ill make a pr for flagging via env var if using short history of full history with full by default
cc @sammcj

@sammcj
Copy link
Collaborator

sammcj commented Nov 29, 2022

Hey folks, sorry I've been swamped and am now playing catch-up - I think rolling back the change makes the most sense.

If the change can be isolated to if a specific input parameter or env - I think that's ok.

Longer term this project really needs better tests 😅

@gligorkot
Copy link
Author

Thanks guys, I appreciate you both jumping in on this and remediating.

@gligorkot
Copy link
Author

Legends! Thanks for fixing this.

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 a pull request may close this issue.

3 participants