Skip to content

builder: fix pull synchronization regression#42035

Merged
AkihiroSuda merged 1 commit into
moby:masterfrom
tonistiigi:builder-pull-fix
Feb 18, 2021
Merged

builder: fix pull synchronization regression#42035
AkihiroSuda merged 1 commit into
moby:masterfrom
tonistiigi:builder-pull-fix

Conversation

@tonistiigi

@tonistiigi tonistiigi commented Feb 17, 2021

Copy link
Copy Markdown
Member

fixes moby/buildkit#1939 ("Failed to compute cache key in newer version")

regression from dbffbe8 and 8f464ae (#41601) (v20.10 only). Buildkit standalone/buildx is not affected.

Config resolution was synchronized based on wrong key as ref
variable is initialized only after in the same function. This means that
on parallel config pulls keys can collide and one side is ignored. Using
right key isn't fully correct either as the syncronized method
changes properties of the puller instance and can't be just skipped.
Added better error handling for the same case as well.

@DRoet @summera

Signed-off-by: Tonis Tiigi [email protected]

Config resolution was synchronized based on a wrong key as ref
variable is initialized only after in the same function. Using
the right key isn't fully correct either as the synchronized method
changes properties of the puller instance and can't be just skipped.
Added better error handling for the same case as well.

Signed-off-by: Tonis Tiigi <[email protected]>
@tonistiigi tonistiigi changed the title builder: fix pull syncronization regression builder: fix pull synchronization regression Feb 17, 2021
@tonistiigi tonistiigi added this to the 20.10.4 milestone Feb 17, 2021
@thaJeztah thaJeztah modified the milestones: 20.10.4, 21.xx Feb 17, 2021

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@thaJeztah

Copy link
Copy Markdown
Member

@tiborvass @AkihiroSuda PTAL

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AkihiroSuda
AkihiroSuda merged commit bc6f4cc into moby:master Feb 18, 2021
@BretFisher

Copy link
Copy Markdown

Thanks a lot ya'll. Quick turnaround on this one!

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.

Failed to compute cache key in newer version

5 participants