This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
CI: Use 'windows-2019' image for Windows tests (makes CI passing) #2758
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
In CI, use the 'windows-2019' image instead of 'windows-latest'.
Reason for change
This gives us an older version of Visual Studio compatible with apm's old copy of node-gyp, so CI can proceed past installing dependencies/not get stuck, on the Windows jobs.
(context: apm is still built around npm 6 --> node-gyp 5.x. Visual Studio 2022 support was only added in node-gyp 8.4.0. So we need older Visual Studio to accommodate apm's old copy of node-gyp. the 'windows-2019' image has the older Visual Studio we're looking for.)
Applicable Issues
None filed, but CI isn't passing.
More details about the issue
(I assume the Windows jobs started failing when the 'windows-latest' CI image tag was updated to point to/be an alias for the 'windows-2022' image.)
CI's Windows jobs get stuck on the "install dependencies" step, because they need to build native C/C++ code in some of the packages, but apm's old copy of node-gyp doesn't understand how to find find Visual Studio 2022 or newer, so the dependency installation steps fail. Normally the test step has a "fails allowed" setting, but this was failing even before the tests ran, causing the overall windows jobs to report failing, and thus all PRs are going to report as failing, making it much harder to tell at a glance which PRs actually pass CI on macOS and Linux. A reminder that the Windows tests have been known failing and allowed to fail without making CI red for a long time now. Failing before the tests ran is a new thing.