-
Notifications
You must be signed in to change notification settings - Fork 13
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
Do not enforce presence of CNB_STACK_ID #283
Conversation
Co-authored-by: Ralf Pannemans <[email protected]> Signed-off-by: Johannes Dillmann <[email protected]>
5eb1c17
to
d857d71
Compare
Can you expand on this? Where is this creating a problem? Is this part of the work we need to do to deprecate stacks? |
If the platform provides
When using a custom stack in our platform, it works fine for
This would be a good first step towards removing the stack. @dmikusa Is there any potential problem that we did not see? |
Mostly just trying to understand the request and requirements but also a little concerned with keeping spec compatibility. That said I haven't looked to check what, if anything, the spec says for the versions we presently support. |
But that would mean that
That would be good to know indeed. |
In v1.x, we supported buildpack API 0.5 to 0.8. The buildpack spec mentions
Looking in the platform spec it's trickier cause I don't think the two are linked, but I see some notes about this env variable being optional. See here.
and then it goes on to list It is consistent up to platform spec 0.12 where stacks are deprecated. Even then, it recommends that stack authors keep setting that and that the platform pass it through. I also looked for places where it might be referenced and didn't see any. It looks like libcnb is just pulling it into the context so it's easily accessible to buildpacks. That said, buildpacks may use and operate differently if this is not set. For example, I know there are some Paketo buildpacks that use the stack ID to make assumptions about the contents of the runtime image. Given that, it seems reasonable to me to make this change. The env variable isn't required, so we shouldn't fail when it's not set. Are you planning to PR this for 1.x as well? I think we could do that safely, if you need it. |
Will do. I always forget that |
|
If
CNB_STACK_ID
is not present, the buildpacks should not just fail.related rfc: https://github.com/buildpacks/rfcs/blob/main/text/0096-remove-stacks-mixins.md
first step for fixing paketo-buildpacks/libpak#329
This also aligns the behavior with
packit
, so that allpaketo
buildpacks behave similar.