Add an upgrade scenario to the installer test suite - #9
Open
tashian wants to merge 1 commit into
Open
Conversation
The suite only ever did a fresh install, so a package whose install scriptlet is skipped on upgrade looked fine (PRE-170: pacman never runs step-agent's post_install on upgrade because the package defines no post_upgrade). Each container now runs two scenarios from a helper mounted alongside the installer: a fresh install of the latest stable release, then a downgrade to the previous stable release, deletion of a probe that only the scriptlet produces, and a second run of the installer. The upgrade passes only if the package is at the latest version and the probe is back. The probe is the tss SupplementaryGroups drop-in, which no package-manager hook recreates; the tss group is created up front so it applies on every distro. Versions come from the stable manifest tree; UPGRADE_FROM overrides the starting point. Older packages call systemctl unguarded from their scriptlets and fail in a container without systemd, so a no-op systemctl is put in place only while the previous release is laid down and removed before the upgrade under test runs. The checkout is mounted as a directory rather than per file: a single-file bind mount is pinned to its original inode and Docker Desktop keeps serving the stale copy after the file is rewritten. Current results against stable 0.69.2 from 0.68.0: debian and ubuntu pass both scenarios; archlinux fails the upgrade (PRE-170, fix in smallstep/agent); fedora and EL fail the upgrade because 0.68.0's rpm %preun tears the drop-in down after the new %post has run, which is a defect in the shipped 0.68.0 package rather than in this suite. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BzF6nFCdBJVudxRXYuGoCX
tashian
enabled auto-merge
September 2, 2026 01:40
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.
Name of feature:
Upgrade scenario in
scripts/test-smallstep-agent-installer.sh.Pain or issue this feature alleviates:
The suite only ever did a fresh install, so a package whose install scriptlet is skipped on upgrade looked fine. PRE-170: pacman never runs step-agent's
post_installon upgrade because the package defines nopost_upgrade(fix: smallstep/agent#1214).Each container now runs two scenarios from
scripts/installer-scenarios.sh, mounted alongside the installer:The probe is
/etc/systemd/system/step-agent.service.d/tss.conf, which no package-manager hook recreates (the step-agent user and/run/step-agentare recreated by pacman's own sysusers/tmpfiles hooks and wrongly passed an earlier attempt). Thetssgroup is created up front so the probe applies on every distro. Versions come fromstable/step-agent/linux/index.json;UPGRADE_FROM=<ver>overrides the starting point.Two container concessions, both commented in the scripts: a no-op
systemctlis in place only while the previous release is laid down (0.68.0's scriptlets call it unguarded and abort in a systemd-less container), and the checkout is mounted as a directory because Docker Desktop keeps serving a stale copy through a single-file bind mount after the file is rewritten.Current results (stable 0.69.2, upgrade from 0.68.0):
%preunhas no upgrade guard and rpm runs it after the new%post, so it deletes the drop-in (and disables the swtpm units). A defect in the shipped 0.68.0 package, not in the suite; goes green once the previous stable is 0.69.2+Supporting links/other PRs/issues:
After merge, bump the
step-agentsubmodule pointer in packages.smallstep.com.🤖 Generated with Claude Code
https://claude.ai/code/session_01BzF6nFCdBJVudxRXYuGoCX