271 Commits

Author SHA1 Message Date
Jan Keromnes
9519ee4385 [db][usage] Add d_b_billed_session table migration and Go definitions
Co-authored-by: Laurie T. Malau <laurie@gitpod.io>
2022-08-04 09:26:48 -03:00
Alex Tugarev
07c3e72290 Fix persistence of usageAttributionId 2022-07-21 12:50:16 -03:00
Alex Tugarev
472f0b71e0 Move usageAttributionId 2022-07-21 08:55:16 -03:00
Thomas Schubart
4f6a5b576c Incorporate review feedback
- Use latest workspace instance to set workspace class
- Add more detailed configuration for workspace classes
- Make workspace classes configurable in installer
2022-07-21 05:10:16 -03:00
Thomas Schubart
c16b43ca5b [gitpod-db] Add class column to workspace table 2022-07-21 05:10:16 -03:00
Gero Posmyk-Leinemann
b6471fdfb3 [server, db] Fix BlockedRepository.delete 2022-07-20 09:05:15 -03:00
Alex Tugarev
7057101a4d [db][protocol] Implement a CostCenter entity to attribute workspace usage to 2022-07-20 04:05:15 -03:00
Andrew Farries
d5987afa17 Move migration file to correct dir 2022-07-19 08:42:14 +02:00
Alex Tugarev
4ef9f0d43b Add mising db-sync config for d_b_webhook_event 2022-07-19 08:26:14 +02:00
Milan Pavlik
058c31eea2 [usage] Store user, project, workspace, type & class 2022-07-18 15:29:13 +02:00
Alex Tugarev
6c395b5881 Record webhook events 2022-07-15 10:58:02 +02:00
Andrew Farries
d587d73dc6 Rename column in database entity
Rename the misnamed primary key `workspaceId` -> `instanceId`.

Usage based billing is unreleased so just drop the table and recreate it
- no data to migrate.

Also add index names.
2022-07-14 15:25:01 +02:00
Andrew Farries
58de22f8bf Add migration for new usage table 2022-07-12 15:15:59 +02:00
Andrew Farries
05783e320e Add new database entity for usage table 2022-07-12 15:15:59 +02:00
Andrew Farries
f59ea8711d Off topic: Number steps in README correctly 2022-07-12 15:15:59 +02:00
Christian Weichel
48aff21449 [ws-manager-bridge] Use WS update status version 2022-07-08 20:23:55 +05:30
Gero Posmyk-Leinemann
eefe632d5e [server] tsGet: Don't return deleted Team Subscriptions 2022-07-08 11:53:55 +05:30
Andrew Farries
543d66f914 [server] Add APIs for working with blocked repos
* Create, list, delete.
2022-07-07 12:27:54 +05:30
Gero Posmyk-Leinemann
0e75fc739e [db] Change types of updatedAt/createdAt from datetime to timestamp 2022-07-06 19:06:53 +05:30
Thomas Schubart
f157a029ae Remove defaults 2022-07-06 11:13:53 +05:30
Thomas Schubart
cd60a4a12d [dashboard] Allow user to set workspace class 2022-07-06 11:13:53 +05:30
mustard
154dc5fd7d [server,db,protocol] support ssh public key
Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
2022-07-05 11:04:52 +05:30
Andrew Farries
1f9ed57eb1 Remove unused deletedAt column 2022-06-30 21:23:38 +05:30
Andrew Farries
47db0ebefc Add d_b_blocked_repository to tables.ts 2022-06-30 21:23:38 +05:30
Andrew Farries
1a35999ab4 Remove todos
Answered by code review.
2022-06-30 21:23:38 +05:30
Andrew Farries
2764e6dff9 Rename isRepositoryBlocked 2022-06-30 21:23:38 +05:30
Andrew Farries
812ff0a20e Add unit tests for blocked repositories 2022-06-30 21:23:38 +05:30
Andrew Farries
da0fdf5164 Add migration to add new entity
This was auto-generated by running:

`docker run --rm --name some-mysql -e MYSQL_ROOT_PASSWORD=test -e MYSQL_DATABASE=gitpod -e MYSQL_USER=gitpod -e MYSQL_PASSWORD=test -p 3306:3306 -d mysql:5.7`

`yarn typeorm migration:generate -n New` from the `gitpod-db` directory.

And then removing everything but the new table.

We should document a better way of doing this.
2022-06-30 21:23:38 +05:30
Andrew Farries
edc3d0214c Add new DB entity and supporting classes
Add the new BlockedRepository entity and its interface and
implementation.
2022-06-30 21:23:38 +05:30
Gero Posmyk-Leinemann
d3b2239398 [server] Tone down "found more than one active token" 2022-06-30 19:51:38 +05:30
Sven Efftinge
ba78bd4d08 [server] abort running prebuilds on same branch 2022-06-30 11:40:38 +05:30
Jan Keromnes
d96dedc188 [gitpod-db] Drop deprecated 'attributedTeamId' column from workspace instances 2022-06-29 12:59:37 +05:30
Gero Posmyk-Leinemann
09dbf29160 [db] Remove DeletedEntryGC and all references 2022-06-27 15:41:36 +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
eb79aefea4 [db] fix adminGetWorkspaces/findAllWorkspaceAndInstances 2022-06-24 12:07:32 +05:30
Jan Keromnes
71813fe752 [db] Persist attributed teamId on workspace instances (for usage analytics / billing purposes) 2022-06-16 12:58: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
Pavel Tumik
db51bdd623 fix index on volume snapshot table 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
André Duarte
ff84252286 Fix tests 2022-06-08 14:49:18 +05:30
André Duarte
04683e038a Add migration 2022-06-08 14:49:18 +05:30
André Duarte
3374a43a22 Add workspace class to workspace instance 2022-06-08 14:49:18 +05:30
Jan Keromnes
7c0ecdbf86 [db][payment][server] Implement TeamSubscription2.excludeFromMoreResources 2022-06-01 16:37:50 +05:30
Milan Pavlik
d0f11b876c [worspace-instance] Deprecate deployedTime field 2022-06-01 13:59:50 +05:30
Pavel Tumik
c6910dac35 tie snapshot volumes to workspace instance id 2022-05-25 13:17:39 +05:30
Alex Tugarev
1420b9ca54 Managed cloneURL column. 2022-05-19 15:33:33 +05:30
Sven Efftinge
1bf277a17f [prebuilds] no prebuilds for inactive repos 2022-05-19 15:33:33 +05:30
Alex Tugarev
38b975c18b [db] enable overriding of expiryDate on tokens 2022-05-18 20:42:33 +05:30
Alex Tugarev
680932745a Revert "[prebuilds] no prebuilds for inactive repos"
This reverts commit 72aa5e0aa8c30b4e000f86d65f2c14667d13de1d.
2022-05-12 13:23:27 +05:30