Closed norkje closed 5 years ago
Reckoner::reckon
checks all claimed versions. Would it be more correct to only check claimed versions that are reachable from the commit that has been tagged?
The commit with tag 0.2.0
can not be reached by the commit with tag 0.1.1
.
@mikaelvik I don't think the claimed version checking is the issue here. The reason we check all of them is to avoid some re-releasing something that's been released elsewhere in the repo. It shouldn't prevent you from rebuilding a tagged version.
There's definitely a bug here. I was able to reproduce this with your repo and by creating a new repo describing your steps. However, I got two very different commit graphs between the two:
Your Repo
* f8637fb (origin/release-0.1, release-0.1) Fix feature 1
| * e95e0c5 (HEAD -> master, origin/master, origin/HEAD) Fix feature 1
| * 32140f1 Add feature 2
|/
* 7b07761 Add feature 1
* c2096ae Init
* 2c422b4 (tag: 0.1.1) Fix for feature 1
| * 236b83d (tag: 0.2.0) Fix for feature 1
| * 0131ee2 (tag: 0.2.0-rc.1) Add feature 2
|/
* ed96d1b (tag: 0.1.0) Add feature 1
* 3ceb4ac Init
Manual Steps
* ac5d996 (tag: 0.1.1, release-0.1) Fix feature 1
| * f6dd0f7 (tag: 0.2.0, master) Fix feature 1
|/
| * 035c80e (tag: 0.2.0-rc.1) feature 2
|/
* b963e53 (HEAD, tag: 0.1.0) feature 1
* db5ccf0 init
Your test repo seems to have some repeated history if you look at the individual branches they don't all line up with the same commits.
The main part that seems problematic in the manual one is that 0.2.0 is tagged off master and not as another commit building on top of 0.2.0-rc.1. Is this intentional? If so, can you explain your workflow more, so I can see if that jives with how I expect reckon to behave?
At a minimum there's something that could be validated or enforced here, but the behavior definitely seems wrong.
Actually, I tracked those manual steps wrong, let me try that again.
Yeah, this looks way more correct:
* d13db36 (tag: 0.1.1, release-0.1) Fix feature 1
| * f356552 (tag: 0.2.0, master) Fix feature 1
| * e0b778e (tag: 0.2.0-rc.1) feature 2
|/
* 589825c (HEAD, tag: 0.1.0) feature 1
* 49631b4 Init
So yeah, this is definitely a bug. It seems to be thinking 0.2.0 is the current version on the 0.1.0 and 0.1.1 tags, which it obviously isn't. May need to add some more logging to reckon to make it more apparent what's going wrong here.
Great that you were able to reproduce the bug.
I work with @norkje and we're eager to start using reckon. Not being able to rebuild previous versions would definetely be a no-go.
Is this the desired behavior or is this a bug?
Example is located here -> https://github.com/norkje/reckon-rebuild-final-tag-bug