Merge pull request #47049 from vvoland/c8d-fix-labels-check-filter

c8d/getImageLabelByDigest: Fix misspelled `labels` check
This commit is contained in:
Sebastiaan van Stijn 2024-01-09 15:55:57 +01:00 committed by GitHub
commit afc7e581e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -363,7 +363,7 @@ func imageFamiliarName(img containerdimages.Image) string {
// targeting the specified digest. // targeting the specified digest.
// If images have different values, an errdefs.Conflict error will be returned. // If images have different values, an errdefs.Conflict error will be returned.
func (i *ImageService) getImageLabelByDigest(ctx context.Context, target digest.Digest, labelKey string) (string, error) { func (i *ImageService) getImageLabelByDigest(ctx context.Context, target digest.Digest, labelKey string) (string, error) {
imgs, err := i.client.ImageService().List(ctx, "target.digest=="+target.String()+",label."+labelKey) imgs, err := i.client.ImageService().List(ctx, "target.digest=="+target.String()+",labels."+labelKey)
if err != nil { if err != nil {
return "", errdefs.System(err) return "", errdefs.System(err)
} }