-
I have a repository with ~150 branches, of which ~40 are release branches. Debugging the code I observed there are strategies to calculate the base version not listed in the documentation, in particular GitVersion.VersionCalculation.TrackReleaseBranchesVersionStrategy That strategy start jumping back in the commit history and takes ~2 hours to complete. After this time spent, the selected base version is the same as the one selected by TaggedCommitVersionStrategy. I wonder if TrackReleaseBranchesVersionStrategy can be optimized:
All my tests were done in version 5.9.0. Unfortunately I cannot override with a customized gitversion executable due to company's policy. Any advise from the dev team? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
@yecarri I see you're using an old version. So maybe you can try 5.12.0 instead. At the moment we're working on the v6.0 version. It's still in beta but if you are allowed to, you can give it a try. |
Beta Was this translation helpful? Give feedback.
-
Hi @arturcic I expected the process to work this way:
But what I see is that the algorithm continues looking into ancestors even if it found version tags. TrackReleaseBranchesVersionStrategy is expensive. It should be called only if ConfigNextVersionVersionStrategy, MergeMessageVersionStrategy, TaggedCommitVersionStrategy, and VersionInBranchNameVersionStrategy failed to get a base version. And FallbackVersionStrategy should be called only if all the above failed. I don't see a reason to spend 2 hours jumping over ancestors when I started in a tagged version or I found a tagged version in one or 2 linear jumps. Is there a reason not to apply the strategies this way? |
Beta Was this translation helpful? Give feedback.
-
As far as I remember we have some fixes in the 6.x version, so if you don't mind test the latest beta.4 version. There are some breaking changes there, mostly configuration related, but you can give it a try |
Beta Was this translation helpful? Give feedback.
-
I'd love to, but I don't have dotnet-8 in my dev machine. |
Beta Was this translation helpful? Give feedback.
-
Great that you have spent so much time. In my opinion 3 minutes is still too long. Actually in 6.x we have touched a lot of code and changed the concepts to address not only how the version numbers are created. For instance the plan is to create an flags enum to give the user the option to decide which strategies are executed or not: Anyway the topic performance test is something which needs to be ensured and this is a task which is open. Would you like to help for instance to create a plan how to test this? Or create example repositories for the performance tests? |
Beta Was this translation helpful? Give feedback.
As far as I remember we have some fixes in the 6.x version, so if you don't mind test the latest beta.4 version. There are some breaking changes there, mostly configuration related, but you can give it a try