Milan Pavlik
9cab00ae89
[biling] Remove UpdateInvoices - old reconciler
2022-09-08 16:38:23 +02:00
Milan Pavlik
9f132579bc
[usage] Fix negative credits
2022-09-08 16:26:23 +02:00
Milan Pavlik
0a8e3dcbd3
[usage] Ignore running instances before August 2022
2022-09-08 13:35:23 +02:00
Milan Pavlik
cd087fe9f0
[usage] Instantiate now after we've collected all usage data
2022-09-08 11:01:23 +02:00
Milan Pavlik
e937ca78e8
[usage] Remove old controller & report generator
2022-09-08 09:56:23 +02:00
Sven Efftinge
5e72785abc
[usage] remove ListBilledUsage API
2022-09-08 08:54:23 +02:00
Sven Efftinge
249a563c48
[dashboard] Use new usage API for team-usage
2022-09-07 19:00:22 +02:00
Sven Efftinge
1fe5162c9f
[usage] store more data for in usage entry
2022-09-07 17:10:22 +02:00
Milan Pavlik
52279b12ab
[billing] Implement ReconcileInvoices
2022-09-07 14:34:22 +02:00
Milan Pavlik
de49aa319b
[billing] Trigger ReconcileInvoices in ledger reconciler
2022-09-07 13:42:22 +02:00
Milan Pavlik
9cd730ebdb
[billing] Implement FinalizeInvoice with usage ledger
2022-09-07 12:46:22 +02:00
Milan Pavlik
7a5443ed4a
[usage] Exclude workspace instances without a startedTime
2022-09-07 09:29:22 +02:00
Milan Pavlik
c9ce4dd64b
[usage] Serialize metadata into usage records
2022-09-06 16:31:21 +02:00
Milan Pavlik
eb9b5799f6
[usage] Filter out not started workspace instances
2022-09-06 16:00:21 +02:00
Milan Pavlik
db2688eb2d
[usage] Drop big log message
2022-09-06 14:20:21 +02:00
Milan Pavlik
3328f5783b
[usage] Cleanup usage records after test
2022-09-06 12:35:21 +02:00
Milan Pavlik
d70b54d2db
[usage] Save inserted and updated records in the DB
2022-09-06 11:44:21 +02:00
Sven Efftinge
29388c9764
Added API call to fetch usage data
2022-09-06 09:04:21 +02:00
Milan Pavlik
a03681ac1d
[usage] Implment ledger control loop
2022-09-06 06:13:21 +02:00
Milan Pavlik
536a13dc18
[usage] Find running and stopped instances in ledger reconciler
2022-09-05 13:52:20 +02:00
Sven Efftinge
ba687e5c23
[usage] more workspace instance fetch methods
2022-09-05 11:26:09 +02:00
Milan Pavlik
754a4db44d
[usage] Drop raw sessions from usage report to cut size in half
2022-09-01 07:32:16 +02:00
Milan Pavlik
1c3090f88e
[usage] Fix test for listing usage with pagination
2022-08-31 21:58:16 +02:00
Milan Pavlik
28f6980a26
[stripe] Handle invoice finalization
2022-08-31 16:06:16 +02:00
Alex Tugarev
a8d0889405
Add pagination to list usage
2022-08-31 15:14:16 +02:00
Milan Pavlik
8b11db368b
[usage] Fix content service nil pointer
2022-08-30 14:56:14 +02:00
Milan Pavlik
dba77a55e6
[usage] Upload report with more details
2022-08-30 14:52:15 +02:00
Milan Pavlik
33c613c5da
[stripe] Set reportId on invoices after updating credits
2022-08-30 11:36:15 +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
8d009263e1
[billing] Set report ID on Invoices when updating usage credits
2022-08-26 13:40:11 +02:00
Alex Tugarev
030c183993
Use upcoming invoice
2022-08-25 16:07:10 +02:00
Laurie T. Malau
8b201eea37
Get CostCenter
2022-08-25 11:13:41 +02:00
Milan Pavlik
9a7119d05d
[usage] Return report_id from ReconcileUsage RPC
2022-08-24 10:34:40 +02:00
Jan Keromnes
a2cf9d343b
[usage] In tests, use slightly different creation/started times and stopping/stopped time
2022-08-22 08:23:38 +02:00
Jan Keromnes
ff7c3d696d
[usage] Change instance runtime calculation: creationTime → startedTime, stoppedTime → stoppingTime
2022-08-22 08:23:38 +02:00
Gero Posmyk-Leinemann
d186e8342f
[usage] Review comments
2022-08-18 09:47:34 +02:00
Gero Posmyk-Leinemann
c3cd684930
[usage] Test for and fix negative credits in GenerateUsageReport
2022-08-18 09:47:34 +02:00
Laurie T. Malau
87fbe606ea
Fix return
2022-08-12 13:08:29 +02:00
Laurie T. Malau
0e3702e073
Implement setBilledSession
2022-08-11 09:15:55 +02:00
Andrew Farries
8a8d2eab6d
Add placeholder implementation of FinalizeInvoice
2022-08-10 14:48:54 +02:00
Andrew Farries
84f77d2340
Test billingService can receive large messages
...
Add a test to ensure that the gRPC server can receive very large message
payloads.
Use the billing RPC service `UpdateInvoices` RPC as the RPC to call as
that is the one we see failing in production.
2022-08-09 16:57:53 +02: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
fc10f0b13a
[usage] Implement CollectUsage
2022-08-02 08:53:46 -03:00
Milan Pavlik
c4708b3048
[usage] Implement BillingService
2022-07-27 04:48:22 -03:00
Milan Pavlik
c582420eb0
[usage] Fix BilledSession credits precision
2022-07-27 04:11:21 -03:00
Milan Pavlik
2b6778bcd9
[usage] Implement ordering
2022-07-25 06:59:20 -03:00
Milan Pavlik
fd0b758c90
[usage] By default sort results descending
2022-07-22 11:47:17 -03:00
Milan Pavlik
0674341b6c
[usage] ListUsage filters by time range
2022-07-22 06:57:17 -03:00
Milan Pavlik
2946bee541
[usage] Store workspace, project, type & class
2022-07-19 15:24:14 +02:00
Milan Pavlik
3fd02a710a
[usage] Return extra fields for ListBilledUsage
2022-07-19 09:06:14 +02:00