Skip to content

Commit ed75253

Browse files
committed
Merge remote-tracking branch 'origin/main' into lsp-format-mem-leak
2 parents 865cfdd + b40fd73 commit ed75253

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Add `textDocument/rename` and `textDocument/prepareRename` support for `buf lsp serve`.
66
- Fix panic in LSP for empty option paths.
7+
- Fix support for multi-arch image manifests for `buf beta registry plugin push`.
78

89
## [v1.61.0] - 2025-11-25
910

cmd/buf/internal/command/beta/registry/plugin/pluginpush/pluginpush.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -495,19 +495,14 @@ func getImageIDAndDigestFromReference(
495495
break
496496
}
497497
}
498-
refNameWithoutDigest, _, ok := strings.Cut(ref.Name(), "@")
499-
if !ok {
500-
return "", "", fmt.Errorf("failed to parse reference name %q", ref)
501-
}
502-
repository, err := name.NewRepository(refNameWithoutDigest)
503-
if err != nil {
504-
return "", "", fmt.Errorf("failed to construct repository %q: %w", refNameWithoutDigest, err)
498+
if manifest.Digest.String() == "" {
499+
return "", "", fmt.Errorf("no valid platform manifest found in image index for %q", ref)
505500
}
506501
// We resolved the image index to an image manifest digest, we can now call this function
507502
// again to resolve the image manifest digest to an image config digest.
508503
return getImageIDAndDigestFromReference(
509504
ctx,
510-
repository.Digest(manifest.Digest.String()),
505+
ref.Context().Digest(manifest.Digest.String()),
511506
options...,
512507
)
513508
case desc.MediaType.IsImage():

0 commit comments

Comments
 (0)