Lana Dann
12/02/2021, 9:20 PMPYTHONPATH
for storage? for context, i’m using gitlab storage for my flow and flows are in lib/flows
but when the flow tries to run, it errors with ModuleNotFoundError: No module named 'lib'
when the flow tries to access the storage.Kevin Kho
12/02/2021, 9:20 PMLana Dann
12/02/2021, 9:21 PMKevin Kho
12/02/2021, 9:23 PMLana Dann
12/02/2021, 9:33 PMKevin Kho
12/02/2021, 9:36 PMECSRun(image=…)
and the agent starts a new ECS container with that image and then gets the Flow from storage and runs it on topLana Dann
12/02/2021, 9:43 PMflow
container and then executes the flow. is that correct?Kevin Kho
12/02/2021, 9:48 PMprefect execute flow
as a CLI command in the container to start the flow run.
PYTHONPATH
is not a storage thing (unless you use Docker storage). The script based storages like Github or S3 just hold the flow code and that flow code is pulled down when the flow is executed. The PYTHONPATH
has to go on the execution environment (the container)Lana Dann
12/02/2021, 9:53 PMconstants.py
file that i import in my flow? does that also get copied over?Kevin Kho
12/02/2021, 9:55 PMcloudpickle
did not support deep copying of Python modules (until very recently). With the cloudpickle
development this experience might be improved, but that is definitely a Prefect 2.0 thing.
So yes, only the flow file is copied over by default and the dependencies need to be added to the execution environment (through the container)