Skip to content
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: Buildpacks config #191

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

RFC: Buildpacks config #191

wants to merge 3 commits into from

Conversation

jromero
Copy link
Member

@jromero jromero commented Nov 18, 2021

An alternative to project descriptor that is solely focused on Cloud Native Buildpacks.

Rendered

Signed-off-by: Javier Romero <rjavier@vmware.com>
@buildpack-bot
Copy link
Member

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)

Signed-off-by: Javier Romero <rjavier@vmware.com>

> If multiple files exist, `toml` would be selected.

#### TOML
Copy link
Member

@jkutner jkutner Nov 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a dot-file, i would expect this file structure to map directly to the pack commands. So a table for each command, with

[build]
builder = ""
clear-cache = true

  [[build.buildpacks]]
  id = "

and so on...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about the build table but given that all of the properties only apply to build I didn't see the need to add a layer of depth that the users need to repeatedly add.

Signed-off-by: Javier Romero <rjavier@vmware.com>

To prevent unnecessary complexity for end-users (app developers), the `buildpacks.<ext>` file would only support properties associated with Cloud Native Buildpacks. See full list of properties in the [file](#file) section.

### Cross-Platform Support
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't appear to improve on the status quo (project.toml). The buildpacks.* would. need to be converted into another format to become cross-platform supportable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does in that Platforms become required to support buildpacks.*. That said, we could do the same to project.toml. This RFC tries to paint a new picture on a CNB specific config file that becomes required for platforms to support.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the advantages of requiring this file over project.toml?


## File

`buildpacks.<ext>` where `<ext>` corrolates to a supported format.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is way too easily confused with buildpack.toml

Copy link
Member Author

@jromero jromero Nov 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree but do we expect app developers to be using buildpack.toml? To me, they are separated enough in context that I personally don't get troubled.

Alternatively, maybe something like Buildpacks, with no extension, similar to Dockerfile.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree but do we expect app developers to be using buildpack.toml?

If we don't, I think that makes the problem worse, because they won't even notice when they need to pay attention to the differences.


#### TOML

```toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't look any less complex to me than project.toml

# Drawbacks
[drawbacks]: #drawbacks

Why should we *not* do this?
Copy link
Member

@jkutner jkutner Nov 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • buildpacks.* is easily confused with buildpack.toml
  • buildpacks* is not inherently portable. We still need to implement a mechanism and more spec to convert it to something portable
  • yet-another-config-file: I won't have a place to put config that's common across tools (license, include/exclude, version, image names, etc)
  • doesn't map well to pack commands/flags

@Haegi
Copy link

Haegi commented Dec 2, 2021

You should keep in mind that #187 (when merged) would cause a small change in the proposed file content.

@hone
Copy link
Member

hone commented Dec 2, 2022

Should we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants