Skip to content

Add Arch Linux to the CI test matrix - #2132

Merged
twangboy merged 2 commits into
saltstack:developfrom
twangboy:feature/archlinux-ci-matrix
Sep 11, 2026
Merged

twangboy merged 2 commits into
saltstack:developfrom
twangboy:feature/archlinux-ci-matrix

Conversation

@twangboy

Copy link
Copy Markdown
Contributor

Summary

Arch Linux has had full install support in bootstrap-salt.sh for a while (f706f4d recently ported ALT Linux's onedir fixes over to it), but it has never had any CI coverage — it doesn't appear anywhere in .github/workflows/templates/generate.py, so no archlinux job exists in the matrix. f706f4d's own commit message notes it "couldn't be verified end-to-end via CI".

This PR:

  1. Fixes a real bug in install_arch_linux_onedir_post(): it only ever created/enabled a hardcoded salt-minion.service unit. install_arch_linux_restart_daemons()/install_arch_check_services() are generic and unconditionally loop over api/master/minion/syndic per the _INSTALL_* flags, so a -M (master) or -S (syndic) onedir install on Arch would fail trying to restart/check a unit that was never created. Ported ALT Linux's install_alt_linux_onedir_post() loop, which creates a unit per requested role. Default minion-only behavior is unchanged.
  2. Wires Arch Linux into the CI matrix, following the same pattern used to add ALT Linux: archlinux added to generate.py's LINUX_DISTROS/STABLE_DISTROS/ONEDIR_DISTROS, DISTRO_DISPLAY_NAMES, and CONTAINER_SLUG_NAMES (rolling-release, so distro-slug == container-slug == archlinux), ci.yml regenerated via pre-commit run -av generate-actions-workflow, and archlinux added to test-linux.yml's --break-system-packages conditionals (Arch enforces the same PEP 668 restriction as Debian≥12/Ubuntu≥24).

Scope notes / follow-ups expected

  • No version blacklist entries added yet — full stable+git+onedir matrix, matching ALT Linux's own initial rollout. Two likely candidates to watch on the first real run and blacklist/fix as follow-ups if they fail:
    • install_arch_linux_stable() builds from the current AUR salt PKGBUILD with no version pinning, so stable-* instances may not resolve to the requested Salt version.
    • git-* instances may hit Arch's PEP 668 restriction inside bootstrap-salt.sh itself, since _USE_BREAK_SYSTEM_PACKAGES only covers ubuntu>=24/debian>=12, not Arch.
  • test-linux.yml invokes bootstrap-salt.sh <type> <version> with no -M/-S flags for any distro, so the onedir_post fix (item 1) won't itself be exercised by this new CI matrix — it's still correct/necessary for real-world -M/-S usage, matching ALT Linux's own current CI limitation.

Testing

  • bash -n bootstrap-salt.sh — clean.
  • pre-commit run -av generate-actions-workflow — idempotent, diff matches expectations (new archlinux job inserted alphabetically, instance list identical to ubuntu-2604's unblacklisted reference, added to set-pipeline-exit-status needs).
  • YAML-validated the regenerated ci.yml and edited test-linux.yml.
  • Manually traced install_arch_linux_onedir_post()'s new per-role loop against _INSTALL_MASTER/_INSTALL_MINION/_INSTALL_SYNDIC/_START_DAEMONS defaults and flag semantics (confirmed in the arg-parsing section) — default (minion-only) behavior unchanged, -M/-S now produce their own units.
  • No local docker/shellcheck available to run the repo's shellcheck hook; the rewritten function is a structural copy of install_alt_linux_onedir_post(), which already passes CI's shellcheck.

🤖 Generated with Claude Code

…nedir_post()

install_arch_linux_onedir_post() only ever created and enabled a
hardcoded salt-minion.service unit. install_arch_linux_restart_daemons()
and install_arch_check_services() are generic and unconditionally loop
over api/master/minion/syndic per the _INSTALL_* flags, so a -M
(master) or -S (syndic) onedir install on Arch Linux would fail when
those functions tried to restart/check a salt-master.service or
salt-syndic.service unit that was never created.

Port ALT Linux's install_alt_linux_onedir_post() loop, which creates a
unit for whichever roles are actually requested via _INSTALL_MASTER /
_INSTALL_MINION / _INSTALL_SYNDIC, gated by _START_DAEMONS. Default
minion-only behavior is unchanged.
Wire Arch Linux into the generated GitHub Actions test matrix,
following the same pattern used to add ALT Linux:

- Add "archlinux" to generate.py's LINUX_DISTROS, STABLE_DISTROS, and
  ONEDIR_DISTROS lists, and to DISTRO_DISPLAY_NAMES/CONTAINER_SLUG_NAMES
  (Arch is rolling-release, so distro-slug and container-slug are both
  just "archlinux").
- Regenerate ci.yml (pre-commit run -av generate-actions-workflow),
  adding the archlinux job and its instances list, and adding it to
  set-pipeline-exit-status's needs.
- Add archlinux to test-linux.yml's --break-system-packages
  conditionals, since Arch enforces the same PEP 668
  externally-managed-environment restriction as Debian>=12/Ubuntu>=24
  for the CI container's own pip install step.

No new version blacklist entries are added yet; the container image
for archlinux already exists in salt-ci-containers, but which
stable-*/git-* instances actually pass is unverified pending the first
real CI run (matching how ALT Linux's own blacklist entries were only
added after real failures surfaced). Likely candidates to watch:
install_arch_linux_stable()'s AUR build has no version pinning, and
git-* installs may hit Arch's own PEP 668 restriction since
_USE_BREAK_SYSTEM_PACKAGES in bootstrap-salt.sh only covers
ubuntu>=24/debian>=12.
@twangboy
twangboy force-pushed the feature/archlinux-ci-matrix branch from eafd5c8 to 0e5b858 Compare September 10, 2026 22:34
@twangboy
twangboy merged commit 041d29d into saltstack:develop Sep 11, 2026
157 checks passed
@twangboy
twangboy deleted the feature/archlinux-ci-matrix branch September 11, 2026 00:06
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