-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
builder: define GetRemotes for the worker #44920
Conversation
This fixes the panic and exports cache. For the import-export cycle to work properly moby/buildkit#3580 is also needed. |
Can we get some additional CI tasks here to make sure we're exercising this code path? |
@neersighted It's tricky because it is one of these cases where Moby plugs into BuildKit libraries to disable the default behavior and replace it with compatibility code that would work without containerd. #44908 enables the BuildKit tests that check these flows. |
30d882b
to
76d38dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
76d38dd
to
40e8922
Compare
Should this have been "since v0.8"? I started backporting this for 23.0, then noticed the commit message, so was wondering if that branch needed a different signature, but comparing them, they looked the same; https://github.com/moby/buildkit/blob/v0.10.6/worker/result.go#L29-L32 // GetRemotes method abstracts ImmutableRef's GetRemotes to allow a Worker to override.
// This is needed for moby integration.
// Use this method instead of calling ImmutableRef.GetRemotes() directly.
func (wr *WorkerRef) GetRemotes(ctx context.Context, createIfNeeded bool, refCfg cacheconfig.RefConfig, all bool, g session.Group) ([]*solver.Remote, error) { https://github.com/moby/buildkit/blob/v0.11.2/worker/result.go#L36-L39 // GetRemotes method abstracts ImmutableRef's GetRemotes to allow a Worker to override.
// This is needed for moby integration.
// Use this method instead of calling ImmutableRef.GetRemotes() directly.
func (wr *WorkerRef) GetRemotes(ctx context.Context, createIfNeeded bool, refCfg cacheconfig.RefConfig, all bool, g session.Group) ([]*solver.Remote, error) { Using that line for guidance, I think signature changes happened in v0.9.0-rc1 and v0.10.0-rc1;
|
var _ interface { | ||
GetRemotes(context.Context, cache.ImmutableRef, bool, cacheconfig.RefConfig, bool, session.Group) ([]*solver.Remote, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While there's no exported interface to match yet, perhaps it would be good to add a "permalink" to the code in BuildKit for reference (to save people from hunting down the interface to look for)
re-ran CI 4 times, but it keeps timing out on BuildKit integration tests; don't know if it's related, or if I'm just unlucky; https://github.com/moby/moby/actions/runs/4107961433/jobs/7100496258
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am no longer confident these changes are correct as every CI run has timed out at 30 minutes in the same buildkit integration test. Something seems to be deadlocking, or otherwise misbehaving.
The function signature has changed since v0.10. Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
40e8922
to
eaeaa7b
Compare
It looks like what changed since the last push was another re-vendor? How can we backport this to 23.0 -- was the same BuildKit fix made on the 0.10 branch, so we can simply cherry-pick the first commit & use a different BuildKit version? |
@neersighted No, the patch changed https://github.com/moby/moby/compare/40e89225367c6d402b2f2fb22a30402829b71715..eaeaa7b7fde455335623809efb3944c58f248d6e#diff-cea55065cd7f6cf43128f33bb9ad7b223c244fa6ad23a9a3852f9981b3d71e64R268 . All other changes was just the rebase. |
Ah, I see. No other changes? |
I updated the cherry-pick to point to the new commit-sha, but will rebase the backport after #44952 is merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
doh! and now forgot about the commit message;
well 🤷 |
Fixes #44918
The function signature has changed since v0.10.
Signed-off-by: Tonis Tiigi [email protected]