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

solver: make digest computation for ops deterministic again #5363

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsternberg
Copy link
Collaborator

The solver relied on protobuf marshaling to compute a digest. There's no guarantee of the byte order, especially for maps, with marshaling. As an implementation detail, gogo would sort the keys for a map and Deterministic: true causes the standard marshaler to sort the keys, but this isn't a reliable method.

In the future, we likely want to either remove the maps from the protobuf messages or not rely on protobuf serialization for this function.

The solver relied on protobuf marshaling to compute a digest. There's no
guarantee of the byte order, especially for maps, with marshaling. As an
implementation detail, gogo would sort the keys for a map and
`Deterministic: true` causes the standard marshaler to sort the keys,
but this isn't a reliable method.

In the future, we likely want to either remove the maps from the
protobuf messages or not rely on protobuf serialization for this
function.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
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.

1 participant