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

fix: use sha256 for merge/diff op cache maps #4192

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

goller
Copy link
Contributor

@goller goller commented Sep 2, 2023

The digest of the merge/diff ops' CacheMap would be json strings like:

{"Type":"buildkit.merge.v0","Merge":{"inputs":[{"input":0},{"input":1}]}}

rather than a sha256.

I'm not sure what will happen with this change.

Also, even with this change I think all merge ops with two inputs would still hash to the same digest. Is this ok?

I checked on all the other ops and they all correctly are sha256.

The digest of the merge/diff ops' CacheMap
would be json strings like:

```
{"Type":"buildkit.merge.v0","Merge":{"inputs":[{"input":0},{"input":1}]}}
```

rather than a sha256.

Signed-off-by: Chris Goller <[email protected]>
@tonistiigi
Copy link
Member

cc @sipsma . This will break the existing cache, but I don't think we have any other choice.

@tonistiigi tonistiigi merged commit fca54c9 into moby:master Sep 12, 2023
@goller goller deleted the fix/merge-diff-cachemap-digest branch September 12, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants