Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-6544

Calculate "Estimated remaining time" for incremental Maven builds based on the cumulative last build time of the building modules

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None
    • Maven2 project

      When using the incremental build option for Maven2 jobs, the estimated remaining time should be calculated based on the build time of only those modules which are actually build

          [JENKINS-6544] Calculate "Estimated remaining time" for incremental Maven builds based on the cumulative last build time of the building modules

          kutzi added a comment -

          This would probably also fix the problem that the progress bar is displayed in red, if a previous incremental build finished very quickly and the subsequent takes much longer, because many more modules are build.

          kutzi added a comment - This would probably also fix the problem that the progress bar is displayed in red, if a previous incremental build finished very quickly and the subsequent takes much longer, because many more modules are build.

          kutzi added a comment - - edited

          Attached a patch to implement this feature.

          A few comments:

          • I had to change 2 pretty basic classes of Hudson, namely Run and Queue.Executable to get it working - added getEstimatedDuration() to both.
          • I changed all calls to Queue.Executable.getParent().getEstimatedDuration() to Queue.Executable.getEstimatedDuration()
          • IMO it would maybe even make sense to deprecate getEstimatedDuration() in Queue.Task resp. Job as the concrete Run usually should know better how long it will take - because of Run specific parameters (like which modules are being build). But I'm not sure about that - maybe you don't have a concrete Run around at some time and still want to have an estimated duration.

          kutzi added a comment - - edited Attached a patch to implement this feature. A few comments: I had to change 2 pretty basic classes of Hudson, namely Run and Queue.Executable to get it working - added getEstimatedDuration() to both. I changed all calls to Queue.Executable.getParent().getEstimatedDuration() to Queue.Executable.getEstimatedDuration() IMO it would maybe even make sense to deprecate getEstimatedDuration() in Queue.Task resp. Job as the concrete Run usually should know better how long it will take - because of Run specific parameters (like which modules are being build). But I'm not sure about that - maybe you don't have a concrete Run around at some time and still want to have an estimated duration.

          Code changed in hudson
          User: : kutzi
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Executor.java
          trunk/hudson/main/core/src/main/java/hudson/model/Queue.java
          trunk/hudson/main/core/src/main/java/hudson/model/Run.java
          trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
          trunk/hudson/main/test/src/test/java/hudson/maven/MavenMultiModuleTest.java
          trunk/hudson/main/test/src/test/java/hudson/model/queue/WideExecutionTest.java
          http://jenkins-ci.org/commit/36164
          Log:
          [FIXED JENKINS-6544] calculate estimated remaining time for incremental Maven builds based on the modules which are actually being build

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kutzi Path: trunk/hudson/main/core/src/main/java/hudson/model/Executor.java trunk/hudson/main/core/src/main/java/hudson/model/Queue.java trunk/hudson/main/core/src/main/java/hudson/model/Run.java trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java trunk/hudson/main/test/src/test/java/hudson/maven/MavenMultiModuleTest.java trunk/hudson/main/test/src/test/java/hudson/model/queue/WideExecutionTest.java http://jenkins-ci.org/commit/36164 Log: [FIXED JENKINS-6544] calculate estimated remaining time for incremental Maven builds based on the modules which are actually being build

          Code changed in hudson
          User: : kutzi
          Path:
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/36165
          Log:
          [FIXED JENKINS-6544] calculate estimated remaining time for incremental Maven builds based on the modules which are actually being build

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kutzi Path: trunk/www/changelog.html http://jenkins-ci.org/commit/36165 Log: [FIXED JENKINS-6544] calculate estimated remaining time for incremental Maven builds based on the modules which are actually being build

          dogfood added a comment -

          Integrated in hudson_main_trunk #348
          [FIXED JENKINS-6544] calculate estimated remaining time for incremental Maven builds based on the modules which are actually being build

          kutzi :
          Files :

          • /trunk/hudson/main/core/src/main/java/hudson/model/Queue.java
          • /trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
          • /trunk/hudson/main/test/src/test/java/hudson/model/queue/WideExecutionTest.java
          • /trunk/hudson/main/test/src/test/java/hudson/maven/MavenMultiModuleTest.java
          • /trunk/hudson/main/core/src/main/java/hudson/model/Executor.java
          • /trunk/hudson/main/core/src/main/java/hudson/model/Run.java

          dogfood added a comment - Integrated in hudson_main_trunk #348 [FIXED JENKINS-6544] calculate estimated remaining time for incremental Maven builds based on the modules which are actually being build kutzi : Files : /trunk/hudson/main/core/src/main/java/hudson/model/Queue.java /trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java /trunk/hudson/main/test/src/test/java/hudson/model/queue/WideExecutionTest.java /trunk/hudson/main/test/src/test/java/hudson/maven/MavenMultiModuleTest.java /trunk/hudson/main/core/src/main/java/hudson/model/Executor.java /trunk/hudson/main/core/src/main/java/hudson/model/Run.java

            kutzi kutzi
            kutzi kutzi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: