Currently, NotificationService immediately closes any issue that does not have the failure label:
|
// Immediately close issues which aren't failures, since open issues should represent actionable items. |
|
// Retry with backoff to handle GitHub's eventual consistency - the issue may not be fully |
|
// propagated across GitHub's backend services immediately after creation. |
|
if (!labels.Where(l => l.Contains(Commands.NotificationLabels.Failure)).Any()) |
|
{ |
|
_logger.LogInformation("No failure label found in the notification labels."); |
|
await RetryHelper.GetWaitAndRetryPolicy<ApiException>(_logger) |
|
.ExecuteAsync(() => |
|
github.Issue.Update(repoOwner, repoName, issue.Number, new IssueUpdate { State = ItemState.Closed })); |
|
} |
The failure label is only added when an exception is thrown, not when the category is "Failed" due to recent build failures:
|
else if (recentFailedBuilds is not null) |
|
{ |
|
category = "Failed"; |
|
|
|
StringBuilder builder = new(); |
|
builder.AppendLine( |
|
$"Due to recent failures of the following builds, a build will not be queued again for subscription '{subscription}':"); |
|
builder.AppendLine(); |
|
foreach (string buildUri in recentFailedBuilds) |
|
{ |
|
builder.AppendLine($"* {buildUri}"); |
|
} |
|
|
|
builder.AppendLine(); |
|
builder.AppendLine( |
|
$"Please investigate the cause of the failures, resolve the issue, and manually queue a build for the Dockerfile paths listed above. You must manually tag the build with a tag named '{AzdoTags.AutoBuilder}' in order for AutoBuilder to recognize that a successful build has occurred."); |
|
labels: new string[] |
|
{ |
|
NotificationLabels.AutoBuilder, |
|
NotificationLabels.GetRepoLocationLabel(subscription.Manifest.Repo, subscription.Manifest.Branch) |
|
}.AppendIf(NotificationLabels.Failure, () => exception is not null), |
This means "AutoBuilder - Failed" issues are filed and immediately closed. These issues are actionable and should be left open so that they are visible and can be triaged.
Currently,
NotificationServiceimmediately closes any issue that does not have thefailurelabel:docker-tools/src/ImageBuilder/NotificationService.cs
Lines 84 to 93 in 78513bb
The
failurelabel is only added when an exception is thrown, not when the category is "Failed" due to recent build failures:docker-tools/src/ImageBuilder/Commands/QueueBuildCommand.cs
Lines 191 to 206 in 6b2d022
docker-tools/src/ImageBuilder/Commands/QueueBuildCommand.cs
Lines 269 to 273 in 6b2d022
This means "AutoBuilder - Failed" issues are filed and immediately closed. These issues are actionable and should be left open so that they are visible and can be triaged.