Fix nits + comments
Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
parent
6e28c0505f
commit
e6bbc5bf01
@ -116,13 +116,11 @@ func (t *buildTask) dockerfile(ctx context.Context, pctx *plancontext.Context, s
|
|||||||
}
|
}
|
||||||
|
|
||||||
st, err := ref.ToState()
|
st, err := ref.ToState()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
solvedRef, err := s.Solve(ctx, st, pctx.Platform.Get())
|
solvedRef, err := s.Solve(ctx, st, pctx.Platform.Get())
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -120,6 +120,9 @@ func (s Solver) ResolveImageConfig(ctx context.Context, ref string, opts llb.Res
|
|||||||
|
|
||||||
// Solve will block until the state is solved and returns a Reference.
|
// Solve will block until the state is solved and returns a Reference.
|
||||||
func (s Solver) SolveRequest(ctx context.Context, req bkgw.SolveRequest) (*bkgw.Result, error) {
|
func (s Solver) SolveRequest(ctx context.Context, req bkgw.SolveRequest) (*bkgw.Result, error) {
|
||||||
|
// makes Solve() to block until LLB graph is solved. otherwise it will
|
||||||
|
// return result (that you can for example use for next build) that
|
||||||
|
// will be evaluated on export or if you access files on it.
|
||||||
req.Evaluate = true
|
req.Evaluate = true
|
||||||
res, err := s.opts.Gateway.Solve(ctx, req)
|
res, err := s.opts.Gateway.Solve(ctx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -150,11 +153,6 @@ func (s Solver) Solve(ctx context.Context, st llb.State, platform specs.Platform
|
|||||||
// call solve
|
// call solve
|
||||||
res, err := s.SolveRequest(ctx, bkgw.SolveRequest{
|
res, err := s.SolveRequest(ctx, bkgw.SolveRequest{
|
||||||
Definition: def,
|
Definition: def,
|
||||||
|
|
||||||
// makes Solve() to block until LLB graph is solved. otherwise it will
|
|
||||||
// return result (that you can for example use for next build) that
|
|
||||||
// will be evaluated on export or if you access files on it.
|
|
||||||
Evaluate: true,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Reference in New Issue
Block a user