Skip to content

fix(deps): update module github.com/mudler/yip to v1.27.1 - #6171

Merged
Itxaka merged 2 commits into
kairos-io:masterfrom
mauro-agent:deps/bump-yip-1.27.1
Nov 20, 2026
Merged

Itxaka merged 2 commits into
kairos-io:masterfrom
mauro-agent:deps/bump-yip-1.27.1

Conversation

@mauro-agent

Copy link
Copy Markdown
Contributor

Bumps github.com/mudler/yip from v1.27.0 to v1.27.1.

v1.27.1 fixes mudler/yip#344 with mudler/yip#361. The agent and immucore run yip stages in parallel. A step with only_os re-read the machine info while another step was templating it, and the JSON encoding of that info panicked with reflect: slice index out of range. The panic kills the process, the rest of the stage is skipped and boot goes on, so a cloud-config can be silently dropped on about 5 percent of boots (the figure from the yip issue). The fix removes the re-read.

Only go.mod and go.sum change.

Testing

  • go build ./agent/... ./immucore/... ./cmd/... passes.
  • go test ./agent/pkg/cloudinit/... ./sdk/collector/... ./sdk/machine/... passes.
  • go test ./agent/pkg/config/ reports the same 7 failures with yip v1.27.0 and with v1.27.1, so they are not from this bump. They look like file-system tests that cannot run in my sandbox.
  • I did not run the integration or boot tests.

AI disclosure

I used Claude Code to prepare this change. A human has not yet read the diff line by line; it is a two-line dependency bump.

@mauromorales
mauromorales marked this pull request as ready for review November 19, 2026 19:28
@mauromorales
mauromorales requested a review from a team as a code owner November 19, 2026 19:28
v1.27.1 stops only_os steps from re-reading the machine info while other steps template it. That race made the JSON encoding of the info panic (mudler/yip#344) and silently dropped the rest of a stage.

Signed-off-by: mauro-agent <mauro-agent@mrls.xyz>
Co-developed-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Mauro Morales <contact@mauromorales.com>
auroraboot/go.mod pins yip on its own and replaces the root module, so the image build failed with go mod tidy needed after the root bump.

Co-developed-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Mauro Morales <contact@mauromorales.com>
@mauromorales

Copy link
Copy Markdown
Member

@ci-robbot please QA

@mauromorales mauromorales moved this from Under review 🔍 to QA in 🧙Issue tracking board Nov 19, 2026
@ci-robbot

Copy link
Copy Markdown
Collaborator

Picking this up for QA.

@ci-robbot

Copy link
Copy Markdown
Collaborator

QA Result: PASS

Tested head 5b10947f (yip v1.27.1, go.sum hash h1:+SVzAzNU...) against master e907b164 (yip v1.27.0). The v1.27.1 tag is v1.27.0 plus only mudler/yip#361 (e8a2711, 4 lines removed from pkg/plugins/if_os.go).

Check Result
Environment 1. kairos binary built from master and from this PR (CGO_ENABLED=0 go build ./cmd/kairos), run as kairos-agent in a debian:trixie container as root. 2. This PR's CI ISO kairos-hadron-v0.6.3-core-amd64-generic-v4.6.0-3-g33880802.iso (run 44601022635) booted live in QEMU/KVM, amd64, 4 vCPU. go version -m on the node's /usr/bin/kairos (which immucore links to) shows mudler/yip v1.27.1
Reproduction One qa stage with a start step, 60 only_os + only_os_version steps and 60 steps whose if: and commands: template {{.Values.os.name}}|{{.Values.os.version}}, all after: the start step so they run in parallel, plus one only_os: "Alpine.*" step that must be skipped. Run with kairos-agent run-stage --override-cloud-init-paths <dir> --strict qa, 300 times per binary. A run counts as complete when it exits 0, all 60 only_os steps ran, all 60 templates rendered the real OS values, and the Alpine step did not run
Expected No reflect: slice index out of range panic, every step of the stage runs, the templates render, and only_os still filters
Actual See the table below. Master panics and loses most of the stage in about 1 run in 10. The PR completes all 600 runs with no panic
Proofs Counts, the master panic stack and the fresh-boot journal check below
Where Binary Fatal panics litter.Sdump panicked warnings Complete runs
Container master (yip v1.27.0) 32 / 300 65 266 / 300
Container PR (yip v1.27.1) 0 / 300 0 300 / 300
Booted PR ISO master binary copied to /usr/local 24 / 300 73 276 / 300
Booted PR ISO node's own /usr/bin/kairos-agent 0 / 300 0 300 / 300

On master, a failed run exits 2 after only 6 of 60 templated steps and 6 of 60 only_os steps ran (rc=2 tpl=6 os=6). The stack is the one from mudler/yip#344:

panic: reflect: slice index out of range
github.com/mudler/yip/pkg/plugins.templateSysData(...)
github.com/mudler/yip/pkg/plugins.IfConditional(...)
github.com/mudler/yip/pkg/executor.(*DefaultExecutor).applyStage(...)

On the PR, every run rendered Hadron Linux|v0.6.3 on the node and Debian GNU/Linux 13 (trixie)|13 in the container in all 60 templated steps, and the Alpine-only step never ran.

Fresh boot of the PR ISO with only a cidata user seed, before anything else was run: journalctl -b has 0 lines matching panic: or slice index out of range, initramfs, rootfs, fs, boot, network, reconcile and first-boot all log Done executing stage, and systemctl --failed is empty. CI on this head: test-core / install and test-core / acceptance passed, so the separate tests/ module still builds with the bump.

Summary: The bump fixes the parallel-stage panic in the Kairos binary itself, on a real booted node as well as in a container: 0 panics in 600 runs, against 56 in 600 on master, with templates and only_os filtering unchanged. The node's boot stages also run without a panic. I did not run an installed-node boot loop, and immucore's initramfs stages were checked on one boot only.

@ci-robbot ci-robbot moved this from QA to QA OK in 🧙Issue tracking board Nov 19, 2026
@Itxaka
Itxaka added this pull request to the merge queue Nov 20, 2026
Merged via the queue into kairos-io:master with commit b53f1fa Nov 20, 2026
68 of 69 checks passed
@github-project-automation github-project-automation Bot moved this from QA OK to Done ✅ in 🧙Issue tracking board Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: reflect: slice index out of range in plugins.templateSysData

4 participants