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

Multi-module incremental build does not detect changes correctly

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • maven-plugin
    • None
    • Hudson 1.378 running on Windows XP/java 1.5.0_18.

      I have found couple little problems causing multi-module incremental build not to work as excepted. The changes are localized in hudson.maven.MavenModuleSetBuild.java under mave-plugin

      1 - isDescendantOf does not normalize the path being tested against normalized mod relative path
      2 - belongsToSubsidiary have the same problem with path not being normalized and in theory should simply delegate to isDescendantOf (with minor common code extraction/refactor)
      3 - startsWith fails in cases where there are same level modules with the same name prefix. e.g. a change in any of (utils, UtilsIO and UtilsNetwork) will always trigger utils module.

      I have experienced issues 1 and 2 when using Hudson and SVN "Local module directory" and AccuRev @Sub-path". Both scm providers returned changes using / separator while Hudson maven modules getRelativePath() returns paths with \ separator. I believe the problem might present in other providers.

      Issue 3 is a specific to certain use cases and I suspect will not bother a lot of people.

      PS I am amazed by the code quality that goes into Hudson. If nothing it is an example of how software should be written.

          [JENKINS-7611] Multi-module incremental build does not detect changes correctly

          Andrew Bayer added a comment -

          I'm going to split off the third issue because that should be trivial to fix.

          Andrew Bayer added a comment - I'm going to split off the third issue because that should be trivial to fix.

          Andrew Bayer added a comment -

          Ok, so far as I could tell, issue 3 is not actually an issue - the module relative path will always end with a /. I couldn't replicate it, so I'm assuming it's not real. Onward to 1 and 2, though.

          Andrew Bayer added a comment - Ok, so far as I could tell, issue 3 is not actually an issue - the module relative path will always end with a /. I couldn't replicate it, so I'm assuming it's not real. Onward to 1 and 2, though.

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
          http://jenkins-ci.org/commit/35382
          Log:
          [FIXED JENKINS-7611] Make sure the changelog paths we're comparing against are using Unix slashes, same as the module paths

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java http://jenkins-ci.org/commit/35382 Log: [FIXED JENKINS-7611] Make sure the changelog paths we're comparing against are using Unix slashes, same as the module paths

          Code changed in hudson
          User: : abayer
          Path:
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/35383
          Log:
          Change for JENKINS-7611

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/www/changelog.html http://jenkins-ci.org/commit/35383 Log: Change for JENKINS-7611

          awaragi added a comment - - edited

          Wow impressive speed on fixing things

          Regarding issue #3. When I was debugging, the modules relative path didn't end with /!. To replicate problem, create two modules named util and utilX. make a change in utilX and you will trigger the util module build too.

          awaragi added a comment - - edited Wow impressive speed on fixing things Regarding issue #3. When I was debugging, the modules relative path didn't end with /!. To replicate problem, create two modules named util and utilX. make a change in utilX and you will trigger the util module build too.

          dogfood added a comment -

          Integrated in hudson_main_trunk #308
          [FIXED JENKINS-7611] Make sure the changelog paths we're comparing against are using Unix slashes, same as the module paths

          abayer :
          Files :

          • /trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java

          dogfood added a comment - Integrated in hudson_main_trunk #308 [FIXED JENKINS-7611] Make sure the changelog paths we're comparing against are using Unix slashes, same as the module paths abayer : Files : /trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java

            abayer Andrew Bayer
            awaragi awaragi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: