argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
14.91k stars 3.18k forks source link

Option to have workflow with single available lock run #13630

Open tooptoop4 opened 1 week ago

tooptoop4 commented 1 week ago

Summary

The multi mutex/semaphore feature has a restriction that only becomes apparent with this feature. Prior to this feature there was only ever one possible mutex or semaphore so in case of highpriority wf and lowpriority wf both wanting it the high one would get it. But in case of high priority wf wanting 2 mutexes (1 which is available but the other taken by some other wf) and different low priority wf only wanting 1 mutex (which is available) the low priority wf is unnecessarily blocked from running even though the high priority can't run anyway (since not ALL of its criteria is met)

see https://github.com/argoproj/argo-workflows/pull/13358#discussion_r1681710287

Use Cases

This is similar to 'short query acceleration' where small tasks are allowed to get a slice of compute whenever the heavy hitters did not necessarily have enough headroom to run

Joibel commented 1 week ago

Do you have a design for what this would look like?

Currently the only strategy is front of queue workflow gets to run. Would an alternative (controller global) strategy of "first runnable workflow" in queue be an alternative to this proposal for you?

tooptoop4 commented 1 week ago

Would an alternative (controller global) strategy of "first runnable workflow" in queue be an alternative to this proposal for you?

yes this exactly!