openwhisk-client-go icon indicating copy to clipboard operation
openwhisk-client-go copied to clipboard

wsk activation list behavior

Open rabbah opened this issue 5 years ago • 2 comments

A recent change to the way activations are listed produced two different behaviors.

When there are no activations, the result is this:

> wsk activation list 
activations

and when repeated with activations, the result is this:

>  wsk activation list
Datetime            Activation ID                    Kind                 Start Duration   Status            Entity                                                                                              
2019-03-14 15:25:40 1d11658e3f974e6391658e3f97be63ac nodejs:6             cold  69ms       success           guest/e:0.0.1                                                                                       

@larandersson perhaps we should nuke the naked activations headers when there are no results.

additionally, can we trim the lines so that they don't overflow unnecessarily?

Screen Shot 2019-03-14 at 2 42 42 PM

rabbah avatar Mar 14 '19 19:03 rabbah

@rabbah I'll have a look on the empty result problem. About the wrapping lines problem, there are not that many columns to work with, but something can be done with Kind, which could be given less space. The Status column is not much to do about (unless we switch to status code instead or reinvent the statuses with shorter options), it's dimensioned according to the maximum width of the various statuses available, and then the Entity column could also be given less space. All of these columns, except Status, are truncated if they exceed the assigned column width- Ther's already code in there that does that, so to fix the problem we need to anwser some questions. First of all, how many characters should we set as a maximum for each line? How many characters for Kind and Entity? What were the settings for your terminal when you ran these tests? What should we use as default?

larandersson avatar Mar 14 '19 19:03 larandersson

fyi.. the api command did some dynamic column truncation https://github.com/apache/incubator-openwhisk-cli/blob/b18f5f0a86c3975c2e2872678b67a42621dda809/commands/api.go#L600

mdeuser avatar Mar 14 '19 20:03 mdeuser