https://prefect.io logo
s

Samuel Hinton

02/04/2021, 11:21 AM
Hi team! Are there any useful debugging methods for figuring out why agents arent executing flows? I can see the agent start nicely, and it appears in the Prefect dashboard as healthy, but the
hello_flow
example flow never executes. The agent startup seems fine:
Copy code
agent_1      | [2021-02-04 11:16:51,742] INFO - agent | Starting LocalAgent with labels ['753b3ccf1df5']
agent_1      | [2021-02-04 11:16:51,742] INFO - agent | Agent documentation can be found at <https://docs.prefect.io/orchestration/>
agent_1      | [2021-02-04 11:16:51,742] INFO - agent | Agent connecting to the Prefect API at <http://apollo:4200>
And its still querying the server (see image), but it never actually does anything? I note that manually starting an agent seems to work, but including an agent in the docker-compose that launches all the other prefect services does not, and the debug output is just continually stating that no flows are found, disagreeing with the UI rather confusingly.
Copy code
agent_1      | [2021-02-04 11:34:48,152] DEBUG - agent | No flow runs found
agent_1      | [2021-02-04 11:34:48,153] DEBUG - agent | Next query for flow runs in 10.0 seconds
a

Amanda Wee

02/04/2021, 12:28 PM
From what I've seen, the first thing to check in such cases is whether your flows have a subset of the labels of the agent. The catch is that the local agent has a label, which means that if your flows have no labels, they won't be matched with the local agent because flows with no labels only match agents with no labels.
s

Samuel Hinton

02/04/2021, 12:29 PM
Ah yeah, I see what you mean. Even though I only gave it an โ€œanyโ€ label in my code, its attached another label (the local executor one I think) which my agents dont have set. Alighty, time to see if I can use dask for both local flow and the agent ๐Ÿ™‚ Thanks for the tip!