236 Commits

Author SHA1 Message Date
Milan Pavlik
3c553500f0 [usage]Actually reset usage during ResetUsage RPC 2022-11-02 09:16:07 +01:00
Laurie T. Malau
ee8354aa79 [usage] Implement CreateStripeSubscription 2022-11-01 16:15:06 +01:00
Milan Pavlik
4d1f29895c [usage] Start trigerring ResetUsage RPC 2022-10-31 14:13:05 +01:00
Milan Pavlik
2ec4546105 [usage] List cost centers with expired billing time 2022-10-27 16:56:42 +02:00
Milan Pavlik
7532f3c15f [usage] Setup usage reset job 2022-10-26 14:46:41 +02:00
Milan Pavlik
7a5f156f5a [usage] Configure Stripe Price IDs through installer 2022-10-25 21:53:40 +02:00
Milan Pavlik
8735238f00 [stripe] Populate Stripe Customers from searches, use as lookup 2022-10-20 13:50:35 +02:00
Milan Pavlik
0d566be29a [stripe] Store Stripe Customer in the db on creation 2022-10-20 09:37:35 +02:00
Manuel Alejandro de Brito Fontes
7da2ba7324 Update Caddy to v2.6.2 2022-10-19 20:58:34 +02:00
Milan Pavlik
7cbd71a27a [usage] Add StripeCustomer db model 2022-10-19 13:48:34 +02:00
Milan Pavlik
224c961883 [billing] Implement CreateStripeCustomer 2022-10-19 10:38:34 +02:00
Milan Pavlik
f626371eaf [usage] Validate spending limits in UpdateCostCenter 2022-10-13 14:00:29 +02:00
Milan Pavlik
849170fedd [usage] Return CostCenter from SetCostCenter udpates - implementation 2022-10-12 11:41:27 +02:00
Milan Pavlik
72a01c02f1 [stripe] Check for err when reporting stripe requests completed metric 2022-10-11 16:45:26 +02:00
Milan Pavlik
c8a7667c0d [usage] Report Stripe metrics without full request path 2022-10-11 13:50:26 +02:00
Milan Pavlik
c428154475 [stripe] Implement BillingService.GetStripeCustomer 2022-10-07 16:55:23 +02:00
Milan Pavlik
93fa97a5be [stripe] Add test for filtering out balances for Stripe Cost Centers 2022-10-05 17:59:21 +02:00
Milan Pavlik
269af7cd96 [stripe] Report metrics from client calls in Go 2022-10-05 14:06:20 +02:00
Milan Pavlik
ec9523701d [stripe] Fix inverted comparison 2022-10-05 13:13:20 +02:00
Manuel Alejandro de Brito Fontes
d5eb5815b5 Update to 1.19 2022-10-04 15:17:22 +02:00
Manuel Alejandro de Brito Fontes
3f6cbd07f1 Update go dependencies 2022-10-04 15:17:22 +02:00
Andrew Farries
83cb1c7a74 Make function output stable
Ensure that the `queriesForCustomersWithAttributionIDs` is stable by
sorting the the attributionIDs before mapping them to queries.

Iteration of map keys is not stable in Go.
2022-10-04 09:31:20 +02:00
Milan Pavlik
c031a86064 [usage] Handle Stripe customers with zero subscriptions 2022-10-04 09:30:20 +02:00
Milan Pavlik
865cc2c5a7 [usage] Simplify UpdateInvoices handling 2022-09-29 15:11:29 +02:00
Milan Pavlik
3d017c0951 [usage] Remove 'Get or create CostCenter' log 2022-09-29 10:16:29 +02:00
Christian Weichel
d6023c989a Revert "Switch to Go workspaces"
This reverts commit 6bc34cf17512cb0a10a3a6cce44141b1f06b624e.
2022-09-29 05:28:29 +02:00
Christian Weichel
174a09222f Revert "Run go work sync"
This reverts commit 6b23167e09f74062b31150d4044a8fe7cacbc34b.
2022-09-29 05:28:29 +02:00
Christian Weichel
6b23167e09 Run go work sync 2022-09-28 08:45:28 +02:00
Christian Weichel
6bc34cf175 Switch to Go workspaces 2022-09-28 08:45:28 +02:00
Milan Pavlik
4a2648eea8 Revert "[usage] Use DefaultClientOptions when creating grpc client connection"
This reverts commit 0f5d689ce5af15e87f2c16a82f644c66b531cbd4.
2022-09-23 10:40:23 +02:00
Sven Efftinge
5670a5500e [usage] show sum of usage not balance
fixes #13067
2022-09-23 10:03:24 +02:00
Milan Pavlik
0f5d689ce5 [usage] Use DefaultClientOptions when creating grpc client connection 2022-09-23 09:22:23 +02:00
Sven Efftinge
1b995ef47f [usage] introduce getBalance API 2022-09-23 07:34:23 +02:00
Milan Pavlik
c7efb44985 [usage] Use credit cents when computing listed usage balance 2022-09-21 14:57:22 +02:00
Milan Pavlik
6f461f5714 [baseserver] Track metrics for HTTP requests automatically 2022-09-20 09:05:21 +02:00
Sven Efftinge
4d35f4db8f [usage] remove unused GetUpcomingInvoice 2022-09-19 11:22:20 +02:00
Milan Pavlik
23419beead [usage] Remove BillingService.SetBilledSession proto 2022-09-16 17:20:17 +02:00
Sven Efftinge
22aa488131 Simplify deploying usage in preview 2022-09-16 16:24:17 +02:00
Sven Efftinge
65812bf67f [usage] implement CancelSubscription 2022-09-16 16:24:17 +02:00
Milan Pavlik
686963ba63 [usage] Fix stripe invoice finalization 2022-09-16 14:37:17 +02:00
Milan Pavlik
42224aeee9 [baseserver] Add metric with version of the server, use in public api and usage 2022-09-16 14:20:17 +02:00
Milan Pavlik
a26a070e45 [usage] Remove verbose log 'searching for customer with query' 2022-09-16 13:50:17 +02:00
Milan Pavlik
d9f460b6ee [billing] Remove implementation of SetBilledSession RPC 2022-09-16 13:16:18 +02:00
Sven Efftinge
2701ec7bdc [usage] added costcenter nextBillingTime 2022-09-15 19:18:16 +02:00
Milan Pavlik
f591c88da5 [usage] Run go mod tidy 2022-09-15 08:40:16 +02:00
Milan Pavlik
075d856f42 [usage] Track last compelted ledger job time 2022-09-15 08:23:16 +02:00
Milan Pavlik
08650a7b75 [usage] Remove stopped without stopping time detector, temporarily 2022-09-14 12:18:15 +02:00
Milan Pavlik
0d757c4cd3 [usage] Add periodic job to detect invalid workspace instances in usage 2022-09-14 10:08:15 +02:00
Milan Pavlik
936c4f2687 [usage] Remove unused WorkspaceInstanceUsage model 2022-09-14 09:07:15 +02:00
Milan Pavlik
c3673e3fdc [usage] Rename ReconcileUsageWithLedger to ReconcileUsage 2022-09-13 15:55:14 +02:00