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

Throttle plugin "per project" doesn't work with Matrix jobs

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins 1.609.3, Windows Server 2008, Oracle's JRE 7 update 79
      throttle-concurrents 1.8.4
    • Similar Issues:

      Description

      The "per project" throttling is broken for matrix jobs.

      For testing, I've created a 96 element (12x8) matrix job. It's attached as CCI_Adm_Darrel_play_Matrix.xml.

      Control Attempt

      With no throttling, the quantity of concurrent child builds is limited only by my available executors.

      Attempt #1

      Throttling thusly:

      • this project alone – radio button SELECTED
      • max total builds – 7
      • max builds per node – 0 (infinite)
      • matrix master builds – check ON
      • matrix config builds – check ON

      RESULT Failure! No throttling happens.

      Attempt #2

      Throttling thusly:

      • this project alone – radio button SELECTED
      • max total builds – 7
      • max builds per node – 0 (infinite)
      • matrix master builds – check OFF
      • matrix config builds – check ON

      RESULT Failure! No throttling happens.

      Success via "category" throttling

      Throttling thusly:

      • System Config
        • "Manage Jenkins" > "Configure System" > (heading) "Throttle Concurrent Builds"
        • category name = darrel_play_matrix
        • max total builds = 7
        • max per node = 0
      • Job Config
        • throttle as part of categorie(s) – radio button SELECTED
        • max total builds = 7 (I expect this to be ignored)
        • max config builds = 7 (I expect this to be ignored)
        • multi-project category = "darrel_play_matrix" check ON
        • matrix master builds – check OFF
        • matrix config builds – check ON

      RESULT Success! This behaves exactly like I expect it to.

      However, my (strong) preference is to use "per project" throttling, so I don't have to create global throttling categories for 100s of developers.

        Attachments

        1. CCI_Adm_Darrel_play_Matrix.xml
          4 kB
        2. screenshot-1.png
          screenshot-1.png
          8 kB
        3. screenshot-2.png
          screenshot-2.png
          6 kB
        4. screenshot-3.png
          screenshot-3.png
          10 kB

          Activity

          Hide
          darrelvun Darrel Vuncannon added a comment -

          I read JENKINS-16521 and JENKINS-13619, but they don't address what I'm seeing.

          I'm able to reproduce this on my production Jenkins instance and my test Jenkins instance.

          Show
          darrelvun Darrel Vuncannon added a comment - I read JENKINS-16521 and JENKINS-13619 , but they don't address what I'm seeing. I'm able to reproduce this on my production Jenkins instance and my test Jenkins instance.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          IIRC there is a known issue with "per project" throttling. I'll check it and the Errata on the Wiki.

          I'd also recommend to update to Jenkins 1.625.x at least.
          There are known Queue snapshot management issues in 1.609.3, hence the plugin may work incorrectly.

          Show
          oleg_nenashev Oleg Nenashev added a comment - IIRC there is a known issue with "per project" throttling. I'll check it and the Errata on the Wiki. I'd also recommend to update to Jenkins 1.625.x at least. There are known Queue snapshot management issues in 1.609.3, hence the plugin may work incorrectly.
          Hide
          darrelvun Darrel Vuncannon added a comment -

          Thanks, Oleg Nenashev, and let me know if you find anything interesting.

          I'm scheduled to upgrade Jenkins next month. I'll probably go straight to the latest 1.642.x version. I can recheck then.

          Show
          darrelvun Darrel Vuncannon added a comment - Thanks, Oleg Nenashev , and let me know if you find anything interesting. I'm scheduled to upgrade Jenkins next month. I'll probably go straight to the latest 1.642.x version. I can recheck then.
          Hide
          sbeaulie Samuel Beaulieu added a comment - - edited

          I'm using
          Jenkins ver. 1.642.2
          Matrix Project Plugin 1.6.
          Throttle Concurrent Builds Plug-in 1.8.4

          And none of the throttling is working for 'matrix' multi-configuration type jobs.

          I've turned on the logs for 'ThrottleQueueTaskDispatcher' but there isn't much logged there anyway

          Edit: I was able to get the 'category' throttling to work as above if I set the
          "Manage Jenkins" > "Configure System" > (heading) "Throttle Concurrent Builds" to a lower number than the job config. If its a higher number than the job config then it does not throttle them (eg system label = 10 and job config = 1 will not throttle to 1)

          Show
          sbeaulie Samuel Beaulieu added a comment - - edited I'm using Jenkins ver. 1.642.2 Matrix Project Plugin 1.6. Throttle Concurrent Builds Plug-in 1.8.4 And none of the throttling is working for 'matrix' multi-configuration type jobs. I've turned on the logs for 'ThrottleQueueTaskDispatcher' but there isn't much logged there anyway Edit: I was able to get the 'category' throttling to work as above if I set the "Manage Jenkins" > "Configure System" > (heading) "Throttle Concurrent Builds" to a lower number than the job config. If its a higher number than the job config then it does not throttle them (eg system label = 10 and job config = 1 will not throttle to 1)
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Likely each matrix job is being throttled as individual project in such configuration. As designed IMHO. Please feel free to propose a pull request, IMHO the entire per-project throttling functionality should be rather deprecated in favor of categories.

          Show
          oleg_nenashev Oleg Nenashev added a comment - Likely each matrix job is being throttled as individual project in such configuration. As designed IMHO. Please feel free to propose a pull request, IMHO the entire per-project throttling functionality should be rather deprecated in favor of categories.
          Hide
          legolas Arnt Witteveen added a comment -

          Oleg Nenashev I'm not sure what the design is, but the documentation explicitly mentions Matrix builds and doesn't mention any limitation, so if this is not considered a bug in the code at least the docs should be updated to mention this limitation.

          Show
          legolas Arnt Witteveen added a comment - Oleg Nenashev I'm not sure what the design is, but the documentation explicitly mentions Matrix builds and doesn't mention any limitation, so if this is not considered a bug in the code at least the docs should be updated to mention this limitation.

            People

            • Assignee:
              Unassigned
              Reporter:
              darrelvun Darrel Vuncannon
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: