https://prefect.io logo
#prefect-community
Title
# prefect-community
p

Paco Ibañez

06/22/2022, 6:45 PM
In 2.0 how could I manually run a flow / replay a flow run to be able to use pdb for debugging purposes? I have tried
python -m prefect.engine <flow_run_id>
but I get
This run has already terminated
k

Kevin Kho

06/22/2022, 6:56 PM
This is not possible because the flow already ended. You can’t rerun a finished flow like that, but there are thoughts to expose something like that eventually
p

Paco Ibañez

06/22/2022, 6:57 PM
how could I manually rerun it? is there a flag or something i could pass in the cli?
k

Kevin Kho

06/22/2022, 7:00 PM
What are you trying to do? The flow failed so you want to inspect it at some point?
p

Paco Ibañez

06/22/2022, 7:01 PM
i would like to add a pdb breakpoint to the flow code and run it from the cli so I can debug
or what would be the best way to troubleshoot a flow that fails before outputting any logs? I can see the agent picking up the run but then the only thing I see is
prefect.flow_runner.docker - Flow run container 'spiffy-husky' has status 'exited'
I am pretty sure the issue has to do with pydantic parameter validation I just would like to debug whats going on
k

Kevin Kho

06/22/2022, 8:50 PM
A couple things you can try to get more insight: 1.
prefect deployment execute <flow-name>/<deployment-name>
to see if this shows the error 2. Set
PREFECT_DEBUG_MODE=1
3. Or maybe
docker logs <container>
p

Paco Ibañez

06/22/2022, 9:00 PM
thanks!
29 Views