395 Commits

Author SHA1 Message Date
Pudong
6d02689f65
[supervisor] always allow gitpod user ssh (#19182) 2023-12-02 06:34:09 +02:00
Pudong
10fe5b9699
[sshgateway] use ssh CA to auth (#19147)
* [sshgateway] use ssh CA to auth

* change name

* add error log

* fix

* mark volume optional

* [installer] validate ssh-ca secret

* Revert "[installer] validate ssh-ca secret"

This reverts commit ca6ede78a7b5a720fd315eca32eb277cb5063069.

We must support the scenario where the installer has the secret, but, it is not in the cluster yet.

---------

Co-authored-by: Kyle Brennan <kyle@gitpod.io>
2023-11-30 19:17:08 +02:00
Huiwen
a7bd49fb34
[supervisor] Remove default image fetch to improve IDE startup performance (#18993)
* [supervisor] Remove default image fetch to improve IDE startup performance

* fix build

* address feedback
2023-11-02 08:30:40 +02:00
Anton Kosyakov
aefaa86542
[supervisor] return missing user for ssh keys (#18977) 2023-10-27 14:10:34 +03:00
Huiwen
ad7ef3b892
[supervisor] increase default workspace image cache duration and do prefetch (#18951) 2023-10-19 09:46:27 +03:00
Anton Kosyakov
cf7d0e9500
remove supervisor_live_git_status (#18921)
and deprecated instance.status.repo
2023-10-16 17:20:24 +03:00
Anton Kosyakov
cbc308305c
[ssh] flexible auth user (#18880) 2023-10-06 14:52:15 +03:00
Anton Kosyakov
40c39f5312
Revert "Relax assumptions in supervisor (#18782)" (#18857)
This reverts commit 9a38b607055780fa7b2cd61c1379143d6c7b3715.
2023-10-02 23:00:11 +03:00
Anton Kosyakov
777a9cb800
[supervisor] cache default workspace image (#18845) 2023-09-29 19:14:08 +03:00
Christian Weichel
9a38b60705
Relax assumptions in supervisor (#18782)
* [supervisor] Make UID/GID configurable

* Support content initializer as env var

* Make workspace runtime explicit

* Make linux user configurable for Git operations

* Don't assume /home/gitpod

* Fix unittest

* Fix wsdaemon
2023-09-27 17:32:06 +03:00
Anton Kosyakov
2565a1c5b8
[supervisor] add ssh tunnel metrics (#18795) 2023-09-25 23:30:04 +03:00
Huiwen
bee03a113e
[supervisor] fix panic with runGP option (#18777)
* [supervisor] fix panic with runGP option

* Check if `s` is nil to avoid adding guards outside
2023-09-22 15:24:01 +02:00
Huiwen
62c573a453
Add default image get to PAPI and improve Dashboard (#18767)
* [server] update getDefaultWorkspaceImage api

* [dashboard] api usage update

* [protocol] add go definition

* [papi] add getDefaultWorkspaceImage method

* fixup

* [dashboard] add org image warning to start workspace page

* fix error wrap

* Update supervisor to use publicApi

* [dashboard] always show default image and remove tag width limit

* fixup

* move new warning to StartPage

* Update components/dashboard/src/teams/TeamSettings.tsx

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>

* Address feedback

---------

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
2023-09-22 11:58:01 +02:00
Huiwen
04e576fbe0
Add default workspace image to org setting (#18723)
* 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>
2023-09-19 14:51:58 +02:00
Manuel Alejandro de Brito Fontes
08f37c5c3e
Do not log if the connection was closed abnormally (#18665) 2023-09-06 10:10:03 +02:00
Sven Efftinge
af35dbfe9b
Fix gitstatus updates (#18613) 2023-08-30 10:26:56 +02:00
Anton Kosyakov
b3ae12f956
git real time (#18323) 2023-08-03 20:51:28 +08:00
Anton Kosyakov
8f85d82009
[supervisor] expose control service over REST (#18411)
* [supervisor] expose control service over REST

* [supervisor] expose host key on create key pair

to let clients to do fingerpring checking
2023-08-02 23:01:28 +08:00
Jean Pierre
5b0541a9bc
Add more tunnel ssh loggging (#18286) 2023-07-18 14:37:34 +08:00
Pudong
9bb400b0e8
[supervisor] improve docker activation (#18284)
* Revert "Revert "[supervisor] improve docker activation (#18143)" (#18236)"

This reverts commit 9b21205074aff9fb4474354195e77b8827fdf7aa.

* only start docker activation if content is ready
2023-07-17 17:11:33 +08:00
Huiwen
d6f2245b8a
[supervisor] correct CreateSSHKeyPair error code (#18257)
* [supervisor] correct CreateSSHKeyPair error code

* 💄
2023-07-12 17:45:29 +08:00
Filip Troníček
9b21205074
Revert "[supervisor] improve docker activation (#18143)" (#18236)
This reverts commit 0f9d3192fbba4922d122fefd4d6e070f56efb551.
2023-07-11 20:29:28 +08:00
Anton Kosyakov
0f9d3192fb
[supervisor] improve docker activation (#18143)
* [supervisor] fix leaking docker sockets

* [supervisor] remote outcome for gitpod_activate_docker

* [supervisor] don't log expected docker activation socket errors

* [supervisor] add max retries on exit code errors

* only notification if not in headless and logFile successful created

* move retry logic to listener

* change max retry attempts

* ignore canceled error

* add sleep

---------

Co-authored-by: Pudong Zheng <tianshi8650@gmail.com>
2023-07-11 17:50:28 +08:00
Anton Kosyakov
dcaa6da5d1
validate: run IDE prebuild only in headless workspace (#18120)
in order to avoid race between IDE and prebuild
2023-07-03 19:21:20 +08:00
Anton Kosyakov
fdb7e5ea16
validate jb warmup (#18050)
* [jb] move warmup tasks to integration

* move composition of ide prebuild tasks in supervisor
2023-06-30 14:51:48 +08:00
Jean Pierre
669d149d0a
Fix properly close ssh tunnel websocket connection (#18042) 2023-06-26 14:41:16 +08:00
AXON
7045e1d02b
Use a script for BROWSER variable (#17926)
* Use a script for BROWSER variable

* Revert "Use a script for BROWSER variable"

This reverts commit b72bb6c8d58b52c1d8c21917f12aeded4c0f5ce4.

* Use dockerfile instead

* Use /bin/sh and add browser.sh to leeway
2023-06-14 03:56:04 +08:00
Thomas Schubart
2cab1406dd
[ws-manager-mk2] Remove persistent volume claim feature (#17860)
* [ws-daemon] Remove PVC

* [installer] Remove PVC

* [workspacekit] Remove PVC

* [content] Remove PVC

* [preview] Remove PVC

* [wsman-api] Remove PVC

* [ws-daemon-api] Remove PVC

* [workspacekit] Mount workspace directory

* [supervisor] Remove PVC

* [test] Remove PVC

* Fix build
2023-06-13 18:35:04 +08:00
Huiwen
306ac3bf98
Add missing protocol property IDE-153 (#17890)
* Add missing protocol property

* 💄
2023-06-09 23:44:00 +08:00
Anton Kosyakov
9e55fed400
configure BROWSER to use gp open (#17871)
In order to allow tools to access the browser which rely on it.
2023-06-08 23:06:08 +08:00
Pudong
81b7f9f85a
[supervisor] add grpc_recovery middleware (#17861) 2023-06-07 18:29:58 +08:00
Pudong
27b9a40d08
[supervisor] concurrent map writes when terminals close (#17859)
* [supervisor] concurrent map writes when terminals close

* Update components/supervisor/pkg/terminal/terminal.go

* switch to waitgroup

* remove error in Close
2023-06-07 17:21:57 +08:00
Anton Kosyakov
b9b9065abc
fix IDE-16: run terminal tests with timeout (#17830) 2023-06-06 20:22:57 +08:00
Pudong
1a7828ddd0
[supervisor] fix port config nil panic (#17834) 2023-06-06 01:10:56 +08:00
Pudong
c1e80f5f8d
Support forward https protocol port (#16547)
* introduce this feature to user

* use tcp proxy
2023-05-31 14:41:05 +08:00
Jean Pierre
6652c98a1a
Add WorkspaceUpdates method (#17728)
* Add WorkspaceUpdates method

* Replace InstanceUpdates
2023-05-30 23:56:04 +08:00
Huiwen
6474e9f25e
Revert "use nftPortForwarder" (#17690)
it will cause port not accessible if it only listen on localhost
2023-05-22 16:38:56 +08:00
Pudong
176393a0c8
Add support to forward https protocol port (#17644)
* add support to forward https protocol port

* Update components/ws-proxy/pkg/proxy/routes.go

Co-authored-by: Kyle Brennan <kyle@gitpod.io>

---------

Co-authored-by: Kyle Brennan <kyle@gitpod.io>
2023-05-19 15:22:53 +08:00
Pudong
744eb491bf
[supervisor] Persist bash history across workspace restarts PRD-59 (#17612)
* persistence command history

* fix test

* addressed feedback
2023-05-15 22:39:00 +08:00
Jean Pierre
293ec4abb7
Directly tunnel websocket connection to ssh server (#17447)
* Directly tunnel websocket connection to ssh server

* 💄

* 💄
2023-05-13 04:16:57 +08:00
Anton Kosyakov
91d8c41e50
[supervisor] small fixes of previous leftovers (#17315) 2023-04-21 17:41:42 +08:00
Anton Kosyakov
45d1ac8305
[supervisor] log potentially leaking grpc streams (#17243) 2023-04-18 03:51:49 +08:00
Anton Kosyakov
ffa75e5536 [jb] support running tests agaist latest backend version 2023-03-29 09:58:31 +02:00
Manuel Alejandro de Brito Fontes
846510d06b
Fix supervisor memory and CPU stats (#16861)
* Fix supervisor memory and CPU stats

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

* Update supervisor go modules

---------

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>
2023-03-27 16:33:25 +02:00
Huiwen
260497b107
[supervisor] fix open access control not working when git permission missed (#16987)
- Update `runAsGitpodUser` to append correct env
- Fix .gitignore make whole supervisor component unsearchable
2023-03-24 14:48:16 +01:00
Pudong
b465d06617
Uniformly use proxy to get the configuration of configcat (#16942)
* Uniformly use proxy to get the configuration of configcat

* Add configcat enabled in workspace info api

* enabled configcat in ide-service
2023-03-23 11:01:15 +01:00
Anton Kosyakov
f260c31439
[rebuild] decoule IDE env vars from registry-facade (#16812)
by moving in supervisor-ide-config.json
2023-03-13 13:24:48 +01:00
Jean Pierre
ca02b3f83b
Add custom supervisor metrics (#16745)
* Add custom supervisor metrics

Co-authored-by: Huiwen <mustard-mh@users.noreply.github.com>

* Add to allowlist

* Normalize error

---------

Co-authored-by: Huiwen <mustard-mh@users.noreply.github.com>
2023-03-10 20:54:46 +01:00
Manuel Alejandro de Brito Fontes
5c7eac6d3e
Allow TLS v1.2 (#16774) 2023-03-09 16:34:45 +01:00
Anton Kosyakov
00b723df59
[supservisor] configurable SSH log level (#16713)
as well rate limit SSH stdout
2023-03-07 19:38:05 +01:00