Visitar URL original
Finalize records before exporting · Issue #3149 · docker/buildx · GitHub
Skip to content

Finalize records before exporting #3149

Closed

Description

@crazy-max

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions