Johan sh
01/31/2025, 3:07 PMJohan sh
01/31/2025, 3:08 PMJohan sh
01/31/2025, 3:11 PMJake Kaplan
01/31/2025, 3:54 PMJohan sh
01/31/2025, 4:02 PMJohan sh
01/31/2025, 4:07 PMJake Kaplan
01/31/2025, 4:50 PMJake Kaplan
01/31/2025, 4:51 PMJohan sh
01/31/2025, 5:50 PMJake Kaplan
01/31/2025, 6:33 PMJohan sh
02/02/2025, 2:35 PM'Opening process...'
, which makes debugging quite challenging.
However, I’m not sure if this is related, but I was also encountering another recurring error:
"An error occurred while monitoring flow run 'xxxxxxxxx'. The flow run will not be marked as failed, but an issue may have occurred.
(...)
File "/home/azureuser/prefect-env/lib/python3.12/site-packages/prefect_azure/workers/container_instance.py", line 948, in _stream_output
if line_time > last_written_time:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: can't compare offset-naive and offset-aware datetimes"
To fix this, I modified the _stream_output
function by adding the following just before the line_time > last_written_time
comparison:
if line_time.tzinfo is None:
line_time = line_time.replace(tzinfo=timezone.utc)
if last_written_time.tzinfo is None:
last_written_time = last_written_time.replace(tzinfo=timezone.utc)
Since making this change, I haven’t encountered either of the two recurring errors. I’m not sure if the issues are related, but I’m keeping my fingers crossed! 🤷🏻♂️Jake Kaplan
02/02/2025, 8:44 PMTypeError: can't compare offset-naive and offset-aware datetimes"
error, that looks like it occurred once the job was created and as part of the monitoring. It should just mean that if your flow run crashed, it wouldn't be able to report it back. My hunch is that it's a separate issue, but hard to say? It looks like theres an assumption that the logs it pulls are not timezone naive. I'm glad you were able to resolve it though! Would you consider contributing your fix to https://github.com/PrefectHQ/prefect/tree/main/src/integrations/prefect-azure?Johan sh
02/05/2025, 9:51 AMJohan sh
02/05/2025, 9:51 AMJohan sh
02/05/2025, 9:53 AMJohan sh
02/05/2025, 9:57 AMJake Kaplan
02/05/2025, 2:33 PMJohan sh
02/05/2025, 2:46 PMJohan sh
02/05/2025, 2:46 PMJohan sh
02/05/2025, 2:51 PMJake Kaplan
02/05/2025, 3:35 PMJake Kaplan
02/05/2025, 3:36 PMstream_output
had that been working before your fix...Johan sh
02/05/2025, 3:56 PMJake Kaplan
02/05/2025, 4:27 PM