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

Cannot throttle a matrix job without throttling the axis children

    XMLWordPrintable

Details

    Description

      When configuring throttling for a matrix job, I assumed (and wanted) the throttling to apply the overall matrix as a whole, including all child jobs. However the result is throttling is applied to each child job.

      In my case, each jobs requires an external resource that cant be shared across jobs. I've allocated each child its own resource so all children can run concurrently. It works great until two matrix jobs try to run at the same time, then they stomp all over each other. Using the concurrent throttling plugin which helps but now only one child job runs instead of one matrix job, so its much slower than necessary.

      In general its probably ideal to be able to configure throttling at both the matrix and child levels. Though applying throttling at the matrix level only seems like an improvement to me, as its more intuitive and just as useful.

      Attachments

        Issue Links

          Activity

            abayer Andrew Bayer added a comment -

            For right now, I'm going to implement this with throttling only applicable at the parent level, since that doesn't require any UI changes. Should have a test build shortly.

            abayer Andrew Bayer added a comment - For right now, I'm going to implement this with throttling only applicable at the parent level, since that doesn't require any UI changes. Should have a test build shortly.

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java
            http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/3aa86a8b55f1eb6be14ddb757a352f9e39b5a746
            Log:
            [FIXED JENKINS-12240] Fixing handling of MatrixProjects and MatrixConfigurations.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/3aa86a8b55f1eb6be14ddb757a352f9e39b5a746 Log: [FIXED JENKINS-12240] Fixing handling of MatrixProjects and MatrixConfigurations.
            dogfood dogfood added a comment -

            Integrated in plugins_throttle-concurrent-builds-plugin #52
            [FIXED JENKINS-12240] Fixing handling of MatrixProjects and MatrixConfigurations. (Revision 3aa86a8b55f1eb6be14ddb757a352f9e39b5a746)

            Result = SUCCESS
            Andrew Bayer :
            Files :

            • src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java
            dogfood dogfood added a comment - Integrated in plugins_throttle-concurrent-builds-plugin #52 [FIXED JENKINS-12240] Fixing handling of MatrixProjects and MatrixConfigurations. (Revision 3aa86a8b55f1eb6be14ddb757a352f9e39b5a746) Result = SUCCESS Andrew Bayer : Files : src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java
            reevelau reeve lau added a comment -

            Hi,

            My use case rather prefer the old behavior.

            There 2 types of job in my env, Matrix job (with 2 children running in Windows and Linux) and non-Matrix job (running either in Window or Linux). All executing instances (2 Children of matrix and non-Matrix) require an external resource with limited supply.

            I am trying to use category throttling to control maximum concurrent jobs among these 2 types of job. If this plugin only throttling on Matrix parent level, then I have to set the throttle number as 1 when the actual external resource is 2. This greatly decrease the efficiency when the the executing job is non-Matrix one.

            Regards,
            Reeve

            reevelau reeve lau added a comment - Hi, My use case rather prefer the old behavior. There 2 types of job in my env, Matrix job (with 2 children running in Windows and Linux) and non-Matrix job (running either in Window or Linux). All executing instances (2 Children of matrix and non-Matrix) require an external resource with limited supply. I am trying to use category throttling to control maximum concurrent jobs among these 2 types of job. If this plugin only throttling on Matrix parent level, then I have to set the throttle number as 1 when the actual external resource is 2. This greatly decrease the efficiency when the the executing job is non-Matrix one. Regards, Reeve

            Is it possible to configure the job to get the old behavior back. We have a very large matrix job and would like to limit it to execute just a part of the matrix at the same time ( resource limited ). Is the new ticket needed for this issue ?

            vladisld Vlad Dovlekaev added a comment - Is it possible to configure the job to get the old behavior back. We have a very large matrix job and would like to limit it to execute just a part of the matrix at the same time ( resource limited ). Is the new ticket needed for this issue ?
            reevelau reeve lau added a comment -

            I created this ticket JENKINS-23439.

            reevelau reeve lau added a comment - I created this ticket JENKINS-23439 .

            People

              abayer Andrew Bayer
              casey casey ching
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: