36 Commits

Author SHA1 Message Date
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
8dcbb578db [usage] Refactor controller package into scheduler 2022-09-13 11:17:14 +02:00
Milan Pavlik
24c50d2e44 # This is a combination of 2 commits.
# This is the 1st commit message:

[usage] Refactor controller package into scheduler

# This is the commit message #2:

[usage] Refactor controller package into scheduler
2022-09-13 11:17:14 +02:00
Milan Pavlik
e85ad2a595 [usage] Remove unused config and functions 2022-09-12 08:35:13 +02:00
Milan Pavlik
9cab00ae89 [biling] Remove UpdateInvoices - old reconciler 2022-09-08 16:38:23 +02:00
Milan Pavlik
e937ca78e8 [usage] Remove old controller & report generator 2022-09-08 09:56:23 +02:00
Milan Pavlik
de49aa319b [billing] Trigger ReconcileInvoices in ledger reconciler 2022-09-07 13:42:22 +02:00
Milan Pavlik
a03681ac1d [usage] Implment ledger control loop 2022-09-06 06:13:21 +02:00
Milan Pavlik
a802c11018 [usage] Invoke ReconcileUsageWithLedger from controller 2022-09-05 12:03:20 +02:00
Milan Pavlik
754d0ebba9 [usage] Setup ledger reconciler tick 2022-09-02 13:53:17 +02:00
Milan Pavlik
2d0b1a1b1b [usage] Report upload/download metrics for usage report 2022-09-01 07:28:16 +02:00
Milan Pavlik
8b11db368b [usage] Fix content service nil pointer 2022-08-30 14:56:14 +02:00
Milan Pavlik
9df045e11c [usage] Fetch sessions from usage report instead of from RPC arguments 2022-08-30 11:00:14 +02:00
Milan Pavlik
5c4fe01d59 [usage] Disable controller when schedule is empty 2022-08-26 16:30:11 +02:00
Alex Tugarev
030c183993 Use upcoming invoice 2022-08-25 16:07:10 +02:00
Laurie T. Malau
0e3702e073 Implement setBilledSession 2022-08-11 09:15:55 +02:00
Andrew Farries
33b1603b64 Set client send and receive message sizes 2022-08-09 16:57:53 +02:00
Milan Pavlik
98715106f5 [usage] Add grpc client metrics, up max call sizes 2022-08-05 09:56:49 -03:00
Andrew Farries
9d72fb5df9 [usage] Add billInstancesAfter config setting
Add a new config setting to the usage component.

`billInstancesAfter` sets the date after which instances should be
considered for billing - instances started before `billInstancesAfter`
will not be considered by the billing controller.
2022-08-05 09:47:49 -03:00
Milan Pavlik
f88afd76e5 [usage] Fix max call send message size 2022-08-05 05:58:49 -03:00
Milan Pavlik
6390f20643 [billing] Report metrics on updated subscriptions 2022-08-04 12:52:48 -03:00
Milan Pavlik
bb0483c3e0 [usage] Self-connection allows up to 30MB in message response 2022-08-04 04:30:48 -03:00
Milan Pavlik
fc10f0b13a [usage] Implement CollectUsage 2022-08-02 08:53:46 -03:00
Andrew Farries
0805d02729 Delay gRPC self connection
The billing client tries to connect to the usage component gRPC server
before the gRPC server is ready. This is a non-fatal error as gRPC
dialing has built-in backoff/retry logic but it does produce ugly
warnings in the usage component logs.

Here we use a simple solution to delay the self-connection attempt for a
short period to give the gRPC server time to start.
2022-08-01 11:34:45 -03:00
Milan Pavlik
c4708b3048 [usage] Implement BillingService 2022-07-27 04:48:22 -03:00
Milan Pavlik
630b21e441 [usage] Remove pricer dependency from billing controller 2022-07-26 10:29:21 -03:00
Andrew Farries
01af2de26b Rename ContentServiceUrl to ContentServiceAddress 2022-07-25 05:56:20 -03:00
Andrew Farries
109a7a695d Create contentservice and pass to it to reconciler
When the usage component starts up.
2022-07-25 05:56:20 -03:00
Andrew Farries
e2385352a4 [usage] Implement GetBilledUsage rpc 2022-07-18 13:57:13 +02:00
Andrew Farries
6fb78e92ac Let the usage reconciler take a pricer
Instance pricing is a usage concern, not just a billing concern.
2022-07-15 16:29:02 +02:00
Milan Pavlik
48411d7cfb [usage] Workspace Pricer uses config 2022-07-13 08:49:59 +02:00
Andrew Farries
5932df564f Placeholder implementation of usage gRPC server 2022-07-11 13:50:58 +05:30
Andrew Farries
c83333fc3a Add usage-api component
Add Placeholder .proto files and script to generate Go client/server
SDKs.

Adapted from the `public-api` component.
2022-07-08 16:25:55 +05:30
Milan Pavlik
e8ab39e3e7 [usage] Use a config file to configure usage component 2022-07-04 20:44:51 +05:30
Milan Pavlik
e6602f7ffa [usage] Refactor server start into a function, specify config 2022-06-30 17:58:39 +05:30