We have two runners: an unlabeled one with DRONE_RUNNER_CAPACITY=10 which is meant to execute the “parallel” pipeline, and one labeled “runner: single” which has DRONE_RUNNER_CAPACITY=1. The idea is the “parallel” pipeline can run up to 10 different builds in parallel, while “serial” is gated to one build at a time on a specific runner. In practice it seems “parallel” won’t start until “serial” gets the queue (runner with “runner: single” starts processing the build, but correctly blocks on completion of the associated “parallel” pipeline).
Is this expected behavior, or a subtle bug in pipeline dependency management?
sorry, I’m not sure I understand the issue. Can you please provide a sample configuration that can be used to reproduce the problem? and describe expected results vs actual results?
Assume we have two repos repoA and repoB with the same .drone.yml (as described above):
Expected results:
repoA triggers a build, pipeline “parallel” is run on the default (non-labeled) runner
repoB triggers a build, pipeline “parallel” is run in parallel with the repoA build on the default runner
repoA build finishes the “parallel” pipeline and starts executing pipeline “serial” on the runner: single runner
repoB build finishes the “parallel” pipeline, and queues the pipeline “serial” on the runner: single runner
repoA build finishes the “serial” pipeline and repoB “serial” pipeline starts executing.
Actual results:
repoA triggers a build, pipeline “parallel” is run on the default (non-labeled) runner. This actually reserves a repoA “serial” pipeline in the runner: single queue.
repoB triggers a build, but the pipeline “parallel” is pending, presumably because runner: single is not available.
Would it be helpful to share the corresponding docker-compose.yml which specifies the 2 runners?
I do appreciate the additional detail, however, I think I am still missing something. I recommend posting a simplified yaml file that demonstrates the problem and your docker-compose file and logs (the more information the better).
This actually reserves a repoA ‘serial’ pipeline in the ‘runner: single’ queue
I am not sure I understand this phrasing. Drone does not have a reservation system. Drone has a FIFO queue of pending pipelines. When all dependencies for a pipeline are satisfied it can be pulled from the queue by a runner.
repoB triggers a build, but the pipeline “parallel” is pending, presumably because runner: single is not available.
Whether or not a runner for serial is available has no bearing on whether or not parallel pipelines are pulled from the queue by available runners and executed. I am not able to reproduce the behavior being described in this thread, as I understand it.
Note that build 99 and 100 were able to execute the first pipeline (unlabeled) despite there being no available runner to process the second pipeline (labeled).