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

Merging from develop to feature branch causes MinorPatch to change #1525

Closed
DOMZE opened this issue Nov 8, 2018 · 10 comments
Closed

Merging from develop to feature branch causes MinorPatch to change #1525

DOMZE opened this issue Nov 8, 2018 · 10 comments
Labels
Milestone

Comments

@DOMZE
Copy link

DOMZE commented Nov 8, 2018

Starting with a clean master branch with only a GitVersion.yml config file

The following scenario, after merging develop into feature/featureA causes gitversion (in feature/featureA) to display 1.1.1 as MajorMinorPatch. I would expect it to stay at 1.2.0 or move to 1.3.0 if there's a release branch (release/1.2.0) created

Flow:
bug

Git commands to reproduce issue

git tag 1.1.0
git checkout -b develop
git commit -m "commit in develop" --allow-empty # 1.2.0-alpha.1
git checkout -b feature/featureA
git commit -m "commit in featureA" --allow-empty # 1.2.0-featureA.2
git commit -m "commit in featureA" --allow-empty # 1.2.0-featureA.3
git checkout develop
git commit -m "commit in develop" --allow-empty # 1.2.0-alpha.2
git commit -m "commit in develop" --allow-empty # 1.2.0-alpha.3
git checkout feature/featureA # 1.2.0-featureA.3
git merge develop --no-ff

Using GitVersion 4.0.0 and ContinuousDeployment in all branches

@DOMZE
Copy link
Author

DOMZE commented Nov 13, 2018

@arturcic @asbjornu @dazinator @gep13 @pascalberger any thoughts?

@asbjornu
Copy link
Member

@DOMZE: How does your GitVersion.yml file look like?

@DOMZE
Copy link
Author

DOMZE commented Nov 14, 2018

@asbjornu as follow:

mode: ContinuousDeployment
branches: {}
ignore:
  sha: []

@dazinator
Copy link
Member

dazinator commented Nov 14, 2018

My assumptions are inline with @DOMZE but I could easily be missing something. Would be good to examine what test cases we have around this, and add a few to verify the behaviour we expect!

@asbjornu
Copy link
Member

@DOMZE: Are you able to write a test that provokes this problem and submit it as a PR?

@DOMZE
Copy link
Author

DOMZE commented Nov 16, 2018

@asbjornu @dazinator Please see PR #1533 for the demonstration of this bug.
The test fails

It also includes the demo for Issue #1526

@DOMZE
Copy link
Author

DOMZE commented Nov 21, 2018

@asbjornu any updates, especially on PR #1526 as this is a blocker for us for our CI pipeline

@jbaehr
Copy link
Contributor

jbaehr commented Dec 11, 2018

Some months ago we also provided a demonstration for what I believe is the very same problem: #1446. We still see this from time to time, but not always. I have repos where merging develop into a feature works four times and the fifths shows this problem (without any releases or tagging in between).

@ruhullahshah
Copy link
Contributor

I have added a fix for this issue, that is waiting to get merged
#1446

@asbjornu
Copy link
Member

Since #1446 is merged, I suppose this can be closed.

@arturcic arturcic added this to the 5.0.0 milestone Feb 27, 2019
@arturcic arturcic added the Bug label Mar 7, 2019
asbjornu pushed a commit to asbjornu/GitVersion that referenced this issue Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants