diff --git a/registry/storage/driver/gcs/gcs.go b/registry/storage/driver/gcs/gcs.go index 161fdf84..f2b6f49a 100644 --- a/registry/storage/driver/gcs/gcs.go +++ b/registry/storage/driver/gcs/gcs.go @@ -372,7 +372,7 @@ type writer struct { } // Cancel removes any written content from this FileWriter. -func (w *writer) Cancel() error { +func (w *writer) Cancel(ctx context.Context) error { w.closed = true err := storageDeleteObject(cloud.NewContext(dummyProjectID, w.client), w.bucket, w.name) if err != nil { diff --git a/registry/storage/driver/oss/oss.go b/registry/storage/driver/oss/oss.go index 0c5f76f0..6d42af95 100644 --- a/registry/storage/driver/oss/oss.go +++ b/registry/storage/driver/oss/oss.go @@ -657,7 +657,7 @@ func (w *writer) Close() error { return w.flushPart() } -func (w *writer) Cancel() error { +func (w *writer) Cancel(ctx context.Context) error { if w.closed { return fmt.Errorf("already closed") } else if w.committed {