follow-up docker/actions-toolkit#652 (comment)
We should make sure records are finalized before exporting them similar to history trace:
|
// build is complete but no trace yet. try to finalize the trace |
|
time.Sleep(1 * time.Second) // give some extra time for last parts of trace to be written |
|
|
|
c, err := rec.node.Driver.Client(ctx) |
|
if err != nil { |
|
return "", nil, err |
|
} |
|
_, err = c.ControlClient().UpdateBuildHistory(ctx, &controlapi.UpdateBuildHistoryRequest{ |
|
Ref: rec.Ref, |
|
Finalize: true, |
|
}) |
|
if err != nil { |
|
return "", nil, err |
|
} |
@tonistiigi I wonder if we should have a Finalize attribute in
|
type queryOptions struct { |
|
CompletedOnly bool |
|
Filters []string |
|
} |
To share logic for both export and trace in queryRecords?
follow-up docker/actions-toolkit#652 (comment)
We should make sure records are finalized before exporting them similar to
history trace:buildx/commands/history/trace.go
Lines 57 to 70 in 9ba3f77
@tonistiigi I wonder if we should have a
Finalizeattribute inbuildx/commands/history/utils.go
Lines 116 to 119 in 9ba3f77
To share logic for both
exportandtraceinqueryRecords?