https://prefect.io logo
e

Emma Willemsma

10/13/2020, 7:36 PM
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
j

Jim Crist-Harif

10/13/2020, 7:55 PM
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
S3
storage, you could use the version as part of the
key
, for
Docker
storage it could be part of the
image_tag
, etc... This will show up in the UI and be stored with the flow as metadata.
šŸ‘€ 1
upvote 2
e

Emma Willemsma

10/13/2020, 9:31 PM
Oh that works, thank you!