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

Maven modules marked to wrong build when running concurrent job

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core, maven-plugin
    • None

      I have a Maven project build with one module, named jenkins-test. This module contains one test, which fails everytime (assertTrue(false) ). There is a problem when this project is executed with "Execute concurrent builds if necessary" turned on and when multiple jobs are started at same time. Multiple builds start and finish, but some of these jobs are completed succesfully and some are marked as failed. What I see in the build status page is something like this:

      (Success) Build #180 (May 12, 2012 8:17:09 PM)
      ...
      Module Builds
      jenkins-test (didn't run)

      (Success) Build #181 (May 12, 2012 8:17:12 PM)
      ...
      Module Builds
      (disabled) jenkins-test (didn't run)

      (Unstable) Build #182 (May 12, 2012 8:17:19 PM)
      ...
      Module Builds
      jenkins-test (Unstable) #182 (Unstable) #183 (Unstable) #184

      Logs show that the builds were executed properly (commit ids are right, and "[ERROR] There are test failures." is there). The next build then gets build number #187.

      In my setup I'm using Gerrit and Gerrit Trigger to launch jobs, so when I push multiple commits into Gerrit in one push, Jenkins starts multiple jobs at same time. I don't know if you can duplicate this behavior without Gerrit, though.

      Currently MavenModule and MavenModuleSet have their own build numbers, which are increment when a new module is built. These might get mixed up when multiple builds are executed concurrently. Multiple MavenModuletSets are built starting at the same time, and some how the numbering of MavenModules gets out of sync.

      The commit in https://github.com/jyrkiput/jenkins/commit/0d076e610b39b215ed34c35a5d4840e56183d5e4 fixes this, but I haven't tested it other cases than mine and I don't think that I'm qualified to change something that is this deeply on the jenkins core The commit probably has some unnecessary bits in it too at the moment. So I don't think that it should be merged

          [JENKINS-13810] Maven modules marked to wrong build when running concurrent job

          Jyrki Puttonen created issue -
          Jyrki Puttonen made changes -
          Description Original: I have a Maven project build with one module, named jenkins-test. This module contains one test, which fails everytime (assertTrue(false) :)). There is a problem when this project is executed with "Execute concurrent builds if necessary" turned on and when multiple jobs are started at same time. Multiple builds start and finish, but some of these jobs are completed succesfully and some are marked as failed. What I see in the build status page is something like this:

          (Success) Build #180 (May 12, 2012 8:17:09 PM)
          ...
          Module Builds
          jenkins-test (didn't run)

          (Success) Build #181 (May 12, 2012 8:17:12 PM)
          ...
          Module Builds
          (disabled) jenkins-test (didn't run)

          (Unstable) Build #182 (May 12, 2012 8:17:19 PM)
          ...
          Module Builds
          jenkins-test (Unstable) #182 (Unstable) #183 (Unstable) #184

          Logs show that the builds were executed properly (commit ids are right, and "[ERROR] There are test failures." is there). The next build then gets build number #187.

          In my setup I'm using Gerrit and Gerrit Trigger to launch jobs, so when I push multiple commits into Gerrit in one push, Jenkins starts multiple jobs at same time. I don't know if you can duplicate this behavior without Gerrit, though.

          Currently MavenModule and MavenModuleSet have their own build numbers, which are increment when a new module is built. These might get mixed up when multiple builds are executed concurrently. Multiple MavenModuletSets are built starting at the same time, and some how the numbering of MavenModules gets out of sync.

          The commit in https://github.com/jyrkiput/jenkins/commit/0d076e610b39b215ed34c35a5d4840e56183d5e4 fixes this, but I haven't tested it other cases than mine and I don't think that I'm qualified to change something that is this deeply on the jenkins core :) The commit probably has some unnecessary bits in it too at the moment. So I don't think that it should be merged :)
          New: I have a Maven project build with one module, named jenkins-test. This module contains one test, which fails everytime (assertTrue(false) :)). There is a problem when this project is executed with "Execute concurrent builds if necessary" turned on and when multiple jobs are started at same time. Multiple builds start and finish, but some of these jobs are completed succesfully and some are marked as failed. What I see in the build status page is something like this:
          {quote}
          (Success) Build #180 (May 12, 2012 8:17:09 PM)
          ...
          Module Builds
          jenkins-test (didn't run)
          {quote}

          {quote}
          (Success) Build #181 (May 12, 2012 8:17:12 PM)
          ...
          Module Builds
          (disabled) jenkins-test (didn't run)
          {quote}

          {quote}
          (Unstable) Build #182 (May 12, 2012 8:17:19 PM)
          ...
          Module Builds
          jenkins-test (Unstable) #182 (Unstable) #183 (Unstable) #184
          {quote}

          Logs show that the builds were executed properly (commit ids are right, and "[ERROR] There are test failures." is there). The next build then gets build number #187.

          In my setup I'm using Gerrit and Gerrit Trigger to launch jobs, so when I push multiple commits into Gerrit in one push, Jenkins starts multiple jobs at same time. I don't know if you can duplicate this behavior without Gerrit, though.

          Currently MavenModule and MavenModuleSet have their own build numbers, which are increment when a new module is built. These might get mixed up when multiple builds are executed concurrently. Multiple MavenModuletSets are built starting at the same time, and some how the numbering of MavenModules gets out of sync.

          The commit in https://github.com/jyrkiput/jenkins/commit/0d076e610b39b215ed34c35a5d4840e56183d5e4 fixes this, but I haven't tested it other cases than mine and I don't think that I'm qualified to change something that is this deeply on the jenkins core :) The commit probably has some unnecessary bits in it too at the moment. So I don't think that it should be merged :)
          evernat made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Jenkins IRC Bot made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: concurrent-build [ 15628 ]
          Ivan Fernandez Calvo made changes -
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ]
          Resolution Original: Cannot Reproduce [ 5 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Ivan Fernandez Calvo made changes -
          Link New: This issue is related to JENKINS-31322 [ JENKINS-31322 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 144278 ] New: JNJira + In-Review [ 186059 ]
          Arnaud Héritier made changes -
          Attachment New: Screenshot 2017-09-20 17.18.50.png [ 39909 ]
          Attachment New: Screenshot 2017-09-20 17.18.41.png [ 39910 ]
          Attachment New: Screenshot 2017-09-20 17.18.34.png [ 39911 ]
          Attachment New: Screenshot 2017-09-20 17.16.43.png [ 39912 ]
          Attachment New: Screenshot 2017-09-20 17.16.32.png [ 39913 ]
          James Dumay made changes -
          Remote Link New: This issue links to "CloudBees Internal OSS-2503 (Web Link)" [ 18270 ]
          Olivier Lamy made changes -
          Assignee New: Olivier Lamy [ olamy ]

            olamy Olivier Lamy
            jyrkip Jyrki Puttonen
            Votes:
            6 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: