-
Notifications
You must be signed in to change notification settings - Fork 173
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
Duration reported incorrectly using ara CLI #523
Comments
Hey @hovisms and thanks for the issue. Formatting dates and durations is hard :) In the meantime, from a database perspective, the duration is stored as a timedelta computed automatically when an end is known: Lines 23 to 39 in dde7674
The API returns the timedelta with the full precision (for example, ara/ara/ui/templatetags/datetime_formatting.py Lines 17 to 21 in dde7674
I don't have bandwidth to look at this right now but for the CLI, it tries to parse the timedelta string and this might be a good place to start troubleshooting: Lines 33 to 43 in dde7674
I am not sure what your automation around excel looks like but you could compute a number of seconds by substracting the end date and start date like the database model does and then format it according to your needs. |
@hovisms unrelated to the original issue but I wanted to point out that it is recommended to run the same version of ara for both the server and the clients in order to avoid running into issues. If the server is 1.7.0 the clients should also have 1.7.0. |
Thanks for the quick feedback. I was able to re-calculate duration based on subsequent starting time. I also pulled latest container images to get everything up to 1.7.0. Thanks again! |
What is the issue ?
Using the ara (version 1.6.1) command to pull task information, the duration field is sometimes incorrect. The value output by this method is significantly different than the value observed and shown in the web UI. Note, this only happens for some tasks in the report, not all.
Here is an example task that completed in under a second reported correctly by the WebUI but incorrectly by the ara command (both are queries for playbook 211, task 228664):
What should be happening ?
The duration should be reported correctly/consistently. It would also be helpful if there were an option to output duration in seconds vs. hh:mm:ss.000000 format (which isn't easily processed in excel).
The text was updated successfully, but these errors were encountered: