Skip to content
Permalink
Browse files

[JENKINS-48821] - Don't forget estimated duration of asynchronous jobs (

#3329)

* Don't forget estimated duration of asynchronous jobs.

When jobs are executed, the estimated duration is calculated, memorized
and reseted when the job is finished.

But when the job is executed asynchronously (e.g. as for pipeline
scripts), the execution is just triggered. Therefore the estimated
duration should remain - and not be reseted after triggering.

JENKINS-48821: Time remaining for all pipeline jobs is N/A
JENKINS-49616: Estimated time remaining NA

* Reset cached estimated duration also when asynchronous job ends.

(cherry picked from commit 3fc3921)
  • Loading branch information...
bernolanger authored and olivergondza committed Mar 10, 2018
1 parent 9b69208 commit 1400918ddaef45470720e60d4d1dbfd2f6ac78d4
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/java/hudson/model/Executor.java
@@ -459,7 +459,6 @@ public SubTask call() throws Exception {
if (asynchronousExecution == null) {
finish2();
}
executableEstimatedDuration = DEFAULT_ESTIMATED_DURATION;
}
}

@@ -490,6 +489,7 @@ private void finish2() {
if (this instanceof OneOffExecutor) {
owner.remove((OneOffExecutor) this);
}
executableEstimatedDuration = DEFAULT_ESTIMATED_DURATION;
queue.scheduleMaintenance();
}

0 comments on commit 1400918

Please sign in to comment.
You can’t perform that action at this time.