From what I can see, it seems that registration ad...
# ask-community
t
From what I can see, it seems that registration adds/updates flows. I suppose I am looking more for a sync type process, so that old ones are also deleted.
k
Hey Thomas, this depends on the storage. For example, Git storage will always fetch from Git during runtime. If the registered metadata deviates too far from the code, you will get an error. You can also specify the same flow storage location so it gets overwritten
t
Sorry, I mean the registered flows on prefect cloud.
The flows seem to persist on the cloud, but I assume will fail if the code has changed
Maybe this is what you mean?
k
We do not persist Flow code on Cloud. We persist the location of that flow code, and then it gets retrieved during runtime. So you can use Git Storage or S3 Storage or Local Storage. It gets retrieved. Git specifically is easy to fall out of sync cuz you can register but not update Git or vice versa. So if the metadata (task graph) in the Flow does not match the one loaded from Storage, it will throw an error. Does that make more sense?
t
It does make sense, yes. That was my current understanding.
My concern was that the UI showing old flows, which is a bit confusing. I was looking to keep them in sync so that it is clear what is in production.
with airflow, for example, it is easy to keep the two synced
k
Ah I see, you can filter by version in the UI. In Prefect, I often see it paired with CI/CD to register after the code is changed.
t
Yes, I was thinking of doing something like that in the CI/CD. Do you have an example? Or can you point me in the right direction of what type of prefect functionality you mean?
k
The CI/CD is not Prefect functionality but what I can show you is the CLI docs that you can use to pair with your CD pipeline.
There is this article that might give a bit of insight
And there is also this Github discussion thread
t
ok, great.
I am using the register flow, but it seems there will be a bit of work to keep the two in sync.
I'll look through the docs.
Thanks for sharing
k
I think the Github thread is the best place to start