Thread
#prefect-community
    Jeff Brainerd

    Jeff Brainerd

    1 year ago
    Hello 😛refect: team— qq on versioning flows:
    We currently use
    version_group_id
    when we register flows to differentiate the environment (i.e. prod, staging, etc). Not only do they run in separate environments, those flows all have separate version history as well. I see in the docs that
    version_group_id
    is deprecated. So what’s the best practice for differentiating flow groups for separate environments? Should we use the env as part of the flow name, e.g.
    my_flow_prod
    ? And if that’s the case, does Project + Name uniquely identify the flow? Thanks!
    Jim Crist-Harif

    Jim Crist-Harif

    1 year ago
    Hi Jeff, we're planning on deprecating
    version_group_id
    in favor of a similar mechanism, but that deprecation hasn't completed yet. See https://prefect-community.slack.com/archives/CL09KU1K7/p1608758775445500?thread_ts=1608756725.445100&cid=CL09KU1K7 for more info.
    As for your 2nd question, yes a project + flow name uniquely identifies a flow, so grouping by project may also work for your use case. Note that if you're using
    Local
    storage you'll need to explicitly specify a path (since the default path doesn't take the project into a ccount), but other than that things will work fine.
    (that linked thread above has some other ideas for how to version flows between environments you may be interested in)
    Amanda Wee

    Amanda Wee

    1 year ago
    @Jim Crist-Harif wait, so if I have two flows with the same name in the different projects with
    Local
    storage, and don't specify the path, they will use the same path and hence the flow registered later will "override" the flow registered earlier?
    Jim Crist-Harif

    Jim Crist-Harif

    1 year ago
    Currently yes (I view this as a bug though, see https://github.com/PrefectHQ/prefect/issues/3900). Cloud/server will register separate flows, but the actual flow storage in your local filesystem will overwrite the other flow since the file names collide.
    Amanda Wee

    Amanda Wee

    1 year ago
    Ohhhh! Now I understand why I am getting weird errors with some flows claiming that I may have changed the flow code without re-registering the flow.
    Jim Crist-Harif

    Jim Crist-Harif

    1 year ago
    Ah, yeah, that'd do it. Since this has bit two users now, I'll prioritize the fix for the next release.
    Amanda Wee

    Amanda Wee

    1 year ago
    Thanks, that's a huge help because I really couldn't figure out why my flows would work individually but fail when I did the combined setup.
    Jeff Brainerd

    Jeff Brainerd

    1 year ago
    Ok, thanks for the info @Jim Crist-Harif!