Hello again! When using server, as I use `register...
# ask-community
g
Hello again! When using server, as I use
register
, all my new or modified flows get registered fine. On the other side, some flows I've deleted are still registered on my server. Is there a way of syncing these?
a
@Gabriel Milan 1. How did you delete the flows? Could it be that you deleted only flow runs, but not the underlying flows? 2. How do you register? using flow.run(), using prefect register CLI or in some other way?
g
1. I'm deleting the actual code for the flow 2. I'm registering using the CLI:
prefect register --project someproject -p pipelines_dir/
we're trying to set up CD. currently, we have this template https://github.com/prefeitura-rio/pipelines
a
if you only delete the flow code from the pipelines_dir, it will have the effect that those deleted flows won’t be reregistered, but if they have already been registered in the past and haven’t been deleted, they will persist. You would need to explicitly delete those flows using a GraphQL mutation, or if all those flows are in a specific project, you can delete the entire project and this will also delete the flows from that project
g
even if I build JSON or something, it won't be able to tell that I've deleted the flow?
a
afaik, as long as a flow has been registered, you would need to explicitly delete it if you want this flow to be deleted. There is no “prefect unregister” command currently. Even an “old” no longer used flow can provide useful metadata and flow history for debugging various data issues so this behavior makes sense in most cases. But I understand that unregister could be useful.
upvote 1
g
I see. thanks again!