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

SBOM Generation is failing #1208

Closed lbussell closed 5 months ago

lbussell commented 7 months ago

Here's an example of the failure from the dotnet-docker-nightly pipeline:

/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '/mnt/vss/_work/_temp/ec43ae6b-0059-4dad-929b-0d418318796c.ps1'
Generating SBOM for dotnetdocker.azurecr.io/build-staging/2385979/dotnet/nightly/sdk@sha256:f7168fb170d1a2058f163476827b0c99be89e35e867c971b3cb9b8d2e45a0c98
ForEach-Object: /mnt/vss/_work/_temp/ec43ae6b-0059-4dad-929b-0d418318796c.ps1:29
Line |
  29 |  $images -Split ',' | ForEach-Object {
     |                       ~~~~~~~~~~~~~~~~
     | The term
     | '/mnt/vss/_work/_tasks/ManifestGeneratorTask_0a569e1c-b731-4e6d-995a-8184fcd1f6e7/0.197.88/dotnet-6.0.15 /mnt/vss/_work/_tasks/ManifestGeneratorTask_0a569e1c-b731-4e6d-995a-8184fcd1f6e7/0.197.56/dotnet-6.0.15 /mnt/vss/_work/_tasks/ManifestGeneratorTask_0a569e1c-b731-4e6d-995a-8184fcd1f6e7/0.197.87/dotnet-6.0.15/dotnet' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

##[error]PowerShell exited with code '1'.
mthalman commented 7 months ago

This is odd because there doesn't seem to be a new version of the Manifest Generator Task that would cause a regression. The current version is 0.197.56 which is the same version that existed on builds that were working.

lbussell commented 7 months ago

Also, this failure is inconsistent - here's two legs of the same build that are failing/passing the SBOM stage

Passing: https://dev.azure.com/dnceng/internal/_build/results?buildId=2386549&view=logs&j=9aada89a-2e24-5acb-2807-6900158b9cce&t=019042b9-3668-5c2d-d087-47aa8f6af465

Failing: https://dev.azure.com/dnceng/internal/_build/results?buildId=2386549&view=logs&j=5451b624-d93a-5e9f-b2ab-9f4f54898441&t=6a4dd7b5-b345-5561-496f-4b7a1bc4fa21

lbussell commented 5 months ago

This has not been a problem in the past month.

mthalman commented 5 months ago

This was fixed by the changes in the Generate SBOMs step from https://github.com/dotnet/docker-tools/pull/1215.