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 <mail@jkroepke.de>
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
  • Loading branch information
jkroepke committed Jul 31, 2024
1 parent 7729fef commit d0227a7
Show file tree
Hide file tree
Showing 17 changed files with 628 additions and 544 deletions.
218 changes: 120 additions & 98 deletions THIRD-PARTY-LICENSES.md

Large diffs are not rendered by default.

240 changes: 129 additions & 111 deletions go.mod

Large diffs are not rendered by default.

522 changes: 263 additions & 259 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 @@ -14,7 +14,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 @@ -376,7 +376,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 @@ -846,7 +846,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 @@ -946,7 +946,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 @@ -1104,7 +1104,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 @@ -177,7 +178,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 @@ -316,7 +317,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 @@ -421,7 +422,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 @@ -432,7 +433,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 d0227a7

Please sign in to comment.