You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix up how we trigger the sending of the usage report into Stripe. Currently it's done inside the ReconcileTimeRange This currently causes tests to report
[ERROR] Request error from Stripe (status 401): {"status":401,"message":"You did not provide an API key.
What we want is something akin to a pipeline.
Generate the report and return it. This completes the usage controller "data munching"
(later) Store it.
Pass it onto a Billing Controller.
In practice, it should be possible to succeed the usage report, but fail the Stripe update (for example for Stripe outage reasons)
The text was updated successfully, but these errors were encountered:
Investigating this further, the easiest seems to actually introduce the following Services and RPCs:
UsageService.CollectUsage()
BillingService.UpdateInvoices()
These two are then responsible for performing the respective parts of the control loops, can be invoked remotely but in the common case, are invoked periodically by the cron in the controller.
Doing so also gives us a couple of benefits:
Improved observability of either task, as we can piggy back on gRPC observability
When we need to sync explicitly, we can do so over an RPC
Makes it possible to in the future decouple the RPC trigger from the implementation - k8s cron
Fix up how we trigger the sending of the usage report into Stripe. Currently it's done inside the ReconcileTimeRange This currently causes tests to report
[ERROR] Request error from Stripe (status 401): {"status":401,"message":"You did not provide an API key.
What we want is something akin to a pipeline.
Generate the report and return it. This completes the usage controller "data munching"
(later) Store it.
Pass it onto a Billing Controller.
In practice, it should be possible to succeed the usage report, but fail the Stripe update (for example for Stripe outage reasons)
The text was updated successfully, but these errors were encountered: