-
Notifications
You must be signed in to change notification settings - Fork 481
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
Implement ability to load images by default in non-Docker build drivers. #2259
Conversation
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.
This could also be a driver-opt
maybe?
Thanks! I like this path, as it allows finer granularity when selecting the new behavior (per driver vs per env). |
3ba8f17
to
9889528
Compare
f93683d
to
03340c5
Compare
@tonistiigi @crazy-max |
fa960fa
to
8e7dbc3
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.
Can you squash your commits please?
Also would be nice to have integration tests in https://github.com/docker/buildx/tree/master/tests if you can or can be follow-up
Thanks!
Sure! I initially did not realize that not all workers are tested by default with PTAL |
2fd4de2
to
e8b5973
Compare
@crazy-max Could you help me re-trigger the validation workflows? |
Thanks! |
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 thanks!
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.
It needs a rebase with changes introduced recently sorry 😅
See also review, I tried to push changes to your branch but looks like you don't allow edits by maintainers. Here is my branch if you want to pick these changes: master...crazy-max:buildx:default-load-opt otherwise I can carry in another PR if you prefer. Thanks
tests/build.go
Outdated
if sb.Name() != "docker" { | ||
t.Skip("skipping test for non-docker workers") | ||
} |
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.
Use helper, see bcda1db
tests/build.go
Outdated
registry, err := sb.NewRegistry() | ||
if errors.Is(err, integration.ErrRequirements) { | ||
t.Skip(err.Error()) | ||
} | ||
require.NoError(t, err) | ||
|
||
target := registry + "/buildx/registry:" + identity.NewID() |
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.
Setting up registry is not needed for this test, see 4d012cf
c7012c1
to
58a45d9
Compare
Thanks! From what I can tell, I cannot grant edit rights retroactively. |
tests/build.go
Outdated
cmd.Env = append(cmd.Env, "BUILDX_BUILDER="+builderName) | ||
outb, err := cmd.CombinedOutput() | ||
require.NoError(t, err, string(outb)) | ||
} |
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.
The image inspect
test seems to have been removed: master...crazy-max:buildx:default-load-opt#diff-12855e5a65cd0dc084324f4808d159cf2ebd514a77c6eee4dba653e1a4e94470R793-R795
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.
Yup, sorry, bad merge. Was juggling too many things.
Updated and tested locally 🤞
This eases build driver migrations, as it allows aligning the default behavior. See also https://docs.docker.com/build/drivers/ Signed-off-by: Niklas Gehlen <niklas@namespacelabs.com>
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.
Thanks!
This eases build driver migrations, as it allows aligning the default behavior.
See also https://docs.docker.com/build/drivers/