53 Commits

Author SHA1 Message Date
Milan Pavlik
41dabf9619 [usage] Reduce log level for Fetching usage data log 2023-02-08 14:55:46 +01:00
Sven Efftinge
aaa0653d54 [ubp] reset usage on chargebee cancellation 2022-12-15 12:32:25 -03:00
Christian Weichel
478a75e744 Switch license to AGPL 2022-12-08 13:05:19 -03:00
Sven Efftinge
fcc42fe1a4 [usage] handle no stopping but stopped time 2022-12-06 12:38:17 -03:00
Sven Efftinge
a5d67448b2 Revert "[usage] handle reset usage for chargebee" 2022-12-02 11:47:01 -03:00
Sven Efftinge
2eead4a625 [usage] handle reset usage for chargebee
chargebee subscriptions that are cancelled get a dedicatd cost center
2022-11-30 09:08:00 -03:00
Sven Efftinge
7252b10b78 [usage] reduce possibility for races in ResetUsage 2022-11-28 11:02:57 -03:00
Sven Efftinge
e044c1d49f [admin] allow usage adjustments 2022-11-22 06:31:51 -03:00
Laurie T. Malau
ee08e7863c [db] Move db models to gitpod-db/go module 2022-11-21 08:37:50 -03:00
Sven Efftinge
89d0b7df3f [admin] add admin endpoints for usage 2022-11-18 12:57:47 +02:00
Jan Keromnes
e97e8e91b4 [usage] Address nits from https://github.com/gitpod-io/gitpod/pull/14485 2022-11-16 13:29:45 +02:00
Milan Pavlik
e4daab98a4 [common-go] Move base database connection & types to common-go 2022-11-16 10:59:45 +02:00
Jan Keromnes
77bb23fc5e [usage] Don't pass '0001-01-01T00:15:00Z' timestamps through the CostCenter API when it should be undefined 🙃 2022-11-11 13:32:41 +02:00
Jan Keromnes
56a4fe2895 [usage] Introduce an explicit CostCenter.BillingCycleStart time 2022-11-11 13:32:41 +02:00
Milan Pavlik
3c553500f0 [usage]Actually reset usage during ResetUsage RPC 2022-11-02 09:16:07 +01:00
Milan Pavlik
2ec4546105 [usage] List cost centers with expired billing time 2022-10-27 16:56:42 +02:00
Milan Pavlik
849170fedd [usage] Return CostCenter from SetCostCenter udpates - implementation 2022-10-12 11:41:27 +02:00
Sven Efftinge
5670a5500e [usage] show sum of usage not balance
fixes #13067
2022-09-23 10:03:24 +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
Sven Efftinge
2701ec7bdc [usage] added costcenter nextBillingTime 2022-09-15 19:18:16 +02:00
Milan Pavlik
c3673e3fdc [usage] Rename ReconcileUsageWithLedger to ReconcileUsage 2022-09-13 15:55:14 +02:00
Sven Efftinge
74bc751ec7 [cost center] Add save API 2022-09-09 11:25:24 +02:00
Milan Pavlik
51245afbd4 [usage] Include drafts when listing usage summary 2022-09-09 11:03:24 +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
c9ce4dd64b [usage] Serialize metadata into usage records 2022-09-06 16:31:21 +02:00
Milan Pavlik
db2688eb2d [usage] Drop big log message 2022-09-06 14:20: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
Alex Tugarev
a8d0889405 Add pagination to list usage 2022-08-31 15:14:16 +02:00
Milan Pavlik
dba77a55e6 [usage] Upload report with more details 2022-08-30 14:52: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
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
ff7c3d696d [usage] Change instance runtime calculation: creationTime → startedTime, stoppedTime → stoppingTime 2022-08-22 08:23:38 +02:00
Milan Pavlik
fc10f0b13a [usage] Implement CollectUsage 2022-08-02 08:53:46 -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
Andrew Farries
e2385352a4 [usage] Implement GetBilledUsage rpc 2022-07-18 13:57:13 +02:00