buildpacks / rfcs

RFCs for Cloud Native Buildpacks
Apache License 2.0
56 stars 71 forks source link

Support for multi-platform artifacts when creating builders and buildpack package #295

Closed jjbustamante closed 3 months ago

jjbustamante commented 10 months ago

readable

Fixes pack #1459

buildpack-bot commented 10 months ago

Maintainers,

As you review this RFC please queue up issues to be created using the following commands:

/queue-issue <repo> "<title>" [labels]...
/unqueue-issue <uid>

Issues

(none)

natalieparellano commented 5 months ago

Awesome work @jjbustamante. I would really prefer if we kept "shared" files out of this RFC, it would make it a lot simpler to understand and implement. But otherwise this looks great.

jjbustamante commented 5 months ago

@natalieparellano , @joshwlewis

Thank you very much for your feedback. Just to quick summarize the changes that I am going to do:

  1. From the root folder pack will read: buildpack.toml and package.toml
  2. Based on that information, pack will determine the target root folder, which in theory must contain all the files the Buildpack Author wants to put into the OCI image.
  3. Buildpack Authors will be responsible for copying or creating symlink or hard link for each files into each platform folder

In this way, we will eliminate the complexity of copying partial files and recreating the platform content with the shared files strategy.

did I get it right?

natalieparellano commented 5 months ago

@jjbustamante makes sense to me. The only thing I would add is that we do need buildpack.toml in the root directory for each target, so we should copy it there. But that is probably the only special case.

jjbustamante commented 5 months ago

@natalieparellano @joshwlewis

If you can take a look at these changes will be awesome

jjbustamante commented 5 months ago

Also, should I put something on how it is supposed to work for composite buildpacks? based on the discussions on this thread

natalieparellano commented 4 months ago

Moving to voting, closing next Thursday March 21

The proof of concept can be found here: https://github.com/buildpacks/pack/pull/2086

jjbustamante commented 3 months ago

Very excited that this has progressed to status/voting, and personally can't wait to see better multi-platform support in our tooling!

At the risk of coming off a bit pedantic, I think it'd be worthwhile to consider the terminology used in this RFC (and our tooling). While supporting multiple architectures on linux is undoubtedly the most pressing reason most of us want this, it seems a bit inaccurate to refer to the changes proposed here as "multi-arch"?

The title is currently "Support for multi-arch artifacts when creating builders and buildpack package", but maybe something like "Support creating multi-platform builder and buildpack artifacts" would more accurately encapsulate/describe the proposed changes? This would also align better with Docker's terminology.

I've suggested some changes (non-exhaustively) to the wording in case that's helpful - feel free to use/dismiss as you see fit. Appreciate you all's efforts, and again, I very much hope we'll soon see these changes introduced, regardless of what we call them :)

@runesoerensen Thank you so much for your suggestions! I will take a look at them but I truly appreciate it. I am not an native english speaker 😄 and this kind of feedback is always great for me to keep improving!