Skip to content

Previous solve results should be referable as locals in gw API #751

@tonistiigi

Description

@tonistiigi

after doing res, err := gw.Solve() you should be able to use a ref from that result inside a future LLB request.

For implementation, every ref returned should be associated with the edge digest that pointed to it. Now when this is used in LLB it should just marshal into the same digest without the actual definition and when doing a next solve solver will just pick up the old vertex from the graph.

A similar technique is used in llb-gobuild https://github.com/tonistiigi/llb-gobuild/blob/e8a5c93b8173ed02dd82be319006598fa9c52acf/cmd/gobuild/main.go#L123-L134

@ijc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions