dotnet / arcade

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

NuGet validation post-build step broken #14840

Closed akoeplinger closed 3 months ago

akoeplinger commented 3 months ago

This got broken with https://github.com/dotnet/arcade/pull/14809. /cc @premun

We probably are not importing the utils that contain Write-PipelineTelemetryError anymore.

https://dev.azure.com/dnceng/internal/_build/results?buildId=2472257&view=logs&j=a13e9384-d6d3-5a14-7a96-79282fc11262&t=62b78796-390e-5a19-0957-0b46593907e3&l=26

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_work\_temp\3d7689fe-b7a8-4ae6-a4de-f5c36b4e8928.ps1'"
at <ScriptBlock>, D:\a\_work\1\s\eng\common\post-build\nuget-validation.ps1: line 9
at <ScriptBlock>, D:\a\_work\_temp\3d7689fe-b7a8-4ae6-a4de-f5c36b4e8928.ps1: line 4
at <ScriptBlock>, <No file>: line 1
D:\a\_work\1\s\eng\common\post-build\nuget-validation.ps1 : The term 'Write-PipelineTelemetryError' is not recognized 
as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was 
included, verify that the path is correct and try again.
At D:\a\_work\_temp\3d7689fe-b7a8-4ae6-a4de-f5c36b4e8928.ps1:4 char:1
+ . 'D:\a\_work\1\s\eng\common\post-build\nuget-validation.ps1' -Packag ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Write-PipelineTelemetryError:String) [nuget-validation.ps1], CommandNot 
   FoundException
    + FullyQualifiedErrorId : CommandNotFoundException,nuget-validation.ps1
premun commented 3 months ago

Oh yeah, thanks. One import is missing there.

akoeplinger commented 3 months ago

The fix didn't work, I'm still seeing this in https://dev.azure.com/dnceng/internal/_build/results?buildId=2473882&view=logs&j=a13e9384-d6d3-5a14-7a96-79282fc11262&t=62b78796-390e-5a19-0957-0b46593907e3&l=16

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_work\_temp\b41a9dc4-57c4-4493-a99c-2d77ac970fb6.ps1'"
at <ScriptBlock>, D:\a\_work\1\s\eng\common\post-build\nuget-validation.ps1: line 16
at <ScriptBlock>, D:\a\_work\_temp\b41a9dc4-57c4-4493-a99c-2d77ac970fb6.ps1: line 4
at <ScriptBlock>, <No file>: line 1

/cc @andriipatsula

andriipatsula commented 3 months ago

Looking. I'll try to investigate/resolve the issue today.

andriipatsula commented 3 months ago

Somehow, the nuget-verification.ps1 script didn't propagate to your repo. <-- that's the reason. We are looking to mitigate the problem.

andriipatsula commented 3 months ago

Maestro++ should have overridden the entire /eng/common folder, but it didn't: https://dev.azure.com/dnceng/internal/_git/dotnet-emscripten?version=GBdotnet/main&path=/eng/common/post-build

akoeplinger commented 3 months ago

ohh interesting

akoeplinger commented 3 months ago

@andriipatsula I think it might have something to do with https://github.com/dotnet/emscripten/blob/7711db1008f4a6c7238d3e27afc3209973b4bb47/.gitignore#L38-L39

I tried locally and the new .ps1 file doesn't show up unless I remove that

andriipatsula commented 3 months ago

Hm, that could be because Maestro++ clones a repo, copies files, and creates a commit on a machine. I suggest removing this .gitignore rule or making it more explicit. You can manually copy the file into /eng/common or wait for the next dependency update from Arcade.

akoeplinger commented 3 months ago

I fixed the .gitignore and a new arcade update contained the file, thanks :)

I think you can pass -f to git add so it ignores .gitignore rules, might be something we should do for the eng/common files.