test: fix failing kitchen suites by pinning salt to the image version#591
Conversation
On the *-3006* / *-3007* suites, kitchen fails on every platform while
applying the salt states:
'salt' changed from '3006.17-0' to '3008.1-0'
[ERROR ] ModuleNotFoundError: spec not found for the module 'site'
>>>>>> Converge failed on <default-oraclelinux-9-3006-17>
The images ship salt 3006.17/3007.9, but salt.pkgrepo adds the
salt-repo-latest repo (saltproject-rpm/, currently 3008.1) and the unpinned
pkg.installed upgrades salt in place; swapping the running onedir under
salt-call breaks the post-install module refresh, so the run dies.
The per-version pins in test/salt/pillar/ only cover 3002/3003/3004 and set
salt:release, which is no longer read by any state. Pin salt:version to the
image's running version instead, so the formula keeps the installed salt.
Co-authored-by: Claude <noreply@anthropic.com>
8b50270 to
5c894b9
Compare
|
Update after watching the matrix: this pin does get past the crash above — converge completes and salt stays at the image's Pinning Rather than force a dead end, I'd rather ask how you'd prefer to handle it. Two directions I can see:
I'll open a separate PR trying option 2 (it's a |
Pinning salt:version (previous commit) writes the running version into salt_settings.version, but the _mapdata reference files are static and one per OS — shared across the -3006/-3007/-master suites — so they can't carry a per-image version. Drop salt_settings.version from both sides of the compare: it now tracks the kitchen image's salt rather than a fixed default, so it's not a value the static reference should assert. Co-authored-by: Claude <noreply@anthropic.com>
|
Update — I went with the first option above. Two commits:
On the latest pipeline all 34 blocking
I also closed #592 (the "skip Thanks for maintaining this! |
|
Thank you for taking a look at this - it was on the to-do list to get to eventually. Great first contibution! |
|
🎉 This PR is included in version 1.13.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
Correction to my note above on the
Separately worth flagging: even the freshest So as long as the |
I opened #590 to fix a one-line typo, but its GitLab CI jobs failed — and
other PRs (e.g. #589) fail with the same error. So the kitchen suites seem to
be failing independently of any change; this PR is an attempt to fix that.
The
*-3006*/*-3007*suites die on every platform while applying the states:Those images ship salt 3006.17 / 3007.9, but
salt.pkgrepoadds thesalt-repo-latestrepo (currently 3008.1) and the unpinnedpkg.installedupgrades salt in place — swapping the onedir under the running
salt-call,which breaks the post-install module refresh.
The per-version pins in
test/salt/pillar/only cover 3002/3003/3004 and setsalt:release, which no state reads anymore — so the current images get nopin. This pins
salt:versionto the image's running salt (grains.saltversion)instead, so the formula keeps it rather than upgrading.
I couldn't run kitchen locally, so this leans on the PR's CI matrix to validate.
(The stale
v3002/3/4-py3.slsreleasepins are dead now and could be droppedin a follow-up.)
Disclosure: prepared with the assistance of Claude (an LLM).