-
Notifications
You must be signed in to change notification settings - Fork 297
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
Proof of Concept for Execution Environment RFC #2324
Draft
jjbustamante
wants to merge
12
commits into
main
Choose a base branch
from
jjbustamante/execution-environment-poc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Juan Bustamante <[email protected]>
github-actions
bot
added
the
type/enhancement
Issue that requests a new feature or improvement.
label
Jan 26, 2025
jjbustamante
changed the title
WIP - adding flag to set the CNB_EXEC_ENV
Proof of Concept for Execution Environment RFC
Jan 26, 2025
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2324 +/- ##
==========================================
- Coverage 69.96% 69.91% -0.04%
==========================================
Files 254 255 +1
Lines 18758 18821 +63
==========================================
+ Hits 13122 13157 +35
- Misses 4755 4781 +26
- Partials 881 883 +2
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: Juan Bustamante <[email protected]>
…in progress Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR is intended to be an initial implementation of the Execution Environment RFC. it uses an initial implementation on lifecycle developed by @jabrown85 in the following branch
The RFC is in a voting state; we must include those changes on some API version and the current code should be updated afterward.
Changes added
pack build
command was added,--exec-env
, to pass through the execution environment duringthe build process. By default, value will be productionOutput
Before
The Execution Environment feature doesn't exist, nothing to show here.
After
I added a bunch of unit tests to the updated toml files, but to test all together I used our sample repo. The hello-moon buildpack prints some environment variables during its execution.
Using a current lifecycle.
pack
with the changes made in this PR--exec-env
flagNotice in the following log how
pack
is sending theCNB_EXEC_ENV
environment variable with the value we set in the--exec-env
flag to thelifecycle
Also notice, because this
lifecycle
version doesn't know anything about theCNB_EXEC_ENV
when our hello-moon buildpacks runs, we don't see the environment variable there.Using a lifecycle compiled from Jesse's branch
As I mentioned before, @jabrown85 created a lifecycle implementation for this RFC, I compiled that a
lifecycle
from that branch and created a sample builder with it. I built the sample ruby application using that builder.Similar to our previous example,
pack
sends theCNB_EXEC_ENV
with the value we specified in the command line.Now, we can see the environment variable CNB_EXEC_ENV is available to the buildpack at execution time to the build/detect binaries.
Documentation
Related
Resolves #___