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

fix: print proper estimated runtime even when some jobs don't provide it #435

Merged
merged 1 commit into from
May 8, 2023

Conversation

kissiel
Copy link
Contributor

@kissiel kissiel commented May 2, 2023

Description

Drive-by fix for the estimated duration computation that Pierre complained about yesterday.
With this patch, if a job exists that doesn't specify the estimated_duration, Checkbox will still compute the whole estimated runtime but it will add the "at least" clause.

I tested it by creating a provider with two jobs, one with a estimated_duration defined, and one that did not have it.
I've run sessions with varying selections to see if it works properly.

Copy link
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

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

LGTM

I've tested it by running com.canonical.certification::client-cert-iot-ubuntucore-22, which has jobs with no estimated_duration, and in this case I get an output like:

========[ Running job 5 / 97. Estimated time left (at least): 1:51:00 ]=========

If I run checkbox with a test plan where all the jobs have an estimated_duration, I get something like this:

==============[ Running job 1 / 88. Estimated time left: 0:56:33 ]==============

@kissiel kissiel merged commit ee243b4 into main May 8, 2023
@kissiel kissiel deleted the fix-estimated-duration branch May 8, 2023 19:18
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