Skip to content

[server] Only try to delete Stripe subscription if the user's BillingMode is "usage-based" #17318

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 2 commits into from
Apr 24, 2023

Conversation

geropl
Copy link
Member

@geropl geropl commented Apr 21, 2023

Description

Related Issue(s)

Fixes WEB-191

How to test

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options:

  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • analytics=segment
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

/hold

@geropl geropl requested a review from a team April 21, 2023 13:00
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Apr 21, 2023
@roboquat roboquat added size/M and removed size/XS labels Apr 24, 2023
}
}

protected async cancelSubscription(subscriptionId: string): Promise<void> {
Copy link
Member

Choose a reason for hiding this comment

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

Ah, this is a remnant of our split brain dealing with Stripe.

On usage, there's CancelSubscription which would ideally handle every detail of this, such that it can be uniformly called.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, totally agree that we should fold this code into the usage side.
So far I've refrained because I'm waiting for authN. But we could also do it earlier, too! Maybe out of scope for this PR, though.

@geropl
Copy link
Member Author

geropl commented Apr 24, 2023

/unhold

@roboquat roboquat merged commit 0a1ea38 into main Apr 24, 2023
@roboquat roboquat deleted the gpl/user-delete-sub branch April 24, 2023 09:08
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels May 15, 2023
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 size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants