-
Bug
-
Resolution: Postponed
-
Critical
-
None
After upgrading to a recent version of the Jenkins 2 core and several different plugins, we discovered a critical defect in the handling of queued parameterized builds that are triggered by multijob phases. I've managed to reduce the use case to this simple example:
Job A:
Type: Freestyle job
Quiet time: 30 seconds
Execute concurrent builds: checked
This Build is Parameterized -> String Parameter -> Name: MyParam
Job B:
Type: multijob
Add one phase build step with the following config:
trigger: Job A
Add Parameter -> Predefined Parameter -> MyParam=JobB
Job C:
Type: multijob
Add one phase build step with the following config:
trigger: Job A
Add Parameter -> Predefined Parameter -> MyParam=JobC
With these 3 jobs configured, manually trigger a build of Job B and Job C back to back. You will see only one instance of Job A ends up in the queue and this build is then associated with both builds of Job B and Job C. This is incorrect behavior because the input parameters are different between the two. I would expect to see 2 builds of Job A to be run - one with MyParam set to JobB and another with MyParam set to JobC.
I probably should mention that I retested this configuration with Job B and Job C of type Freestyle job and using the conventional "trigger parameterized build" publish stage and the behavior was as expected, so this problem has something to do with the way the multijob phases are trigger / queuing builds of parameterized downstream jobs.
Further, I feel the need to point out that in our case we have thousands of jobs on our build farm that leverage this particular combination of plugins to orchestrate our build pipeline, all of which are sharing different downstream jobs in this way, which is why I've set the impact to critical. It completely breaks the behavior of the downstream triggers and any subsequent build phases that depend on the output of those triggered jobs.
Our current configuration:
Jenkins LTS v2.46.1
Parameterized Trigger Plugin v2.33
Multijob Plugin v1.24
- relates to
-
JENKINS-35513 Multijob view, cannot display results of more than one build of same job
- Closed
-
JENKINS-38866 Multi branch with same commit not getting triggered as expected
- Closed
-
JENKINS-30689 Multijob plugin doesn't handle launching the same job twice with different parameters correctly
- Closed
-
JENKINS-33251 MultiJob Phase not sending right value for "Run Parameter" in the downstream Job.
- Closed
-
JENKINS-31846 MultiJob plugin should differ when the same job is used multiple times
- Closed