From 727f4e745e37fc5f06f44395eda53cf4c497bc48 Mon Sep 17 00:00:00 2001 From: Myasnikov Daniil Date: Mon, 6 Jul 2026 16:49:42 +0500 Subject: [PATCH] fix(dashboard): keep the v prefix on the reported platform version The console config ConfigMap stripped the leading v (trimPrefix "v") while the operator's COZYSTACK_VERSION and the vX.Y.Z release tags keep it, so the dashboard displayed 1.4.0 where the operator reported v1.4.0. Keep the tag verbatim, and build the baked VITE_APP_VERSION fallback as v$(COZYSTACK_ VERSION) too so the deploy-time and build-time version strings stay consistent with each other and with the operator. Assisted-By: Claude Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Myasnikov Daniil --- packages/system/dashboard/Makefile | 2 +- packages/system/dashboard/templates/configmap.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/system/dashboard/Makefile b/packages/system/dashboard/Makefile index d76c56534..d69509373 100644 --- a/packages/system/dashboard/Makefile +++ b/packages/system/dashboard/Makefile @@ -31,7 +31,7 @@ build-console: $(call image-tags,cozystack-ui,v$(COZYSTACK_VERSION)) \ $(call cache-args,cozystack-ui) \ --metadata-file images/console.json \ - --build-arg APP_VERSION=$(COZYSTACK_VERSION) \ + --build-arg APP_VERSION=v$(COZYSTACK_VERSION) \ --push=$(PUSH) \ --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ --load=$(LOAD) diff --git a/packages/system/dashboard/templates/configmap.yaml b/packages/system/dashboard/templates/configmap.yaml index 365a19208..5b0441ef2 100644 --- a/packages/system/dashboard/templates/configmap.yaml +++ b/packages/system/dashboard/templates/configmap.yaml @@ -6,7 +6,9 @@ {{- $tag := .Values.console.image | toString | splitList "@" | first | splitList ":" | last }} {{- $config := merge (dict) $branding }} {{- if regexMatch "^v?[0-9]" $tag }} -{{- $_ := set $config "version" (trimPrefix "v" $tag) }} +{{- /* Keep the tag verbatim (vX.Y.Z), matching the operator's COZYSTACK_VERSION + and the vX.Y.Z release tags, rather than stripping the leading v. */}} +{{- $_ := set $config "version" $tag }} {{- end }} apiVersion: v1 kind: ConfigMap