Repository navigation
strip sourcemap from Dockerfile builds - #5012
Conversation
This seems to be leading to a gigantic pb.Definition value which exceeds the gRPC message size. Signed-off-by: Alex Suraci <[email protected]>
sipsma
left a comment
There was a problem hiding this comment.
I don't think users have a way to interact with this value right now, so stripping it seems OK, but I may be missing some use case, and it would be better to get a fix upstream.
Yeah we don't use this AFAIK anywhere right now, so LGTM. I agree it would be much better to understand and fix upstream though as it's entirely possible we'll want this someday.
I remembered this PR which feels like it could be intertwined somehow: moby/buildkit#2859
But on a quick glance through the code I couldn't really make heads or tails of what was going on, haven't interacted with the source map part of the codebase at all previously, so no clear ideas immediately on how to fix there.
Yep, that's the exact change I undid and the test that started failing. 😂 Seems like we need another way to approach this in Buildkit. I'll put a TODO in my notes to figure this out upstream. (That's not worth much though at this point...) |
A bug seems to be leading to a gigantic
pb.Definitionvalue which exceeds the gRPC message size. I ran into this when trying to run Bass's tests in Dagger:cd bass/ dagger run ./bass/test -i src=./It's really slow for other reasons; more PRs coming! But it should reliably trigger the bug.
I tried to investigate why this was happening, and attempted a fix in Buildkit (changed something from an
x.ys = append(x.ys, ys)to justx.ys = ys), but my fix broke the tests, so I'm not sure if it's right.Here's a gist for the gigantic
pb.Definitionand the "fixed" one: https://gist.github.com/vito/be84c33a40f243ad472e63b88cce5658Basically Buildkit is repeatedly adding the same source information hundreds of times. I think this is partly caused by the fact that we propagate mounts from one container to the next, but my understanding of this is loose at best.
I don't think users have a way to interact with this value right now, so stripping it seems OK, but I may be missing some use case, and it would be better to get a fix upstream.