Hello Everyone. Quick questions. My prefect flow failed and the logs are not helping that much. I get a long stack trace error without anything specific. How can I know that I have a problem with the infra, or with the code ? If you need more details please help me frame my question better.
✅ 1
a
Anna Geller
09/18/2022, 2:05 PM
can you try running the same flow locally? if this works, you could determine whether this is a flow code or infra issue
Anna Geller
09/18/2022, 2:06 PM
if existing logs are not helpful, you can try enabling DEBUG logs e.g.
Copy code
prefect config set PREFECT_LOGGING_LEVEL=DEBUG
a
Andrei Tulbure
09/18/2022, 4:52 PM
It runs locally, but it takes a slightly different route than via Prefect cloud
Andrei Tulbure
09/18/2022, 4:52 PM
Where should I enable debug logs ? In the code, just after declaring my flow?
a
Anna Geller
09/18/2022, 7:04 PM
On the execution layer
a
Andrei Tulbure
09/19/2022, 8:07 AM
sorry. in the code do you mean ?
a
Anna Geller
09/19/2022, 10:07 AM
I meant on the agent/infrastructure block
Anna Geller
09/19/2022, 10:32 AM
e.g.:
Copy code
prefect config set PREFECT_LOGGING_LEVEL=DEBUG
prefect agent start -q yourqueue
or:
Copy code
from prefect.infrastructure import Process
process_block = Process(env={"PREFECT_LOGGING_LEVEL": "DEBUG"})
process_block.save("prod", overwrite=True)
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.