Skip to content

Commit e7ff7ea

Browse files
committed
client: make sure ref is configurable for the history API
Signed-off-by: Tonis Tiigi <[email protected]>
1 parent 7f432bf commit e7ff7ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/solve.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ type SolveOpt struct {
4949
SessionPreInitialized bool // TODO: refactor to better session syncing
5050
Internal bool
5151
SourcePolicy *spb.Policy
52+
Ref string
5253
}
5354

5455
type ExportEntry struct {
@@ -95,6 +96,9 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG
9596
}
9697

9798
ref := identity.NewID()
99+
if opt.Ref != "" {
100+
ref = opt.Ref
101+
}
98102
eg, ctx := errgroup.WithContext(ctx)
99103

100104
statusContext, cancelStatus := context.WithCancel(context.Background())

0 commit comments

Comments
 (0)