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

Duplicate matrix leg name from introduction of aspnet composite Dockerfiles #1141

Closed mthalman closed 1 year ago

mthalman commented 1 year ago

The introduction of the aspnet composite Dockerfiles have caused there to be situations where the matrix generation fails. It ends up producing duplicate leg names.

Example: https://dev.azure.com/dnceng/internal/_build/results?buildId=2189050&view=results (internal link)

Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.InvalidOperationException: Duplicate leg name(s) found in matrix 'linuxArm32': 8.0-alpine3.17-aspnet
   at Microsoft.DotNet.ImageBuilder.Commands.GenerateBuildMatrixCommand.GenerateMatrixInfo() in /image-builder/src/Commands/GenerateBuildMatrixCommand.cs:line 448
   at Microsoft.DotNet.ImageBuilder.Commands.GenerateBuildMatrixCommand.ExecuteAsync() in /image-builder/src/Commands/GenerateBuildMatrixCommand.cs:line 46
   at Microsoft.DotNet.ImageBuilder.Commands.Command`2.<GetCliCommand>b__9_0(TOptions options) in /image-builder/src/Commands/Command.TOptions.cs:line 46

Looking at the matrix legs that were generated, I see this:

image

One is targeting the normal aspnet Dockerfiles and the other is for composite but they have the same leg name.

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

This is still happening, apparently. I was able to reproduce the new instance of this happening so I am trying to get it fixed soon.