mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
build(deps): bump all dependencies (#2532)
* build(deps): bump all dependencies Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> * build(deps): bump all dependencies Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de> * build(deps): bump all dependencies Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de> * build(deps): bump all dependencies Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> --------- Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
This commit is contained in:
@@ -3,6 +3,7 @@ package local
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
"os"
|
||||
@@ -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"
|
||||
@@ -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)
|
||||
}
|
||||
@@ -316,7 +317,7 @@ func (driver *Driver) formatErr(err error) error {
|
||||
default:
|
||||
storageError := storagedriver.Error{
|
||||
DriverName: driver.Name(),
|
||||
Enclosed: err,
|
||||
Detail: err,
|
||||
}
|
||||
|
||||
return storageError
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user