Thread
#prefect-community
    s

    Sven Teresniak

    1 year ago
    I have 2 questions regarding the new
    prefect 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__
    )
    Michael Adkins

    Michael Adkins

    1 year ago
    1.
    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.
    s

    Sven Teresniak

    1 year ago
    Thanks! 🙂
    Michael Adkins

    Michael Adkins

    1 year ago
    @Marvin archive "What's the difference between
    prefect build
    ,
    prefect register
    , and
    flow.register?
    "
    Marvin

    Marvin

    1 year ago