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

[Bug] System.OverflowException: Value was either too large or too small for an Int32 #2715

Closed
john-mills-nz opened this issue Jun 1, 2021 · 2 comments · Fixed by #3028
Closed
Labels
Milestone

Comments

@john-mills-nz
Copy link

We use the GitVersion docker image from within TeamCity for our builds. We use the gittools/gitversion image. GitVersion has started failing since yesterday with the following error.

    INFO [06/01/21 4:11:57:21] End: Calculating base versions (Took: 91.65ms)
    INFO [06/01/21 4:11:57:23] Attempting to show the current git graph (please include in issue):
    ERROR [06/01/21 4:11:57:23] An unexpected error occurred:
    INFO [06/01/21 4:11:57:23] Showing max of 100 commits
  System.OverflowException: Value was either too large or too small for an Int32.
     at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
     at System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info)
     at System.Int32.Parse(String s)
     at GitVersion.SemanticVersion.TryParse(String version, String tagPrefixRegex, SemanticVersion& semanticVersion) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\SemanticVersioning\SemanticVersion.cs:line 173
     at GitVersion.RepositoryStore.GetValidVersionTags(String tagPrefixRegex, Nullable`1 olderThan) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\RepositoryStore.cs:line 400
     at GitVersion.VersionCalculation.TaggedCommitVersionStrategy.GetTaggedVersions(IBranch currentBranch, Nullable`1 olderThan) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\BaseVersionCalculators\TaggedCommitVersionStrategy.cs:line 29
     at GitVersion.VersionCalculation.TaggedCommitVersionStrategy.GetVersions() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\BaseVersionCalculators\TaggedCommitVersionStrategy.cs:line 24
     at GitVersion.VersionCalculation.BaseVersionCalculator.GetBaseVersions(IVersionStrategy strategy)+MoveNext() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\BaseVersionCalculator.cs:line 90
     at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
     at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
     at GitVersion.VersionCalculation.BaseVersionCalculator.GetBaseVersion() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\BaseVersionCalculator.cs:line 31
     at GitVersion.VersionCalculation.NextVersionCalculator.FindVersion() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionCalculation\NextVersionCalculator.cs:line 58
     at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitVersionCalculateTool.cs:line 52
     at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.App\GitVersionExecutor.cs:line 70

Our builds were working properly on 2021-05-25. It appears that version 5.6.10 & 5.6.11 have become broken. GitVersion works correctly when using the gittools/gitversion:5.6.9 image.

I can also run GitVersion successfully on the same branch locally, using Gitversion 4.0.0 on Windows 10.

@asbjornu
Copy link
Member

Looks like a duplicate of #2390.

@asbjornu asbjornu mentioned this issue Mar 3, 2022
5 tasks
@asbjornu asbjornu added this to the 5.x milestone Mar 3, 2022
@arturcic arturcic modified the milestones: 5.x, 5.8.3 Mar 5, 2022
@github-actions
Copy link

github-actions bot commented Mar 5, 2022

🎉 This issue has been resolved in version 5.8.3 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

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.

3 participants