Simon Emms f35e762354 [workspace]: add force-stop check on stopping workspaces
Since #4910 stopped counting "stopping" workspaces for billing purposes,
any workspace caught in a "stopping" phase would never be force-stopped.
This adds a conditional "includeStopping" boolean (defaulting to `false`)
to the DB implementation and the meta-instance-controller simply includes
that phase in the search.

It was discovered that ~200 workspaces were caught in this phase (90%
prebuilds) so this phase is necessary to force-stop.
2021-08-13 13:12:12 +02:00
..
2021-07-13 16:47:11 +02:00
2021-07-13 16:47:11 +02:00
2021-07-13 16:47:11 +02:00
2021-07-13 16:47:11 +02:00
2020-08-25 09:25:15 +00:00
2020-08-25 09:25:15 +00:00
2021-07-15 11:29:47 +02:00
2021-06-09 12:52:57 +02:00
2021-07-13 16:47:11 +02:00
2021-07-13 16:47:11 +02:00

Gitpod-db

Contains all the database related functionality, implemented using typeorm.

Adding a new table

  1. Create a migration - use the baseline as an exemplar
  2. Create a new entity that implements the requisite interface or extend an existing entity as required - see db-user.ts
  3. If it is a new table, create the matching injectable ORM implementation and interface (if required) - see user-db-impl.ts and user-db.ts. Otherwise extend the existing interface and implementation as required.
  4. Add the injectable implementation to the DB container module, binding the interface and implementation as appropriate, otherwise it will not be instantiated correctly e.g.
    bind(TypeORMUserDBImpl).toSelf().inSingletonScope();
    bind(UserDB).toService(TypeORMUserDBImpl);
  1. Add the new ORM as an injected component where required e.g. in user-controller.ts
    @inject(UserDB) protected readonly userDb: UserDB;