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

BadRequest error when copying base images for buildtools-prereqs repo #1125

Closed mthalman closed 1 year ago

mthalman commented 1 year ago

The following exception occurs when executing the Copy Base Images task of the check-base-image-updates pipeline for the buildtools-prereqs repo:

Microsoft.Rest.Azure.CloudException: Long running operation failed with status 'BadRequest'.
   at Microsoft.Rest.ClientRuntime.Azure.LRO.LROPollState`2.CheckErrorStatusAndThrowAsync(HttpRequestMessage request, HttpResponseMessage response)
   at Microsoft.Rest.ClientRuntime.Azure.LRO.LROPollState`2.GetRawAsync(Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Rest.ClientRuntime.Azure.LRO.LROPollState`2.UpdateResourceFromPollingUri(Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Rest.ClientRuntime.Azure.LRO.LROPollState`2.Poll(Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Rest.ClientRuntime.Azure.LRO.AzureLRO`2.StartPollingAsync()
   at Microsoft.Rest.ClientRuntime.Azure.LRO.AzureLRO`2.BeginLROAsync()
   at Microsoft.Rest.Azure.AzureClientExtensions.GetLongRunningOperationResultAsync[TBody,THeader](IAzureClient client, AzureOperationResponse`2 response, Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Rest.Azure.AzureClientExtensions.GetLongRunningOperationResultAsync[TBody](IAzureClient client, AzureOperationResponse`1 response, Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Rest.Azure.AzureClientExtensions.GetLongRunningOperationResultAsync(IAzureClient client, AzureOperationResponse response, Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Rest.Azure.AzureClientExtensions.GetPostOrDeleteOperationResultAsync(IAzureClient client, AzureOperationResponse response, Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Azure.Management.ContainerRegistry.Fluent.RegistriesOperations.ImportImageWithHttpMessagesAsync(String resourceGroupName, String registryName, ImportImageParametersInner parameters, Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Azure.Management.ContainerRegistry.Fluent.RegistriesOperationsExtensions.ImportImageAsync(IRegistriesOperations operations, String resourceGroupName, String registryName, ImportImageParametersInner parameters, CancellationToken cancellationToken)
   at Polly.AsyncPolicy.<>c__DisplayClass40_0.<<ImplementationAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext)

Example build failure (internal link)

This only occurs for that repo, so it seems specific to the tags or registries being referenced in that repo. The log doesn't indicate which tag it is that's causing the failure. Multiple tags are output but the imports happen in parallel so it's not clear which one is the cause.

dotnet-issue-labeler[bot] commented 1 year 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 1 year ago

@mthalman has this fixed itself? https://dev.azure.com/dnceng/internal/_build?definitionId=805&_a=summary

mthalman commented 1 year ago

Indeed. That's the best kind of fix.