-
Notifications
You must be signed in to change notification settings - Fork 386
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
Allow using Podman to develop Earthly #1675
Conversation
Includes partial refactor of URL generation.
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.
nice job! just left some ultra minor nits.
Handled. |
This reverts commit 2f9c9ee.
@alexcb I think I cleaned up the test failure reasons. The refactor hid a very sneaky bug; would love your re-review to make sure its still ok to merge. |
fe.urls, err = fe.setupAndValidateAddresses(FrontendStub, cfg) | ||
if err != nil { | ||
return nil, errors.Wrap(err, "failed to calculate buildkit URLs") | ||
} |
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 was the source of the bug. We used to calculate URLs after choosing a frontend; but by choosing the stub, we would end up skipping the calculations instead during our unit tests. The solution was to also let the stub calculate URLs; so the remote buildkit would end up being chosen.
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.
Ohhhh buddy did this take a while to figure out.
util/containerutil/docker.go
Outdated
all := []string{binary} | ||
all = append(all, args...) | ||
|
||
return fmt.Sprintf("cat %s | %s", filename, strings.Join(all, " ")) |
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.
return fmt.Sprintf("cat %s | %s", filename, strings.Join(all, " ")) | |
return fmt.Sprintf("cat %s | %s", shellescape.QuoteCommand(filename), strings.Join(all, " ")) |
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.
looks good, just a minor edge-case
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.
Nice job 🥇
These changes fix a couple sore points when using Podman to develop Earthly itself:
registries.conf
.WITH DOCKER --load
in aLOCALLY
target.