Continuum
  1. Continuum
  2. CONTINUUM-1915

Continuum 1.2 does not build the project when it has changes in sub-modules and the m2 build is recursive

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2.3
    • Component/s: Integration - Maven 2
    • Labels:
      None
    • Environment:
      Linux
    • Flags:
      Patch

      Description

      Log shows:
      2008-10-01 18:00:04,701 [pool-1-thread-1] INFO action#update-working-directory-from-scm - Updated 2 files.
      2008-10-01 18:00:04,732 [pool-1-thread-1] INFO buildController - Merging SCM results
      2008-10-01 18:00:05,011 [pool-1-thread-1] INFO continuumBuildExecutor#maven2 - Changes are only in sub-modules.
      2008-10-01 18:00:05,019 [pool-1-thread-1] INFO buildController - No changes in the current project, not building

      In continuum, the working copy looks like this

      • parent-md
      • mycommon
      • myintegration
      • mybusiness
      • mydo
      • pom.xml

      the pom.xml is used for adding project into continuum

      the pom.xml consist of those projects

      <modules>
      <module>parent-md</module>
      <module>mycommon</module>
      <module>myintegration</module>
      <module>mybusiness</module>
      <module>mydo</module>
      </modules>

      parent-md is the parentpom for all project listed

      After developer making changes in sub-modules ex: myintegration in SVN, continuum detects the changes during schedule run but nothing gets built even myintegration itslef. This model works well in 1.1.

      Now all of our 10+ projects with 50+ sub-modules in total stop building by schedule.

        Issue Links

          Activity

          apache maillist created issue -
          Hide
          apache maillist added a comment -

          by the way, when I add the project, I checked "For multi modules project, load only root as recursive build", otherwise, continuum checks out all child projects as a flat structure.

          Show
          apache maillist added a comment - by the way, when I add the project, I checked "For multi modules project, load only root as recursive build", otherwise, continuum checks out all child projects as a flat structure.
          Wendy Smoak made changes -
          Field Original Value New Value
          Link This issue is related to CONTINUUM-1807 [ CONTINUUM-1807 ]
          Hide
          Wendy Smoak added a comment -

          Linking to CONTINUUM-1807 - this was an intentional change in Continuum 1.2

          ... and the discussion thread http://www.nabble.com/Continuum-1.2-build-does-not-build-the-project-when-it-has-change-in-sub-modules-td19770898.html

          Show
          Wendy Smoak added a comment - Linking to CONTINUUM-1807 - this was an intentional change in Continuum 1.2 ... and the discussion thread http://www.nabble.com/Continuum-1.2-build-does-not-build-the-project-when-it-has-change-in-sub-modules-td19770898.html
          Hide
          Geert Pante added a comment -

          So, just to be clear: you have a recursive build, so in Continuum you only see the 10 top projects?
          Then it's logical that your sub-module will never be built separately.
          But the change in CONTINUUM-1807 should not apply for you: you probably want to launch your recursive build.

          Wendy, can you check if the change in CONTINUUM-1807 makes an exception for recursive builds?
          The change in CONTINUUM-1807 may only affect non-recursive builds.

          I don't know if there's an easy way to parse build definitions to detect if they're recursive or not. Maybe just looking for the absence of "--non-recursive" will do.

          Show
          Geert Pante added a comment - So, just to be clear: you have a recursive build, so in Continuum you only see the 10 top projects? Then it's logical that your sub-module will never be built separately. But the change in CONTINUUM-1807 should not apply for you: you probably want to launch your recursive build. Wendy, can you check if the change in CONTINUUM-1807 makes an exception for recursive builds? The change in CONTINUUM-1807 may only affect non-recursive builds. I don't know if there's an easy way to parse build definitions to detect if they're recursive or not. Maybe just looking for the absence of "--non-recursive" will do.
          Hide
          apache maillist added a comment -

          Yes, I see 10 top projects; all sub modules are showing only on the "working copy" for each project. I have taken out "--non-recursive". The situation we have now is the developer changed code in sub module, nothing get built even for the sub module that was changed.

          Show
          apache maillist added a comment - Yes, I see 10 top projects; all sub modules are showing only on the "working copy" for each project. I have taken out "--non-recursive". The situation we have now is the developer changed code in sub module, nothing get built even for the sub module that was changed.
          Hide
          Larvell Jones added a comment - - edited

          shouldBuild in MavenTwoBuildExecutor is using incorrect logic to determine if build is recursive.

          boolean isRecursive = StringUtils.isNotEmpty( buildDefinition.getArguments() ) && !(
                      buildDefinition.getArguments().indexOf( "-N" ) < 0 ||
                          buildDefinition.getArguments().indexOf( "--non-recursive" ) < 0 );
          

          Should be:

          boolean isRecursive = StringUtils.isNotEmpty( buildDefinition.getArguments() ) && (
                      buildDefinition.getArguments().indexOf( "-N" ) < 0 && 
                          buildDefinition.getArguments().indexOf( "--non-recursive" ) < 0 );
          
          Show
          Larvell Jones added a comment - - edited shouldBuild in MavenTwoBuildExecutor is using incorrect logic to determine if build is recursive. boolean isRecursive = StringUtils.isNotEmpty( buildDefinition.getArguments() ) && !( buildDefinition.getArguments().indexOf( "-N" ) < 0 || buildDefinition.getArguments().indexOf( "--non-recursive" ) < 0 ); Should be: boolean isRecursive = StringUtils.isNotEmpty( buildDefinition.getArguments() ) && ( buildDefinition.getArguments().indexOf( "-N" ) < 0 && buildDefinition.getArguments().indexOf( "--non-recursive" ) < 0 );
          Hide
          Johan Larsson added a comment -

          Thanks for the start! But that will just make it build all the time, because the isRecursive check is to early in the method and if the arguments is empty it will not think it can be recursive.

          I have attachad a diff which at least on my side seems to work as expected.

          Show
          Johan Larsson added a comment - Thanks for the start! But that will just make it build all the time, because the isRecursive check is to early in the method and if the arguments is empty it will not think it can be recursive. I have attachad a diff which at least on my side seems to work as expected.
          Hide
          Johan Larsson added a comment -

          Fix for isRecursive issue. Diff is against continuum-1.2.2.

          Show
          Johan Larsson added a comment - Fix for isRecursive issue. Diff is against continuum-1.2.2.
          Johan Larsson made changes -
          Attachment m2buildexecutor.java-fix-for-isRecursive.diff [ 38018 ]
          Olivier Lamy (*$^¨%`£) made changes -
          Patch Submitted [Yes]
          Fix Version/s 1.2.3 [ 14693 ]
          Olivier Lamy (*$^¨%`£) made changes -
          Assignee Olivier Lamy [ olamy ]
          Olivier Lamy (*$^¨%`£) made changes -
          Summary Continuum 1.2 does not build the project when it has changes in sub-modules Continuum 1.2 does not build the project when it has changes in sub-modules and the m2 build is recursive
          Hide
          Olivier Lamy (*$^¨%`£) added a comment -

          fix in 1.2.x branch rev 723119
          merge in trunk rev 723121
          Attached patch not used

          Show
          Olivier Lamy (*$^¨%`£) added a comment - fix in 1.2.x branch rev 723119 merge in trunk rev 723121 Attached patch not used
          Olivier Lamy (*$^¨%`£) made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Wendy Smoak made changes -
          Link This issue is related to CONTINUUM-2108 [ CONTINUUM-2108 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:36:01 UTC 2015 [ 1428222961749 ]
          Mark Thomas made changes -
          Workflow jira [ 12710568 ] Default workflow, editable Closed status [ 12740318 ]
          Mark Thomas made changes -
          Patch Submitted Yes [ 10763 ]
          Flags Patch [ 10430 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:12:18 UTC 2015 [ 1428268338676 ]
          Mark Thomas made changes -
          Workflow jira [ 12948578 ] Default workflow, editable Closed status [ 12985824 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          62d 20h 42m 1 Olivier Lamy (*$^¨%`£) 03/Dec/08 17:10

            People

            • Assignee:
              Olivier Lamy (*$^¨%`£)
              Reporter:
              apache maillist
            • Votes:
              6 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development