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

Maestro keeps commenting on PRs with failed policies #3601

Closed
premun opened this issue Jun 7, 2024 · 4 comments · Fixed by #3613
Closed

Maestro keeps commenting on PRs with failed policies #3601

premun opened this issue Jun 7, 2024 · 4 comments · Fixed by #3613

Comments

@premun
Copy link
Member

premun commented Jun 7, 2024

Examples:

@premun
Copy link
Member Author

premun commented Jun 7, 2024

We have a high amount of exceptions of this type:

System.InvalidOperationException:
   at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException (System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Linq.Enumerable.TryGetSingle (System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at Microsoft.DotNet.DarcLib.GitHubClient+<CreateOrUpdatePullRequestMergeStatusInfoAsync>d__34.MoveNext (Microsoft.DotNet.DarcLib, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null: /_/src/Microsoft.DotNet.Darc/DarcLib/GitHubClient.cs:475)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at SubscriptionActorService.PullRequestActorImplementation+<CheckMergePolicyAsync>d__29.MoveNext (SubscriptionActorService, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null: /_/src/Maestro/SubscriptionActorService/PullRequestActor.cs:575)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at SubscriptionActorService.PullRequestActorImplementation+<SynchronizePullRequestAsync>d__28.MoveNext (SubscriptionActorService, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null: /_/src/Maestro/SubscriptionActorService/PullRequestActor.cs:520)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at SubscriptionActorService.ActionRunner+<InvokeAction>d__11`1.MoveNext (SubscriptionActorService, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null: /_/src/Maestro/SubscriptionActorService/ActionRunner/ActionRunner.cs:124)

@premun
Copy link
Member Author

premun commented Jun 7, 2024

Okay, seems like GitHub Octokit library has int32 overflow when we are creating the comments. The comment gets created but we do not note down it happened because of an exception:

await gitHubClient.Issue.Comment.Create(owner, repo, prIssueId, comment);
pr.SourceRepoNotified = true;

@premun
Copy link
Member Author

premun commented Jun 7, 2024

We will bump Octokit and see. I can also make it that if we see this exception, we will note down the comment happened

@premun
Copy link
Member Author

premun commented Jun 7, 2024

The fix for this is probably here: octokit/octokit.net#2928

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

Successfully merging a pull request may close this issue.

2 participants