Support -N package-release suffix in Salt version strings - #68
Merged
Conversation
Salt patch releases now publish a -N package-release suffix (e.g. 3008.1-1) as a real GA build. Test-MinionVersionParameter previously rejected any -MinionVersion containing a hyphen and exited immediately, exactly like the earlier RC bug. Test-SaltOnedirVersionIsGA and _salt_onedir_dir_is_ga only allowed digits and dots, so a -N build was silently excluded from latest/major-series auto-resolution even when it was the newest available build. - windows/svtminion.ps1: widen Test-MinionVersionParameter to accept -N alongside rcN; widen Test-SaltOnedirVersionIsGA to treat -N as GA; fix Compare-SaltCalVer to parse the -N suffix as a separate release number instead of throwing on the int-cast, since widening the GA filter now routes -N strings into every latest/major-series comparison, not just explicit requests. - linux/svtminion.sh: widen _salt_onedir_dir_is_ga the same way. sort -V already orders a -N build after the bare version it replaces, so no comparator change is needed there. Verified both scripts resolve a -N build correctly via latest, a bare major version, and an exact request, and that a -N or rc directory merely existing in a listing doesn't break resolution of an unrelated version -- the specific failure mode that broke RC handling previously. Adds test cases to the existing Windows functional test suite and a new fixture-free Linux test (tests/linux/test_version_resolution.sh) that exercises the real resolution functions against stub directory names, without adding any binary fixtures.
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?
Salt patch releases now publish a -N package-release suffix (e.g. 3008.1-1) as a real GA build. Test-MinionVersionParameter previously rejected any -MinionVersion containing a hyphen and exited immediately, exactly like the earlier RC bug. Test-SaltOnedirVersionIsGA and _salt_onedir_dir_is_ga only allowed digits and dots, so a -N build was silently excluded from latest/major-series auto-resolution even when it was the newest available build.
Verified both scripts resolve a -N build correctly via latest, a bare major version, and an exact request, and that a -N or rc directory merely existing in a listing doesn't break resolution of an unrelated version -- the specific failure mode that broke RC handling previously.
Adds test cases to the existing Windows functional test suite and a new fixture-free Linux test (tests/linux/test_version_resolution.sh) that exercises the real resolution functions against stub directory names, without adding any binary fixtures.