I'm trying out Prefect. Two questions: - I added ...
# prefect-community
w
I'm trying out Prefect. Two questions: • I added and registered a flow with a local server. It has caught my attention that when I re-add the exact same flow, a new 'version' is created. What is the best practice for adding a flow? Am I supposed to add it just once and again for updates? Or always before creating a new flor run? • What is the typical separation of concerns? Should I just call
create_flow_run
in the client, or should the client be doing anything else?
k
Yeah this is a known pain point of the current setup that versions are practically not really useful because you can’t “roll back” a version. So in Orion (Prefect 2.0), versions can be user supplied
So for current Core, I would say the rule of thumb is any change requires a re-registration and will bump up the version
If you have a flow of flows, you can use the
create_flow_run
task to trigger a subflow If you need to trigger a Flow from somewhere else like lambda,
client.create_flow_run
is good for that. If you can just add a schedule, then you don’t need this