-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lock ops based on computed key rather than LLB digest
- Loading branch information
1 parent
d4e630c
commit dccc5a2
Showing
4 changed files
with
95 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package llbsolver | ||
|
||
import ( | ||
"github.com/moby/buildkit/solver" | ||
"github.com/moby/buildkit/solver/llbsolver/ops" | ||
) | ||
|
||
// isSourceOp returns a function that can be called to determine if a Vertex | ||
// contains an *ops.SourceOp. | ||
func (s *Solver) isSourceOp() solver.IsSourceOpFunc { | ||
return func(v solver.Vertex, b solver.Builder) (bool, error) { | ||
w, err := s.resolveWorker() | ||
if err != nil { | ||
return false, err | ||
} | ||
|
||
op, err := w.ResolveOp(v, s.Bridge(b), s.sm) | ||
if err != nil { | ||
return false, err | ||
} | ||
|
||
switch op.(type) { | ||
case *ops.SourceOp: | ||
return true, nil | ||
default: | ||
return false, nil | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters