236 Commits

Author SHA1 Message Date
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
Jan Keromnes
7a23e97cf6 [server][dashboard][protocol] Remove deprecated Project DB config feature 2022-09-13 07:50:14 +02:00
Milan Pavlik
e85ad2a595 [usage] Remove unused config and functions 2022-09-12 08:35:13 +02:00
Sven Efftinge
343c462098 [usage] added a test for ListUsage 2022-09-09 12:26:24 +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
43e526b1d6 [stripe] Finalized invoce debits, do not set credits to negative when updating 2022-09-09 09:27:24 +02:00
Milan Pavlik
066b577b6d [usage] Remove unused RPCs from proto 2022-09-09 07:19:23 +02:00
Milan Pavlik
9329939388 [stripe] Use attributionId in stripe queries 2022-09-09 07:18:23 +02:00
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
Sven Efftinge
a2ee46bba7 [usage] make tests robust
... against parallel DB changes
2022-09-08 12:31: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
2882e7ede4 [usage] Add listing of credit balance 2022-09-07 07:48: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
e01c880447 Added API call to fetch usage data 2022-09-06 09:58: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
Milan Pavlik
a802c11018 [usage] Invoke ReconcileUsageWithLedger from controller 2022-09-05 12:03:20 +02:00
Sven Efftinge
ba687e5c23 [usage] more workspace instance fetch methods 2022-09-05 11:26:09 +02:00
Sven Efftinge
f1c4783096 [usage] store and fetch usage entries 2022-09-05 11:26:09 +02:00
Milan Pavlik
754d0ebba9 [usage] Setup ledger reconciler tick 2022-09-02 13:53:17 +02:00
Sven Efftinge
f54482b8c3 Added Usage table 2022-09-02 11:33:17 +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
2d0b1a1b1b [usage] Report upload/download metrics for usage report 2022-09-01 07:28:16 +02:00
Milan Pavlik
1c3090f88e [usage] Fix test for listing usage with pagination 2022-08-31 21:58:16 +02:00
Milan Pavlik
4b134683bc [billing] Fix usage report download 2022-08-31 21:57: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
dd6cdf96ec [usage] Fix report to JSON conversion 2022-08-31 14:39:16 +02:00
Milan Pavlik
7bc22735ea [usage] Normalize json keys in report 2022-08-30 15:19:15 +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