-
Notifications
You must be signed in to change notification settings - Fork 199
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
Display more installation information with show #1605
Conversation
a0e37b1
to
eb3ff8f
Compare
/azp run porter |
Azure Pipelines successfully started running 1 pipeline(s). |
@vdice Right now this shows the parameters on the last claim. Based on what we talked about today, when I implement the installation document, we would show the parameters associated with the installation when that's implemented. I think showing this data right now though is still useful? |
Add the following fields to the porter show output: * Bundle Repository, e.g. getporter/porter-hello * Bundle Version * Parameters used last All of this data comes from the last claim associated with the installation. I have also consolidated the print logic for parameters and outputs so that they both truncate and mask sensitive values the same way. If someone wants the full unmasked values, right now they need to use --ouput json|yaml instead. In some places we had not defined json/yaml marshal tags so I added them. $ porter show mysql Name: mysql Bundle: getporter/mysql Version: 0.1.3 Created: 7 minutes ago Modified: 39 seconds ago Parameters: -------------------------------------------- Name Type Value -------------------------------------------- database-name string "mydb" mysql-name string "porter-ci-mysql" mysql-user string "mysql-admin" namespace string "" Outputs: --------------------------------------- Name Type Value --------------------------------------- mysql-password string ****** mysql-root-password string ****** History: ------------------------------------------------------------------------- Run ID Action Timestamp Status Has Logs ------------------------------------------------------------------------- 01F6FZD5Z0NMSM4TZ9SGDF6Z6G install 7 minutes ago failed true Signed-off-by: Carolyn Van Slyck <[email protected]>
eb3ff8f
to
d0fc8e7
Compare
docs/content/operators/logs.md
Outdated
@@ -49,15 +49,17 @@ ID** uniquely identifies a run, or execution of a bundle. | |||
```console | |||
$ porter show whalegap | |||
Name: whalegap | |||
Bundle: |
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.
Is the bundle name missing here? Or is this how it looks when we don't know it for some reason?
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.
Let me change the output here to use a bundle that was installed using --reference
. When that flag isn't used, i.e. we installed it from source, then we won't have this bundle value.
We could display (installed from source)
instead of an empty string?
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.
We could display (installed from source) instead of an empty string?
Oh maybe so, that could be a good option. In any case, sounds like a candidate for a follow-up.
"hasLogs": "false" | ||
}, | ||
{ | ||
"claimID": "3", |
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.
Just found this curious: a jump from 1 to 3 for claimID... A quirk of the CreateClaim
helper?
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.
it's a quirk of how the test generates repeated id's for claims and results. I was lazy and the number didn't really matter, it just had to be consistent between tests. 😀
Signed-off-by: Carolyn Van Slyck <[email protected]>
Signed-off-by: Carolyn Van Slyck <[email protected]>
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
What does this change
Add the following fields to the porter show output:
All of this data comes from the last claim associated with the installation.
There was a CNAB Spec bug that tripped up my testing. Porter was not setting the bundle reference on the claim. It's not required by the spec, but since we have the data and now we want to show it, we should set it whenever it's available.
I have also consolidated the print logic for parameters and outputs so that they both truncate and mask sensitive values the same way. If someone wants the full unmasked values, right now they need to use --ouput json|yaml instead.
What issue does it fix
Fixes #1585
Part of #1446 (just changes show, doesn't add the --version flag to the other command)
Notes for the reviewer
Checklist