Carlos Cueto
04/14/2022, 4:27 AMLocalRun
flow's working_dir
parameter. Whenever I specify the following:
flow.run_config = LocalRun(_working_dir_='C:/scripts/GetADUsers', _labels_=["SVRBIPTH01"])
Whenever I register the flow (I'm using Prefect 1.2.0 on MacOS python 3.10) I get the following working_dir on the UI of Prefect Cloud:
/Users/carloscueto/Documents/Python_Scripts/Prefect-Flows/PowerShell/GetADUsers/C:/scripts/GetADUsers
It seems to be adding the path from where I register the script from (on the local machine) to the working_dir string I specified on the run_config.
Has anybody encountered this before? Everything works fine when I register the flow from a Windows computer.Kevin Kho
stored_as_script=True
and point to the path
with LocalStorageAnna Geller
from prefect import task, Flow
@task(log_stdout=True)
def hello_world():
print("hello world")
with Flow("hello") as flow:
hw = hello_world()
then register via CLI:
prefect register --project xxx -p hw.py
this will automatically add storage and run config host name labelsCarlos Cueto
04/14/2022, 12:51 PMKevin Kho
Sohail Ali
05/19/2022, 8:39 PMKevin Kho
Sohail Ali
05/19/2022, 8:45 PMKevin Kho
Sohail Ali
05/19/2022, 8:48 PMKevin Kho
Sohail Ali
05/19/2022, 8:58 PMKevin Kho