Is there anyway when you register a flow to not cr...
# prefect-community
Is there anyway when you register a flow to not create a new version if nothing has changed?
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?
Hello @Ben Davison! Every time you register a flow with the same name, Prefect will create a
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
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
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
I see, thank you for elaborating.