Hi, I'm completely new to prefect, I'm currently testing it as a way to run simple pipelines on azur...
p

Paweł Biernat

over 1 year ago
Hi, I'm completely new to prefect, I'm currently testing it as a way to run simple pipelines on azure container instances. I'm currently trying to run a snippet from the azure tutorial
from 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.