John Muehlhausen
01/25/2024, 8:56 PMprefect deployment build
seems to want?
Specifically I want to create a deployment that uses an existing flow in a particular work pool with the flow parameters given for the deployment similar to a "Custom Run" in the Cloud UI. And of course set the schedule etc.John Muehlhausen
01/26/2024, 12:04 AMJessica Smith
01/26/2024, 1:27 PMJohn Muehlhausen
01/26/2024, 9:16 PMprefect deployment build \
--name deployment-name \
--pool work-pool \
--infra process \
--skip-upload \
--timezone 'America/New_York' \
--cron '0 2 * * 1-5' `# 2am mon-fri` \
--apply `# install this deployment in cloud` \
`# skip this due to --apply: --output out.yaml` \
--storage-block 'remote-file-system/code-storage' \
`# any necessary --param` \
`# entrypoint:` \
flow.py:flow_func
@Jessica Smith it seems as if the above command should not need flow.py to exist in the working directory where the command is run, for the following reasons:
• skip-upload/storage-block, the code is already in the storage block, which is named
• unless I'm misunderstanding something, all the deployment needs to do is tell the worker where to get the code (storage-block) and what to run once it is in hand (entrypoint).
So why does flow.py need to be accessible to run this command?John Muehlhausen
01/26/2024, 9:39 PM# flow.py
from prefect import flow
@flow
# if real func has args
# seems like we can skip them here
def flow_func():
pass
It seems as if a stub flow.py is enough, so I'm pretty sure the command could be changed to not require it at allBring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by