Lock runner to pipeline

Problem

In my project, I have the problem that if I have multiple pipelines pending, a single runner takes up jobs (first step usually) of multiple pipelines before finishing the pipeline that was started first. First problem with this is that the first step is doing a database reset of the Test-API my app is talking to. Additionally, whenever a concurrent runner is picking up a new job, my test suite either resets the other pipelines database or race conditions occur if tests are ran by multiple runners using the same backend. I did some research here and in the configs/docs and I did not find a way to configure this.

Possible solution

Lock a runner to a specific pipeline, so if it takes up the first job of a pipeline it shall not take up any job that is not part of that pipeline until the pipeline is finished

Bottom line

If somebody would confirm that my scenario is actually a valid one or somebody else has these problems, please at least let me know, I might also try to add this in a fork. But it might also need some changes in the multirunner repo, because as far as I know, the runners do not have a clue which pipeline they are running.

Screenshot

Screen_Shot_2016-07-14_at_17.19.11

In the attached screenshot, you see the problem: I have configured only a single runner with concurrency set to 1 - which is the only configuration that works for me so far. There are multiple pipelines pending and when a build finishes the runner just takes up the first step of another pipeline instead of finishing the first. IMHO it would in general totally make sense to finish the first pending pipeline before picking up jobs of subsequent pending pipelines.

Edited Jul 15, 2020 by Jason Yavorsky
Assignee Loading
Time tracking Loading