Repository navigation
Omit definitions from returned references - #7296
Merged
Merged
Conversation
tonistiigi
reviewed
Oct 19, 2026
tonistiigi
left a comment
Member
There was a problem hiding this comment.
I don't think this new test adds much and you can skip it. We should already have coverage that the definition still gets returned to client/frontend in integration tests.
Returning a gateway frontend result serialized the solved references' LLB definitions again. The Return handler already resolves those references by ID [1], so a large definition plus result metadata could exceed the gRPC message limit after Solve succeeded. Omit definitions from references serialized in Return. Keep them in Solve responses and client references so Reference.ToState can still reconstruct their LLB state. Prepared by Codex on Tamir's behalf. [1]: https://github.com/moby/buildkit/blob/64aefaef4d7dbb993156a0839958e4342aeb4c51/frontend/gateway/gateway.go#L1102-L1168 Signed-off-by: Tamir Duberstein <tamird@gmail.com>
tamird
force-pushed
the
gateway-return-reference-ids
branch
from
October 19, 2026 22:05
09340e7 to
c3fdbd4
Compare
Contributor
Author
Removed the mock client and test in c3fdbd4. The existing testFrontendUseSolveResults integration test covers the Solve/ToState path and exported result. Prepared by Codex on Tamir's behalf. |
tonistiigi
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Returning a gateway frontend result serialized the solved references' LLB definitions again. The Return handler already resolves those references by ID 1, so a large definition plus result metadata could exceed the gRPC message limit after Solve succeeded.
Omit definitions from references serialized in Return. Keep them in Solve responses and client references so Reference.ToState can still reconstruct their LLB state.
Prepared by Codex on Tamir's behalf.