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

Throttling based on parameters does not work with Pipeline jobs

    XMLWordPrintable

Details

    • 2.2

    Description

      Configuration

      1. Pipeline job with parameters
      2. Execute concurrent builds if necessary: true
      3. Throttle Concurrent Builds: true
      4. Prevent multiple jobs with identical parameters from running concurrently: true

      Notes

      • Job parameters are defined as part of the pipeline setup with the properties command
      • This is also an issue when properties are not defined as part of the pipeline setup, and are configured through the UI directly

      Problem

      When throttling based on one of the job's parameters, the plugin does not prevent multiple builds from running concurrently when the defined parameter is the same.

      Attachments

        Issue Links

          Activity

            shezaan Sherabi GuessWhat added a comment - - edited

            We are having the same issue.
            1. Uncheck "Do not allow concurrent builds"
            2. Check "Throttle concurrent builds"
                 -> Check "Prevent multiple jobs with identical parameters from running concurrently"

            Below is Pipeline as code for the above steps:

            // disableConcurrentBuilds(), --> Note concurrency is enabled since this line is commented out.
            [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: true, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: true, throttleOption: 'project']

            shezaan Sherabi GuessWhat added a comment - - edited We are having the same issue. 1. Uncheck "Do not allow concurrent builds" 2. Check "Throttle concurrent builds"      -> Check "Prevent multiple jobs with identical parameters from running concurrently" Below is Pipeline as code for the above steps: // disableConcurrentBuilds(), --> Note concurrency is enabled since this line is commented out. [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: true , maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: true , throttleOption: 'project']

            Having the same issues not being able to throttle pipeline jobs based on parameters, has this received any attention/help/updates? This is causing a lot of pain on our internal CI. Running Jenkins jenkins-2.222.1 with latest TCB.

            francob Franco Bladilo added a comment - Having the same issues not being able to throttle pipeline jobs based on parameters, has this received any attention/help/updates? This is causing a lot of pain on our internal CI. Running Jenkins jenkins-2.222.1 with latest TCB.
            basil Basil Crow added a comment - Fixed in jenkinsci/throttle-concurrent-builds-plugin#117 .
            basil Basil Crow added a comment -

            Released in 2.2.

            basil Basil Crow added a comment - Released in 2.2 .
            smits Amit Shur added a comment -

            I have a similar issue where Jenkins is NOT preventing a second build from running, despite it sharing a parameter value with the already running first build.
            It says here the issue was fixed in v2.2, however I've tried with all versions starting from v2.2 all the way to v2.6, and all failed. 
            Considering no one else has complained since the v2.2 release, does anyone have an idea as to what could be wrong in my setup that would cause the issue still to occur?
            Thanks you all.

            smits Amit Shur added a comment - I have a similar issue where Jenkins is NOT preventing a second build from running, despite it sharing a parameter value with the already running first build. It says here the issue was fixed in v2.2, however I've tried with all versions starting from v2.2 all the way to v2.6, and all failed.  Considering no one else has complained since the v2.2 release, does anyone have an idea as to what could be wrong in my setup that would cause the issue still to occur? Thanks you all.

            People

              basil Basil Crow
              alunsford Aaron Lunsford
              Votes:
              13 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: