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

Join Plugin ignores dependencies wrapped with flexible-publish

    XMLWordPrintable

Details

    Description

      Join trigger doesn't work in the expected way when combined with Flexible Publish plugin.

      • Project A triggers project B, project C conditionally (using flexible-publish).
      • Project A triggers project D via Join plugin.

      In this case, join plugin works as followings unexpectedly:

      • (not critical) Project B,C,D will be displayed in the project status page.
        • Expected bahaivor: Only project B, C will be displayed.
      • (critical) Project D is triggered just after project A finished.
        • Project D is triggered after project B, C finished.

      This is the behavior just like when project A has no project dependencies except join trigger.
      This means join trigger fails to find out dependencies wrapped with flexible-publish.


      Hi,

      I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

      So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

      When I have a look of my main project dashboard I see it triggers all of the 3 projects as downstream whereas It should trigger only the first two ones

      Attachments

        Activity

          raphc Raphael CHAUMIER created issue -
          raphc Raphael CHAUMIER made changes -
          Field Original Value New Value
          Component/s join-plugin [ 15635 ]
          raphc Raphael CHAUMIER made changes -
          Description Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they build successfully.

          When I have a look of my main project I see It trigger all of the 3 projects as downstream whereas It should trigger only the first two ones
          Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project I see It trigger all of the 3 projects as downstream whereas It should trigger only the first two ones
          raphc Raphael CHAUMIER made changes -
          Description Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project I see It trigger all of the 3 projects as downstream whereas It should trigger only the first two ones
          Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project dashboard I see It trigger all of the 3 projects as downstream whereas It should trigger only the first two ones
          raphc Raphael CHAUMIER made changes -
          Description Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project dashboard I see It trigger all of the 3 projects as downstream whereas It should trigger only the first two ones
          Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project dashboard I see it triggers all of the 3 projects as downstream whereas It should trigger only the first two ones
          ikedam ikedam made changes -
          Assignee bap [ bap ] ikedam [ ikedam ]
          ikedam ikedam added a comment -

          I don't know much about join plugin, but that sounds the expected behavior.
          You mean

          • Project A triggers project B and project C in some conditions.
          • Project A triggers project D after B,C finished (join).

          That means A triggers B,C,D, doesn't it?

          ikedam ikedam added a comment - I don't know much about join plugin, but that sounds the expected behavior. You mean Project A triggers project B and project C in some conditions. Project A triggers project D after B,C finished (join). That means A triggers B,C,D, doesn't it?
          raphc Raphael CHAUMIER added a comment - - edited

          Exactly, but In a normal way (without flexible plugin), Jenkins well handles downstream jobs. On the job dashboard only project B and C appears. Why does it seems different with flexible plugin ?

          Thks

          raphc Raphael CHAUMIER added a comment - - edited Exactly, but In a normal way (without flexible plugin), Jenkins well handles downstream jobs. On the job dashboard only project B and C appears. Why does it seems different with flexible plugin ? Thks
          ikedam ikedam added a comment -

          It is just because join plugin fails to find out dependencies wrapped with flexible-publish.
          You can also see project D is displayed in the project status page when you configure a project with "Join Trigger" without "Build other projects".

          To be exact, JoinTrigger#getAllDownstream fails to find out them: https://github.com/jenkinsci/join-plugin/blob/join-1.15/src/main/java/join/JoinTrigger.java#L216

          This results not only project D is displayed but also project D is always triggered just after project A is finished. That means, join doesn't work at all.

          ikedam ikedam added a comment - It is just because join plugin fails to find out dependencies wrapped with flexible-publish. You can also see project D is displayed in the project status page when you configure a project with "Join Trigger" without "Build other projects". To be exact, JoinTrigger#getAllDownstream fails to find out them: https://github.com/jenkinsci/join-plugin/blob/join-1.15/src/main/java/join/JoinTrigger.java#L216 This results not only project D is displayed but also project D is always triggered just after project A is finished. That means, join doesn't work at all.
          ikedam ikedam made changes -
          Component/s flexible-publish-plugin [ 16130 ]
          Assignee ikedam [ ikedam ] mdonohue [ mdonohue ]
          Description Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project dashboard I see it triggers all of the 3 projects as downstream whereas It should trigger only the first two ones
          Join trigger doesn't work in the expected way when combined with [Flexible Publish plugin|https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin].

          * Project A triggers project B, project C conditionally (using flexible-publish).
          * Project A triggers project D via Join plugin.

          In this case, join plugin works as followings unexpectedly:
          * (not critical) Project B,C,D will be displayed in the project status page.
          ** Expected bahaivor: Only project B, C will be displayed.
          * (critical) Project D is triggered just after project A finished.
          ** Project D is triggered after project B, C finished.

          This is the behavior just like when project A has no project dependencies except join trigger.
          This means join trigger fails to find out dependencies wrapped with flexible-publish.

          ----

          Hi,

          I want to check some env variable before triggering 2 downstream projects which are joint after their build to 1 other project.

          So I declared my conditions then add a 'build downstream project' action with my two projects plus a 'Join Trigger' action to join the projects to another project once they have built successfully.

          When I have a look of my main project dashboard I see it triggers all of the 3 projects as downstream whereas It should trigger only the first two ones
          Summary Wrong Downstream project where Join Plugin is used Join Plugin ignores dependencies wrapped with flexible-publish
          ikedam ikedam added a comment -

          Promoted Builds Plugin might be an alternate solution for you.

          ikedam ikedam added a comment - Promoted Builds Plugin might be an alternate solution for you.

          Thanks ikedam for your explanations.

          I'll try promoted builds plugin. So the problem is on Join plugin.

          Regards

          raphc Raphael CHAUMIER added a comment - Thanks ikedam for your explanations. I'll try promoted builds plugin. So the problem is on Join plugin. Regards
          edgar0119 Edgar Yu added a comment -
          edgar0119 Edgar Yu added a comment - I was fix it on here! https://github.com/Edgar0119/join-plugin and I wss pull a merge request https://github.com/jenkinsci/join-plugin/pull/9
          mdonohue mdonohue added a comment -

          I commented on the pull request - it looks like whitespace was changed as part of the commit, making the diff difficult to read.
          It is recommended practice on any project to separate whitespace changes from content changes, so I can't accept this as-is.

          mdonohue mdonohue added a comment - I commented on the pull request - it looks like whitespace was changed as part of the commit, making the diff difficult to read. It is recommended practice on any project to separate whitespace changes from content changes, so I can't accept this as-is.
          edgar0119 Edgar Yu added a comment -

          Hello, I has pull request again to fix this bug. https://github.com/jenkinsci/join-plugin/pull/10

          edgar0119 Edgar Yu added a comment - Hello, I has pull request again to fix this bug. https://github.com/jenkinsci/join-plugin/pull/10

          Code changed in jenkins
          User: 俞韋廷
          Path:
          pom.xml
          src/main/java/join/JoinTrigger.java
          http://jenkins-ci.org/commit/join-plugin/246a1fb66f5c39b5f36489014269937668d58412
          Log:
          JENKINS-28709 Join Plugin ignores dependencies wrapped with flexible-publish

          (https://issues.jenkins-ci.org/browse/JENKINS-28709)

          Now it can handle "hudson.plugins.parameterizedtrigger.BuildTrigger" in Flexible publisher!

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: 俞韋廷 Path: pom.xml src/main/java/join/JoinTrigger.java http://jenkins-ci.org/commit/join-plugin/246a1fb66f5c39b5f36489014269937668d58412 Log: JENKINS-28709 Join Plugin ignores dependencies wrapped with flexible-publish ( https://issues.jenkins-ci.org/browse/JENKINS-28709 ) Now it can handle "hudson.plugins.parameterizedtrigger.BuildTrigger" in Flexible publisher!

          Code changed in jenkins
          User: Michael Donohue
          Path:
          pom.xml
          src/main/java/join/JoinTrigger.java
          http://jenkins-ci.org/commit/join-plugin/7ff674339affb5d72116c405ace1d1a90acc63c3
          Log:
          Merge pull request #10 from Edgar0119/master

          (Bug Fixed!)JENKINS-28709 Join Plugin ignores dependencies wrapped with flexible-…

          Compare: https://github.com/jenkinsci/join-plugin/compare/54908f824cc4...7ff674339aff

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Donohue Path: pom.xml src/main/java/join/JoinTrigger.java http://jenkins-ci.org/commit/join-plugin/7ff674339affb5d72116c405ace1d1a90acc63c3 Log: Merge pull request #10 from Edgar0119/master (Bug Fixed!) JENKINS-28709 Join Plugin ignores dependencies wrapped with flexible-… Compare: https://github.com/jenkinsci/join-plugin/compare/54908f824cc4...7ff674339aff
          edgar0119 Edgar Yu made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          edgar0119 Edgar Yu added a comment -

          This bug is solved in the join-plugin version 1.20

          Reference:
          1. join-plugin GitHub releases page
          2. https://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin

          edgar0119 Edgar Yu added a comment - This bug is solved in the join-plugin version 1.20 Reference: 1. join-plugin GitHub releases page 2. https://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin
          edgar0119 Edgar Yu made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 163564 ] JNJira + In-Review [ 208843 ]

          People

            mdonohue mdonohue
            raphc Raphael CHAUMIER
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: