Repository navigation
Conversation
6104809 to
2229a75
Compare
|
I'm not sure it's possible to just push manifest list with Buildkit, at least, it wasn't possible when I worked on multi-platform. You can take a look at #1467, it's a proof of concept that implement multi-platform in dagger Europa (old version but there shouldn't be much change in go code) |
|
Yes. You're correct. Have to use |
4cd4c38 to
5401287
Compare
|
otherwise, the arch-suffix images created by so QEMU is too slow for compiling huge project. native buildkit is required for this case |
3ad31e6 to
2a94724
Compare
363e3db to
f1f4f54
Compare
TomChv
left a comment
There was a problem hiding this comment.
Thanks for your amazing contribution 🚀
@aluzzardi @shykes That's a really interesting PR that follows what I did during autumn.
WDYT?
I left minors comments after a quick look, we must take time and put extra attention on this PR so you can wait before applying my comments.
There was a problem hiding this comment.
Platform is also optional in core.#Dockerfile so you should not need that if statement
There was a problem hiding this comment.
have to use this. otherwise, cue will throw error.
There was a problem hiding this comment.
Platform is optional, you do not need that if statement?
6259476 to
ddb3114
Compare
|
never mind. I want to continue do next big thing, multi-arch builder. |
|
@morlay Appreciate the effort here and agree this is an important feature. I have a couple high-level thoughts + concerns. In terms of your use case, you mentioned that "QEMU is too slow for compiling huge project" and it seems like your intention after this PR is to add support for distributing builds across multiple Buildkit daemons for each platform (correct me if wrong). I like that idea a lot, but it touches on a lot of issues related to support for multiple Buildkit workers that I think we need to design very carefully. Even for just this PR, we may need to do a lot more iteration to nail down the cue interface, add a lot more tests to make sure it works seamlessly with the rest of the features (including the What I'm getting at is that it might be easier to approach this problem differently to unblock your use case faster. Here's one route I could imagine:
This is just my personal feeling though. If there's some other reasons the above won't work or you'd rather figure out how to get this support merged into |
I agree. In fact, Different from
It could be accept multi platforms, if when it set, it could push with the selected platform.
In github actions, it could. This is why the PR needed, for non-docker environment Why mv to dagger? |
That's alright actually, I was just using Do you think any of those would work for you? If so, those tools could be wrapped in a reusable action and then put under a |
Nope. Multi-arch builds is the big feature of In workflow like (webui + go service): (this should be common for projects) %%{init:{'theme':'base'}}%%
flowchart TD
web_assets["web assets \n (only need to build on any one arch)"]
go_build_amd64["go build for amd64"]
go_build_arm64["go build for arm64"]
multi_arch_image["build multi-arch image"]
web_assets
--> go_build_amd64 & go_build_arm64
--> multi_arch_image
Without mult-arch support, we have to use Another issue with those steps, With mult-arch support, we could simple run So in another words, My recently projects, using dagger with mult-arch support (binaries: https://github.com/morlay/dagger/releases/tag/v0.3.0-beta): |
I completely get this and absolutely agree we want to take advantage of buildkit's builtin features in the long-term. The only concern I have right now is that this PR makes a lot of decisions on how we want to approach this problem, which means we are committing to it (or forcing us to make backwards incompatible changes in the future). That's why I thought using a separate tool could be a faster option since it would work already today (even if it has some caveats like you said). If we can find a way to get this same functionality but only by using experimental command line flags rather than modifying our core actions in cue, that might be another somewhat quicker path (but we'd need sign-off from other team members too of course). I could imagine something like this:
The only problem I'm not sure about is the one you mentioned where your |
It not change old way, could use tag on manifest list is better than arch-suffix, it could let use change nothing of k8s manifests to deploy to k8s cluster with any arch node, even to k8s cluster with mulit-arch nodes like me.
# For each step, it is run on docker container. so platform is the input too.
# go bulild will use the build.web's output for `go:embed`
$ npm run build.web | go build
# when dagger do build --platform=amd64
$ npm run build.web --platform=amd64 | go build --platform=amd64
# `npm run build.web` will pull node for amd64, then run install & build.web
# when dagger do build --platform=arm64
$ npm run build.web --platform=arm64 | go build --platform=arm64
# the platform changed, and the cache will not be hint.
# `npm run build.web` will pull node for arm64, then repeat run install & build.webLike docker did, I prefer declare FROM --platform=${BUILD_PLATFORM} node:alpine |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
… the inputs Signed-off-by: Vasek - Tom C <[email protected]> Signed-off-by: Morlay <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]> Signed-off-by: Morlay <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]> Signed-off-by: Morlay <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]> Signed-off-by: Morlay <[email protected]>
Signed-off-by: Morlay <[email protected]>
Signed-off-by: Morlay <[email protected]>
With rebase, tests has been merged together into one single `@test`. To correctly cache tests, they are now split into their own `@test` This commit also update `pull_platform.cue` to use templating instead of for loop according to the current dagger coding style. Signed-off-by: Vasek - Tom C <[email protected]> Signed-off-by: Morlay <[email protected]>
- Use templating instead of for loop in test. - Reduce code duplication - Clean up cue file - Correctly exec test in `.bats` Signed-off-by: Vasek - Tom C <[email protected]> Signed-off-by: Morlay <[email protected]>
Signed-off-by: Morlay <[email protected]>
|
Hi @TomChv @shykes @aluzzardi @helderco @sipsma |
|
Hi @morlay, we discussed this PR the other day as a team and decided that while we all completely agree this feature is extremely important and we need to support it in the fullness of time, we currently don't have time to give its design+implementation the attention it requires, so it would be best to close it for now. To be clear, that's not to say there's anything wrong with your change, it's just that with any foundational feature like this we need to spend a lot of time validating it and considering as many future possibilities as we can to ensure it will be compatible with everything else we have planned. The other thing we agreed on as a team is that we truly appreciate all the effort you've put into this and are very sorry that we have to reject the change for now. It's not something we do lightly since we love community contributions and adding new features like this that make Dagger better+easier to use. We just have to balance that against other practical considerations right now. On our side, we are going to be more careful about being clear upfront on whether PRs are likely to be merged or not so we end up making the best use of everyone's time. Also though, we recommend first running proposed features+designs by Dagger maintainers and getting confirmation that it's the right time to pursue them before diving into the implementation. This is briefly mentioned in our online contributing docs, but I'll also update our |
Fine. I think I have to use my forked dagger. https://github.com/morlay/dagger/releases/tag/latest |
Related: #1371
Continue #1467
Instead of extends `#Push`, adding new task `#PushManifestList` for creating the manifest list- https://docs.docker.com/engine/reference/commandline/manifest/
Refs:
Not implatemented, just show api changes