Open david-caro opened 2 years 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>
(none)
@jkutner @jabrown85 any thoughts on this?
I'd love to see this move forward. Thanks for opening it
In general one alternative I would to see reflected in this proposal and discussed is the the following interface -
preparer </path/to/lifecycle-config.toml>
where the lifecycle config is a viper config file that maps to the various lifecycle binary flags + env vars. (See https://github.com/spf13/viper#reading-config-files).
The preparer would take the above file and modify any of the inputs in the file and pass it back to the platform to be supplied to the lifecycle.
The above file would also need to include the platform API. This way the preparer becomes a part of the platform API and has a way of modifying all the inputs needed.
This can be used to implement all of the possible functionality we could ever want from a prepare stage and this interface would be forward-compatible as long as the preparer is compatible with a certain platform API.
Related https://github.com/buildpacks/rfcs/pull/128
Maybe it's going too much into implementation details, but standardizing lifecycle input parsing on viper would allow us to expose a consistent format to map lifecycle binary CLI args <> config file <> lifecycle env vars and define an order of precedence for them.
In general one alternative I would to see reflected in this proposal and discussed is the the following interface -
preparer </path/to/lifecycle-config.toml>
where the lifecycle config is a viper config file that maps to the various lifecycle binary flags + env vars. (See https://github.com/spf13/viper#reading-config-files).
The preparer would take the above file and modify any of the inputs in the file and pass it back to the platform to be supplied to the lifecycle.
The above file would also need to include the platform API. This way the preparer becomes a part of the platform API and has a way of modifying all the inputs needed.
This can be used to implement all of the possible functionality we could ever want from a prepare stage and this interface would be forward-compatible as long as the preparer is compatible with a certain platform API.
Related #128
Maybe it's going too much into implementation details, but standardizing lifecycle input parsing on viper would allow us to expose a consistent format to map lifecycle binary CLI args <> config file <> lifecycle env vars and define an order of precedence for them.
As I understand, this would introduce a new configuration file (the lifecycle-config.toml) and an new configuration file parsing strategy.
About using the new lifecycle-config.toml
file, wouldn't that be duplicating what the project descriptor is for? (according to https://github.com/buildpacks/spec/blob/main/extensions/project-descriptor.md)
About using viper for config parsing and such, I think it would be great to consolidate on it yes :), but out of scope of this RFC? I would not mind working on it though, aside from this maybe. Do you think that just an issue would be enough or a new RFC is required? (I'm not very familiar with the processes of the group yet :} )
(btw. I can absolutely add the option you requested to the doc, just let me know, I'm trying to discuss/understand the details)
@david-caro were you still interested in moving this one forward?
I am yes, though I'm quite busy lately, feel free to take over if you want to push it
@david-caro sounds good, I'll move this into draft for now. We can move it out of draft when someone has the bandwidth to pick it up :)
This follows up on #202
Readable
Change Log
2022-11-18 (3bb05f8)
2022-02-22 (94e3180, d02754f)
Rename io.buildpacks.defaults back to io.buildpacks
Answer arbitrary properties question
2022-02-10 (8fc7a70)
Add a detailed summary
Give the
io.buildpacks
namespace an independent schema version2022-02-07 (99fc145)