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: don't include platform in fileop proto #3858

Merged
merged 2 commits into from
May 30, 2023

Conversation

tonistiigi
Copy link
Member

Afaics FileOp has the same behavior independently from the target platform, so don't include the platform value in the LLB digest. The same already happens for MergeOp/DiffOp.

Atm. when doing multi-platform builds, copying the same files in both architectures can create different LLB. BuildKit solver will discover that the vertexes are the same after doing the cache key computation but this means that it goes to the "merging edges" code path and some vertexes will be canceled. This means inefficient and more complicated codepath as well as weird output to the user.

I also discovered #1889 but have no memory of the full intentions behind it.

While modifying the tests to make sure that platform is still carried over correctly if run steps happen after fileop I discovered that this was not working correctly (imho) for merge and diff op. The second commit is for that. If needed I could also separate it into another PR.

@sipsma

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@jedevc jedevc added this to the v0.12.0 milestone May 22, 2023
@tonistiigi tonistiigi merged commit 016938b into moby:master May 30, 2023
55 checks passed
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.

None yet

2 participants