chore(deps): bump github.com/google/go-containerregistry (#2546)
Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.15.1 to 0.15.2. - [Release notes](https://github.com/google/go-containerregistry/releases) - [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml) - [Commits](https://github.com/google/go-containerregistry/compare/v0.15.1...v0.15.2) --- updated-dependencies: - dependency-name: github.com/google/go-containerregistry dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
d54caaaa02
commit
51cfcf35a0
2
go.mod
2
go.mod
|
|
@ -17,7 +17,7 @@ require (
|
||||||
github.com/go-git/go-git/v5 v5.7.0
|
github.com/go-git/go-git/v5 v5.7.0
|
||||||
github.com/golang/mock v1.6.0
|
github.com/golang/mock v1.6.0
|
||||||
github.com/google/go-cmp v0.5.9
|
github.com/google/go-cmp v0.5.9
|
||||||
github.com/google/go-containerregistry v0.15.1
|
github.com/google/go-containerregistry v0.15.2
|
||||||
github.com/google/go-github v17.0.0+incompatible
|
github.com/google/go-github v17.0.0+incompatible
|
||||||
github.com/google/slowjam v1.0.1
|
github.com/google/slowjam v1.0.1
|
||||||
github.com/karrick/godirwalk v1.16.1
|
github.com/karrick/godirwalk v1.16.1
|
||||||
|
|
|
||||||
|
|
@ -32,13 +32,6 @@ import (
|
||||||
"github.com/google/go-containerregistry/pkg/v1/types"
|
"github.com/google/go-containerregistry/pkg/v1/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func fetcherFromWriter(w *writer) *fetcher {
|
|
||||||
return &fetcher{
|
|
||||||
target: w.repo,
|
|
||||||
client: w.client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// fetcher implements methods for reading from a registry.
|
// fetcher implements methods for reading from a registry.
|
||||||
type fetcher struct {
|
type fetcher struct {
|
||||||
target resource
|
target resource
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/google/go-containerregistry/pkg/logs"
|
|
||||||
"github.com/google/go-containerregistry/pkg/name"
|
"github.com/google/go-containerregistry/pkg/name"
|
||||||
v1 "github.com/google/go-containerregistry/pkg/v1"
|
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||||
"github.com/google/go-containerregistry/pkg/v1/partial"
|
"github.com/google/go-containerregistry/pkg/v1/partial"
|
||||||
|
|
@ -72,21 +71,6 @@ func (r *reader) init(ctx context.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Puller) fetcher(ctx context.Context, target resource) (*fetcher, error) {
|
func (p *Puller) fetcher(ctx context.Context, target resource) (*fetcher, error) {
|
||||||
// If we are Reuse()ing a Pusher, we want to use that for token handshakes and scopes,
|
|
||||||
// but we want to do read requests via a fetcher{}.
|
|
||||||
//
|
|
||||||
// TODO(jonjohnsonjr): Unify fetcher, writer, and repoWriter.
|
|
||||||
if p.o.pusher != nil {
|
|
||||||
if repo, ok := target.(name.Repository); ok {
|
|
||||||
w, err := p.o.pusher.writer(ctx, repo, p.o)
|
|
||||||
if err == nil {
|
|
||||||
return fetcherFromWriter(w.w), nil
|
|
||||||
}
|
|
||||||
logs.Debug.Printf("reusing Pusher failed: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Normal path for NewPuller.
|
|
||||||
v, _ := p.readers.LoadOrStore(target, &reader{
|
v, _ := p.readers.LoadOrStore(target, &reader{
|
||||||
target: target,
|
target: target,
|
||||||
o: p.o,
|
o: p.o,
|
||||||
|
|
|
||||||
|
|
@ -386,6 +386,9 @@ func (rw *repoWriter) writeChild(ctx context.Context, child partial.Describable,
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Consider caching some representation of the tags/digests in the destination
|
||||||
|
// repository as a hint to avoid this optimistic check in cases where we will most
|
||||||
|
// likely have to do a PUT anyway, e.g. if we are overwriting a tag we just wrote.
|
||||||
func (rw *repoWriter) manifestExists(ctx context.Context, ref name.Reference, t Taggable) (bool, error) {
|
func (rw *repoWriter) manifestExists(ctx context.Context, ref name.Reference, t Taggable) (bool, error) {
|
||||||
f := &fetcher{
|
f := &fetcher{
|
||||||
target: ref.Context(),
|
target: ref.Context(),
|
||||||
|
|
@ -409,6 +412,14 @@ func (rw *repoWriter) manifestExists(ctx context.Context, ref name.Reference, t
|
||||||
if terr.StatusCode == http.StatusNotFound {
|
if terr.StatusCode == http.StatusNotFound {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We treat a 403 here as non-fatal because this existence check is an optimization and
|
||||||
|
// some registries will return a 403 instead of a 404 in certain situations.
|
||||||
|
// E.g. https://jfrog.atlassian.net/browse/RTFACT-13797
|
||||||
|
if terr.StatusCode == http.StatusForbidden {
|
||||||
|
logs.Debug.Printf("manifestExists unexpected 403: %v", err)
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false, err
|
return false, err
|
||||||
|
|
|
||||||
|
|
@ -513,7 +513,7 @@ github.com/google/go-cmp/cmp/internal/diff
|
||||||
github.com/google/go-cmp/cmp/internal/flags
|
github.com/google/go-cmp/cmp/internal/flags
|
||||||
github.com/google/go-cmp/cmp/internal/function
|
github.com/google/go-cmp/cmp/internal/function
|
||||||
github.com/google/go-cmp/cmp/internal/value
|
github.com/google/go-cmp/cmp/internal/value
|
||||||
# github.com/google/go-containerregistry v0.15.1
|
# github.com/google/go-containerregistry v0.15.2
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
github.com/google/go-containerregistry/internal/and
|
github.com/google/go-containerregistry/internal/and
|
||||||
github.com/google/go-containerregistry/internal/compression
|
github.com/google/go-containerregistry/internal/compression
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue