Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llb: deterministic marshaling for protobuf and store results from multiple constraints #5374

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

jsternberg
Copy link
Collaborator

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.

…tiple 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 <[email protected]>
@tonistiigi
Copy link
Member

@jsternberg I don't think you can revert back to :master tag right in this PR. We need to merge your PR first, let the master tag rebuild and then we can switch to it.

@jsternberg
Copy link
Collaborator Author

Yea I'll revert it back. I mostly changed it so I could test the PR.

@tonistiigi tonistiigi merged commit 8445ccf into moby:master Oct 2, 2024
138 of 179 checks passed
@jsternberg jsternberg deleted the marshal-constraints-cache branch October 2, 2024 20:49
@tonistiigi
Copy link
Member

@jsternberg New master image has been built. You can bring back the second commit now.

@crazy-max
Copy link
Member

@tonistiigi Maybe just revert my changes #5361 ?

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

Successfully merging this pull request may close these issues.

3 participants