gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
12.9k stars 1.24k forks source link

Epic: Migrate all User Attribution to Team Attribution #15665

Closed svenefftinge closed 1 year ago

svenefftinge commented 1 year ago

In order to simplify the system and the user experience we have decided to remove the notion of usage attribution for individual accounts. This includes also no billing on individual accounts.

Instead, all users will be part of at least one team. If they are not a member of a team we will create a synthetic one.

Migration

Context

Summary

Let's simplify our UX by removing the possibility for individual accounts to act as cost centers, so that only teams have credits, billing, and attributed usage.

Context

We currently have the notion of “Personal Account” and “Teams” which forces us to have several concepts twice (usage, payment) and in slightly different notions and also makes it sometimes non-obvious where workspaces are accounted to. This makes our UX more complicated than needed.

Proposed solution

Automatically create a synthetic team (of one) for users that join Gitpod without an invite link (which would just add them to the team they are invited to). It should be a regular team and the team’s name is derived from the user’s name (e.g “Tim’s Team”).

Users would always work in the context of that team which owns all its resources (workspaces, projects, prebuilds) for all its users. In what team I’m in is determined by a persisted setting and I can switch it using a top level drop down (in case I’m a member of more than one team).

Attribution

When starting a workspace we attribute it to the selected team. Optional: in case the workspace belongs to a project that is part of one of my other teams, we should tell the user on workspace start and allow them to change the currently selected team.

Freemium / Trial

The free 500 credits per month will be attributed to the first team that a user creates. Additional invited users will not change the amount. This allows teams to try Gitpod with all its features.

In order to keep supporting the subsidised personal plan (1000 credits for 9USD) every pay-as-you-go subscription on teams will go with that price.

User Interface

The UI could like this:

image

Note that the selection of the team has moved to the right and with that becomes a global context with clear boundaries: Everything I do in Gitpod I do within this entity.

Decisions / Next Steps

We could approach this in the following steps:

1) Make a change (https://github.com/gitpod-io/gitpod/pull/15533) that will create a team (of one) for a user and migrates all of the user’s workspaces, projects, usage, and billing information. New users go through this migration as well, but in this case, most migration steps would be no-ops as there are no such resources. I would attempt to make this a lazy migration (i.e. happens when a user first interacts with Gitpod after the change). Make sure that all workspace instances are attributed to instances, based on the same logic we have now (personal account → team of one). In this step, we would already need to remove billing and usage from the personal account as this now lives under the team of one. A slow migration allows to granularly move users into this new situation, but adds additional complexity as we need to keep both logics functional.

2) Change the UI as proposed above 👆. Make the team selection sticky and remove the team slug in the URL (we can allow /t/<slug> or /t/<id>) to force setting the context, but I believe a query param would make more sense.

3) Git rid of the default billing account and instead enhance the out-of-credits screen with an option to start a workspace under a different team (that has credits).

gtsiolis commented 1 year ago

@svenefftinge This one should be good to close? Cc @geropl @atduarte

atduarte commented 1 year ago

@gtsiolis thanks! Keep them coming 😁