Skip to content

Commit

Permalink
Merge pull request #4542 from thaJeztah/24.0_backport_manifest_deref
Browse files Browse the repository at this point in the history
[24.0 backport] cli/registry: fix client.pullManifestList not de-referencing manifest, and remove "v1" check
  • Loading branch information
thaJeztah committed Aug 29, 2023
2 parents cdd81d6 + d3485b9 commit 3789f8a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cli/registry/client/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ func pullManifestList(ctx context.Context, ref reference.Named, repo distributio
}

// Replace platform from config
imageManifest.Descriptor.Platform = types.OCIPlatform(&manifestDescriptor.Platform)
p := manifestDescriptor.Platform
imageManifest.Descriptor.Platform = types.OCIPlatform(&p)

infos = append(infos, imageManifest)
}
Expand Down Expand Up @@ -242,11 +243,6 @@ func (c *client) iterateEndpoints(ctx context.Context, namedRef reference.Named,

confirmedTLSRegistries := make(map[string]bool)
for _, endpoint := range endpoints {
if endpoint.Version == registry.APIVersion1 {
logrus.Debugf("skipping v1 endpoint %s", endpoint.URL)
continue
}

if endpoint.URL.Scheme != "https" {
if _, confirmedTLS := confirmedTLSRegistries[endpoint.URL.Host]; confirmedTLS {
logrus.Debugf("skipping non-TLS endpoint %s for host/port that appears to use TLS", endpoint.URL)
Expand Down

0 comments on commit 3789f8a

Please sign in to comment.