Skip to content

Support -N package-release suffix in Salt version strings - #68

Merged
twangboy merged 1 commit into
saltstack:mainfrom
twangboy:support-patch-build-releases
Jul 23, 2026
Merged

Support -N package-release suffix in Salt version strings#68
twangboy merged 1 commit into
saltstack:mainfrom
twangboy:support-patch-build-releases

Conversation

@twangboy

Copy link
Copy Markdown
Contributor

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.

  • 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.

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.
@twangboy
twangboy merged commit 231f067 into saltstack:main Jul 23, 2026
20 checks passed
@twangboy
twangboy deleted the support-patch-build-releases branch July 23, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant