dotnet / arcade

Tools that provide common build infrastructure for multiple .NET Foundation projects.
MIT License
673 stars 347 forks source link

SignCheckTask Returns False Without Logging an Error #6734

Open benvillalobos opened 3 years ago

benvillalobos commented 3 years ago

Context

MSBuild is upgrading to Arcade 5.0 and we're hitting errors in our pipeline builds that our nupkg files aren't signed properly.

The Problem

These errors aren't helpful, as all we see is: c:\src\git\msbuild\.packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.20510.1\tools\SdkTasks\SigningValidation.proj(48,5): error MSB4181: The "SignCheckTask" task returned false but did not log an error. [c:\src\git\msbuild\.packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.20510.1\tools\SdkTasks\SigningValidation.proj]

Some sort of solution

If the task would fail, throw an error that provides context as to why it failed.

Why it's blocking

I'm not sure how to move forward migrating to arcade 5.0 because I'm not sure what's going wrong.

Extra Info

Contents of signcheck.errors.log Signing issues found Contents of signcheck.log

Starting execution of SignCheck.

Results

[File] Microsoft.Build.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Conversion.Core.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Engine.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Framework.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Localization.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Runtime.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Tasks.Core.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Utilities.Core.16.9.0-preview-20622-01.nupkg, Signed: False
[File] MsBuild.Engine.Corext.16.9.0-preview-20622-01.nupkg, Signed: False
[File] VS.ExternalAPIs.MSBuild.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Localization.16.9.0-preview-20622-01.nupkg, Signed: False
[File] MsBuild.Engine.Corext.16.9.0-preview-20622-01.nupkg, Signed: False
[File] VS.ExternalAPIs.MSBuild.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Conversion.Core.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Engine.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Framework.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Runtime.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Tasks.Core.16.9.0-preview-20622-01.nupkg, Signed: False
[File] Microsoft.Build.Utilities.Core.16.9.0-preview-20622-01.nupkg, Signed: False

Total Time: 00:00:15.8654127
Total Files: 682, Signed: 240, Unsigned: 20, Skipped: 422, Excluded: 0, Skipped & Excluded: 0
benvillalobos commented 3 years ago

Based on some new understanding (thank you @riarenas), it appears this task wouldn't be able to gain context as to why it failed. As a standard though, MSBuild prefers that tasks log their own errors when they would return false.

riarenas commented 3 years ago

@BenVillalobos I'm removing the blocking checkbox for now as I think we figured out this was a matter of using an older version of arcade that was still affected by https://github.com/dotnet/core-eng/issues/11458. We can discuss the logging for the task during triage. If updating to a newer arcade doesn't solve things, feel free to mark it blocking again.

benvillalobos commented 3 years ago

@riarenas updating arcade resolved the issue. Thanks again!