Sven Teresniak
04/13/2021, 11:45 AMprefect register
:
1. What is the purpose of prefect build
? I think I understand what it does. But when do I want to use prefect build
+ prefect register --json
ever?
2. Is there any difference between prefect register -p flow.py
on a flow file and calling flow.register(…)
as part of a python flow.py
call? The latter seems much more dynamic (e.g. do some initialization/behaviour changes in __main__
)Zanie
prefect build
exists so you can decouple the flow storage push step from the registration step. We use this for our documentation examples so users can register flows that we've built and pushed to a github repo without them having to touch the source code.
2. There are some minor differences. prefect register
uses an idempotency key by default. If no storage is defined and you give a script path to register, we'll setup local storage for you. Similarly we'll setup module storage if given a module path to register. It should be equivalent in most cases, it's just making things easier to get going for new users.Sven Teresniak
04/13/2021, 2:38 PMZanie
prefect build
, prefect register
, and flow.register?
"Marvin
04/14/2021, 2:02 AM