-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[usage] Implement BillingService #11655
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
9f59205
to
65aaa25
Compare
283117f
to
c8bed3e
Compare
c8bed3e
to
f905ecf
Compare
/werft run with-preview with-billing 👍 started the job as gitpod-build-mp-usage-billing-service-impl.7 |
started the job as gitpod-build-mp-usage-billing-service-impl.8 because the annotations in the pull request description changed |
f905ecf
to
a84798d
Compare
a508cee
to
492699c
Compare
/werft run with-preview with-billing 👍 started the job as gitpod-build-mp-usage-billing-service-impl.13 |
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.
/hold for one extra test
492699c
to
1fd7237
Compare
/hold |
/unhold |
FYI, this looks like it's failing to establish the gRPC connection to itself in staging:
|
although, after restarting the pod it seems fine 🤷 |
Will take a closer look. It's possible it's a race condition between the server starting and the connection. |
I made #11743 to track the race at startup. |
Description
Implements
UpdateInvoices
RPC onBillingService
.There are 2 implementations:
stripe.Client
With this PR, the flow changes to the following:
BillingController
, theBillingService.UpdateInvoices(sessions)
is invoked over a grpc self-connectionBehaviour of the component remains unchanged. Tests are updated to move to the corresponding parts.
The benefit of using na RPC is that we get metrics for the RPCs but also we incrementally decouple the UsageController from the Billing one. In subsequent PRs, a similar RPC will be introduced for collecting Usage and these two RPCs will then be chained. We started with Billing as it's easier to do initially and reduces the size of subsequent PRs. If you want to see how this looks, here's a PoC which converts both.
Related Issue(s)
Relates to #10785
How to test
Unit tests
Preview
Release Notes
Documentation
Werft options: