-
Notifications
You must be signed in to change notification settings - Fork 243
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
"odo config unset" doesn't unset an environment variable but says it did #2139
Comments
/kind bug |
@dharmit Is it a correct approach to unset env var, i mean passing the key value pair to unset the env var. Practically i would pass the key instead of passing the whole key value pair. But yes in some point i would say its a corner usecase. |
@amitkrout yes, I would not pass the key-value pair when doing unset. And it could be a corner use-case depending on how frequently/infrequently one uses env vars in their components. Assuming it's a corner case, In my particular case, I ended up discarding and redoing demo recordings because env var was already there in the component's pod. 😂 |
This PR: - Adds ability to use `foo=bar` when unsetting an environment variable - Tests have been added To test: ```sh git clone https://github.com/openshift/nodejs-ex && cd ~/nodejs-ex odo create odo push odo config set --env foo=bar odo push # optional odo config view odo config unset --env foo=bar odo push # optional odo config view ``` Closes redhat-developer#2139
This PR: - Adds ability to use `foo=bar` when unsetting an environment variable - Tests have been added To test: ```sh git clone https://github.com/openshift/nodejs-ex && cd ~/nodejs-ex odo create odo push odo config set --env foo=bar odo push # optional odo config view odo config unset --env foo=bar odo push # optional odo config view ``` Closes redhat-developer#2139
This PR errors out when there is a missing environment variable or an invalid environment variable has been passed. To test: ```sh odo config set --env foo=bar odo config unset --env testvariable # will error odo config unset --env foo=bar # will error odo config unset --env foo # will pass ``` Closes redhat-developer#2139
This PR errors out when there is a missing environment variable or an invalid environment variable has been passed. To test: ```sh odo config set --env foo=bar odo config unset --env testvariable # will error odo config unset --env foo=bar # will error odo config unset --env foo # will pass ``` Closes redhat-developer#2139
This PR errors out when there is a missing environment variable or an invalid environment variable has been passed. To test: ```sh odo config set --env foo=bar odo config unset --env testvariable # will error odo config unset --env foo=bar # will error odo config unset --env foo # will pass ``` Closes redhat-developer#2139
Assigning this to you @dharmit since you already have a PR open and we combined our separate PR's :) |
#2274 is already merged and this is a duplicate to that |
[kind/bug]
What versions of software are you using?
odo version
:master
How did you run odo exactly?
odo config set --env
.odo config unset --env foo=bar
.odo config unset --env foo
(don't mention the value offoo
this time).Verify output of
odo config view
at the end of each stepActual behavior
odo
says that it has successfully unset the env var but it actually hasn't.Expected behavior
Either
odo config unset
should complain that it can't handle the input given by user or unset the value as user would expectThe text was updated successfully, but these errors were encountered: