nodejs / build

Better build and test infra for Node.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Failed to find WiX install for Visual Studio 2019` on test-rackspace-win2019_vs2019-x64-3

richardlau opened this issue · comments

From https://ci.nodejs.org/job/node-daily-v18.x-staging/117/, https://ci.nodejs.org/job/node-compile-windows/54766/nodes=win-vs2019/console failed on test-rackspace-win2019_vs2019-x64-3:

14:35:20 > if defined msi (
14:35:20 echo Looking for WiX installation for Visual Studio 2019...  
14:35:20  if not exist "C:\Program Files (x86)\WiX Toolset v3.11\\SDK\VS2017" (
14:35:20 echo Failed to find WiX install for Visual Studio 2019  
14:35:20  echo VS2019 support for WiX is only present starting at version 3.11  
14:35:20  goto msbuild-not-found 
14:35:20 )  
14:35:20  if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\\..\MSBuild\Microsoft\WiX" (
14:35:20 echo Failed to find the WiX Toolset Visual Studio 2019 Extension  
14:35:20  goto msbuild-not-found 
14:35:20 ) 
14:35:20 ) 
14:35:20 Looking for WiX installation for Visual Studio 2019...
14:35:20 Failed to find WiX install for Visual Studio 2019
14:35:20 VS2019 support for WiX is only present starting at version 3.11
14:35:20 
14:35:20 > echo Failed to find a suitable Visual Studio installation. 
14:35:20 Failed to find a suitable Visual Studio installation.
14:35:20 
14:35:20 > echo Try to run in a "Developer Command Prompt" or consult 
14:35:20 Try to run in a "Developer Command Prompt" or consult
14:35:20 
14:35:20 > echo https://github.com/nodejs/node/blob/HEAD/BUILDING.md#windows 
14:35:20 https://github.com/nodejs/node/blob/HEAD/BUILDING.md#windows
14:35:20 

cc @StefanStojanovic

Thanks for bringing this to my attention. I've looked into it. What I see in the environment variables of that build is that WIX is set to C:\Program Files (x86)\WiX Toolset v3.11\, although the machine has WiX v3.14 installed. All of the CI machines are set up in the same way and when inspecting them (the machine that caused this problem included) I see the WIX env var is set to the correct path.

That was strange so I looked at the windows-update-reboot job. There I saw that 3 days ago, when updating chocolatey packages, WiX 3.14 was found (first new release in ~5 years) and our old version 3.11 got upgraded. Just upgrading a package is not reason enough to trigger a reboot, so some machines rebooted because of other factors and some didn't. The ones that didn't have kept the old values for env vars, thus the issue happened.

As for the resolution, I did the simplest thing - restarted Jenkins on all Win2019 VS2019 machines (the only ones making the MSI installer with WiX v3). From my perspective, doing any extra work eg. changing jobs to refresh env vars, etc. is unnecessary as no other env var can affect compilation this much, plus there is already the reboot mechanism in the update job that can even be forced. Regarding this issue, I suggest keeping it open for a few more days to make sure it doesn't happen again and if it doesn't we can close it next week.

I've checked a few of the latest builds and this issue hasn't repeated. I even made sure that the machine that caused problems before was working. I'll close the issue and we can reopen it if needed.