Skip to content

[ubp] allow usage of team without stripe sub #15159

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

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

svenefftinge
Copy link
Member

@svenefftinge svenefftinge commented Dec 5, 2022

Description

This change removes the requirement for a team to have an active stripe subscription in order to see their balance and start workspaces.

It only depends on whether they have credits available. This change allows to grant a spending limit and/or credits to teams that are still on the internal other strategy.

Screenshot 2022-12-05 at 16 00 17

Related Issue(s)

Fixes #15137

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-payment
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-sefftinge-ubp-unbilled-teams-with-15137.1 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat added the size/S label Dec 5, 2022
@svenefftinge svenefftinge force-pushed the sefftinge/ubp-unbilled-teams-with-15137 branch from eca4739 to b7b045f Compare December 5, 2022 13:48
@svenefftinge svenefftinge marked this pull request as ready for review December 5, 2022 14:59
@svenefftinge svenefftinge requested a review from a team December 5, 2022 14:59
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Dec 5, 2022
Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @svenefftinge!

So I guess we now always show the "Balance" UI also for Teams (even when they don't have any credits):

0 credit limit (default for teams without sub) credit limit almost used up
Screenshot 2022-12-06 at 09 03 32 Screenshot 2022-12-06 at 09 25 02

Side note: This is a pre-existing change, but I still have a hard time reading the "reverse progress bar" that's showing "remaining balance" instead of just "credits consumed".

  • When the credit limit is 0, it shows a full progress bar (i.e. "everything remains"), while I would expect an empty progress bar instead (i.e. "nothing remains")
  • Also, over time as you consume credits, the progress bar goes from full to empty, i.e. it "shrinks" from right to left 🙈 I find this super confusing

So, the new supported behavior with this PR is:

  1. Take a team without a Stripe subscription
  2. Increase its monthly limit via Admin
  3. The team is now able to take attribution for its own projects 🙌

Caveats:

  • Still, once a team has an altered limit, users can not default their own attribution to that team in their /billing section (teams still need a subscription to be a default attribution)
  • Also, once your altered team has reached its limit, you can still start new workspaces for that team's project -- it's just that the new workspaces will silently re-attribute to the user instead of the team (I found that a little confusing)

/hold for the caveats, but approving because this works as advertised and allows granting more resources to a team

Cc @jldec and @gtsiolis because this makes Team Billing always show the "Balance" UI, even when they don't have a subscription (small UX change)

@svenefftinge
Copy link
Member Author

/unhold

will take care of the caveats in follow up

@roboquat roboquat merged commit 7797eb5 into main Dec 6, 2022
@roboquat roboquat deleted the sefftinge/ubp-unbilled-teams-with-15137 branch December 6, 2022 08:36
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UBP] Unbilled teams with available credits should attribute usage to the team
4 participants