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

Parametrized matrix job does not take priority from build parameter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • prioritysorter-plugin
    • Jenkins 2.375.3
      Priority Sorter Plugin Version 4.1.0

      We have a pipeline job the first schedules a "build" job and once that completes it triggers a large "test" matrix job. The matrix job is parametrized, and one of the parameters is BuildPriority (String parameter type). The BuildPriority parameter is set by the pipeline job when triggering the job, depending on things like PR name or trigger comment, and I can see that it gets set correctly to 2 or 3 as I want.

      I have 3 priority groups defined, all of the type "Jobs and folders marked for inclusion", so I don't expect any interference between them. One of them is called "Custom priority group" and the matrix job belongs to it. This group has default priority and under priority strategy I have "Use Priority from Build Parameter" and the parameter name is BuildPriority.

      With a matrix of size 5, this is my expectation:

      trigger pipelineA->trigger MatrixA(BuildPriority=3)

      execute MatrixA-0

      execute MatrixA-1

      execute MatrixA-2

      trigger pipelineB->MatrixB(BuildPriority=2)

      execute MatrixB-0

      execute MatrixB-1

      execute MatrixB-2

      execute MatrixB-3

      execute MatrixB-4

      execute MatrixA-3

      execute MatrixA-4

       

      Unfortunately what I see is that all combinations of MatrixA are executed before any of MatrixB, basically ignoring the priority that I set with the build parameter.

      I checked the logs and I see all combinations with "reason: Use Priority from Build Parameter, priority: 2" for both Matrix job combinations. I can see that the parameter was set correctly for the run in the /parameters page of the two matrix jobs, so I am not sure why it's not working

            Unassigned Unassigned
            lupalby Alberto
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: