Skip to content
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] When payment is enabled, attribute all workspace instance usage to an explicitly selected "billing account" #10901

Closed
Tracked by #9036
jankeromnes opened this issue Jun 24, 2022 · 0 comments · Fixed by #10893
Assignees
Labels
team: webapp Issue belongs to the WebApp team

Comments

@jankeromnes
Copy link
Contributor

jankeromnes commented Jun 24, 2022

Is your feature request related to a problem? Please describe

When payment is enabled, attribute all workspace instance usage to an explicitly selected "billing account".

Describe the behaviour you'd like

In #10533 and #10822, we've implemented a unique usage attribution ID for workspace instances, which attributes the instance's usage to either a user or a team.

This implemented "project-based attribution", which is the default attribution model we want e.g. in Self-Hosted:

Project-based attribution: If payments are not enabled (e.g. Self-Hosted), we attribute:
  - To the owner of the project (user or team), if the workspace is linked to a project
  - To the user, iff the workspace is not linked to a project

However, for usage-based billing, we want teams to be able to pay for 100% of their members' usage, regardless of whether their usage happens or a team project or something else (e.g. personal project, no project, ...).

For this, we need to implement "billing-based attribution", which we want for SaaS:

Billing-based attribution: If payments are enabled, we attribute all the user's usage to:
  - An explicitly selected billing account (e.g. a team with usage-based billing enabled)
  - Or, we default to the user for all usage (e.g. free tier or individual billing, regardless of project/team)

Describe alternatives you've considered

The alternative is to keep the "project-based attribution" like in Self-Hosted, where workspace instance usage gets attributed based on a project's ownership (regardless of billing status). We don't want this model when billing is enabled.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: webapp Issue belongs to the WebApp team
Projects
Archived in project
1 participant