https://prefect.io logo
Title
j

james.lamb

07/17/2020, 4:25 PM
Hello from Chicago! 👋 Could someone confirm the right mental model for uniqueness in Prefect Cloud? • `project`: name is unique across all projects within a tenant, id is globally unique across all of prefect cloud • `flow`: name is unique across all flows within a project, id is globally unique across all of prefect cloud • `tenant`: id is globally unique across all of prefect cloud I'm writing stuff that interacts with Prefect Cloud, and I want to be sure that my assumptions here are correct. So, for example, I want to be sure that two flows called
c00l-flow
could exist in the same tenant, as long as they are in different projects. thanks!
👀 1
n

nicholas

07/17/2020, 4:32 PM
You're correct @james.lamb - that's the right way to think about organization; if you're running into any frictions/see any UI improvements to how you're interacting with these flows and projects, let us know!
j

james.lamb

07/17/2020, 4:33 PM
cool, cool thank you!
does the flow's
id
change every time the version changes? Otherwise I'm struggling to understand a result like this
that is two entries for "flow" with the same name, in the same project, in the same tenant
n

nicholas

07/17/2020, 5:05 PM
That's correct @james.lamb - the previous entity is maintained to partition things like run history, logs etc. For a consistent ID, you'll want to use the flow's
flow_group_id
j

james.lamb

07/17/2020, 5:10 PM
oh interesting. I did not know about that and it's surprising to me. As far as I can tell,
flow_group_id
isn't mentioned in the docs. For example, these docs are by `id`: https://docs.prefect.io/orchestration/concepts/flows.html#graphql-2 Is there somewhere in the docs where I could have learned about this field? If I hadn't checked that response I would have made a bad assumption about the data model, and I think others might come to that same conclusion.
I do see that the
flow_group_id
is the same across that example I showed, so that's doing what I'd expect!
n

nicholas

07/17/2020, 5:12 PM
That was a somewhat recent refactoring of Cloud, to create a more robust version group; agreed this needs to be added to the docs though, I'll open a ticket from this thread 🙂
🐛 1
:thank-you: 1
j

james.lamb

07/17/2020, 5:14 PM
By default, flows with the same name in the same Project will be given the same 
version_group_id
 and are considered "versions" of each other.
So what is the difference between
version_group_id
and
flow_group_id
?
n

nicholas

07/17/2020, 5:16 PM
Version group id is the old entity, which should be removed at some point in the future. The version group didn't have a proper model in the database, so the flow group took its place.
j

james.lamb

07/17/2020, 5:17 PM
ahhh ok, got it. I'll start using
flow_group_id
, thanks!
🚀 1
thanks for the quick response and having this Slack! I wish other open source projects had communities that were this supportive!
n

nicholas

07/17/2020, 5:18 PM
Glad you're finding it helpful!