https://prefect.io logo
w

William Evonosky

08/30/2023, 7:36 PM
Hey all, I wasn't sure if I found a bug/feature request and was prompted to come here and ask about it before submitting a Issue on Github. I am running a prefect server locally (prefect version 2.11.5) and am running some flows to understand how exception handling and retries happen in tasks. In my flow, I have a task that will raise an exception 20% of the time and the task is setup to retry on exception up to three times. The flow runs fine but there is an inconsistency with logs locally and on the server. Locally, when an exception is raised, I see an
ERROR
log for the exception and later a
INFO
log telling me a non-final state was received (AwaitingRetry). Up on the server when checking the logs, the
INFO
log about attempting a retry is non-existent. Is this excepted behavior? Maybe there are two different loggers being used and only of them is reporting up to the server?
j

Jake Kaplan

08/30/2023, 8:09 PM
hey, fwiw this is expected behavior. This log in particular is not sent to the api on purpose it seems: https://github.com/PrefectHQ/prefect/blob/main/src/prefect/engine.py#L1794-L1801 I don't have a good reason that specific log couldn't/shouldn't be sent to the API. If you find it helpful to show I'd definitely recommend filing an an issue (and submit a pr for the change if you'd like) someone else may have more context
w

William Evonosky

08/30/2023, 9:13 PM
Ah thanks for the quick reply. Yeah it seems odd that log call is specifically set to not send to the API...its IMO useful information to have. I'll make a ticket for it and if I have time make a PR and see what maintainers think.
🙌 1