Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic column sizing to wsk activation list command #427

Merged
merged 3 commits into from
Apr 10, 2019

Conversation

larandersson
Copy link
Contributor

@larandersson larandersson commented Mar 18, 2019

This addresses apache/openwhisk-client-go#119 and adds dynamic sizing behavior to the Kind and Status columns, as well as skips the column heading if there are no activation records to display.

With this change, the behavior will be:

wsk activation list --skip 20 --limit 5

Datetime            Activation ID                    Kind     Start Duration   Status  Entity
2019-03-14 14:49:11 847b942103bb4b43bb942103bb7b4376 nodejs:6 warm  2ms        success guest/helloworld:0.0.1
2019-03-14 14:47:48 d5c208b0336c40328208b0336ca03222 nodejs:6 cold  33ms       success guest/helloworld:0.0.1
2019-03-14 09:04:49 d8b4fb863117413ab4fb863117513af5 nodejs:6 cold  31ms       success guest/greeting:0.0.1
2019-03-12 19:28:25 daa12f0d612f4426a12f0d612f8426c4 nodejs:6 cold  129ms      success guest/greeting:0.0.1
2019-03-12 18:20:32 daa5acdcc48947e0a5acdcc489f7e04e nodejs:6 cold  116ms      success guest/greeting:0.0.1

And, then for next pagination we can see how the columns change dynamically (see the Status and Entity columns):

wsk activation list --skip 25 --limit 5

Datetime            Activation ID                    Kind     Start Duration   Status            Entity
2019-02-28 10:08:27 3d578d89fd0f4106978d89fd0f110650 nodejs:6 cold  741ms      success           guest/kafkaFeed:0.0.2
2019-02-27 15:17:05 05b8edb3f5aa40cbb8edb3f5aaf0cbc9 nodejs:6 warm  126ms      success           guest/kafkaFeed:0.0.2
2019-02-27 15:16:16 b18da1f06f4143718da1f06f41937150 nodejs:6 warm  129ms      success           guest/kafkaFeed:0.0.2
2019-02-27 15:14:28 5d8d23b5082d4dba8d23b5082d4dba8a nodejs:6 warm  99ms       application error guest/kafkaFeed:0.0.2
2019-02-27 15:10:34 3d7e4912dc224273be4912dc227273a9 nodejs:6 cold  966ms      success           guest/kafkaFeed:0.0.2

This PR is dependent on apache/openwhisk-client-go#120, and when that has been merged into client-go, the build.gradle file needs to be updated to the commit hash of that PR.

  • I have signed a CLA

@rabbah
Copy link
Member

rabbah commented Apr 4, 2019

@larandersson I see this error in Travis

:buildDarwin386# github.com/apache/incubator-openwhisk-cli/commands
commands/activation.go:57:28: undefined: whisk.ActivationFilteredRow
commands/activation.go:107:53: undefined: whisk.ActivationFilteredRow
commands/activation.go:435:19: undefined: whisk.StatusCodes
commands/activation.go:439:71: undefined: whisk.StatusCodes
commands/activation.go:440:17: undefined: whisk.StatusCodes
commands/util.go:215:9: undefined: whisk.ActivationFilteredRow
commands/util.go:216:12: cannot range over collection (type interface {})
 FAILED

@larandersson
Copy link
Contributor Author

larandersson commented Apr 4, 2019

@rabbah Did you observe the dependency to apache/openwhisk-client-go#120? It's not expected to work until that PR has been merged, and the build.gradle file has been updated to that commit. Not sure how you usually handle these kind of dependencies?

@rabbah
Copy link
Member

rabbah commented Apr 4, 2019

Thanks. Just merged it.

@larandersson
Copy link
Contributor Author

@rabbah Updated build.gradle. Now it should work.

Copy link
Member

@rabbah rabbah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also update the vendor file?

@larandersson
Copy link
Contributor Author

@rabbah Updated vendor.json as well.

Copy link
Member

@rabbah rabbah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased this to master to resolve conflicts.

@rabbah rabbah merged commit 096792a into apache:master Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants