https://prefect.io logo
Title
i

Ismail Cenik

05/17/2021, 7:38 PM
Hello, is there a way to limit the concurrent run of flows? Assume that I have a flow that can be run from different resources and we do not want concurrent runs of some flows. We need to put a kind of queue to control triggers on our side but is there a way to limit concurrent runs of a specific flow on the Prefect side? I saw an ability to limit concurrent runs of tasks but I need for a specific flow.
k

Kevin Kho

05/17/2021, 7:41 PM
Hi @Ismail Cenik! I will double-check but I think this is a cloud only feature. Are you on server?
z

Zanie

05/17/2021, 7:45 PM
There's some WIP documentation at https://deploy-preview-4492--prefect-docs.netlify.app/orchestration/flow-runs/concurrency-limits.html#flow-run-limits -- as Kevin said, this is Cloud only though.
i

Ismail Cenik

05/17/2021, 8:06 PM
Thanks for the quick answer. We are on the cloud and our agent is running on our EKS. As far as I understand, when I give a label to a specific flow, I can limit the concurrency run of that flow to 1? The other flows and runs will not be affected by that config change, right?
k

Kevin Kho

05/17/2021, 8:09 PM
You mean changing flow concurrency while there are flows running? The flows will be allowed to finish fist
πŸ‘ 1
z

Zanie

05/17/2021, 8:10 PM
Yep @Ismail Cenik that is correct
πŸ‘ 1
i

Ismail Cenik

05/17/2021, 8:38 PM
Thank you.
Hello, I define the label as "
run_config=KubernetesRun(job_template_path="job_template.yaml", labels=["NonConcurrent-Run"])
" This is our Flow Concurrency
This is the warning message
k

Kevin Kho

05/17/2021, 10:42 PM
And do you have an agent with the label?
i

Ismail Cenik

05/17/2021, 10:42 PM
Our Agent is running on Kubernetes so we need to define the same label on Kubernates Agent, right?
k

Kevin Kho

05/17/2021, 10:42 PM
Yes exactly
πŸ‘ 1
i

Ismail Cenik

05/17/2021, 10:45 PM
Is there any link for describing that definition? So I will forward it to the related party. I do not have access to it everywhere in our system.
k

Kevin Kho

05/17/2021, 10:46 PM
I think this if they are starting with the CLI
Actually that covers all ways
t

Tejus Rachakonda Venkata Ramanuj

05/18/2021, 1:19 AM
Hi @Kevin Kho , I am from the same organization as Ismail and am pondering, the documentation that you sent in the thread (this) , is to start a whole new prefect-agent, we already have a prefect-agent up and running, we need to have a label for that right? As long as the one that's in the yellow state, runs on my local it's fine, once my shell terminated it goes into yellow and then red, is there a way we can change the label for the agent that's on the right side? which is the one we're using currently. @Ismail Cenik
k

Kevin Kho

05/18/2021, 1:30 AM
You need to restart the agent with the new labels.
There is no way to add labels on the agent once it’s started