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

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Maven2 project

      Description

      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

        Issue Links

          Activity

          Hide
          kutzi 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.

          Show
          kutzi 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.
          Hide
          kutzi 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.
          Show
          kutzi 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.
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          dogfood 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
          Show
          dogfood 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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: