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

Skip SBOM generation for cached images #1101

Open mthalman opened 1 year ago

mthalman commented 1 year ago

Currently SBOMs are generated for all images relevant to the build job, each for images that were pulled from the cache. This is wasteful because the SBOM was already generated in the original pipeline that published that image. We don't need another one for each subsequent build where it's pulled from the cache.

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.

mthalman commented 1 year ago

[Triage] This was first noticed in the https://github.com/dotnet/dotnet-buildtools-prereqs-docker repo where there are some large images that take a long time to run SBOM generation. Some build legs end up pulling down all cached images and not building anything but still continue to run SBOM generation. This can take quite a while (> 20 mins in some cases) vs a relatively small amount of time just to pull the images. So it's completely unnecessary to do these SBOM operations.

lbussell commented 2 months ago

[Triage] Slightly related: https://github.com/dotnet/docker-tools/issues/1331