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

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • maven-plugin
    • None
    • 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

      Attachments

        Issue Links

          Activity

            kutzi kutzi created issue -
            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.

            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.
            kutzi kutzi made changes -
            Field Original Value New Value
            Assignee kutzi [ kutzi ]
            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.
            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.
            kutzi kutzi made changes -
            Attachment patch.txt [ 19694 ]
            kutzi kutzi made changes -
            Attachment patch.txt [ 19694 ]
            kutzi kutzi made changes -
            Attachment patch.txt [ 19695 ]

            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_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
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]

            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_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
            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
            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
            kutzi kutzi made changes -
            Link This issue depends on JENKINS-9072 [ JENKINS-9072 ]
            ircbot Jenkins IRC Bot made changes -
            Component/s maven-plugin [ 16033 ]
            Component/s maven2 [ 15487 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 136639 ] JNJira + In-Review [ 187248 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: