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 <me@carolynvanslyck.com>
eb3ff8f to
d0fc8e7
Compare
docs/content/operators/logs.md
Outdated
| ```console | ||
| $ porter show whalegap | ||
| Name: whalegap | ||
| Bundle: |
There was a problem hiding this comment.
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.
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.
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.
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.
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 <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
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