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 #0096] Remove 'stacks' from builder.toml #1303

Closed
Tracked by #219
buildpack-bot opened this issue Oct 6, 2021 · 5 comments · Fixed by #1660
Closed
Tracked by #219

[RFC #0096] Remove 'stacks' from builder.toml #1303

buildpack-bot opened this issue Oct 6, 2021 · 5 comments · Fixed by #1660
Labels
status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.

Comments

@buildpack-bot
Copy link
Member

buildpack-bot commented Oct 6, 2021

builder.toml has a [stack] key which doesn't make sense in a post stack world (docs). However the new key name and the structure of this field are yet to be determined.

builder.toml has current schema:

# Stack that will be used by the builder
[stack]
id = "io.buildpacks.samples.stacks.bionic"
# This image is used at runtime
run-image = "cnbs/sample-stack-run:bionic"
run-image-mirrors = ["mirror1", "mirror2"]
# This image is used at build-time
build-image = "cnbs/sample-stack-build:bionic"

This feeds into /cnb/stack.toml in the created builder with schema:

[run-image]
 image = "cnbs/sample-stack-run:bionic"
 run-image-mirrors = ["mirror1", "mirror2"]

Proposed schema for builder.toml:

[run]
# Runtime images - first element is the default, later elements may be selected by run image extensions
[[run.images]]
image = "cnbs/some-run-image"
mirrors = ["mirror1", "mirror2"]
[build]
# This image is used at build-time
image = "cnbs/some-build-image"

This should feed into /cnb/run.toml in the created builder with schema:

[[images]]
 image = "cnbs/some-run-image"
 mirrors = ["mirror1", "mirror2"]
@natalieparellano
Copy link
Member

See discussion here: buildpacks/spec#335 (comment)

@natalieparellano natalieparellano added the status/discussion-needed Issue or PR that requires in-depth discussion. label Jan 9, 2023
@natalieparellano
Copy link
Member

natalieparellano commented Feb 16, 2023

Update: buildpacks/spec@ef56944 proposes the builder contain a new file: run.toml with schema:

[[images]]
 image = "<image>"
 mirrors = ["<mirror1>", "<mirror2>"]

This could become [[run.images]] in builder.toml

@natalieparellano natalieparellano added status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement. and removed status/discussion-needed Issue or PR that requires in-depth discussion. labels Feb 16, 2023
@natalieparellano
Copy link
Member

Note from Feb 23 Working Group:

  • We like this proposal, but let's rename [[image]] to [[images]] to be consistent with how we pluralize other list items
  • We might eventually want to add mirrors = ["mirror1", "mirror2"] as a field under [build] (out of scope for this issue)
  • What happens when builder.toml only contains [stack] - should we auto translate this to [run] and [build]?
    • Opinion: no, this could introduce other problems, but we could output a warning to the effect of "this builder will not work on newer platforms, copy/paste the following TOML to builder.toml to make it compatible"
    • Note that we can't do the reverse translation ([run] and [build] -> [stack]) because we don't have a stack ID

@natalieparellano
Copy link
Member

@jkutner will write up a plan

@jjbustamante
Copy link
Member

@jkutner plan

@natalieparellano natalieparellano linked a pull request Mar 23, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants