From 10427fc0e4637e677f293fcd2a4aadeca0dc2c83 Mon Sep 17 00:00:00 2001 From: Benoit Tigeot Date: Wed, 21 May 2025 16:31:50 +0200 Subject: [PATCH] Prevent failure when resolving version tags in oras memory store - The newReference() function transforms version tags by replacing + with _ for OCI compatibility - But the code was using the original ref (with +) for TagBytes() - Then it tries to find the tagged reference using parsedRef.String() (with _) - This mismatch causes the Resolve method to fail with "not found" - By using parsedRef.String() consistently in both places, the references will match and the lookup will succeed. Close: https://github.com/helm/helm/issues/30881 Signed-off-by: Benoit Tigeot --- pkg/registry/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/registry/client.go b/pkg/registry/client.go index de7e636e1..014d0be46 100644 --- a/pkg/registry/client.go +++ b/pkg/registry/client.go @@ -693,7 +693,7 @@ func (c *Client) Push(data []byte, ref string, options ...PushOption) (*PushResu return nil, err } - manifestDescriptor, err := oras.TagBytes(ctx, memoryStore, ocispec.MediaTypeImageManifest, manifestData, ref) + manifestDescriptor, err := oras.TagBytes(ctx, memoryStore, ocispec.MediaTypeImageManifest, manifestData, parsedRef.String()) if err != nil { return nil, err }