-
Notifications
You must be signed in to change notification settings - Fork 125
NuKeeper reports success even if Git operation fails #930
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Should still look into this? |
It will also report success if NuGet.exe throws an exit code other than Definitely should report a proper exit code if any part of the process fails. @AnthonySteele |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Has any changes been made for this so far? If not it's still relevant. |
I am experiencing the same behavior when package cannot be updated for some reason
But nukeeper exits with code 0: $ echo $?
0 This is really important in CI scenarios, where exit code indicates whether process succeeded or failed. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still relevant AFAIK |
Still very relevant. Last week this hides several errors which I recognized yesterday. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
In my CI, I run NuKeeper from a PowerShell task and parse the results. If no packages were updated, I throw an error. Maybe this can help you. Now I need to find out why NuKeeper doesn't always find the newest package from my feed even though it is in there.
|
This is also an issue for me. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still relevant |
🐛 Bug Report
If NuKeeper cannot perform a git operation and fails, it still reports success via errorlevel = 0. This will impact any automation system that leverages NuKeeper (in my case, Azure DevOps)
Expected behavior
If NuKeeper fails it reports as a failure so automation (such as DevOps) can correctly notify that a failure occurred.
Reproduction steps
Configure project with NuKeeper in any environment that doesn't provide it access to push. Simply denying branch creation rights should be sufficient, or putting into an ADO pipeline without token access.
Updates failed LibGit2SharpException : request failed with status code: 403
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_remote_push(RemoteHandle remote, IEnumerable
1 refSpecs, GitPushOptions opts) at LibGit2Sharp.Network.Push(Remote remote, IEnumerable
1 pushRefSpecs, PushOptions pushOptions)at LibGit2Sharp.Network.Push(IEnumerable
1 branches, PushOptions pushOptions) at NuKeeper.Git.LibGit2SharpDriver.<>c__DisplayClass17_0.<Push>b__0() in d:\a\r1\a\drop\NuKeeper.Git\LibGit2SharpDriver.cs:line 189 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of stack trace from previous location where exception was thrown --- at NuKeeper.Engine.Packages.PackageUpdater.MakeUpdatePullRequests(IGitDriver git, RepositoryData repository, NuGetSources sources, SettingsContainer settings, IReadOnlyCollection
1 updates) in d:\a\r1\a\drop\NuKeeper\Engine\Packages\PackageUpdater.cs:line 85at NuKeeper.Engine.Packages.PackageUpdater.MakeUpdatePullRequests(IGitDriver git, RepositoryData repository, IReadOnlyCollection`1 updates, NuGetSources sources, SettingsContainer settings) in d:\a\r1\a\drop\NuKeeper\Engine\Packages\PackageUpdater.cs:line 46
Configuration
nukeeper 0.26.0 x64
Platform if applicable:
The text was updated successfully, but these errors were encountered: