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 #0109] Allow setting environment variables using the build image #330

Closed
buildpack-bot opened this issue Nov 13, 2022 · 3 comments · Fixed by #345
Closed

[RFC #0109] Allow setting environment variables using the build image #330

buildpack-bot opened this issue Nov 13, 2022 · 3 comments · Fixed by #345
Milestone

Comments

@buildpack-bot
Copy link
Member

This issue have been automatically created from pull request buildpacks/rfcs#230.

@edmorley
Copy link
Contributor

edmorley commented Jul 13, 2023

It seems this should also be added to a Buildpack API milestone too (and not just the Platform 0.11 milestone), since buildpack authors need to be aware of this change as well.

For example, if a buildpack author uses clear-env = true (in order that the buildpack author has more explicit control over env vars passed to any subprocesses launched by the buildpack), then the buildpack author in some cases will want to load the env vars from /cnb/build-config and pass them to subprocesses that need them (similar to what buildpack authors already have to do for platform env vars when using clear-env = true).

@natalieparellano
Copy link
Member

natalieparellano commented Jul 13, 2023

@edmorley thanks for bringing this up. I think we got in a weird state here where Platform API 0.11 is released but Buildpack API 0.10 (which describes the build config dir for buildpacks) is not (see: "This applies for all values of clear-env or if clear-env is undefined in buildpack.toml."). For the case that you describe, I don't think the buildpack needs to take any particular action in order to propagate the build-config/<env> to future buildpacks.

I do have a question @AidanDelaney @samj1912 the platform spec says "Operator-defined environment variables MAY be modified by subsequent buildpacks before they are provided to a given buildpack." (it says the same thing for "User-provided environment variables" i.e., <platform>/env). But looking at the lifecycle code that seems not to be the case - we always override the buildpack-provided env with the platform env... is the spec wrong? Does anyone remember the original intention here?

@natalieparellano
Copy link
Member

Closed in Platform 0.11 and Buildpack 0.10

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.

3 participants