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

Specification for CNB_STACK_ID changed when it was deprecated in Platform API 0.12 #396

Closed
edmorley opened this issue Mar 27, 2024 · 1 comment · Fixed by #397
Closed

Comments

@edmorley
Copy link
Contributor

Platform API 0.11 says:

Build Image

The platform MUST ensure that:

  • ...
  • The image config's Env field has the environment variable CNB_STACK_ID set to the stack ID.

(https://github.com/buildpacks/spec/blob/platform/v0.11/platform.md#build-image)

Under "run image" there is no mention of CNB_STACK_ID - ie: the env var only needs to be set in the build image.

However, when stacks were deprecated in Platform API 0.12, and the spec updated in #335, the specification was changed to say the CNB_STACK_ID env var should be set for both the run and build image:

For compatibility with older platforms and older buildpacks, base image authors SHOULD ensure for build images and run images:

  • The image config's Env field has the environment variable CNB_STACK_ID set to the stack ID.

(https://github.com/buildpacks/spec/blob/platform/v0.12/platform.md#iobuildpacksstack-labels)

I'm presuming this change was inadvertent?

edmorley added a commit to edmorley/spec that referenced this issue Mar 27, 2024
Restores the specification for `CNB_STACK_ID` to the definition that was used prior to the docs refactor in buildpacks#335.

Fixes buildpacks#396.

Signed-off-by: Ed Morley <[email protected]>
@edmorley
Copy link
Contributor Author

I've opened #397 for this. (We'll also want to backport to the older branches)

@edmorley edmorley changed the title Specifcation for CNB_STACK_ID changed when it was deprecated in Platform API 0.12 Specification for CNB_STACK_ID changed when it was deprecated in Platform API 0.12 Mar 27, 2024
edmorley added a commit to edmorley/spec that referenced this issue Mar 27, 2024
Restores the specification for `CNB_STACK_ID` to the definition that was used prior to the docs refactor in buildpacks#335.

Fixes buildpacks#396.
Backport of buildpacks#397.

Signed-off-by: Ed Morley <[email protected]>
edmorley added a commit to edmorley/spec that referenced this issue Mar 27, 2024
Restores the specification for `CNB_STACK_ID` to the definition that was used prior to the docs refactor in buildpacks#335.

Fixes buildpacks#396.
Backport of buildpacks#397.

Signed-off-by: Ed Morley <[email protected]>
edmorley added a commit to edmorley/spec that referenced this issue Mar 27, 2024
Restores the specification for `CNB_STACK_ID` to the definition that was used prior to the docs refactor in buildpacks#335.

Fixes buildpacks#396.
Backport of buildpacks#397.

Signed-off-by: Ed Morley <[email protected]>
edmorley added a commit to edmorley/spec that referenced this issue Mar 27, 2024
Restores the specification for `CNB_STACK_ID` to the definition that was used prior to the docs refactor in buildpacks#335.

Fixes buildpacks#396.
Backport of buildpacks#397.

Signed-off-by: Ed Morley <[email protected]>
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 a pull request may close this issue.

1 participant