dotnet / docker-tools

This is a repo to house some common tools for our various docker repos.
MIT License
122 stars 46 forks source link

"Post Publish Notification" pipeline step is failing due to changes in Wait For Mcr Ingestion pipeline tasks #1278

Closed lbussell closed 4 months ago

lbussell commented 4 months ago

It's giving the following error:

Unhandled exception: System.InvalidOperationException: Build task with name 'WaitForImageIngestion' could not be found in the build timeline.
   at Microsoft.DotNet.ImageBuilder.Commands.PostPublishNotificationCommand.GetBuildTaskResultsAsync(Dictionary`2 taskResults, IBuildHttpClient buildClient, TeamProject project) in /image-builder/src/Commands/PostPublishNotificationCommand.cs:line 156
   at Microsoft.DotNet.ImageBuilder.Commands.PostPublishNotificationCommand.ExecuteAsync() in /image-builder/src/Commands/PostPublishNotificationCommand.cs:line 78
   at System.CommandLine.Invocation.CommandHandler.GetResultCodeAsync(Object value, InvocationContext context)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---

Due to changes from https://github.com/dotnet/docker-tools/pull/1271.

dotnet-issue-labeler[bot] commented 4 months ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

lbussell commented 4 months ago

This is still happening even after the following PRs tried to fix it:

Error: https://dev.azure.com/dnceng/internal/_build/results?buildId=2450186&view=logs&j=739bb7ec-7296-5b40-7dff-ee3297bfdaa4&t=487ef77f-c8ee-5b2f-147b-5cff06a12f4e&l=102

Unhandled exception: System.InvalidOperationException: Build task with name 'Wait for Mcr Doc Ingestion' could not be found in the build timeline.

It is probably time for me to repro and debug this.

mthalman commented 4 months ago

It's because of the casing of MCR (versus Mcr) this time. I missed that with my casing change. But it should be resolved now with the update to make the check case-insensitive.

mthalman commented 4 months ago

This makes the pipeline now use the fix to make it case-insensitive: https://github.com/dotnet/docker-tools/pull/1282

lbussell commented 4 months ago

This is now failing with another error:

- ManagedIdentityCredential authentication unavailable. The requested identity has not been assigned to this resource.
Status: 400 (Bad Request)

Content:
{"error":"invalid_request","error_description":"Multiple user assigned identities exist, please specify the clientId / resourceId of the identity in the token request"}

Perhaps we should run this with a new identity with no specific permissions so that it can always pick that one up. Rather than using whatever is assigned to the VM, which we don't control.

mthalman commented 4 months ago

That's a separate issue. The Post Publish Notification step issue looks to be fixed (internal link).

lbussell commented 4 months ago

I filed https://github.com/dotnet/docker-tools/issues/1286 for that issue so we can close this as fixed unless it comes up again.