-
Notifications
You must be signed in to change notification settings - Fork 71
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: Override Env Vars By Default #98
Conversation
Signed-off-by: Stephen Levine <stephen.levine@gmail.com>
Signed-off-by: Stephen Levine <stephen.levine@gmail.com> Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Signed-off-by: Stephen Levine <stephen.levine@gmail.com> Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Final Comment Period with merge disposition, closing on 10 August, 2020. |
# What it is | ||
[what-it-is]: #what-it-is | ||
|
||
Buildpack authors can create environment variable files as `<layer>/env(.launch|.build|)/NAME` such the an environment variable with name `NAME` is exported into the runtime, build-time (for subsequent buildpacks), or both environments. The contents of the file are set as the value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Buildpack authors can create environment variable files as `<layer>/env(.launch|.build|)/NAME` such the an environment variable with name `NAME` is exported into the runtime, build-time (for subsequent buildpacks), or both environments. The contents of the file are set as the value. | |
Buildpack authors can create environment variable files as `<layer>/env(.launch|.build|)/NAME` such that an environment variable with name `NAME` is exported into the runtime, build-time (for subsequent buildpacks), or both environments. The contents of the file are set as the value. |
|
||
Buildpack authors can create environment variable files as `<layer>/env(.launch|.build|)/NAME` such the an environment variable with name `NAME` is exported into the runtime, build-time (for subsequent buildpacks), or both environments. The contents of the file are set as the value. | ||
|
||
These environment variable files are applied dynamically, either before subsequent buildpacks or when the app container starts. Their application may be modulated by file extensions such as `.append`, `.prepend`, `.default`, and `.override`. For `.append` and `.prepend`, a special `NAME.delim` file may be used to specify the delimiter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify – if you wanted to append to PATH
, you would create a file <layer>/env(.launch|.build|)/NAME.append
?
Overall, we should make this change but the devil is in handling the backwards breaking changes. I assume this is slated for 1.0. Do we plan to handle the current behavior and this behavior in the same group? |
@hone If we can find a comfortable way to do it, I would say yes. Some options might be:
I think I like 2 best, but it feels like we've got some options to play around with that should give us the compatibility we desire. |
I think @ekcasey had plans to do this already. |
Given an upcoming spec change around how environment variables are written to the filesystem, this change updates the API to be compatible with both old and new versions. It does this by eliminating the "unqualified" API and requiring explicit declarations for all API usage. It also eliminates the "delimiter" APIs in favor of requiring a delimiter for all "append" and "prepend" APIs. [buildpacks/spec#131][buildpacks/rfcs#98] Signed-off-by: Ben Hale <bhale@vmware.com>
Readable