-
Notifications
You must be signed in to change notification settings - Fork 244
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
Adds odo create project -o json
output
#1916
Adds odo create project -o json
output
#1916
Conversation
/hold This is WIP as well as builds on the #1898 branch.. |
048d279
to
4fea5cb
Compare
/retest |
d2c998b
to
ab68796
Compare
ab68796
to
105b9d9
Compare
/hold cancel |
ee0a080
to
40de901
Compare
on Travis
On openshift CI
/retest |
/retest |
/retest |
40de901
to
f2b3af5
Compare
|
||
// If -o json has been passed, let's output the approriate json output! | ||
if log.IsJSON() { | ||
project.MachineReadableSuccessOutput(pco.projectName, successMessage) |
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.
Nit: this is a bit confusing as it feels that function is not breaking and the next line would get executed
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.
Got it :) Added an else statement.
Other than what others have commented I have one nitpick |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: girishramnani The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
/lgtm from me
/hold please have a look at @dharmit comments
9c9f18e
to
080d774
Compare
Could you have another quick look @dharmit ? Thanks for the updates! |
@cdrage I still see: $ odo project create -w newproject -o json | jq .
parse error: Invalid numeric literal at line 1, column 5 is this expected? #1916 (comment) makes me believe that you tried to fix this. |
I'll investigate it again @dharmit for some reason, it is only being affected when using the |
080d774
to
0d4696e
Compare
Just updated the PR again to fix your issue. Seems like a spinner was still being shown @dharmit |
/retest all |
Adds machine readable output for odo create project. To test: ```sh odo create project -o json ```
0d4696e
to
b444527
Compare
Works like a charm $ odo project create -w newproject -o json | jq .
{
"kind": "Project",
"apiVersion": "odo.openshift.io/v1alpha1",
"metadata": {
"name": "newproject",
"namespace": "newproject",
"creationTimestamp": null
},
"message": "Project 'newproject' is ready for use"
} Thanks @cdrage! /hold cancel |
/retest |
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
Looks like it's stick in limbo on testing... /retest all |
Adds machine readable output for odo create project.
To test: