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

Join project not triggered correctly when passing SCM info downstream via downstream-ext plugin

      Hi,

      I'm seeing some strange issues when using the Join and Downstream-ext plugin. I've attached a screenshot of my job setup.

      My perforce depot looks something like this:

      \\source\root
      	\\source\root\root.cpp
      	\\source\root\folderA
      		source\root\folderA\fileA.cpp
      	\\source\root\folderB
      		source\root\folderB\fileB.cpp
      

      If I modify fileA.cpp and check it in, the build process happens like this:

      1) JobA detects the change, builds, finishes and triggers a build of JobB.
      2) JobB builds and this in turn triggers its downstream projects: JobB1, JobB2.
      3) JobB1 builds because fileA.cpp is modified which is in JobB1's Perforce view (//source/root/folderA).
      4) JobB2 doesn't build because no changes are detected.
      5) JobC is then triggered.
      

      This is all working as expected, which is great.

      This isn't working as expected though...I modify root.cpp and check it in, the build process happens like this:

      1) JobA detects the change, builds, finishes and triggers a build of JobB.
      2) JobB builds and in turn triggers its downstream projects: JobB1, JobB2.
      3) JobB1 doesn't build because root.cpp is outside of JobB1's view (//source/root/folderA)
      3) JobB2 doesn't build because root.cpp is outside of JobB2's view (//source/root/folderB)
      4) At this point JobC is NOT triggered when I believe it should be! JobC is the Join project specified in JobB.
      

      So it seems that JobC will only be triggered if either JobB1 or JobB2 is triggered. This seems wrong to me and I think it's a bug in either of the plugins.

      Has anyone else seen this issue? Is there something wrong with my project setup by any chance?

      Regards,
      Tom.

          [JENKINS-10435] Join project not triggered correctly when passing SCM info downstream via downstream-ext plugin

          Stefan Wolf added a comment -

          Yeah, sorry. You have to add a trigger from JobB directly to JobC, too. JobC will not start to build directly, because it is blocked by its downstream jobs JobB1 and JobB2, so this should work.

          About your concern: I see a possibility to add the desired behaviour to the join plugin, something along the lines "Don't trigger join project if this projects' build failed". But this would have nothing to do with the downstream-ext plugin, either.

          Stefan Wolf added a comment - Yeah, sorry. You have to add a trigger from JobB directly to JobC, too. JobC will not start to build directly, because it is blocked by its downstream jobs JobB1 and JobB2, so this should work. About your concern: I see a possibility to add the desired behaviour to the join plugin, something along the lines "Don't trigger join project if this projects' build failed". But this would have nothing to do with the downstream-ext plugin, either.

          Thomas Fields added a comment -

          Hi wolfs,

          I'd appreciate it if you could add that feature to the Join plugin - it seems like a more natural solution as well as simpler to configure when you have many jobs. I'd be happy to test when it's complete.

          Regards,
          Tom.

          Thomas Fields added a comment - Hi wolfs, I'd appreciate it if you could add that feature to the Join plugin - it seems like a more natural solution as well as simpler to configure when you have many jobs. I'd be happy to test when it's complete. Regards, Tom.

          Thomas Fields added a comment -

          Hi wolfs,

          Did you up date the Join plugin at all?

          Thanks,
          Tom.

          Thomas Fields added a comment - Hi wolfs, Did you up date the Join plugin at all? Thanks, Tom.

          Thomas Fields added a comment -

          Hi wolfs,

          Sorry to keep perstering but did you get chance to update the Join plugin?

          Thanks, Tom.

          Thomas Fields added a comment - Hi wolfs, Sorry to keep perstering but did you get chance to update the Join plugin? Thanks, Tom.

          Stefan Wolf added a comment -

          Sorry, I didn't find any time to do this up to now. It could be possible that I release the current trunk version of the join plugin, giving at least support for the downstream-ext plugin, this weekend. For your requested feature I don't know when I will find time. Don't expect too soon, since you need to have in mind that a change to Jenkins core itself is necessary, too. Without this change I cannot update the join plugin to support this feature. Obviously, the feature will then require the new version of Jenkins.

          Stefan Wolf added a comment - Sorry, I didn't find any time to do this up to now. It could be possible that I release the current trunk version of the join plugin, giving at least support for the downstream-ext plugin, this weekend. For your requested feature I don't know when I will find time. Don't expect too soon, since you need to have in mind that a change to Jenkins core itself is necessary, too. Without this change I cannot update the join plugin to support this feature. Obviously, the feature will then require the new version of Jenkins.

          Thomas Fields added a comment -

          Thanks for the update wolfs.

          The reason I kept asking was because I couldn't get your workaround to work properly - maybe I setup my jobs wrong - I'll provide the details shortly.

          Although it's not ideal I wouldn't mind building my own version of the join plugin and Jenkins for that matter - I really need a fix for this issue.

          Thanks Tom

          Thomas Fields added a comment - Thanks for the update wolfs. The reason I kept asking was because I couldn't get your workaround to work properly - maybe I setup my jobs wrong - I'll provide the details shortly. Although it's not ideal I wouldn't mind building my own version of the join plugin and Jenkins for that matter - I really need a fix for this issue. Thanks Tom

          Thomas Fields added a comment -

          Just going over some of my old issues - did you manage to make the change to the join plugin and Jenkins core?

          Thomas Fields added a comment - Just going over some of my old issues - did you manage to make the change to the join plugin and Jenkins core?

          Thomas Fields added a comment -

          Are we any closer to getting this released?

          Thomas Fields added a comment - Are we any closer to getting this released?

          Stefan Wolf added a comment -

          Sorry, I had no time to do something about this. Are you interested in contributing?

          Stefan Wolf added a comment - Sorry, I had no time to do something about this. Are you interested in contributing?

          Thomas Fields added a comment -

          I wouldn't be adverse to contributing but my time is also very limited. I'm sure someone with a firmer grasp on how this all works would be in a better position to fix it though.

          Thomas Fields added a comment - I wouldn't be adverse to contributing but my time is also very limited. I'm sure someone with a firmer grasp on how this all works would be in a better position to fix it though.

            wolfs Stefan Wolf
            tfields Thomas Fields
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: