-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ubp] add chargebee cost center on cancellation #15067
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
Conversation
@@ -4,30 +4,30 @@ | |||
* See License.enterprise.txt in the project root folder. | |||
*/ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for all the formatter changes. seems like this component didn't get the big formatting update last time.
7838674
to
2481e08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Code changes look good to me.
Now I'll try to test this and make sure I can't find any bugs. 🔍
|
||
readonly maxTeamSlotsOnCreation: number = !!process.env.TS_MAX_SLOTS_ON_CREATION ? parseInt(process.env.TS_MAX_SLOTS_ON_CREATION) : 1000; | ||
readonly maxTeamSlotsOnCreation: number = !!process.env.TS_MAX_SLOTS_ON_CREATION | ||
? parseInt(process.env.TS_MAX_SLOTS_ON_CREATION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: pre-existing unsafe parseInt
without a radix (can accidentally parse as octal or hex in some edge cases)
? parseInt(process.env.TS_MAX_SLOTS_ON_CREATION) | |
? parseInt(process.env.TS_MAX_SLOTS_ON_CREATION, 10) |
@svenefftinge Follow-up question: What did you have in mind regarding how this PR can be tested? (I see no "How to test" instructions and no PR preview, but I'm happy to help you set up a Chargebee webhook so that we can exercise the new code path once) |
started the job as gitpod-build-se-on-cancellation.2 because the annotations in the pull request description changed |
/werft run cert-issuer=letsencrypt recreate-preview 👍 started the job as gitpod-build-se-on-cancellation.3 |
Okay, we now have a preview environment with:
I was able to use it to test this PR. Here is what I did:
At this point, the
Eventually, the Chargebee cancellation came through, and I landed on the empty "Upgrade to pay-as-you-go" team billing page, as expected. 👍 However, nothing changed in
|
Another test, this time with an individual Chargebee plan:
|
2481e08
to
d46af89
Compare
28fceea
to
54b9a29
Compare
We decided to handle this maually in the admin dashboard #15055 |
Description
Create a chargebee cost center when the plan gets cancelled. This is so that our usage component treats any accumulated usage as covered and resets to a fresh UBP free plan at the endDate.
Related Issue(s)
Fixes #15055
How to test
Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh