Q
10/05/2022, 12:42 PMprojname/flows/myflow.py
imports projname.utils.utilfunc
).
This flow is scheduled from a deployment and uses Process
as its infrastructure block.
I would like to ensure that the latest version of projname
is installed (to guarantee that utilfunc
is up-to-date), so I can't install the package when setting up agent environment.
I think I can install the package before running the flow if I set Process.command
to something like ["pip", "install", ".", "&&", "python3", "-m", "prefect.engine"]
, but maybe there's a better way to go about it?Khuyen Tran
10/05/2022, 1:36 PMQ
10/05/2022, 3:59 PMshell=True
.shell=True
if isinstance(command, str)
, but currently command is restricted to List[str]
.prefect.engine
.
So there's no way to do something that involves source files before running python3 -m prefect.engine
and I don't think there's a way to modify what happens there.
Welp.Khuyen Tran
10/10/2022, 7:03 PM["pip", "install", ".", "&&", "python3", "-m", "prefect.engine"]
doesn’t work?Q
10/10/2022, 7:49 PMshell=False
is command=["/bin/bash", "-c", "cmd1 args1 && cmd2 args2"]
Doesn't really solve my problem, but figured that out at least.