https://prefect.io logo
Title
b

Ben Davison

06/15/2020, 4:34 PM
Is there anyway when you register a flow to not create a new version if nothing has changed?
r

Rafal

06/15/2020, 4:38 PM
I would like to link to topic. Similar question. What is the best approach when I am changing task code? How to refresh it on prefect GUI and update version of task?
k

Kyle Moon-Wright

06/15/2020, 4:45 PM
Hello @Ben Davison! Every time you register a flow with the same name, Prefect will create a
flow_id
for that newly registered flow to set as the active flow version of that group. So if I’m not mistaken, you’d need to register your new flow with the same
flow_id
as your latest flow in that version group. I am curious as to your use case however, why do you not want to create a new version of your flow?
@Rafal I think typically users will re-register their flows to update their tasks to reflect their latest changes.
👍 1
b

Ben Davison

06/15/2020, 4:51 PM
Hi Kyle, thanks for the reply. My use case is actually around CI/CD -- say for example we have 5 flows in our codebase and we only make a change to one of those flows. We'll be reregistering the other four flows without changing anything. We are kind of working around it by using
git diff
in our pipelines to work out if a flow file has changed. But, if we have a multistage docker flow, we'll have the exact same problem where flows will be reregister with new versions without any changes.
✔️ 1
k

Kyle Moon-Wright

06/15/2020, 5:01 PM
I see, thank you for elaborating.