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

Parametrised Build Trigger Plugin takes build params from the old build not from the current

      When you have a parametrised build trigger using a build parameter to select a list of builds to trigger the following happens: 1st build after a jenkins restart works fine, while the 2nd keeps the parameter values from the 1st. (Or at least it seems so: please find details/proofs in the attachments).

      Still no clue if this comes directly from this plug-in or from some other related to it or (maybe) it's a core jenkins issue (the jenkins was update really often lately plus I had new plug-ins installed/updated so it's hard identify a reason).

      The "test" build I used is following:

      • trigger builds from the CCC variable (non-conditional build step)
      • trigger another build only if BBB is true (conditional build step)

      In the 1st run I select BBB=true, CCC="TEST 2, TEST3"; and the build proceeds as expected triggers builds TEST 2 & TEST 3, and then a conditional build step.

      In the 2nd run I select BBB=false, CCC="TEST 1"; and proceeds in a very weird manner it still triggers builds TEST 2 & TEST 3, like before - so I assume it somehow takes the old value for the parameter CCC, but then doesn't trigger the conditional build - so I assume it now takes the current value for the parameter BBB.

      I am pretty sure it was working fine before (a few weeks ago) I have no proof for it.

        1. Build1.png
          Build1.png
          117 kB
        2. Build2.png
          Build2.png
          71 kB

          [JENKINS-11922] Parametrised Build Trigger Plugin takes build params from the old build not from the current

          so far, I'm not able to reproduce this issue, but:

          • what plugin are you using to trigger the jobs within a buildstep?
          • maybe you could add a screenshot from the configuration too?

          Dominik Bartholdi added a comment - so far, I'm not able to reproduce this issue, but: what plugin are you using to trigger the jobs within a buildstep? maybe you could add a screenshot from the configuration too?

          Actually it doesn't seem related to the conditional build plug-in but to the Jenkins Parameterized Trigger plug-in, I'll change the component.

          The reason I thought it's conditional build plug-in is that before installing it everything was working fine.

          I also updated the description.

          Note: the description & screen-shots still contain the conditional build plug-in but I've tested it today with out conditions configured and there's the same behaviour, if you want I can attach new/more screen-shots.

          Krzesmir Florek added a comment - Actually it doesn't seem related to the conditional build plug-in but to the Jenkins Parameterized Trigger plug-in, I'll change the component. The reason I thought it's conditional build plug-in is that before installing it everything was working fine. I also updated the description. Note: the description & screen-shots still contain the conditional build plug-in but I've tested it today with out conditions configured and there's the same behaviour, if you want I can attach new/more screen-shots.

          changed assignee to reflect the component maintainer

          Dominik Bartholdi added a comment - changed assignee to reflect the component maintainer

          Any update on this one? it is a real issue for us.

          Krzesmir Florek added a comment - Any update on this one? it is a real issue for us.

          Ville Ullen added a comment -

          Hi,

          I believe I have the same issue and it's rather easy to trigger;
          Setup a project with one parameter and one build step - "Trigger/call builds on other projects". In the "projects to build" let it expand the parameter.

          Now I'm new to the code base, but I would say that the cause lies in BuildTriggerConfig.java and this comment;

          // the list of projects to build is computed in getProjectList() ; this method
          // is actually invoked twice (when in a build step), so let's cache its result
          private transient List<AbstractProject> projectList;
          

          This implies that the BuildTriggerConfig is cached on some other level, so it may be that it has worked before and broke due to other optimizations.

          I haven't had the chance to test it yet though, due to administration issues...

          Ville Ullen added a comment - Hi, I believe I have the same issue and it's rather easy to trigger; Setup a project with one parameter and one build step - "Trigger/call builds on other projects". In the "projects to build" let it expand the parameter. Now I'm new to the code base, but I would say that the cause lies in BuildTriggerConfig.java and this comment; // the list of projects to build is computed in getProjectList() ; this method // is actually invoked twice (when in a build step), so let's cache its result private transient List<AbstractProject> projectList; This implies that the BuildTriggerConfig is cached on some other level, so it may be that it has worked before and broke due to other optimizations. I haven't had the chance to test it yet though, due to administration issues...

          I have the same problem and would like to see a bug fix soon, because currently we have to start our builds twice..

          Thomas Dingler added a comment - I have the same problem and would like to see a bug fix soon, because currently we have to start our builds twice..

          cjo9900 added a comment -

          Can you retry this test with 2.15, as the caching of the project list was removed in this version.

          I have tested this and not seen the error but want confirmation from other user before this issue is closed.

          by commit
          https://github.com/jenkinsci/parameterized-trigger-plugin/commit/6d8ffe980777dd7cccc1f9481e374c5861aebda8

          cjo9900 added a comment - Can you retry this test with 2.15, as the caching of the project list was removed in this version. I have tested this and not seen the error but want confirmation from other user before this issue is closed. by commit https://github.com/jenkinsci/parameterized-trigger-plugin/commit/6d8ffe980777dd7cccc1f9481e374c5861aebda8

          Yeap I've tried it and it works fine.

          Krzesmir Florek added a comment - Yeap I've tried it and it works fine.

          cjo9900 added a comment -

          Fixed in released 2.15 so closing.

          cjo9900 added a comment - Fixed in released 2.15 so closing.

            huybrechts huybrechts
            rakuda Krzesmir Florek
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: