Skip to content

Commit

Permalink
build(deps): bump all dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
  • Loading branch information
jkroepke committed Jul 24, 2024
1 parent 048e591 commit 0319c29
Show file tree
Hide file tree
Showing 17 changed files with 519 additions and 917 deletions.
449 changes: 0 additions & 449 deletions THIRD-PARTY-LICENSES.md

Large diffs are not rendered by default.

465 changes: 232 additions & 233 deletions go.mod

Large diffs are not rendered by default.

330 changes: 171 additions & 159 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/storage/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"time"

"github.com/docker/distribution/registry/storage/driver"
"github.com/distribution/distribution/v3/registry/storage/driver"
godigest "github.com/opencontainers/go-digest"
"github.com/opencontainers/image-spec/schema"
imeta "github.com/opencontainers/image-spec/specs-go"
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/gc/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/docker/distribution/registry/storage/driver"
"github.com/distribution/distribution/v3/registry/storage/driver"
godigest "github.com/opencontainers/go-digest"
ispec "github.com/opencontainers/image-spec/specs-go/v1"

Expand Down
7 changes: 4 additions & 3 deletions pkg/storage/gc/gc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"
"time"

"github.com/docker/distribution/registry/storage/driver/factory"
_ "github.com/docker/distribution/registry/storage/driver/s3-aws"
"github.com/distribution/distribution/v3/registry/storage/driver/factory"
_ "github.com/distribution/distribution/v3/registry/storage/driver/s3-aws"
guuid "github.com/gofrs/uuid"
. "github.com/smartystreets/goconvey/convey"
"gopkg.in/resty.v1"
Expand Down Expand Up @@ -89,11 +89,12 @@ func TestGarbageCollectAndRetention(t *testing.T) {
"secretkey": "minioadmin",
"secure": false,
"skipverify": false,
"forcepathstyle": true,
}

storeName := fmt.Sprintf("%v", storageDriverParams["name"])

store, err := factory.Create(storeName, storageDriverParams)
store, err := factory.Create(context.Background(), storeName, storageDriverParams)
if err != nil {
panic(err)
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/storage/imagestore/imagestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"time"
"unicode/utf8"

"github.com/docker/distribution/registry/storage/driver"
"github.com/distribution/distribution/v3/registry/storage/driver"
guuid "github.com/gofrs/uuid"
godigest "github.com/opencontainers/go-digest"
ispec "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down Expand Up @@ -375,7 +375,7 @@ func (is *ImageStore) GetNextRepository(repo string) (string, error) {
}

if errors.Is(err, io.EOF) ||
(errors.As(err, driverErr) && errors.Is(driverErr.Enclosed, io.EOF)) {
(errors.As(err, driverErr) && errors.Is(driverErr.Detail, io.EOF)) {
return store, nil
}

Expand Down Expand Up @@ -845,7 +845,7 @@ func (is *ImageStore) FinishBlobUpload(repo, uuid string, body io.Reader, dstDig
return zerr.ErrUploadNotFound
}

if err := fileWriter.Commit(); err != nil {
if err := fileWriter.Commit(context.Background()); err != nil {
is.log.Error().Err(err).Msg("failed to commit file")

return err
Expand Down Expand Up @@ -945,7 +945,7 @@ func (is *ImageStore) FullBlobUpload(repo string, body io.Reader, dstDigest godi
return "", -1, err
}

if err := blobFile.Commit(); err != nil {
if err := blobFile.Commit(context.Background()); err != nil {
is.log.Error().Err(err).Str("blob", src).Msg("failed to commit blob")

return "", -1, err
Expand Down Expand Up @@ -1103,7 +1103,7 @@ func (is *ImageStore) DeleteBlobUpload(repo, uuid string) error {

defer writer.Close()

if err := writer.Cancel(); err != nil {
if err := writer.Cancel(context.Background()); err != nil {
is.log.Error().Err(err).Str("blobUploadPath", blobUploadPath).Msg("failed to delete blob upload")

return err
Expand Down
11 changes: 6 additions & 5 deletions pkg/storage/local/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package local
import (
"bufio"
"bytes"
"context"
"errors"
"io"
"os"
Expand All @@ -11,7 +12,7 @@ import (
"time"
"unicode/utf8"

storagedriver "github.com/docker/distribution/registry/storage/driver"
storagedriver "github.com/distribution/distribution/v3/registry/storage/driver"

zerr "zotregistry.dev/zot/errors"
storageConstants "zotregistry.dev/zot/pkg/storage/constants"
Expand Down Expand Up @@ -176,7 +177,7 @@ func (driver *Driver) WriteFile(filepath string, content []byte) (int, error) {

nbytes, err := io.Copy(writer, bytes.NewReader(content))
if err != nil {
_ = writer.Cancel()
_ = writer.Cancel(context.Background())

return -1, driver.formatErr(err)
}
Expand Down Expand Up @@ -315,7 +316,7 @@ func (driver *Driver) formatErr(err error) error {
default:
storageError := storagedriver.Error{
DriverName: driver.Name(),
Enclosed: err,
Detail: err,
}

return storageError
Expand Down Expand Up @@ -420,7 +421,7 @@ func (fw *fileWriter) Close() error {
return nil
}

func (fw *fileWriter) Cancel() error {
func (fw *fileWriter) Cancel(_ context.Context) error {
if fw.closed {
return zerr.ErrFileAlreadyClosed
}
Expand All @@ -431,7 +432,7 @@ func (fw *fileWriter) Cancel() error {
return os.Remove(fw.file.Name())
}

func (fw *fileWriter) Commit() error {
func (fw *fileWriter) Commit(_ context.Context) error {
//nolint: gocritic
if fw.closed {
return zerr.ErrFileAlreadyClosed
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/local/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

storagedriver "github.com/docker/distribution/registry/storage/driver"
storagedriver "github.com/distribution/distribution/v3/registry/storage/driver"
. "github.com/smartystreets/goconvey/convey"

storageConstants "zotregistry.dev/zot/pkg/storage/constants"
Expand Down
6 changes: 3 additions & 3 deletions pkg/storage/s3/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"io"

// Add s3 support.
"github.com/docker/distribution/registry/storage/driver"
_ "github.com/docker/distribution/registry/storage/driver/s3-aws"
"github.com/distribution/distribution/v3/registry/storage/driver"
_ "github.com/distribution/distribution/v3/registry/storage/driver/s3-aws"

storageConstants "zotregistry.dev/zot/pkg/storage/constants"
)
Expand Down Expand Up @@ -65,7 +65,7 @@ func (driver *Driver) WriteFile(filepath string, content []byte) (int, error) {
return -1, err
}

if err := stwr.Commit(); err != nil {
if err := stwr.Commit(context.Background()); err != nil {
return -1, err
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions pkg/storage/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package s3

import (
// Add s3 support.
"github.com/docker/distribution/registry/storage/driver"
"github.com/distribution/distribution/v3/registry/storage/driver"
// Load s3 driver.
_ "github.com/docker/distribution/registry/storage/driver/s3-aws"
_ "github.com/distribution/distribution/v3/registry/storage/driver/s3-aws"

"zotregistry.dev/zot/pkg/extensions/monitoring"
zlog "zotregistry.dev/zot/pkg/log"
Expand Down
Loading

0 comments on commit 0319c29

Please sign in to comment.