fix(windows): handle prerelease Salt dirs in bootstrap-salt.ps1#2109
Merged
twangboy merged 3 commits intosaltstack:developfrom Apr 30, 2026
Merged
fix(windows): handle prerelease Salt dirs in bootstrap-salt.ps1#2109twangboy merged 3 commits intosaltstack:developfrom
twangboy merged 3 commits intosaltstack:developfrom
Conversation
Align Get-AvailableVersions with salt-vmtools (PR saltstack#58): drop the href length heuristic that failed on names like 3008.0rc1, filter index links with a Salt-style pattern, and resolve latest / major pins using GA CalVer only via Compare-SaltCalVer. Prerelease builds remain installable by passing the exact directory name. Add an empty listing guard and use a single Invoke-WebRequest in the HTTP path. Document -Version behavior for latest vs GA vs exact RC names.
After killing the background `tee` that drains LOGPIPE, stdout/stderr were still connected to the FIFO write side, so shell teardown could hit SIGPIPE and return 141 even when bootstrap succeeded (seen under `docker exec` with `bash -e` in CI). Record `tee`'s PID with `$!` instead of `ps`/`grep`, and redirect fds to /dev/null before sending SIGTERM so the parent never writes to a pipe with no reader. Also detach fds before exiting when TEE_PID is empty.
Mirror helpers used Windows/macOS Artifactory dirs with sort -V, which preferred prerelease folders (e.g. 3008.0rc1) over GA builds and led to non-existent RPM/package names (Photon salt-minion-* installs). Filter directory names to GA CalVer (digits and dots only), restrict major pins to ^MAJOR., fail with a clear error when nothing matches, fix cd-home failures returning bogus exit codes, and propagate failures from latest-resolution into Photon and macOS install paths.
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.
What does this PR do?
Align Get-AvailableVersions with salt-vmtools (PR #58): drop the href length heuristic that failed on names like 3008.0rc1, filter index links with a Salt-style pattern, and resolve latest / major pins using GA CalVer only via Compare-SaltCalVer. Prerelease builds remain installable by passing the exact directory name. Add an empty listing guard and use a single Invoke-WebRequest in the HTTP path. Document -Version behavior for latest vs GA vs exact RC names.