I’m trying to run a Prefect Flow on a Docker Agent...
# prefect-community
j
I’m trying to run a Prefect Flow on a Docker Agent. The agent is able to pull the image and complete the deployment of the flow run. The flow progresses from
Scheduled
to
Submitted
state in the UI. But there is no docker container that is ever spun up and the agent doesn’t do anything. Is there a checklist similar to this, but for submitted state? https://discourse.prefect.io/t/why-is-my-flow-stuck-in-a-scheduled-state/73
The same flow runs on other agents, and we are sure the labels are correct because the right Prefect docker agent picks it up to deploy the flow on the VM.
Saw there was an article for submitted state, but it did not help. We are able to pull the image to the machine. The agent process is running and says that it was able to deploy the flow
Solved: Reran with the
--show-flow-logs
flag. There was a fatal error on executing the flow that was not handled by Prefect. We used
sys.exit(XXXX)
in our code instead of raising an error and the process exited without sending anything back to Prefect
upvote 1
a
Nice work figuring that out! And thanks for using Discourse to find answers to your questions! 💯
j
Where should I raise that as an issue/bug to be fixed?
a
What do you see as a bug here? You shouldn’t do sys.exit() within your task, instead you can raise a signal. But if you think there is some bug here, you can create a GitHub issue with label bug