7 Commits

Author SHA1 Message Date
Tonis Tiigi
30413b5de7 llb: avoid concurrent map write on parallel marshal
Calling marshal changes the internal state of the op, for example
addCap() helper adds capability constraints. These can race with
same map being read by another Marshal call. Locking the Marshal
function itself also makes sure that the cache is not recomputed
in this case.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-12-06 17:53:59 -08:00
Jonathan A. Sternberg
d59218e6e6 llb: deterministic marshaling for protobuf and store results from multiple constraints
This fixes a problem with the new protobuf marshaling with the standard
library. LLB digests are now forced into deterministic marshaling to
ensure they produce the same digest when marshaled multiple times.

In addition, the marshal cache has also been fixed to work in
multi-threaded frontends with multiple different constraints.
Previously, if an LLB vertex was used in multiple goroutines and
marshaled concurrently, the cache would be broken. This could cause
certain problems when a specific node was used multiple times in the
same LLB tree.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2024-10-02 11:17:45 -05:00
Jonathan A. Sternberg
1a3fc0aa15 protobuf: remove gogoproto
Remove gogoproto in favor of the standard protobuf compiler. This
removes any nonstandard extensions that were part of gogoproto such as
the custom types.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2024-09-26 12:57:45 -05:00
Tõnis Tiigi
016938bac3 Merge pull request #3858 from tonistiigi/llb-platform-fixes
llb: don't include platform in fileop proto
2023-05-29 17:32:25 -07:00
Brian Goff
206b3a1eeb Add some doc strings for LLB functions
This is just a first round of "would have been useful to me" sort of
documentation and examples for the LLB client API.
This is not in any way exhaustive.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-05-15 22:22:09 +00:00
Tonis Tiigi
ad69ba0389 llb: carry platform from inputs for merge/diff
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-05-10 19:39:30 -07:00
Erik Sipsma
8c1e411d01 Add DiffOp support to solver and client.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-01-06 11:05:51 -08:00