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

Not all maven downstream jobs get triggered

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We have a maven job Foo with 10 downstream dependencies. In the Job page all the dependencies are noted clearly as well as on the the actual build page. Hower some of the downstream Jobs show with "(none)" instead of their build number and the log of the Foo build shows the "Triggering a new build of xxxx" lines, but only for 7 out of the 10 that should be triggered.

      Jenkins clearly knows about the SNAPSHOT dependency and shows the downstream relationship correctly, yet it 'forgets' to trigger some of the jobs.

      Confirmed with 1.550 and 1.551.

        Attachments

          Issue Links

            Activity

            sodul Stephane Odul created issue -
            Hide
            sodul Stephane Odul added a comment -

            Still present in 1.553. I have a job with 15 downstream projects listed and only 5 are actually triggered.

            Show
            sodul Stephane Odul added a comment - Still present in 1.553. I have a job with 15 downstream projects listed and only 5 are actually triggered.
            Hide
            sodul Stephane Odul added a comment -

            Also present in 1.558

            Show
            sodul Stephane Odul added a comment - Also present in 1.558
            Hide
            bpodgursky Benjamin Podgursky added a comment -

            I thought this was affecting us as well, but after looking into it a bit it turns out that what was happening triggered by the logic in here https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/AbstractMavenProject.java with the comment "Check to see if any of its upstream dependencies are already building or in queue"

            So we had dependencies A -> C, A -> B, and B -> C (much deeper in practice of course), and after module A deployed, only module B would trigger, and C would only build after B finished. I'm not sure if this is what's happening to you but figured I'd mention it.

            Personally I think it would be nice if this could be disabled via a configuration-- most of the time I'd rather have a few extra wasteful CI builds than wait a long time for the most downstream project to finally build.

            Show
            bpodgursky Benjamin Podgursky added a comment - I thought this was affecting us as well, but after looking into it a bit it turns out that what was happening triggered by the logic in here https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/AbstractMavenProject.java with the comment "Check to see if any of its upstream dependencies are already building or in queue" So we had dependencies A -> C, A -> B, and B -> C (much deeper in practice of course), and after module A deployed, only module B would trigger, and C would only build after B finished. I'm not sure if this is what's happening to you but figured I'd mention it. Personally I think it would be nice if this could be disabled via a configuration-- most of the time I'd rather have a few extra wasteful CI builds than wait a long time for the most downstream project to finally build.
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is duplicated by JENKINS-13601 [ JENKINS-13601 ]
            jglick Jesse Glick made changes -
            Labels snapshot trigger
            Assignee olamy [ olamy ] Jesse Glick [ jglick ]
            Component/s maven-dependency-update-trigger [ 15756 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            jglick Jesse Glick added a comment -

            Linking to a discussion on the list.

            Show
            jglick Jesse Glick added a comment - Linking to a discussion on the list.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/hudson/maven/AbstractMavenProject.java
            http://jenkins-ci.org/commit/maven-plugin/0ff6a1bad777d16fa2852833bc22243bd7d32e13
            Log:
            [FIXED JENKINS-21903] Unless the user has requested to block when upstream is building, do not skip triggering a downstream build just because an upstream is building.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/AbstractMavenProject.java http://jenkins-ci.org/commit/maven-plugin/0ff6a1bad777d16fa2852833bc22243bd7d32e13 Log: [FIXED JENKINS-21903] Unless the user has requested to block when upstream is building, do not skip triggering a downstream build just because an upstream is building.
            scm_issue_link SCM/JIRA link daemon made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/hudson/maven/AbstractMavenProject.java
            src/main/java/hudson/maven/MavenModuleSet.java
            src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly
            src/main/webapp/blockTriggerWhenBuilding.html
            src/test/java/hudson/maven/MavenModuleSetTest.java
            http://jenkins-ci.org/commit/maven-plugin/8aed1aa0e352d51229daba470d1664488a3441c4
            Log:
            JENKINS-21903 Amending 0ff6a1b with flag blockTriggerWhenBuilding to control the new behavior, rather than overloading blockBuildWhenUpstreamBuilding.
            Allows more detailed control that may be needed in some setups.
            Also preserves the default behavior from older plugin versions to avoid surprises.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/AbstractMavenProject.java src/main/java/hudson/maven/MavenModuleSet.java src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly src/main/webapp/blockTriggerWhenBuilding.html src/test/java/hudson/maven/MavenModuleSetTest.java http://jenkins-ci.org/commit/maven-plugin/8aed1aa0e352d51229daba470d1664488a3441c4 Log: JENKINS-21903 Amending 0ff6a1b with flag blockTriggerWhenBuilding to control the new behavior, rather than overloading blockBuildWhenUpstreamBuilding. Allows more detailed control that may be needed in some setups. Also preserves the default behavior from older plugin versions to avoid surprises.
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-26450 [ JENKINS-26450 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 153904 ] JNJira + In-Review [ 194747 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                sodul Stephane Odul
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: