Andrew Maturo
08/20/2024, 4:06 PMpull:
- prefect_aws.deployments.steps.pull_from_s3:
requires: prefect-aws>=0.3.0
bucket: 'bucket-name'
folder: 'src'
And the flow deployment is:
- name: 'sleepy_${short_env}'
flow: flows/sleepy_flow.py
entrypoint: flows/sleepy_flow.py:sleepy_flow
Now this is great and dandy since I finally got it working, but given the redundancies of flows/
I was hoping to use the folder option in the pull step to declare flows and then my deployment could be
- name: 'sleepy_${short_env}'
flow: sleepy_flow.py
entrypoint: sleepy_flow.py:sleepy_flow
Which is a lot cleaner imo. The ideal layout of my bucket was flows/flow.py. The problem here is that it appears the file location is checked BOTH at the deploy time AND at run time. The latter makes perfect sense since it's a push pool, but the former appears to fail without a directory before the flow name? I can't quite decipher what the precise underlying issue is given flow = load_flow_from_entrypoint(deploy_config["entrypoint"])
and FileNotFoundError: [Errno 2] No such file or directory: 'sleepy_flow.py'
. I guess i'm going with src/ but would love to understand my pitfall here.Alexander Azzam
08/20/2024, 4:08 PMAndrew Maturo
08/20/2024, 4:10 PMAlexander Azzam
08/20/2024, 4:17 PMAndrew Maturo
08/20/2024, 5:09 PM