-
Notifications
You must be signed in to change notification settings - Fork 50
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
Introduce Env Variable Retention strategies (toggle between shell- and docs-mode) #761
Open
sourishkrout
wants to merge
13
commits into
main
Choose a base branch
from
653-can-environment-variables-be-reset-within-a-session
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.
Open
Introduce Env Variable Retention strategies (toggle between shell- and docs-mode) #761
sourishkrout
wants to merge
13
commits into
main
from
653-can-environment-variables-be-reset-within-a-session
+1,273
−664
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: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
|
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.
In a nutshell, this PR introduces different strategies to retain environment variables. This option will allow to make available a user setting that sets it's value according to the use case. The problem is that Runme's user base has different use cases that roughly break down into these two:
1. "Docs Mode"
Existing runbooks/notebooks/markdown with placeholder values, e.g., export OPEN_API_KEY=[insert super secret key]. Once a value is set/confirmed by a user prompt, don't ask/evaluate again (unless overwritten promptEnv requires it in cell/document config). Essentially, the first value resolved for a variable is retained, and subsequent reassignments are ignored.
2. "Shell Mode"
Take exported environment variables as is, aka "shell script" style. e.g. export MY_VAR=foo followed by export MY_VAR=bar, the last ran/evaluated value wins. When reassigned, subsequently the last value assigned is retained.
Protobuf Changes
This PR introduces
VarRetentionStrategy
with valuesVarRetentionStrategyFirst
andVarRetentionStrategyLast
. IfVarRetentionStrategyUnspecified
it defaults toVarRetentionStrategyFirst
which is up for reconsideration in a future major release.Related to #731.
Related to #653 (comment).