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

[ISSUE]: gitversion 6.10.0 (and 6.5.0 as well) hangs for a while when calculating version #4409

Open
2 tasks done
simonachmueller opened this issue Feb 6, 2025 · 3 comments

Comments

@simonachmueller
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

GitVersion.Tool, gittools/actions, AzureDevops task

GitVersion version

6.10.0

Operating system

Linux, Windows

What are you seeing?

We are using git flow and mark specific commits on the release branch with a tag (looks like vX.X.X, v1.2.3 for example) and then run a Azure Devops build pipeline selecting that tag. Here is the GitVersion.yml

assembly-informational-format: "{FullSemVer}"
branches:
  develop:
    label: develop
  release:
    label: release
    is-release-branch: true
  hotfix:
    label: hotfix
ignore:
  sha: []
merge-message-formats: {}

Relevant release pipeline:

  - checkout: self
    clean: true
    fetchDepth: 0
  - task: gitversion/setup@3
    displayName: gitversion/setup
    inputs:
      versionSpec: 6.0.x
  - task: gitversion/execute@3
    displayName: gitversion/execute

We just updated from gitversion 5.12.0 to 6.0.5 and the gitversion/execute task takes now 1.5 hours for a first run and 3.5 hours a week later.
v5.12.0 finishes within a minute.
I can reproduce that behavior locally, by checking out our repository on a specific tag.

Gitversion starts as /opt/hostedtoolcache/GitVersion.Tool/6.0.5/dotnet-gitversion --roll-forward Major /home/vsts/work/1/s /output json /l console on the azure hosted build agent.
I can't provide the full output, but some findings:

Azure build agent reports memory and CPU warnings Agent environment resources - Disk: / Available 18306.55 MB out of 74244.74 MB, Memory: Used 6846.00 MB out of 6921.00 MB, CPU: Usage 94.92%

Gitversion runs fast in the beginning on tags with the output like Begin: Finding merge base between 'tags/v2.17.0' and 'origin/release/2.9.0'. etc
Then it stops for like 50 minutes and start to work on branches Begin: Finding merge base between 'hotfix/2.15.1' and 'master'.

Our repo has around a 100 active tags and somewhat about 15 active branches.

What is expected?

Gitversion finishes within few minutes

Steps to Reproduce

Run on a repo when a tag is checked out?

RepositoryFixture Test

No response

Output log or link to your CI build (if appropriate).

@HHobeck
Copy link
Contributor

HHobeck commented Feb 7, 2025

Is it possible to create a repository somehow to get it reproduceable? Or a integration test. What makes your repository so special beside the fact that you have a lot of tags.

@simonachmueller
Copy link
Author

Can I somehow collect anonymous logs from gitversion to be able to provide it here? I don't think I would be able to re-create similar public repository to provide if for you.

@simonachmueller
Copy link
Author

@HHobeck do you have ideas how I can provide additional information without exposing my repository?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants