https://prefect.io logo
Title
g

Glen Trudeau

09/18/2020, 10:14 PM
Another Question. We were getting
Failed to load and execute Flow's environment: ModuleNotFoundError("No module named 'sqlalchemy'")
when running a flow on Fargate agent which I assume is due to the fact that the base docker image doesn’t have that module installed. But when we tried downloading the public image, adding the necessary modules and then uploading to ECR it doesn’t appear that the agent is utilizing the updated image even though we called it inside of the container definitions (reference python wrapper). We see the below screenshot for the new task definition in ECS which means it isn’t pulling the specified image correctly. Any suggestions?
n

nicholas

09/19/2020, 12:15 AM
Hi @Glen Trudeau - at a glance this looks to be a problem with your Flow’s environment, not the environment of your agent. Can you confirm your flow is referencing the correct image?
g

Glen Trudeau

09/21/2020, 7:24 PM
I’m referencing it currently like:
f.environment = LocalEnvironment(metadata={"image":"<http://12345678910.dkr.ecr.us-east-2.amazonaws.com/analytics-repo:latest|12345678910.dkr.ecr.us-east-2.amazonaws.com/analytics-repo:latest>"})
n

nicholas

09/21/2020, 7:27 PM
Hm, and the image you re-registered with ECS matches the one you defined there? (including the tag)
g

Glen Trudeau

09/21/2020, 7:29 PM
Yup!
n

nicholas

09/21/2020, 7:51 PM
Got it, thanks @Glen Trudeau - can you open an issue with the code you used for your flow and agent (or a min reproducible example)? That'll let the Core team triage this better.
g

Glen Trudeau

09/21/2020, 7:53 PM
Will do!
n

nicholas

09/21/2020, 7:53 PM
Thank you! Sorry I couldn't be of more help here, the Core team will get it sorted asap though 🙂
g

Glen Trudeau

09/21/2020, 8:16 PM
Thanks for the help!
😄 1