Open chrsmith opened 6 years ago
Don't we print the full set of diagnostics at the end of the update regardless?
As @ellismg mentions, we print this all out at the end. Showing below while the operation is happening is doable, but something we need to be careful with. We don't want the error being so large it means you don't see progress.
One thing might just be to print out the first error diagnostic below, limited to no more then 4 lines.
Moving out. No obvious 'good' solution is coming. A nd i think the experience now is actually ok. Note: you can also widen your screen to see more info here.
@pgavlin Suggested a "simple" option. On narrow terminals, put the "Info" and possibly "Name" columns into additional rows. Still keep a fixed number of rows per node in the tree - just allow it to be 2 or 3 instead of just 1. Pick this up front based on terminal width at time of launch.
Note that we are also working on improving the display of this same information in app.pulumi.com, and should consider printing the link to the update page before starting the update progress display so that users can go there to get a richer display of progress.
This may be worth trying out. Though i'm somewhat skeptical this will provide enough marginal benefit to be worthwhile. For example, if the display is narrow, and we place the 'info' on hte line below, we're effectively betting on the useful information still having to be on the last printed line, close enough to the start to not be cut off.
If the necessary info is on a previous line, or is later in the same line, this will still be cut off.
Overall, i'm wary about dumping lots of work into a UI experience that is going to always be somewhat encumbered by the inherent limitations of text UI. I'd far prefer to just go simple and have the link to the web progress given up front. Then, if you see that there's an issue during the run, you can just go there, and we can more easily present complex live information thanks to the flexibility of an html front-end. With a normal UI framework, we can more easily do things like have the UI reflow naturally based on the client dimensions. We can easily have sections that can present rich detailed information, but also be collapsible for brevity. etc. etc.
This is related to https://github.com/pulumi/pulumi/issues/1851.
Moving to M20 along with #1851.
I have to admit, I'm not keen on changing our CLI display at the moment. I think it's "good enough" and we spent multiple milestones tweaking things to get to where we are.
@CyrusNajmabadi @lukehoban I propose we punt this down the line a bit longer, and focus on higher value work like progress on libraries, customer reported issues, and the like. Ok?
That's fine with me. My headspace is not with the CLI right now. It's polish, whereas we have core critical functionality in other places we're trying to get done.
I also find it hard to read info as it is often cropped off and important feedback is lost if something is in a stuck state. I usually end up decreasing font size significantly when I wish to read the info column.
A keyboard shortcut that toggles on and off the first three rows, would go a long way to "zoom in" and read info messages/warnings.
Some other suggestions:
kubernetes:admissionregistration.k8s.io:ValidatingWebhookConfiguration
k8s:ValidatingWebhookConfig
kubernetes:rbac.authorization.k8s.io:ClusterRoleBinding
k8s:CRB
kubernetes:admissionregistration.k8s.io:ValidatingWebhookConfiguration
...:ValidatingWebhookConfiguration
**creating failed**
is about 2.5x as long as created
. Consider just failed
in a color terminal.Couldn't we print new diagnostic lines at the top of display and append new lines as log messages are output and then move the progress display to the bottom?
i.e.
Previewing update (dev)
View Live: https://app.pulumi.com/dixler/aws-python/dev/previews/16413561-38d4-4892-9a70-c28015217213
Type Name Plan Info
+ pulumi:pulumi:Stack aws-python-dev create 3 errors; 4 messages
+ ├─ aws:s3:Bucket bucket2 create
+ ├─ aws:s3:Bucket bucket1 create
+ └─ aws:s3:Bucket bucket3 create
Diagnostics:
pulumi:pulumi:Stack (aws-python-dev):
log message 1
log message 2
<APPEND NEW LOGS HERE>
edit: I've looked into the display code and I think the cost to stream at the bottom would be cheap.
When a log message or error occurs during a
pulumi update
, it gets rendered on the "Info" column. This is difficult to read at best, and for messages that span multiple lines, gets truncated before it can be useful.Example:
Would it be possible to render the full
console.log
messages or error messages below the "summary grid"? e.g. create a new diagnostics section on-demand? Something like:@CyrusNajmabadi WDYT?