Browse code

builder: alias containerd errdefs to prevent confusion

the containerd errdefs functions have the same name as the
docker errdefs, but their types use a different signature;
use an alias to prevent them from being mistaken for the
docker errdefs equivalents.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/02/12 06:04:31
Showing 1 changed files
... ...
@@ -11,7 +11,7 @@ import (
11 11
 	"time"
12 12
 
13 13
 	"github.com/containerd/containerd/content"
14
-	"github.com/containerd/containerd/errdefs"
14
+	containerderrors "github.com/containerd/containerd/errdefs"
15 15
 	"github.com/containerd/containerd/images"
16 16
 	"github.com/containerd/containerd/platforms"
17 17
 	ctdreference "github.com/containerd/containerd/reference"
... ...
@@ -36,7 +36,7 @@ import (
36 36
 	"github.com/moby/buildkit/util/progress"
37 37
 	"github.com/moby/buildkit/util/resolver"
38 38
 	"github.com/moby/buildkit/util/tracing"
39
-	digest "github.com/opencontainers/go-digest"
39
+	"github.com/opencontainers/go-digest"
40 40
 	"github.com/opencontainers/image-spec/identity"
41 41
 	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
42 42
 	"github.com/pkg/errors"
... ...
@@ -654,7 +654,7 @@ func showProgress(ctx context.Context, ongoing *jobs, cs content.Store, pw progr
654 654
 			if !j.done {
655 655
 				info, err := cs.Info(context.TODO(), j.Digest)
656 656
 				if err != nil {
657
-					if errdefs.IsNotFound(err) {
657
+					if containerderrors.IsNotFound(err) {
658 658
 						// pw.Write(j.Digest.String(), progress.Status{
659 659
 						// 	Action: "waiting",
660 660
 						// })