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

Throttling on manually first triggered jobs of multibranch pipeline does not work

      Context :

      1. we have a multibranch job, configured for discovering branches / MRs / ..., with such pipeline
        pipeline {
            agent { label ... }
        
            options {
                ...
                throttleJobProperty(
                        categories: ['myCategory'],
                        throttleEnabled: true,
                        throttleOption: 'category'
                )
            }
        
            ...
        }
        
      2. "myCategory" is configured properly
      3. but also configured for "Suppress automatic SCM triggering" (from Branch API plugin)
      4. so we have such jobs, where we manually triggered some job, under some "customer driven" needs

      Fact :
      Throttling works fine with respect to configuration / category, for jobs that have been scheduled at least once, but throttling seems to not be honored for the first run of every job in this multibranch job.

          [JENKINS-72669] Throttling on manually first triggered jobs of multibranch pipeline does not work

          Daniel Beck added a comment -

          for jobs that have been scheduled at least once, but throttling seems to not be honored for the first run of every job in this multibranch job

          Since the options (~ properties in non-declarative) essentially reconfigures the job every time it runs, this is likely a limitation one needs to live with. Same with build parameters, you declare them in the pipeline definition but the first build goes without.

          Daniel Beck added a comment - for jobs that have been scheduled at least once, but throttling seems to not be honored for the first run of every job in this multibranch job Since the options (~ properties in non-declarative) essentially reconfigures the job every time it runs, this is likely a limitation one needs to live with. Same with build parameters, you declare them in the pipeline definition but the first build goes without.

          ok thanks danielbeck, I think we will likely include a "forced dry-run" for the first run of such job, in order to "populate" it accordingly.

          Pierre-Christophe added a comment - ok thanks danielbeck , I think we will likely include a "forced dry-run" for the first run of such job, in order to "populate" it accordingly.

            Unassigned Unassigned
            pcbue Pierre-Christophe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: