If I'm looking at a recent activation to debug it and I don't know its ID, it would be useful to have its start/end time, its status (success, running, failed).
Currently other than confirming there are activations, it is not very useful:
$ wsk activation list
activations
123fb4243552491b94b6fcf6a94be745 vision-analysis
21526c4dd7564090a9095941fa1d546b vision-analysis
0fa2dd0bb55f4df3ba68a571da1a6d34 vision-analysis
3b33904f79f448beb0c913856363a088 vision-analysis
e2e22077ad3945b48b612436fe0bb334 vision-analysis
48581ba45fac4119a5970250e3f0b0d7 vision-analysis
dec75b9e241942e6a9ddd0fc9b8dd68b vision-analysis
3a0e3cbf45734ce1b13220414d6c10af vision-analysis
I have discussed the issue with @rabbah. He proposed more general solution.
activation entity records can be divided into two parts: small constant size and unbounded size. logs, result object are examples of the latter. The other fields of an activation are finite and bounded
Default activation list should get and show a bounded part of each activation. activation list with a flag (include_docs) should get everything that belongs to activation.
I will do the changes in this direction. Any comments?
@fxulusoy: makes sense. eager to see more info on activation list. thanks!
@mdeuser I see go-cli has a --full flag
Should we close this issue?
@l2fprod you can use --since --upto and --full to get a list of the activations and be able to find the one you are looking within the time frame you scoped.
$ wsk activation list -h
list activations
Usage:
wsk activation list [NAMESPACE] [flags]
Flags:
-f, --full include full activation description
-l, --limit LIMIT only return LIMIT number of activations from the collection (default 30)
--since SINCE return activations with timestamps later than SINCE; measured in milliseconds since Th, 01, Jan 1970
-s, --skip SKIP exclude the first SKIP number of activations from the result
--upto UPTO return activations with timestamps earlier than UPTO; measured in milliseconds since Th, 01, Jan 1970
Fred's request is to show more information in the list as in
$ wsk activation list
activations
123fb4243552491b94b... vision-analysis duration start-time end-time status
@rabbah that's the final list of columns to show? No more, No less
activationid actionanme duration start-time end-time status
It's open for discussion. Maybe we add status, start time and duration for starters.
yeah I think those 3 would be useful, and if duration can be printed in human (i.e. less than 1 show xms, less than 1 minute shows x:x seconds, etc..)
Maybe we add status, start time and duration for starters.
incl. action name?
Name is already printed.
We might want to add trigger/rule vs action distinction.
cool -- wanted to make sure that stays on the list.
agree the distinction trigger/rule/action should be highlighted. i think folks will also want to filter based on them, so probably another parameter on the cli?
@rabbah - @bpoole16 and I have picked up on this issue, and we had a few questions:
You mentioned a distinction between actions and triggers/rules in the list; did you have any thoughts on implementation with this? Currently, there is no way to distinguish activations of actions, rules or triggers.
What are your thoughts on implementing this form of the list with a flag? Gathering the data necessary to display the info requested here requires several Get calls to the server, producing noticeable lag time from entering the command to the finished list displaying.
activation for triggers and rules have end time stamp equal to 0 and duration 0 as well.
a rule will have a caused field also populated.
isn't there a pr that almost has this completed?
@rabbah, @mdeuser - wasn't able to find an open PR for this issue when we originally looked into it. Thanks for pointing that out! Are we to assume that this issue is off the table, then? It doesn't look like the PR has been touched in a few months.
This issue is still in need of an implementation. Since the original owner of that PR is not working on it, you can pick up where it leaves off.
@mdeuser, @rabbah, @dubeejw: we wanted to get some feedback on our current proposed output for wsk activation list:
$ wsk activation list
activations
activation id name type date start end zone duration status
0dde2068e2db439883ccdfad79252c11 goodbye action 2017-07-27 10:13:02 10:13:02 EDT 42 success
e03b8069ed7541aabd213a47ec76aaa6 goodbyeRule rule 2017-07-27 10:13:02 n/a EDT 0 success
50aa984ff20c4f9a8cf64dc92e94fff5 goodbyeTrigger trigger 2017-07-27 10:13:02 n/a EDT 0 success
aa7627f3addb42c2a1c80837a218849c hello action 2017-07-27 09:52:20 09:52:20 EDT 371 success
4ab5887c564c4b46b8dc688000dcd121 hello action 2017-07-27 09:52:19 09:52:19 EDT 68 success
20297150a8794bc2904d6786bef933b2 hello action 2017-07-27 09:52:19 09:52:19 EDT 76 success
7fc8cc98eafa44c488f986ce38d5b0a2 zhelloRule rule 2017-07-27 09:52:19 n/a EDT 0 success
f639be4f00ab457f9065c38eab337ded ahelloRule rule 2017-07-27 09:52:19 n/a EDT 0 success
667cc6023e3647668c12be8117a7d98e helloRule rule 2017-07-27 09:52:19 n/a EDT 0 success
for triggers and rules i would omit the end and duration. otherwise looks good to me.
i'm confused by the time zone - where would there be different time zones for the actions? you're going to show the stamps in the time zone for the local host machine right? i think EDT/EST there is a unnecessarily confusing. I would take it out.
looking good.
name column?name value include the package?zone column? i agree with @rabbah in that the default date/time should be displayed in the local system executing the cli.duration .. add units to column header.. i.e. duration (ms)Any opinions on format for the date(yyyy-mm-dd)? There is no Golang function that allows us to format the date based on location. So, if we wanted to format the date according to region we would have to write something to check the users region.
@mdeuser
1) Currently, there are no limits for name.
2) Name does not include package.
3) We agree, zone is being removed.
4) Will do.
Thinking about the appearance of and activation that spans midnight and crosses into the next day. having a start and end each complete with date/time would work, but may be too wordy as most activations would start/end on the same date. are the start and end time values in 24 hour format?
They are on military time, yes.
As for date, i think YYYY-MM-DD should be fine for now.
Here are our two competing ideas for list output, given feedback:
Output 1:
$ wsk activation list
activations
activation id name type start end duration status
8be7b9b23749477dbd9d0a21ddadec34 thisisareallyreallyreallyreallyREALLYreallylong... action 2017/07/27 12:45:40 07/27 12:45:40 34h 17m 36s success
8ac78624eb654b1cb9442ec62686a9f6 hello action 2017/07/27 12:08:48 07/27 12:08:48 34h 17m 36s success
d0083e7c387b4dbcbd66bf303a4771f8 hello action 2017/07/27 12:08:48 07/27 12:08:48 34h 17m 36s success
9c8636e15bcc4c129f226e422737610f hello action 2017/07/27 12:08:48 07/27 12:08:48 34h 17m 36s success
6d17d52fd40f4ba38f3d0125bf7c9cd1 zhelloRule rule 2017/07/27 12:08:48 --/-- --:--:-- -- success
2faeafa6ec7c495a984124f43ffedbb4 ahelloRule rule 2017/07/27 12:08:48 --/-- --:--:-- -- success
b7d8b40eb473467c88dbc1710d5fdc7a helloRule rule 2017/07/27 12:08:48 --/-- --:--:-- -- success
ed5fc08691974db0b5e1ee155c216ba6 helloTrigger trigger 2017/07/27 12:08:48 --/-- --:--:-- -- success
c0e392579fc4404596e2cc18fc9f3c73 hello action 2017/07/27 12:08:17 07/27 12:08:17 34h 17m 36s success
Output 2:
$ wsk activation list
activations
activation id name type start end duration status
8be7b9b23749477dbd9d0a21ddadec34 thisisareallyreallyreallyreallyREALLYreallylong... action 2017/07/27 12:45:40 07/27 12:45:40 34:17:36.789 success
8ac78624eb654b1cb9442ec62686a9f6 hello action 2017/07/27 12:08:48 07/27 12:08:48 34:17:36.789 success
d0083e7c387b4dbcbd66bf303a4771f8 hello action 2017/07/27 12:08:48 07/27 12:08:48 34:17:36.789 success
9c8636e15bcc4c129f226e422737610f hello action 2017/07/27 12:08:48 07/27 12:08:48 34:17:36.789 success
6d17d52fd40f4ba38f3d0125bf7c9cd1 zhelloRule rule 2017/07/27 12:08:48 --/-- --:--:-- --:--:--.--- success
2faeafa6ec7c495a984124f43ffedbb4 ahelloRule rule 2017/07/27 12:08:48 --/-- --:--:-- --:--:--.--- success
b7d8b40eb473467c88dbc1710d5fdc7a helloRule rule 2017/07/27 12:08:48 --/-- --:--:-- --:--:--.--- success
ed5fc08691974db0b5e1ee155c216ba6 helloTrigger trigger 2017/07/27 12:08:48 --/-- --:--:-- --:--:--.--- success
c0e392579fc4404596e2cc18fc9f3c73 hello action 2017/07/27 12:08:17 07/27 12:08:17 34:17:36.789 success
The only difference is how we list the duration.
Also, here is a link showing the specific function for and display of each duration: https://play.golang.org/p/--95pS7LYG
Any feedback about which direction to go would be appreciated. Thanks!
what are the duration units? action have a maximum duration of minutes.. currently 5 tops before they are automatically booted from the system.
imho, the date formats using dash (-) delimiters are more readable. i think just a single date probably warranted. maybe start date, start time, end time.
@mdeuser, @rabbah: how does this look? We adjusted the duration back to reporting just milliseconds, as a 5 minute max run time isn't too much to account for, in our opinion. Also changed the delimiter back to dashes, as well as adjusted the headers and took out the end date.
$ wsk activation list
activations
activation id name type start date start time end time duration (ms) status
8be7b9b23749477dbd9d0a21ddadec34 thisisareallyreallyreallyreallyREALLYreallylong... action 2017-07-27 12:45:40 12:45:40 44 success
8ac78624eb654b1cb9442ec62686a9f6 hello action 2017-07-27 12:08:48 12:08:48 48 success
d0083e7c387b4dbcbd66bf303a4771f8 hello action 2017-07-27 12:08:48 12:08:48 7 success
9c8636e15bcc4c129f226e422737610f hello action 2017-07-27 12:08:48 12:08:48 60 success
6d17d52fd40f4ba38f3d0125bf7c9cd1 zhelloRule rule 2017-07-27 12:08:48 --:--:-- - success
2faeafa6ec7c495a984124f43ffedbb4 ahelloRule rule 2017-07-27 12:08:48 --:--:-- - success
b7d8b40eb473467c88dbc1710d5fdc7a helloRule rule 2017-07-27 12:08:48 --:--:-- - success
ed5fc08691974db0b5e1ee155c216ba6 helloTrigger trigger 2017-07-27 12:08:48 --:--:-- - success
c0e392579fc4404596e2cc18fc9f3c73 hello action 2017-07-27 12:08:17 12:08:17 41 success
looks good!
wsk api list --full) so that the entire name can be displayed@mdeuser - with regards to a --full flag, do you want us to overwrite the current method that wsk activation list --full uses? Right now, it spits out the raw json file documenting all pertinent information for each activation in the list.
ah.. yes. the command already has that --full support. that should be good enough.
does the backend need a change to support the package qualification?
@mdeuser
--full list: the information in the json format is not currently formatted in a necessarily human-friendly way when it comes to time. Here is an example of what it might look like if we still pursued the full list you were discussing:$ wsk activation list
activations
Activation: 3134aa36e0cb458dbf11210afffa7c83
Name: hello
Type: action
Start Date: 2017-07-28
Start Time: 09:01:03
End Time: 09:01:03
Duration (ms): 79
Status: success
Activation: 8be7b9b23749477dbd9d0a21ddadec34
Name: thisisareallyreallyreallyreallyREALLYreallylongactionname
Type: action
Start Date: 2017-07-27
Start Time: 12:45:40
End Time: 12:45:40
Duration (ms): 44
Status: success
Also of note: API full list used to be printed out in JSON format, but has since been changed to the way wsk api list -f prints now, as you had suggested we look into. Not sure if this might be in some other issue?
path value under annotations that includes the package name, and it seems easy to grab the packageName/entityName from it. We're not sure if it's better to use that information to create the name, or to change the backend to give us the name beforehand. Thoughts?@underwoodb-sd-ibm - for backwards compatibility, leave the wsk activation list --full format as-is.
as for the package name, it seems there's a path annotation in the activation record which has a value of the fully qualified action name. perhaps that can be used to identify the package name.
馃憤 to this feature
Issue moved to apache/incubator-openwhisk-cli #160 via ZenHub