mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
* Add default workspace image to org setting * [db] add migration * fixup * [dashboard] add org default image settings * fixup * dashboard fixup * Add server image test TODO * [server] assign global workspace default image * [dashboard] allow to submit empty string (will fallback to global default) * [gp-cli] support gp validate with default image * [dashboard] save default image * fixup * fixup * [gp-cli] improve output * [gp-cli] improve gp init * [gp-cli] gp validate compatibility * Update components/dashboard/src/teams/TeamSettings.tsx Co-authored-by: Filip Troníček <filip@gitpod.io> * Remove org id / get org settings in supervisor * Remove `WorkspaceConfigContext` * Add unit tests * Rename to `DefaultWorkspaceImage` * Update components/dashboard/src/teams/TeamSettings.tsx Co-authored-by: George Tsiolis <tsiolis.g@gmail.com> * Add empty image fallback to supervisor * Fix default workspace image setup * Update org settings fields * fixup * Allow empty image to set to default one --------- Co-authored-by: Filip Troníček <filip@gitpod.io> Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
Gitpod-db
Contains all the database related functionality, implemented using typeorm.
Working on gitpod-protocol component
When you are making changes to gitpod-protocol component, make sure to run yarn build in gitpod-protocol folder to make sure your changes will be rebuild. Also consider running yarn watch so that any changes are rebuilt in realtime.
Adding a new table
- Create a migration - use the baseline as an exemplar
- Create a new entity that implements the requisite interface or extend an existing entity as required - see db-user.ts
- 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.
- 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);
- Add the new ORM as an injected component where required e.g. in user-controller.ts
@inject(UserDB) protected readonly userDb: UserDB;