solver: fixed lint error (double import)
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
parent
7ed616c772
commit
9ffe5c053c
@ -14,7 +14,6 @@ import (
|
|||||||
bkgw "github.com/moby/buildkit/frontend/gateway/client"
|
bkgw "github.com/moby/buildkit/frontend/gateway/client"
|
||||||
"github.com/moby/buildkit/session"
|
"github.com/moby/buildkit/session"
|
||||||
"github.com/moby/buildkit/session/auth/authprovider"
|
"github.com/moby/buildkit/session/auth/authprovider"
|
||||||
"github.com/moby/buildkit/solver/pb"
|
|
||||||
bkpb "github.com/moby/buildkit/solver/pb"
|
bkpb "github.com/moby/buildkit/solver/pb"
|
||||||
"github.com/opencontainers/go-digest"
|
"github.com/opencontainers/go-digest"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
@ -38,14 +37,14 @@ func NewSolver(control *bk.Client, gw bkgw.Client, events chan *bk.SolveStatus,
|
|||||||
|
|
||||||
func invalidateCache(def *llb.Definition) error {
|
func invalidateCache(def *llb.Definition) error {
|
||||||
for _, dt := range def.Def {
|
for _, dt := range def.Def {
|
||||||
var op pb.Op
|
var op bkpb.Op
|
||||||
if err := (&op).Unmarshal(dt); err != nil {
|
if err := (&op).Unmarshal(dt); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
dgst := digest.FromBytes(dt)
|
dgst := digest.FromBytes(dt)
|
||||||
opMetadata, ok := def.Metadata[dgst]
|
opMetadata, ok := def.Metadata[dgst]
|
||||||
if !ok {
|
if !ok {
|
||||||
opMetadata = pb.OpMetadata{}
|
opMetadata = bkpb.OpMetadata{}
|
||||||
}
|
}
|
||||||
c := llb.Constraints{Metadata: opMetadata}
|
c := llb.Constraints{Metadata: opMetadata}
|
||||||
llb.IgnoreCache(&c)
|
llb.IgnoreCache(&c)
|
||||||
|
Reference in New Issue
Block a user