Sorry, I'm still confused around blocks! I understand that I might want to add a block in order to centrally coordinate access to configuration
inside my flow. At this point, I'm just trying to get my flow running though, using an ECS-Task block.
1. I've defined a block in Python with
ECSTask(...).save("dev-trial", overwrite=True)
on my dev machine. It shows up in Prefect Cloud.
2. I have created a deployment with
prefect deployment build -n dev-trial -q dev -ib ecs-task/dev-trial -a flows/healthcheck.py:healcheck
again from my dev machine
3. I have started a local agent with
prefect agent start -q dev
and triggered a job. All works.
4. I have started an agent
inside a container and triggered the job, but now it fails with the error
KeyError: "No class found for dispatch key 'ecs-task' in registry for type 'Block'."
It seems like in the container, it's not able to resolve the block reference. But isn't that embedded inside the yaml downloaded from Prefect Cloud?