openwhisk-client-go
openwhisk-client-go copied to clipboard
wsk activation list behavior
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?

@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?
fyi.. the api command did some dynamic column truncation https://github.com/apache/incubator-openwhisk-cli/blob/b18f5f0a86c3975c2e2872678b67a42621dda809/commands/api.go#L600