Paweł Biernat
05/28/2024, 2:43 PMfrom prefect import flow, get_run_logger, task
@task
def log_hello(name="Marvin"):
logger = get_run_logger()
logger.info(f"{name} said hello!")
return name
@flow
def log_hello_flow():
for name in ["Marvin", "Alice", "Bob"]:
log_hello(name)
if __name__ == "__main__":
# log_hello_flow.deploy(
# name="local-deployment",
# work_pool_name="local-docker-pool",
# image="localhost:5000/prefect-test",
# )
log_hello_flow.deploy(
name="my-first-aci-deployment",
work_pool_name="my-aci-work-pool",
image="XXX.azurecr.io/prefect-test",
)
now when I run it with the local docker pool (commented out section) it seems to be working fine. But when I try to run it on ACI I'm getting
Completed submission of flow run '9a62b3a4-c7ff-4d28-96b5-9769694a03d9'
15:25:21.332 | INFO | prefect.worker.azure-container-instance.azurecontainerworker 4378b7ad-b02b-4c43-b1b9-0b8609a74da9 - AzureContainerInstanceJob 'AzureContainerWorker 4378b7ad-b02b-4c43-b1b9-0b8609a74da9': Container deleted.
15:25:21.374 | INFO | prefect.flow_runs.worker - Reported flow run '9a62b3a4-c7ff-4d28-96b5-9769694a03d9' as crashed: Flow run infrastructure exited with non-zero status code 1.
The run ends up in a failed state, but I can't find any more info on the issue, neither in prefect nor in azure. On azure activity log I see no failed tasks, the only seeming relevant information there is the following. So the credentials seem fine, as it responds to flow run by creating some container groups but that's it. The image got pushed to ACR as I see it listed there.Paweł Biernat
05/28/2024, 2:44 PMKevin Grismore
05/28/2024, 2:48 PMPaweł Biernat
05/28/2024, 2:49 PMKevin Grismore
05/28/2024, 2:49 PMPaweł Biernat
05/28/2024, 2:49 PMKevin Grismore
05/28/2024, 2:49 PMPaweł Biernat
05/28/2024, 2:49 PMKevin Grismore
05/28/2024, 2:50 PMPaweł Biernat
05/28/2024, 2:51 PMKevin Grismore
05/28/2024, 2:52 PMPaweł Biernat
05/28/2024, 2:53 PMKevin Grismore
05/28/2024, 2:54 PMPaweł Biernat
05/28/2024, 4:19 PMFile "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 372, in handle_async_request
with map_httpcore_exceptions():
File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: All connection attempts failed
An exception occurred.
Paweł Biernat
05/28/2024, 4:20 PMKevin Grismore
05/28/2024, 4:20 PMPaweł Biernat
05/28/2024, 4:21 PMPaweł Biernat
05/28/2024, 4:21 PMPaweł Biernat
05/28/2024, 4:22 PMKevin Grismore
05/28/2024, 4:23 PMPaweł Biernat
05/28/2024, 4:23 PMPaweł Biernat
05/28/2024, 4:24 PMKevin Grismore
05/28/2024, 4:24 PMPaweł Biernat
05/28/2024, 4:25 PMKevin Grismore
05/28/2024, 4:25 PMLennart
06/03/2024, 1:56 PMKevin Grismore
06/03/2024, 1:59 PMLennart
06/03/2024, 2:06 PMLennart
06/03/2024, 2:08 PMKevin Grismore
06/03/2024, 2:26 PMPaweł Biernat
06/03/2024, 3:07 PMaz container logs --resource-group <rg-name> --name <container-name>
You can list the active containers with
az container list --resource-group <rg-name> --output table
For some reason I still see some of the containers I created a few days ago (all terminated).Lennart
06/10/2024, 2:43 PM