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

MultiJobBuilder waits for all subjobs of the same project instead of direct subjob instance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Postponed
    • Icon: Major Major
    • multijob-plugin
    • None
    • Jenkins 1.592
      Multijob 1.16

      I have a parent MultiJob that executes a number of child MultiJobs in order to modularize the tasks that I am running. The said child MultiJob build is often built by itself (without the parent MultiJob). When the child is built by itself and a separate parent MultiJob is built afterwards (and in turn the parent MultiJob builds a new instance of the child job), the parent MultiJob's child will wait until the extant stand-alone built Multijob child is done.

      Basically a given MultiJob will wait for all jobs in the queue that are of the same project of the given MultiJob's subjob instead of the intended purpose of waiting for an executor to free up ONLY for the given MultiJob's subjob.

      Is there anything I can do in the time being to avoid this?

      Here is where this wait happens:
      https://github.com/jenkinsci/tikal-multijob-plugin/blob/master/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java#L187-L189

      Probably not super important, but here is my stacktrace when i saw the parent MultiJob blocked (note multijob 1.16 source lines different):
      at java.lang.Thread.sleep(Native Method)
      at java.lang.Thread.sleep(Thread.java:321)
      at java.util.concurrent.TimeUnit.sleep(TimeUnit.java:356)
      at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.perform(MultiJobBuilder.java:191)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:134)
      at hudson.model.Run.execute(Run.java:1759)
      at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)

            Unassigned Unassigned
            dcampbe Danny Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: