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

Improve Avocado jobs command #5761

Closed
v1siuol opened this issue Sep 8, 2023 · 3 comments · Fixed by #5762
Closed

Improve Avocado jobs command #5761

v1siuol opened this issue Sep 8, 2023 · 3 comments · Fixed by #5762
Assignees
Labels

Comments

@v1siuol
Copy link
Contributor

v1siuol commented Sep 8, 2023

Describe the bug
A clear and concise description of what the bug is.

  1. avocado jobs list returns unsorted list of job results. One improvement is to sort the list by mtime. This help find the recent jobs.
  2. avocado jobs show shows weird end time because we don't have the end attribute in the results.json any more.

I have a fix on the first issue, but looking for inputs for the second one. One feasible fix is to replace the end time with the start time.

Steps to reproduce
Steps to reproduce the behavior with a reproducible whenever possible.

# run a few tests
avocado run /bin/true
avocado run /bin/true
avocado run /bin/true
# 1. list
avocado jobs list
# 2. show
avocado jobs show

Expected behavior

b36e709ed01af2567e4df81842b678fb9dca51eb 2023-09-08 03:04:52.701753   1 (1/0/0/0)
11861a8dd228a86e7c0f2b3583fe6ca7011af99c 2023-09-08 03:00:01.887965   1 (1/0/0/0)
6a29261e8d23e963270c42c9147781fed3ca6118 2023-09-08 02:55:27.117886   1 (1/0/0/0)
JOB ID      : latest

Test ID     End Time            Run Time Status
1-/bin/true <correct time> 0.012107 PASS

Current behavior

b36e709ed01af2567e4df81842b678fb9dca51eb 2023-09-08 03:04:52.701753   1 (1/0/0/0)
6a29261e8d23e963270c42c9147781fed3ca6118 2023-09-08 02:55:27.117886   1 (1/0/0/0)
11861a8dd228a86e7c0f2b3583fe6ca7011af99c 2023-09-08 03:00:01.887965   1 (1/0/0/0)
JOB ID      : latest

Test ID     End Time            Run Time Status
1-/bin/true 1970/01/01 01:51:03 01:51:03 0.012107 PASS

System information (please complete the following information):

  • OS: Ubuntu 18.04.6 LTS
  • Avocado version: Avocado 102.0
  • Avocado installation method: reproduce on github & pip installation
@richtja
Copy link
Contributor

richtja commented Sep 11, 2023

Hi @v1siuol, thank you for finding this and even start working on this. Any contribution is welcome.

About the second issue, I think the best approach would be to compute the end time from start time and time. With such approach, we won't change the overall behavior.

@richtja richtja moved this from Triage to In progress in Default project Sep 11, 2023
@richtja
Copy link
Contributor

richtja commented Sep 11, 2023

@v1siuol If you don't mind, I will assign this to you, since you're already working on the first problem.

@v1siuol
Copy link
Contributor Author

v1siuol commented Sep 12, 2023

Thanks! No problem, I am happy to work on it.

@github-project-automation github-project-automation bot moved this from In progress to Done 103 in Default project Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants