1187 Commits

Author SHA1 Message Date
Jan Keromnes
2afad515b2 [server] When a user with no explicit 'usageAttributionId' joins a team with usage-based billing enabled, automatically re-attribute usage to that team 2022-06-29 15:10:37 +05:30
Gero Posmyk-Leinemann
097abd8179 [server] Align workspaceLog access semantics 2022-06-29 13:17:37 +05:30
Gero Posmyk-Leinemann
5e212889ca [server] Introduce GuardedPrebuild and allow access akin to WorkspaceLog/Snapshots 2022-06-29 13:17:37 +05:30
Jan Keromnes
1945d6ca22 [server] When deleting a team with an active usage-based subscription, also cancel the subscription 2022-06-28 21:37:37 +05:30
Jan Keromnes
9593feff8b [server] Allow team members (non-owners) to read the team's usage-based subscription ID 2022-06-28 21:19:37 +05:30
Gero Posmyk-Leinemann
2ab9b97e31 [server] Minor Refactor for RepositoryResourceGuard 2022-06-28 20:28:37 +05:30
Gero Posmyk-Leinemann
67b73c29c2 [server] Minodr adjustment of requested resource kinds 2022-06-28 20:28:37 +05:30
Gero Posmyk-Leinemann
6d015197b5 [server] Add tests for workspace-like GuardedResources 2022-06-28 20:28:37 +05:30
Jan Keromnes
441252f261 [server] Introduce an explicit per-user 'usageAttributionId' and use it to implement 'billing-based attribution' 2022-06-27 19:41:36 +05:30
Adrien Thebo
2cc591a396 [installation-telemetry] Respect sendCustomerID admin setting
An errant `git rebase` accidentally merged in the customer ID into telemetry
data, bypassing a later check in telemetry collection that checked the `sendCustomerID`
field. This commit restores the appropriate check.
2022-06-27 19:11:36 +05:30
Gero Posmyk-Leinemann
09dbf29160 [db] Remove DeletedEntryGC and all references 2022-06-27 15:41:36 +05:30
Milan Pavlik
12b92e9b82 [experiments] Add abstraction for configcat to work in self-hosted 2022-06-27 13:10:36 +05:30
Adrien Thebo
55a5d7a5e2 [installation-telemetry] Expose user control over sending customer ID 2022-06-25 00:47:33 +05:30
Adrien Thebo
47bf5c5622 [installation-telemetry] Expose Customer ID field in telemetry 2022-06-25 00:47:33 +05:30
Pavel Tumik
7d005012a8 Add PVC support to prebuilds 2022-06-24 22:22:33 +05:30
Andrew Farries
5cc4e3d0b2 Return raw duration from getWorkspaceTimeout
Include the raw duration from getWorkspaceTimeout, ie in the format
'60m' before translation to 'short' or 'extended' etc.
2022-06-24 19:26:33 +05:30
Jan Keromnes
af5ef7a947 [server][dashboard] Disable 5 second delay before returning feature flag value
Co-authored-by: Milan Pavlik <milan@gitpod.io>
2022-06-24 17:06:33 +05:30
Sven Efftinge
8789ee721a [server] fix linting issue 2022-06-24 15:21:33 +05:30
Jan Keromnes
26b4f555f4 [server][dashboard] Allow teams to cancel and renew their usage-based subscription in Stripe 2022-06-24 14:55:33 +05:30
Jan Keromnes
59cbf53956 [gitpod-db][server] Refactor workspace instance 'attributedTeamId' to an explicit, not-team-specific 'usageAttributionId' 2022-06-24 14:38:33 +05:30
Alex Tugarev
9a9c01e7ea Avoid token renewal 30mins before time of expiry 2022-06-24 11:19:32 +05:30
Alex Tugarev
1bb3ff9a0d Add caching for pending token renewals 2022-06-24 11:19:32 +05:30
Jan Keromnes
6cc24e7cdf [server] Increase startWorkspace rate limit 1 → 3 starts per user per 10 seconds 2022-06-23 11:09:32 +05:30
Adrien Thebo
2e8366827c [installation-telemetry] Add licenseType to sent telemetry 2022-06-22 21:13:31 +05:30
Gero Posmyk-Leinemann
e97fd4ceec [server] Move DebugApp to protocol 2022-06-21 12:37:30 +05:30
Jan Keromnes
b93288865e [server] Make Stripe usage-based product price IDs configurable 2022-06-20 14:52:29 +05:30
Jan Keromnes
402894b63b [server] Attribute workspace usage to either the project's team, or default to the workspace owner 2022-06-16 12:58:25 +05:30
Thomas Schubart
e11e13ec79 Add team and project to workspace request 2022-06-15 21:43:25 +05:30
Alex Tugarev
769c7b2ff4 Listen on instance updates of a running prebuild
even if you are not the workspace owner.
2022-06-15 15:44:25 +05:30
Alex Tugarev
9f247ca70f [prebuild] cap updateables to be processed
Also, mark updatable as resolved if commit is gone.
2022-06-15 15:31:24 +05:30
Alex Tugarev
c2a621ef64 [server] add guards to adminGetLicense 2022-06-15 14:17:24 +05:30
jakobhero
39da48bca3 [Analytics] Mask PII from deleted Users 2022-06-15 11:08:24 +05:30
JenTing Hsiao
3cf4d854ec Fix typo
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-06-15 11:06:24 +05:30
Pavel Tumik
f0daee2047 add comments 2022-06-15 02:37:25 +05:30
Pavel Tumik
dc111f3996 add limit to volume snapshot GC 2022-06-15 02:37:25 +05:30
Pavel Tumik
7a7792f531 volume snapshot delete and restore support, garbage collection 2022-06-15 02:37:25 +05:30
Jan Keromnes
7bf63df2e9 [server][dashboard] When creating a new Stripe customer, also create a Usage-Based Subscription for them 2022-06-14 17:51:24 +05:30
Andrew Farries
f3680fe1a9 Configure server to use stripe secret 2022-06-13 21:32:23 +05:30
Jan Keromnes
610694cf72 [server][dashboard] Implement Stripe portal to allow usage-based customers to manage their subscription 2022-06-10 13:43:19 +05:30
Jan Keromnes
497741db84 [server][dashboard] Minor Stripe API clean-up 2022-06-09 21:22:19 +05:30
Jan Keromnes
12b58f4979 [server] Introduce and use a ErrorCodes.INTERNAL_SERVER_ERROR 2022-06-09 17:01:19 +05:30
Laurie T. Malau
6525911683 add metrics 2022-06-09 12:23:19 +05:30
Alex Tugarev
07f7d2e998 [gitlab] get rid of UnhandledPromiseRejectionWarning 2022-06-08 19:15:18 +05:30
André Duarte
3374a43a22 Add workspace class to workspace instance 2022-06-08 14:49:18 +05:30
Jan Keromnes
00c1085922 [server] Sanitize Stripe error messages sent by server 2022-06-08 14:27:18 +05:30
Jan Keromnes
71e5c8ea4e [server] Prevent Gitpod API users from testing usage-based billing without the feature flag 2022-06-08 14:27:18 +05:30
Jan Keromnes
585611c70e [server][dashboard] Allow teams to sign up for Usage-Based Billing via Stripe 2022-06-08 14:27:18 +05:30
Jan Keromnes
ee2eaf9450 [server] Implement a StripeService helper class 2022-06-08 14:27:18 +05:30
Jan Keromnes
f0b3ea6927 [server] When GitHub (Enterprise) sends webhooks without a host header, fall back to the hostname from the repository URL
Fixes "Unsupported GitHub Enterprise host: undefined"
2022-06-07 10:55:17 +05:30
Jan Keromnes
8459a4097d [server] Don't skip prebuilds if .gitpod.yml has a 'before' task but no 'init' task 2022-06-07 10:55:17 +05:30