Hey all, (Prefect 1.0) I’m struggling to figure ou...
# prefect-community
j
Hey all, (Prefect 1.0) I’m struggling to figure out why flows execute properly locally, but when triggered through Prefect Cloud + Docker Agent running local doesn’t. The flows are stuck in submitted. Anyone have an idea? I can’t find information about the error message “prefect: error: unrecognized arguments: execute flow-run” . Thanks in advance!
j
Thanks Anna, I checked that out before but cannot find an issue with the execution layer. I can manually pull the image from where the agent is running.
Do you happen to recognise this error message? The --env and --action arguments were used to build the flows. However, I removed these arguments during last build and on the main repo so I’m not sure why prefect still picks them up?
a
it looks like you either don't use the official Prefect base image or you're overriding the entrypoint - here is an example of a Dockerfile https://github.com/anna-geller/packaging-prefect-flows/blob/master/Dockerfile
j
My base image is the official one. This image was working before without any issues
Do I need additional dependencies to use GitHub storage?
a
Can you share your prefect diagnostics output and explain your agent setup? Flow code seems to have been successfully downloaded so GitHub dependency is not an issue here
j
I think I found the issue. I was importing a variable DEPLOY_ENV from another file, which it wasn’t playing nice with. I use this variable at flow build time to reference the correct docker repo (xxxdev.repo/ xxxprd.repo) and prefect project (dev/prd). Is it better to create separate Prefect environments for different environments rather than projects?
Sorry for asking this, I searched for best practices regarding this but couldn’t find much.
a
Ahh classic build time vs. runtime issue We have this for 1.0 https://discourse.prefect.io/t/how-to-distinguish-between-various-environments-development-staging-production-in-prefect-flows/179/2 For 2.0 we'll have more robust recipes for handling environments
j
Thanks Anna, super helpful as always
🙌 1