https://prefect.io logo
Title
h

Ha Pham

08/08/2022, 9:44 AM
I just found out that for a work queue to pick up a flow run, all of the the work queue's tags must present in the deployment. For example • if my work queue has
tag_1
,
tag_2
, and the deployment only has
tag_1
, it wont be picked up • If I modify the deployment to have both
tag_1
,
tag_2
, it will be picked up • If I add another
tag_3
to the deployment, the deployment is also picked up Is this the expected behavior?
āœ… 1
a

Anna Geller

08/08/2022, 11:35 AM
think of tags set on deployment as ways to provide meaningful structure you can have 3 tags on your deployment: your_agent_tag, your_project_tag, your_team_tag if your queue is started with your_agent_tag, it's enough to pick up that deployment but if your work queue has a tag yet_another_tag_to_further_filter_which_flows_I_pick_up, then this deployment from above won't be picked up since you filtered too much out work queues are essentially filters and yes, all that is expected behavior šŸ‘
h

Ha Pham

08/08/2022, 12:24 PM
oh ok understood. so it's like the tags are combined using AND operator, while I expected it to behave like using OR
a

Anna Geller

08/08/2022, 12:31 PM
I think so - if you run everything on the single agent, you only need a single tag when starting an agent - you can do that using a single command which will also create a necessary work queue:
prefect agent start --tag your_agent_tag
j

John Kang

08/11/2022, 5:34 PM
@Ha Pham The way the CTO (@Chris White) mentioned it to us during the Prefect Associate Course was exactly how you wrote it down. The Work queue uses the tags as an 'AND' operator. I was confused at first as well because I expected 'OR' behavior. He said that the 'AND' is so that the work queue can be more restrictive and filter deployments out.
šŸ™Œ 3