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

Add ability to override qbec vars with env alone #142

Open
harsimranmaan opened this issue Jul 23, 2020 · 2 comments
Open

Add ability to override qbec vars with env alone #142

harsimranmaan opened this issue Jul 23, 2020 · 2 comments

Comments

@harsimranmaan
Copy link
Contributor

At the moment, env var KEY can be used to set value for a qbec var named KEY but only if --vm:ext-str KEY is specified when invoking qbec command. The enhancement is to drop the requirement on specifying --vm-ext-str KEY.

With the following example from qbec.yaml, both qbec commands below should set the same value for std.extVar('KEY')

  vars:
    external:
    - default: some-default-key
      name: KEY
export KEY=mykey
qbec show default --vm-ext-str KEY
qbec show default
@gotwarlost
Copy link
Contributor

This means taking the stance that qbec doesn't respect jsonnet's hermetic behavior (only things passed explicitly on the command line can change the output). I'm not entirely opposed to it since it is a usability issue that frequently bites people in the backside because they expect that kind of behavior

@gotwarlost
Copy link
Contributor

If we choose to support this, I think there should be a way to opt-in to this behavior and not have it turned on by default.

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

No branches or pull requests

2 participants