-
Notifications
You must be signed in to change notification settings - Fork 617
Labels
Description
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
| // 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
buildx/commands/history/utils.go
Lines 116 to 119 in 9ba3f77
| type queryOptions struct { | |
| CompletedOnly bool | |
| Filters []string | |
| } |
To share logic for both export and trace in queryRecords?