Hey friends, I'm looking for some guidance on vers...
# prefect-community
Hey friends, I'm looking for some guidance on versioning flows. I like the way flows are up-versioned when they get registered to Prefect Cloud and older versions are automatically archived. However, I want to be able to trace a flow version to its code in github and I'm not sure the best way to do that. We tag our commits with version strings, so I just need to be able to add that information to the flow somehow. Options I've thought of: ā€¢ Can I add some kind of tag when registering my flow? I know there are labels, but as far as I understand the labels are just for linking flows with agents. I haven't seen anything about being able to add other types of tags. ā€¢ Can I override the auto-incremented version number so it matches our version string? Again I haven't seen how to do this in the docs. ā€¢ Can/should I add our version string to the flow name? It sounds like I can set a common version group id for each new version of my flow so that even though they're named differently, Prefect Cloud will still consider them to be versions of each other. However, the docs also say that version group ids are deprecated, so I'm not sure that's the right thing to use. How are other people handling this?
šŸ‘€ 1
Hi Emma, this is definitely a common ask. For now the pattern we've been recommending is adding the version string you want to the storage you're using. For example, if using
storage, you could use the version as part of the
, for
storage it could be part of the
, etc... This will show up in the UI and be stored with the flow as metadata.
šŸ‘€ 1
upvote 2
Oh that works, thank you!