-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
update oc env, return resources in list #11379
update oc env, return resources in list #11379
Conversation
|
||
resourceList := &kapi.List{} | ||
resourceList.APIVersion = outputVersion.Version | ||
resourceList.Kind = "List" |
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.
@fabianofranz I am not sure if this is the correct way of achieving this. If this field is not set, I receive a list with no Kind
field, preventing it from being parsed by commands like oc create
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.
4bb35fb
to
db7fe11
Compare
LGTM, squash? |
Running a command such as `oc new-app https://myrepo -o yaml | oc set env -f - MYVAR=value -o yaml` will not return a set of resources in an `api.List`, but rather print them out individually. This prevents all items from being piped to another `oc` command successfully, as only the last item will be parsed. This patch appends all resources to an api.List before printing.
db7fe11
to
57afc8a
Compare
Done! |
[merge] |
[Test]ing while waiting on the merge queue |
Evaluated for origin test up to 57afc8a |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/10186/) (Base Commit: f6bd74b) |
@fabianofranz check test flaked on #11443 |
flaked on #11442 re[merge] |
@fabianofranz I accidentally linked the PR to solve the flake, rather than the actual issue :/ sorry about that #11442 |
flake #11452 re-[merge] |
check flaked on #11024 |
flaked on #11024 re[merge] |
Evaluated for origin merge up to 57afc8a |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/10435/) (Base Commit: 2dccff1) (Image: devenv-rhel7_5216) |
Fixes #11377
Running a command such as
oc new-app https://myrepo -o yaml | oc set env -f - MYVAR=value -o yaml
will not return a set of resources in anapi.List
, but ratherprint them out individually. This prevents all items from being piped to
another
oc
command successfully, as only the last item will be parsed.This patch appends all resources to an api.List before printing.
cc @openshift/cli-review @csrwng