mirror of
https://github.com/containers/skopeo.git
synced 2025-09-21 09:57:19 +00:00
[release-1.14] Fixes Listing tags in JFrog Artifactory may fail
Addresses the problem first described in https://github.com/containers/skopeo/issues/2346 in the release-1.14 branch Also addresses: https://issues.redhat.com/browse/RHEL-40801 https://issues.redhat.com/browse/RHEL-40805 Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
9
vendor/github.com/containers/image/v5/docker/docker_image.go
generated
vendored
9
vendor/github.com/containers/image/v5/docker/docker_image.go
generated
vendored
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/containers/image/v5/manifest"
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/opencontainers/go-digest"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Image is a Docker-specific implementation of types.ImageCloser with a few extra methods
|
||||
@@ -90,6 +91,14 @@ func GetRepositoryTags(ctx context.Context, sys *types.SystemContext, ref types.
|
||||
}
|
||||
for _, tag := range tagsHolder.Tags {
|
||||
if _, err := reference.WithTag(dr.ref, tag); err != nil { // Ensure the tag does not contain unexpected values
|
||||
// Per https://github.com/containers/skopeo/issues/2346 , unknown versions of JFrog Artifactory,
|
||||
// contrary to the tag format specified in
|
||||
// https://github.com/opencontainers/distribution-spec/blob/8a871c8234977df058f1a14e299fe0a673853da2/spec.md?plain=1#L160 ,
|
||||
// include digests in the list.
|
||||
if _, err := digest.Parse(tag); err == nil {
|
||||
logrus.Debugf("Ignoring invalid tag %q matching a digest format", tag)
|
||||
continue
|
||||
}
|
||||
return nil, fmt.Errorf("registry returned invalid tag %q: %w", tag, err)
|
||||
}
|
||||
tags = append(tags, tag)
|
||||
|
2
vendor/github.com/containers/image/v5/version/version.go
generated
vendored
2
vendor/github.com/containers/image/v5/version/version.go
generated
vendored
@@ -8,7 +8,7 @@ const (
|
||||
// VersionMinor is for functionality in a backwards-compatible manner
|
||||
VersionMinor = 29
|
||||
// VersionPatch is for backwards-compatible bug fixes
|
||||
VersionPatch = 3
|
||||
VersionPatch = 4
|
||||
|
||||
// VersionDev indicates development branch. Releases will be empty string.
|
||||
VersionDev = ""
|
||||
|
Reference in New Issue
Block a user