Skip to content

fix(installer): offer only the extensions this node can install - #5117

Merged
mudler merged 1 commit into
kairos-io:masterfrom
ci-forks:bot/5116-extension-menu-publishes-image
Oct 2, 2026
Merged

mudler merged 1 commit into
kairos-io:masterfrom
ci-forks:bot/5116-extension-menu-publishes-image

Conversation

@ci-robbot

Copy link
Copy Markdown
Collaborator

Fixes #5116

Summary

The interactive installer's extension step listed every layer the catalog
indexes, including layers that publish no system extension image. Selecting one
wrote an install.extensions name that the agent then refused, after the
operator had confirmed the install. git is in exactly that state on the
published hadron-layers index today: publishing.yaml skips its sysext build
on purpose, so the index carries it with "sysext": {} on every tag, and this
repository already vendors the proof in
sdk/extensions/testdata/releases.json.

The screen now offers a catalog layer only when the agent's own resolver can
resolve that name with no version, for the architecture the installer is
running on. Reusing the resolver is what keeps the menu from drifting from what
the install will do, and it drops the entry rather than quietly offering it at
an older version, which #4718 rejected. This moves the same failure earlier, it
does not add a fallback.

Second half: when a version publishes no extension image at all,
Catalog.Resolve now says so. It used to report architecture "amd64" is not available for layer "git" version "2.56.0", which sends the reader looking for
a node of another architecture when none would work.

How it was tested

go test ./sdk/extensions/... ./agent/pkg/extensions/... ./installer/... ./sdk/types/extensions/... is green.

New specs, each confirmed to fail with the change backed out and to pass with
it in:

  • a layer whose tags carry an empty sysext object is not offered
  • a layer that publishes arm64 only is not offered on amd64, and is offered
    on arm64
  • a live media image of the same name is still offered, so an airgapped install
    is unaffected
  • Catalog.Resolve on a base-only layer says the layer publishes no image, and
    does not name the architecture

One existing fixture had to be corrected on the way: catalogJSON in the wizard
tests used tag references (...tailscale:1.80.0) where the generator and the
resolver both require a digest. Nothing had run it through Resolve before, so
the fixture described a catalog the agent would have refused.

The GHCR state quoted in the issue was read anonymously from the registry
during this session:

hadron-layers/git        tags: 2.55.0, 2.56.0
hadron-layers/sysext/git package does not exist
hadron-layers/fwupd      tags: 2.1.6, 2.1.7, 2.1.8
hadron-layers/sysext/fwupd tags: 2.1.7-amd64, 2.1.7-arm64, 2.1.8-amd64, 2.1.8-arm64

Not booted. This is installer-side selection logic covered by unit tests; the
install path it feeds is unchanged.

AI wrote this change. No human read it before it was opened.

πŸ€– Generated with Claude Code

The extension step listed every layer the catalog indexes. A layer does not
have to publish a system extension image: hadron-layers turns the extension
build off per layer through publishing.yaml, and a newly added layer is
indexed before its first extension is pushed. Selecting such an entry wrote an
install.extensions name the agent then refused, after the operator had
confirmed the install. `git` is in that state today.

Offer a catalog layer only when the agent's own resolver can resolve its name
with no version, for the architecture the installer runs on. Reusing the
resolver keeps the menu from drifting from what the install will do, and drops
the entry rather than quietly offering it at an older version, which
kairos-io#4718 rejected.

Say what is wrong when a version publishes no image at all, rather than naming
an architecture that would not have helped.

Fixes kairos-io#5116

Signed-off-by: Ettore Di Giacinto <mudler@kairos.io>
@ci-robbot
ci-robbot requested a review from a team as a code owner October 1, 2026 19:20
@ci-robbot

Copy link
Copy Markdown
Collaborator Author

QA verdict for this head (3b7d1ac5) is on the issue: #5116 (comment) (PASS).

@mudler
mudler merged commit b2de9e1 into kairos-io:master Oct 2, 2026
7 of 8 checks passed

This branch was previously deployed

1 inactive deployment
fork-pr-builds β€” 3b7d1ac5 Deployed Oct 1, 2026 by ci-robbot via authorize #991
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.

installer: the extension step offers catalog layers that publish no extension image, so the pick fails the install

2 participants