From 368a386a56fa9ae3679eb210181ae226e271ec7d Mon Sep 17 00:00:00 2001 From: karo Date: Fri, 17 Apr 2026 13:12:25 +0200 Subject: [PATCH] fix(oci): register manifest blobs in repository_blobs on push Podman (via containerd) fetches sub-manifests referenced in an OCI Image Index via GET /v2/{name}/blobs/{digest}. Manifest blobs were stored in the blobs table but never inserted into repository_blobs, so BlobsDownload returned 404 for them. Add repository_blobs insert in HandleUploadManifest. The existing ON CONFLICT DO NOTHING guard makes this safe for re-pushes. --- internal/commands/UploadManifest.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/commands/UploadManifest.go b/internal/commands/UploadManifest.go index 4784dba..f5a019c 100644 --- a/internal/commands/UploadManifest.go +++ b/internal/commands/UploadManifest.go @@ -42,6 +42,8 @@ func HandleUploadManifest(ctx context.Context, command UploadManifest) (*UploadM return nil, err } + dbContext.RepositoryBlobs().Insert(repositories.NewRepositoryBlob(command.RepositoryId, blob.GetId())) + if strings.HasPrefix(command.Reference, "sha256:") && command.Reference != command.Digest { return nil, ociError.NewOciError(ociError.DigestInvalid) }