From 8afbe57814a6992ddc700c640349b90e52125649 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 21 Sep 2026 15:27:13 +0200 Subject: [PATCH] The pinning line shows the built image's id, not one digit of it --- internal/bootstrap/control.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/bootstrap/control.go b/internal/bootstrap/control.go index 1af4bce..bcade8b 100644 --- a/internal/bootstrap/control.go +++ b/internal/bootstrap/control.go @@ -79,7 +79,7 @@ func InstallControlPlane(ctx context.Context, o Options, d Deps, control control if err != nil { return out, err } - say(fmt.Sprintf(" pinned %s → %s, in %d place(s)", shortRef(built.Image), image, places)) + say(fmt.Sprintf(" pinned %s → %s, in %d place(s)", shortImage(built.Image), image, places)) container, _, err := containerIn(pinned, controlPlaneResourceIn(pinned)) if err != nil { @@ -398,3 +398,13 @@ func sortedKeys(m map[string]string) []string { sort.Strings(keys) return keys } + +// shortImage is an image id as a person reads one: the first twelve hex digits, without the +// algorithm in front — `shortRef` would keep the prefix and show one digit of the digest. +func shortImage(id string) string { + digest := strings.TrimPrefix(id, "sha256:") + if len(digest) > 12 { + return digest[:12] + } + return digest +}