From dce5ae1707f39eb87af2c420735ba57945fb39ec Mon Sep 17 00:00:00 2001 From: Benoit Tigeot Date: Tue, 23 Jun 2026 17:14:04 +0200 Subject: [PATCH] Clarify normalizedVersion is for comparison only Prevent future refactors from switching the returned tag to the normalized form; the registry client handles '+' -> '_'. Signed-off-by: Benoit Tigeot --- pkg/registry/pushref.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/registry/pushref.go b/pkg/registry/pushref.go index 86689d111..a87d12551 100644 --- a/pkg/registry/pushref.go +++ b/pkg/registry/pushref.go @@ -32,7 +32,7 @@ func BuildPushRef(href, chartName, chartVersion string) (string, error) { return "", fmt.Errorf("cannot push to a reference with a digest: %q. Only tags are allowed", href) } - // Normalize chart version for tag comparison/build (registry tags cannot contain '+') + // Normalize for comparison only; the registry client converts '+' to '_' for the actual tag normalizedVersion := strings.ReplaceAll(chartVersion, "+", "_") // if href tag present, it must match normalized chart version if ref.Tag != "" && ref.Tag != normalizedVersion {