-
Notifications
You must be signed in to change notification settings - Fork 71
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
RFC: Support for pack.toml #189
Conversation
Signed-off-by: Joe Kutner <jpkutner@gmail.com>
Maintainers, As you review this RFC please queue up issues to be created using the following commands:
Issues(none) |
Signed-off-by: Joe Kutner <jpkutner@gmail.com>
I understand that e.g. builder might be difficult to impossible to support. On the other hand side, introducing this special handling for the platform maintained as part of CNB core feels a bit like opening the box of Pandora. |
Is #191 the same thing that @jromero is currently drafting in https://hackmd.io/4LGBHOZAQ6GMOTeDf2U3_w?view#What-it-is? If yes, the existence of project.toml namespaces like io.buildpacks.pack.* leads me to the question if that would supersede the proposal for a pack specific configuration file...? If I am right in this, then section about merging pack specific config seems to build a circle with this rfc that might be worth resolving ;) |
@loewenstein I think this RFC started the conversation that led to @jromero's hackmd draft RFC. I'm supportive of that one, and will likely close this once we turn his into a real RFC |
I was asking because the proposal of @jromero seems to try to accommodate this one ;) |
@jkutner, I submitted the RFC for a Prepare Operation and excluded the section referring to the |
@jkutner have you had a chance to review my latest comments? @dfreilich your feedback would also be appreciated here since this seems rather impacting. |
Signed-off-by: Joe Kutner <jpkutner@gmail.com>
Has there been any decision with regards to additional file vs. some flexibility and additional tables in the existing project descriptor file? |
@loewenstein no decision, but I'm reopening this PR for discussion. My hope is that this will allow us to introduce pack specific attributes in the |
|
||
The Pack CLI will honor both the `pack.toml` and `project.toml` file descriptors with the following rules: | ||
|
||
* If one or more descriptors are provided on the command line they will all be merged and used. |
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.
* If one or more descriptors are provided on the command line they will all be merged and used. | |
* If one or more descriptors are provided on the command line, all top-level keys will all be merged and the resulting descriptor will be used. |
I guess I'd still prefer to have "project" related configuration in a single file, i.e. the |
@loewenstein IIUC that matches the intent of this proposal. Any general project configuration can go in |
|
||
```toml | ||
[io.buildpacks.pack] | ||
builder = "<string (optional)>" |
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.
io.buildpacks.builder
already seems to be supported in project.toml
here: https://github.com/buildpacks/spec/blob/main/extensions/project-descriptor.md#iobuildpacksbuilder-optional. Is this different somehow?
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 think that may have been added since I first wrote this. I'll update with a different example that shows something that's specific to pack (like tag
or maybe env-file
)
Moving this into FCP for next Thurs Dec 8. |
@jkutner how does this play with
Would these be supported in |
I guess my main concern is with things that are maybe |
I really like the motivation: advertises that the repo containing the file can be built with pack Now, I have the following doubt: Is there an idea to accomplish that? I mean, for example, if we think of developers that use vscode and they want some extension for Docker, then they have a lot of options. Are we considering creating or maintaining our own IDEs extensions for CNB tooling? |
When multiple descriptors are _merged_ the following precedence is given: | ||
|
||
* Configuration in a file provided on the command line will take precedence over files provided on the command line after it. | ||
* Configuration in a `pack.toml` will take precedence over configuration in a `project.toml` |
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 would like some outputs from pack
to indicate the config being used (even better if it could trace it back to the origin and say why). That way users can know at a glance if their changes have been picked up or if they're not being picked up, get a hint that maybe another file is taking precedence.
I'm unsure whether that desire can be encoded in the RFC in a sensible way.
The Pack CLI will support a new descriptor file, `pack.toml`, that is a superset of the project descriptor. | ||
* An app MAY have a `pack.toml` | ||
* An app MAY have a `project.toml` | ||
* An app MAY have both a `pack.toml` and a `project.toml`, in which case the `project.toml` will be ignored. |
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.
* An app MAY have both a `pack.toml` and a `project.toml`, in which case the `project.toml` will be ignored. | |
* An app MAY have both a `pack.toml` and a `project.toml` where they will be merged and used. |
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.
@hone we've gone back and forth on this. Merging could actually be very complicated, and if we support merging we should only do it at the top level shared key (i.e. we're not going to try and merge lists of things for example)
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.
@jkutner this is precisely why I have a problem with a platform specific descriptor covering platform agnostic configuration.
I would want to have as much as possible in an agnostic way, at least from the perspective of all platforms other than pack
. Why? Because for 99% of the non pack
platforms I can imagine, pack
will be the platform for local execution. See kpack and our integration into project Piper as two examples and Tekton most likely as a third.
Also, as I pointed out in #189 (comment) the “project.toml
will be ignored” statement contradicts other parts of this proposal.
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 still see multiple project descriptor related RFCs open. Can we consolidate them and figure out how each fits in the larger picture? I don't want there to be multiple ways of configuration as that just leads to complicated code and lots of corner cases. If we do decide to implement multiple related RFCs, I would also like to see how they interplay with each other and what precedence would look like amongst them.
Signed-off-by: Joe Kutner <jpkutner@gmail.com>
I'm going to close this RFC again. There is enough about merging pack.toml and project.toml that isn't clear, and there isn't enough interest in using pack.toml (even from me) to make me move it forward. |
Readable