fix(rust-ci): run test-extra under bash so env values survive on Windows#90
Merged
Conversation
v1.9.0 replaced the literal `stable` with "$TOOLCHAIN" read from env:. On a Windows runner the default shell is PowerShell, where $TOOLCHAIN reads a PowerShell variable rather than the environment — so it expanded to the empty string and rustup failed: error: invalid value '' for '[TOOLCHAIN]...': invalid toolchain name: '' The literal never depended on the shell, so the bug arrived with the pin. test-extra is the only job that can land on a non-Linux runner (it is the one driven by extra-test-os); every other job is ubuntu-latest, where the default shell is already bash. Pin the shell for that job, as release.yml's cross-OS matrix in podup already does for the same reason. Caught by podup#1013, the pin-adoption PR — which is exactly what that PR was for. v1.9.0 is unusable for any consumer testing on Windows; this is the fix-forward. Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
v1.9.0 is broken for any consumer that tests on Windows. This is the fix-forward.
v1.9.0 replaced the literal
stablewith"$TOOLCHAIN"read fromenv:. On a Windows runner the default shell is PowerShell, where$TOOLCHAINreads a PowerShell variable rather than the environment — so it expanded to the empty string:The literal never depended on the shell, so the bug arrived with the pin.
test-extrais the only job that can land on a non-Linux runner (it's the one driven byextra-test-os); the other seven areubuntu-latest, where bash is already the default — audited, not assumed.Pins the shell for that job, the same way podup's
release.ymlalready does for its cross-OS matrix, for exactly this reason.Caught by podup#1013, the pin-adoption PR — which is what that PR was for. The lesson is the ordering, though: I cut the v1.9.0 release before any consumer had proven it. The reusable's SHA exists on
mainbefore the tag does, so the adoption PR could and should have run first. Doing that from here on.