Skip to content

Commit

Permalink
Add an alternative with a prefix for special files and folders
Browse files Browse the repository at this point in the history
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
  • Loading branch information
sambhav committed Apr 6, 2021
1 parent 9c2ec36 commit 344cd07
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions text/0000-layer-metadata-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,17 @@ This will break backwards compatibility for numerous buildpacks that don't use a

- What other designs have been considered?

We could add a prefix to each of the layer metadata files like `layer.`. This would allow us to re-use the cached layers but may lead to awkwardness around naming the layer metadata files.
## Alternative 1

We could add a prefix to each of the layer metadata files like `layer.`. This would allow us to re-use the cached layers but may lead to awkwardness around naming the layer metadata files - for eg. if a layer is called `layer.build` the metadata file would end up being `layer.layer.build.toml`

## Alternative 2

We could add a prefix for each of the special metadata files and reserve it for CNB usage. For eg. `launch.toml` could be renamed to `cnb.launch.toml`. This way, we will only be prohibiting layers that have a prefix `cnb.` or a layer named `cnb`. The downsides to this alternative are the fact that the metadata files would not be usable across builds and we would still be prohibiting a class of layer names that may be valid.

- Why is this proposal the best?

Although this is a drastic change, this also open up possibilities in the future to introduce other top level concepts inside the `<buildpacks-workspace>` apart from just `layers`.
Although this is a drastic change, this also open up possibilities in the future to introduce other top level concepts inside the `<buildpacks-workspace>` apart from just `layers` while still allowing layer names to be free-form and without any restrictions.

- What is the impact of not doing this?

Expand Down

0 comments on commit 344cd07

Please sign in to comment.