-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Usage-based] Attribute workspace instances on start #10533
Comments
Another realization, the "attribution" information is more complex that just one field. A workspace instance needs to be attributed to:
|
I believe that the attribution must work as an immutable record at the start of the workspace. We mostly need to know the unique ID (if a team, or individual) who has promised to pay for this workspace. This information should be unrelated to Stripe as it would couple us to Stripe. |
Overnight thought: the If this is true, we might only need to store the "paying" |
Great feedback from @svenefftinge -- rather than attributing to a Team (and defaulting to the owner User if there is no attributed Team), it would nicer to create a dedicated "Cost Center" object. This would simplify the attribution model by making it more explicit (i.e. no implicit "Team or User if no Team" logic), and facilitate future attribution evolutions like:
Cost Center would make sense for SaaS and also for Self-Hosted (i.e. to define various Cost Centers and map to internal structure, observe usage by Cost Center, or manage quotas, etc) |
Is your feature request related to a problem? Please describe
In the context of usage-based billing (#9036), we've identified that it's important to immediately "attribute" a workspace instance to a project, and to a "customer" (i.e. a Team or a User) when the instance starts.
This cannot be done asynchronously / later on, because any of these relationships from instance to project/customer can change at any time:
Thus, it's important to determine and persist the attributed final customer/account every time a workspace instance is started.
Describe the behaviour you'd like
Attribution can be determined in various ways:
Once determined on instance start, this information could be persisted:
d_b_workspace_instance
(e.g.projectId?
, plususerId?
and/orteamId?
)Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: