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

Jenkins kicks off the wrong downstream builds for Maven

      Given: Jenkins has different build jobs with different versions of the same artifacts and group ids. Example jarProj-1.1 and jarProj-1.2, and dependent builds warProj-1.1 and warProj-1.2.

      Problem: When Jenkins determines downstream build jobs, it is choosing ALL versions of old and current jobs. So in the example, jarProj-1.2 kicks off BOTH warProj-1.2 (correct) AND warProj1.1 (incorrect). Also, jarProj-1.1 kicks off no builds at all (incorrect), when instead we expect it to kick off warProj-1.1.

      Seems related to JENKINS-15295. We have the same fingerprint errors.

      Also, JENKINS-12735 made a change to cover version ranges in Maven, and that seems like it would break the downstream builds if a bug was introduced there.

          [JENKINS-15367] Jenkins kicks off the wrong downstream builds for Maven

          The problem always exists in 1.491
          To reproduce add these 2 projects in your jenkins :

          Arnaud Héritier added a comment - The problem always exists in 1.491 To reproduce add these 2 projects in your jenkins : https://github.com/vietj/chromattic https://github.com/vietj/wikbook Wikbook builds will trigger chromattic builds while chromattic uses a released version of wikbook

          This was committed after the 1.491 RC branch was created, and was not backported into the RC branch unfortunately. It will be in 1.492.

          Larry Shatzer, Jr. added a comment - This was committed after the 1.491 RC branch was created, and was not backported into the RC branch unfortunately. It will be in 1.492.

          Successfully tested on 1.491 with a cherry-pick of 4043905580df5bf22cde0eaf3dec103abdc88017

          I tried with https://github.com/nuxeo/nuxeo-common/ and https://github.com/nuxeo/nuxeo-runtime/ with their "master" and "5.6.0" branches.
          I couldn't try much more with https://github.com/vietj/chromattic and https://github.com/vietj/wikbook because of build issues but it seems fine on the POM parsing part.

          Before the fix, nuxeo-common master (version 5.7-SNAPSHOT) was triggering nuxeo-runtime master (version 5.7-SNAPSHOT) and 5.6.0 (version 5.6.0-HF04-SNAPSHOT), whereas nuxeo-common 5.6.0 was triggering nothing at all.
          Note I didn't try to reproduce the issue with chromattic and wikbook before the fix.

          However, even if the triggering is fixed, I still have an issue (I don't know if it's exactly the same issue):

          • relationship between builds is sticked at builds earlier the fix
          • if there was no build before the fix, then the relationship is empty

          I'm talking about jenkins/projectRelationship?lhs=nuxeo-common-5.6.0&rhs=nuxeo-runtime-5.6.0 and jenkins/projectRelationship?lhs=nuxeo-common-master&rhs=nuxeo-runtime-master
          Before 1.480, the relationship is right.
          Since 1.481 until 1.491, without the current fix, the relationship seems still right even if triggering is wrong (see comment-168178 on JENKINS-15237).
          With the current fix applied on 1.491, the relationship is no more updated (new builds are ignored).
          Of course, that new issue appears on the summary views: upstream/downstream information on jobs is right whereas upstream/downstream information on builds is simply missing.

          Julien Carsique added a comment - Successfully tested on 1.491 with a cherry-pick of 4043905580df5bf22cde0eaf3dec103abdc88017 I tried with https://github.com/nuxeo/nuxeo-common/ and https://github.com/nuxeo/nuxeo-runtime/ with their "master" and "5.6.0" branches. I couldn't try much more with https://github.com/vietj/chromattic and https://github.com/vietj/wikbook because of build issues but it seems fine on the POM parsing part. Before the fix, nuxeo-common master (version 5.7-SNAPSHOT) was triggering nuxeo-runtime master (version 5.7-SNAPSHOT) and 5.6.0 (version 5.6.0-HF04-SNAPSHOT), whereas nuxeo-common 5.6.0 was triggering nothing at all. Note I didn't try to reproduce the issue with chromattic and wikbook before the fix. However, even if the triggering is fixed, I still have an issue (I don't know if it's exactly the same issue): relationship between builds is sticked at builds earlier the fix if there was no build before the fix, then the relationship is empty I'm talking about jenkins/projectRelationship?lhs=nuxeo-common-5.6.0&rhs=nuxeo-runtime-5.6.0 and jenkins/projectRelationship?lhs=nuxeo-common-master&rhs=nuxeo-runtime-master Before 1.480, the relationship is right. Since 1.481 until 1.491, without the current fix, the relationship seems still right even if triggering is wrong (see comment-168178 on JENKINS-15237 ). With the current fix applied on 1.491, the relationship is no more updated (new builds are ignored). Of course, that new issue appears on the summary views: upstream/downstream information on jobs is right whereas upstream/downstream information on builds is simply missing.

          Jesse Glick added a comment -

          Should this now be resolved as fixed?

          Jesse Glick added a comment - Should this now be resolved as fixed?

          Olivier Lamy added a comment -

          It looks yes.
          I didn't notice more complain

          Olivier Lamy added a comment - It looks yes. I didn't notice more complain

          Erik Riemers added a comment -

          Seems to have done it on our end. Had no complaints either.

          Erik Riemers added a comment - Seems to have done it on our end. Had no complaints either.

          Jay Meyer added a comment -

          Fixed in 1.492.

          I have not verified this myself, but I trust the word of others who have verified this.
          I have scheduled to try this on my builds the week of Dec-10. If it fails again, I will re-open this issue with the details of the failure.

          Jay Meyer added a comment - Fixed in 1.492. I have not verified this myself, but I trust the word of others who have verified this. I have scheduled to try this on my builds the week of Dec-10. If it fails again, I will re-open this issue with the details of the failure.

          Jay Meyer added a comment -

          I have verified this on my system today, it works.
          using version 1.494.

          Thanks for the fix, much appreciated.

          Jay Meyer added a comment - I have verified this on my system today, it works. using version 1.494. Thanks for the fix, much appreciated.

          Code changed in jenkins
          User: alexkoon
          Path:
          src/main/java/hudson/maven/ModuleDependency.java
          src/test/java/hudson/maven/MavenModuleTest.java
          http://jenkins-ci.org/commit/maven-plugin/1331c06d56902cff73afd66eb48cd50c06c481a2
          Log:
          JENKINS-15367 Fix for downstream dependencies when we have a specified version (not a version range).

          Originally-Committed-As: 4043905580df5bf22cde0eaf3dec103abdc88017

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: alexkoon Path: src/main/java/hudson/maven/ModuleDependency.java src/test/java/hudson/maven/MavenModuleTest.java http://jenkins-ci.org/commit/maven-plugin/1331c06d56902cff73afd66eb48cd50c06c481a2 Log: JENKINS-15367 Fix for downstream dependencies when we have a specified version (not a version range). Originally-Committed-As: 4043905580df5bf22cde0eaf3dec103abdc88017

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          src/main/java/hudson/maven/ModuleDependency.java
          src/test/java/hudson/maven/MavenModuleTest.java
          http://jenkins-ci.org/commit/maven-plugin/056f50426525563299f39f0688179f3c2aef2a66
          Log:
          Merge pull request #609 from alexkoon/master

          JENKINS-15367 Fix Maven downstream resolution when declared as a specific version.
          Originally-Committed-As: 2c469b37b563c5d6ca70ac7841897e1a20083130

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: src/main/java/hudson/maven/ModuleDependency.java src/test/java/hudson/maven/MavenModuleTest.java http://jenkins-ci.org/commit/maven-plugin/056f50426525563299f39f0688179f3c2aef2a66 Log: Merge pull request #609 from alexkoon/master JENKINS-15367 Fix Maven downstream resolution when declared as a specific version. Originally-Committed-As: 2c469b37b563c5d6ca70ac7841897e1a20083130

            olamy Olivier Lamy
            jaymeyer Jay Meyer
            Votes:
            35 Vote for this issue
            Watchers:
            42 Start watching this issue

              Created:
              Updated:
              Resolved: