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

Maven2 Build no longer orders sub-module builds

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None
    • Platform: All, OS: Linux

      I've just upgraded to hudson 1.316 and my projects no longer build properly.

      I work at a commercial company with a wide range of projects, managed by Maven.
      Our project is built as a multi-module project with a top-level aggregator, and
      inter-module dependencies are specified in the poms as normal.

      The aggregator pom is the one we build in Hudson (it lives at the root of the
      project directory, with subprojects in folders underneath).

      The order of events I'm seeing is this:

      1) SCM update is triggered, Hudson does an SVN up, followed by triggering the
      aggregator.

      2) Hudson builds aggregator, "Triggering a new build" for each of the modules

      3) These builds all get added to the queue with no ordering. Some get pulled off
      the queue by executors.

      4) Hudson "Triggering a new build" for each module's dependencies, regardless of
      whether they're building or not, or dependencies of other modules. Some tests
      fail as new code hasn't been compiled yet.

      5) Eventually, all modules get compiled + installed (multiple times!) and all
      tests pass and build status goes back to blue.

      In 1.315, these builds were effectively ordered (perhaps by upstream/downstream)
      and therefore only ran once.

      Modules that depend on "n" other modules are being run n+1 times (once for each
      of those modules and once for the top aggregator). This is making a build that
      used to take 27 minutes take much, much longer.

      Hudson is (still) correctly reporting these projects with upstream/downstream
      dependencies, so it's strange that it's suddenly started building them like
      this.

      This only happens when "Build Modules in parallel" is ticked, obviously.

      Also depressingly (but understandably) all these sub-module builds have to run
      on the same machine that triggered them (usually Master), so our build farm is
      suddenly one busy machine and two not being used.

          [JENKINS-4076] Maven2 Build no longer orders sub-module builds

          Andrew Bayer added a comment -

          This is almost certainly an unintended side effect of the initial patch for
          https://hudson.dev.java.net/issues/show_bug.cgi?id=2736 - let me try to see if I
          can replicate this with the current 1.317-SNAPSHOT.

          Andrew Bayer added a comment - This is almost certainly an unintended side effect of the initial patch for https://hudson.dev.java.net/issues/show_bug.cgi?id=2736 - let me try to see if I can replicate this with the current 1.317-SNAPSHOT.

          Andrew Bayer added a comment -

          Ok, things look alright with 1.317-SNAPSHOT - once my test build finishes, I'll
          verify that I'm looking for the right problem by repeating this against 1.316.

          Andrew Bayer added a comment - Ok, things look alright with 1.317-SNAPSHOT - once my test build finishes, I'll verify that I'm looking for the right problem by repeating this against 1.316.

          Andrew Bayer added a comment -

          Yup, replicated the problem with 1.316, and double-verified it's gone in
          1.317-SNAPSHOT. Hooray for bugs that are actually already fixed by the time they
          get opened! =)

          Andrew Bayer added a comment - Yup, replicated the problem with 1.316, and double-verified it's gone in 1.317-SNAPSHOT. Hooray for bugs that are actually already fixed by the time they get opened! =)

          agenticarus added a comment -

          Just to confirm, this is working fine for me now. Many thanks for the quick turn
          around!

          agenticarus added a comment - Just to confirm, this is working fine for me now. Many thanks for the quick turn around!

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

              Created:
              Updated:
              Resolved: