GitVersionTool via Cake failing #3638
Unanswered
ksvenkatesan77
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Recently we have used GitVersion tool to get the branch information in a cake script. When running it in our dev server,
I init the GitVersion as follows :
GitVersion gitversion = GitVersion(new GitVersionSettings { UpdateAssemblyInfo = false});
it is failing with the following error: Any suggestions to overcome this issue?
> INFO [08/01/23 11:34:55:10] End: Attempting to inherit branch configuration from parent branch (Took: 571.23ms) INFO [08/01/23 11:34:55:10] End: Calculating base versions (Took: 593.88ms) ERROR [08/01/23 11:34:55:13] An unexpected error occurred: LibGit2Sharp.LibGit2SharpException: object not found - no match for id (64335ebf51ca06f483aacf80d03e6d254a830649) at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 154 at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 172 at LibGit2Sharp.Core.Proxy.git_merge_base_many(RepositoryHandle repo, GitOid[] commitIds) in /_/LibGit2Sharp/Core/Pro xy.cs:line 1234 at LibGit2Sharp.ObjectDatabase.FindMergeBase(IEnumerable
1 commits, MergeBaseFindingStrategy strategy) in //LibGit2Sharp/ObjectDatabase.cs:line 731
at LibGit2Sharp.ObjectDatabase.FindMergeBase(Commit first, Commit second) in //LibGit2Sharp/ObjectDatabase.cs:line 6
96
at GitVersion.GitRepository.<>c__DisplayClass26_0.b__0() in D:\a\GitVersion\GitVersion\src\GitVersion.
LibGit2Sharp\Git\GitRepository.cs:line 58
at Polly.Policy
1.<>c__DisplayClass11_0.<Execute>b__0(Context _, CancellationToken _) at Polly.Retry.RetryEngine.Implementation[TResult](Func
3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates
1 shouldRetryResultPredicates, Action
4 onRetry,Int32 permittedRetryCount, IEnumerable
1 sleepDurationsEnumerable, Func
4 sleepDurationProvider)at Polly.Retry.RetryPolicy
1.Implementation(Func
3 action, Context context, CancellationToken cancellationToken)at Polly.Policy
1.Execute(Func
3 action, Context context, CancellationToken cancellationToken)at Polly.Policy
1.Execute(Func
1 action)at GitVersion.Helpers.RetryAction
2.Execute(Func
1 operation) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Helpers\RetryAction.cs:line 35
at GitVersion.GitRepository.FindMergeBase(ICommit commit, ICommit otherCommit) in D:\a\GitVersion\GitVersion\src\GitV
ersion.LibGit2Sharp\Git\GitRepository.cs:line 54
at GitVersion.RepositoryStore.FindMergeBase(ICommit commit, ICommit mainlineTip) in D:\a\GitVersion\GitVersion\src\Gi
tVersion.Core\Core\RepositoryStore.cs:line 277
at GitVersion.MergeBaseFinder.FindMergeBase(ICommit commit, ICommit commitToFindCommonBase) in D:\a\GitVersion\GitVer
sion\src\GitVersion.Core\Core\MergeBaseFinder.cs:line 69
at GitVersion.MergeBaseFinder.FindMergeBaseOf(IBranch first, IBranch second) in D:\a\GitVersion\GitVersion\src\GitVer
sion.Core\Core\MergeBaseFinder.cs:line 51
at GitVersion.MergeCommitFinder.FindMergeBases(IBranch branch)+MoveNext() in D:\a\GitVersion\GitVersion\src\GitVersio
n.Core\Core\MergeCommitFinder.cs:line 55
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable
1 source, Int32& length) at System.Linq.OrderedEnumerable
1.ToList()at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source) at GitVersion.MergeCommitFinder.FindMergeCommitsFor(IBranch branch) in D:\a\GitVersion\GitVersion\src\GitVersion.Core \Core\MergeCommitFinder.cs:line 33 at GitVersion.RepositoryStore.FindCommitBranchWasBranchedFrom(IBranch branch, Config configuration, IBranch[] exclude dBranches) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\RepositoryStore.cs:line 197 at GitVersion.Configuration.BranchConfigurationCalculator.InheritBranchConfiguration(Int32 recursions, IBranch target Branch, BranchConfig branchConfiguration, ICommit currentCommit, Config configuration, IList
1 excludedInheritBranches)at GitVersion.Configuration.BranchConfigurationCalculator.GetBranchConfigurationInternal(Int32 recursions, IBranch ta
rgetBranch, ICommit currentCommit, Config configuration, IList
1 excludedInheritBranches) in D:\a\GitVersion\GitVersion\ src\GitVersion.Core\Configuration\BranchConfigurationCalculator.cs:line 54 at GitVersion.Configuration.BranchConfigurationCalculator.GetBranchConfiguration(IBranch targetBranch, ICommit curren tCommit, Config configuration, IList
1 excludedInheritBranches) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Configuration\BranchConfigurationCalculator.cs:line 28
at GitVersion.VersionCalculation.BaseVersionCalculator.GetBaseVersion()
at GitVersion.VersionCalculation.NextVersionCalculator.FindVersion() in D:\a\GitVersion\GitVersion\src\GitVersion.Cor
e\VersionCalculation\NextVersionCalculator.cs:line 56
at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\C
ore\GitVersionCalculateTool.cs:line 52
at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion
\src\GitVersion.App\GitVersionExecutor.cs:line 66
INFO [08/01/23 11:34:55:13] Attempting to show the current git graph (please include in issue):
INFO [08/01/23 11:34:55:13] Showing max of 100 commits
INFO [08/01/23 11:34:55:32] ERROR: error: Could not read 64335ebf51ca06f483aacf80d03e6d254a830649
ERROR: fatal: revision walk setup failed
An error occurred when executing task 'UpdateModules-New'.
Error: System.AggregateException: One or more errors occurred. ---> Cake.Core.CakeException: GitVersion: Process returne
d an error (exit code 1).
at Cake.Core.Tooling.Tool
1.ProcessExitCode(Int32 exitCode) at Cake.Core.Tooling.Tool
1.Run(TSettings settings, ProcessArgumentBuilder arguments, ProcessSettings processSettings, Action
1 postAction) at Cake.Common.Tools.GitVersion.GitVersionRunner.Run(GitVersionSettings settings) at Submission#0.GitVersion(GitVersionSettings settings) in :line 488 at Submission#0.<<Initialize>>b__0_5() in D:\tools\dvdupdatecake\build\build_modules_full.cake:line 420 at Cake.Core.CakeTaskBuilderExtensions.<>c__DisplayClass32_0.<Does>b__0(ICakeContext x) at Cake.Core.CakeTask.<Execute>d__43.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Cake.Core.DefaultExecutionStrategy.<ExecuteAsync>d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Cake.Core.CakeEngine.<ExecuteTaskAsync>d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Cake.Core.CakeEngine.<ExecuteTaskAsync>d__31.MoveNext()
Beta Was this translation helpful? Give feedback.
All reactions