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

Include number of elapsed seconds for completed executions in "st2 execution get" CLI command output #2482

Merged
merged 10 commits into from Feb 11, 2016

Conversation

Kami
Copy link
Member

@Kami Kami commented Feb 10, 2016

The title says it all.

This should make it easier to see, at a glance, how long it took for the execution to complete and potentially adjust the action timeouts accordingly.

screenshot from 2016-02-10 18 11 51

…ompleted

when using "st2 execution get" command.
Make sure we strip elapsed from the output since we can't consistently assert on
the number of seconds elapsed.
@Kami Kami added the CLI label Feb 10, 2016
LIVEACTION_STATUS_CANCELING = 'canceling'
LIVEACTION_STATUS_CANCELED = 'canceled'


LIVEACTION_COMPLETED_STATES = [
Copy link
Member Author

Choose a reason for hiding this comment

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

Needed to copy this over since we still can't have st2client to depend on st2common.

Packages will make that easier though, we just need to make sure we also publish st2common to PyPi.

@Kami
Copy link
Member Author

Kami commented Feb 10, 2016

While working on this I believe a noticed a bug with live instances - we don't always set end_timestamp for LiveActionDB objects which represent workflow tasks.

I will look into it.

…on model when formatting child instances (tasks).
@Kami
Copy link
Member Author

Kami commented Feb 10, 2016

Ignore my last comment.

It turns out it was a CLI bug which I have just fixed.

@Kami
Copy link
Member Author

Kami commented Feb 10, 2016

I pushed another change so we now also display elapsed time for tasks inside the workflow actions when using st2 execution get CLI command.

screenshot from 2016-02-10 19 37 20

@manasdk
Copy link
Contributor

manasdk commented Feb 10, 2016

👍

@lakshmi-kannan
Copy link
Contributor

It's funny how the last screenshot shows 13s in one place and 14s in another place :P.

@manasdk
Copy link
Contributor

manasdk commented Feb 10, 2016

It's funny how the last screenshot shows 13s in one place and 14s in another place

Isn't that expected? 14s for the parent execution and 13s for the child. I assume rounding errors kicked in since nothing takes 0s to complete.

Unsure if you point that out as a bug of just quirk of rounding errors? If so then I will welcome myself back to an hour ago when you posted.

@lakshmi-kannan
Copy link
Contributor

Unsure if you point that out as a bug of just quirk of rounding errors?

Yeah, I was referring to rounding errors.

@Kami
Copy link
Member Author

Kami commented Feb 11, 2016

Yep, it's total execution vs child execution run time + rounding :P

Kami added a commit that referenced this pull request Feb 11, 2016
…complete_actions

Include number of elapsed seconds for completed executions in "st2 execution get" CLI command output
@Kami Kami merged commit ab90068 into master Feb 11, 2016
@Kami Kami deleted the include_elapsed_seconds_for_complete_actions branch February 11, 2016 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants