From 0f9e6ab832db5dc576f690f36125a70bedb89c75 Mon Sep 17 00:00:00 2001 From: Jeff Carter Date: Wed, 11 Jun 2025 10:27:54 -0400 Subject: [PATCH] Fix the generated manifest for compose artifacts so that the empty config is not added as a layer. Signed-off-by: Jeff Carter --- internal/ocipush/push.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/ocipush/push.go b/internal/ocipush/push.go index c1bf58d64..7cc78997d 100644 --- a/internal/ocipush/push.go +++ b/internal/ocipush/push.go @@ -105,7 +105,9 @@ func PushManifest( ) error { // Check if we need an extra empty layer for the manifest config if ociVersion == api.OCIVersion1_1 || ociVersion == "" { - layers = append(layers, Pushable{Descriptor: v1.DescriptorEmptyJSON, Data: []byte("{}")}) + if err := resolver.Push(ctx, named, v1.DescriptorEmptyJSON, v1.DescriptorEmptyJSON.Data); err != nil { + return err + } } // prepare to push the manifest by pushing the layers layerDescriptors := make([]v1.Descriptor, len(layers))