buildpacks / roadmap

Issue tracker
https://buildpacks.io
Apache License 2.0
0 stars 0 forks source link

As a pack CLI user, I can customize stacks #15

Closed sclevine closed 5 years ago

sclevine commented 6 years ago

Proposed change to config.toml:

Current:

default-stack-id = “some.official.stack”
[[stacks]]
id = “some.official.stack”
run-images = ["my-org/run", "registry2.org/my-org/run" ]
build-images = ["my-org/build"]
builder = "my-org/builder"

New:

default-stack-id = “my.official.stack:custom”
[[stacks]]
id = “some.official.stack”
run-images = ["my-org/run", "registry2.org/my-org/run" ]
build-image = "my-org/build"
builder = "my-org/builder"

[[stacks]]
id = “some.official.stack:custom”
run-images = ["my-org/run", "registry2.org/my-org/run" ]
build-image = "my-org/build-different"
builder = "my-org/builder-different"

Changes:

nebhale commented 6 years ago

From the perspective of a buildpack author (which is what primarily concerns me), seems like a harmless change. I've got no problem with it beyond the obvious avenue for stack proliferation and fragmentation.

@sclevine What do you think the support obligation for buildpack authors is? Do you think that we will have a responsibility to ensure that our buildpacks work on these variants since they appear to be the same stack?

ekcasey commented 6 years ago

It seems to me like it would be the responsibility of the producer of some.official.stack:custom to ensure buildpacks that specify some.official.stack run on this stack.

sclevine commented 6 years ago

New idea, with the same concept: https://github.com/buildpack/spec/pull/18

Would look like:

default-stack = “my custom stack”
[[stacks]]
name = "my custom stack"
id = “some.official.stack”
mixins = ["unixodbc", "gcc"]
run-images = ["my-org2/run", "registry2.org/my-org2/run" ]
build-image = "my-org2/build"
builder = "my-org2/builder"

[[stacks]]
name = "official stack"
id = “some.official.stack”
run-images = ["my-org/run", "registry2.org/my-org/run" ]
build-image = "my-org/build-different"
builder = "my-org/builder-different"

Tempted to not include name and restrict the configuration to a single set of mixins per stack, but that may be annoying.

dgodd commented 6 years ago

I think I prefer the mixin approach.

My concern with allowing custom additions and not stating that in PACK_STACK_ID is that the buildpack designed for the custom version of the stack has no way to state that, and so will fail in a confusing way when run somewhere else.

The mixin approach removes my above concern (I think)