424 Commits

Author SHA1 Message Date
mustard
ea188a52c6
[supervisor] Improve git status calls to disable optional locks (#20715)
Tool: gitpod/catfood.gitpod.cloud
2025-04-02 14:35:01 -04:00
Gero Posmyk-Leinemann
e9aae6e497
[docker-up] Auto-login dockerd if GITPOD_IMAGE_AUTH is set (#20586)
* [docker-up] Minor fixes and add tests

Tool: gitpod/catfood.gitpod.cloud

* [image-builder-bob] Tests&fixes from an experimental PR

Tool: gitpod/catfood.gitpod.cloud

* [supervisor, ws-manager] Write docker credentials into client config file if passed into workspace

Tool: gitpod/catfood.gitpod.cloud

* [server] Introduce project.settings.enableDockerdAuthentication and expose it on the API

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Add "Docker registry authentication" toggle under projects/env vars

Tool: gitpod/catfood.gitpod.cloud

* [server] Guard project.settings.enableDockerdAuthentication by org write_settings permission

Tool: gitpod/catfood.gitpod.cloud

* review comments with cleanup + small fixes

Tool: gitpod/catfood.gitpod.cloud
2025-02-12 05:16:48 -05:00
Filip Troníček
79d46f40fe
[supervisor] Don't install git msg annotation hook in headless workspaces (#20548)
* [supervisor] Don't install git msg annotation hook in headless workspaces

* chown hooks to gitpod user

* Wait for content ready with git commit hooks

* Move hook setup back inside `configureGit`

* Clean up chowns
2025-01-27 08:19:17 -05:00
Filip Troníček
c24b8f4aed
Add optional, org-wide Gitpod commit annotation (#20525)
* [supervisor] Add Gitpod commit annotation

* server and API changes

* [dashboard] add org setting for commit annotation

* Fix things

* Fix label for annotation switch

* Revert accidental rename

* minor docs fixes

* Add a feature flag for the setting: `commit_annotation_setting_enabled`

* Register hook in the cloned repo instead of under /etc/

* don't override existing hooks

* `gp git-commit-message-helper` to use `git interpret-trailers`

* Test it!

* 🧹 indeed

* Update timestamp of DB migration
2025-01-24 08:11:14 -05:00
iQQBot
5c51d08b70
[supervisor] add ptrace cap for all child process (#20359)
* [supervisor] add ptrace cap for all child process

* addressed feedback
2024-11-12 11:13:50 -05:00
Filip Troníček
65e3f094db
[context parser] Check current ref for Docker image existence (#20345)
* [context parser] Check current ref for Docker image existence

* Better builder bob errors from supervisor

* Gently soft-fail when the Dockerfile isn't found

* Add warning to ws metadata when starting workspace

* Introduce a magic constant instead of empty strings

* Improve supervisor failed reading bob log error

* Fixup cloning our special SHA

* idk what happened

* let workspaces start even on invalid docker refs
2024-11-07 08:13:03 -05:00
mustard
b6c243b149
[JBGateway] connection-based client side additional heartbeat (#20319)
* [supervisor-api] Protobuf update and code generating

* [supervisor] implement `sendHeartbeat` method

* [JBGW] update jetbrains gateway (WIP)

* add thinClient a condition for additional heartbeat

* Update checkbox description
2024-11-05 11:50:02 -05:00
Filip Troníček
14a1894629
[supervisor] Fix subscription leaks in PortsStatus (#20332)
* Increase port status subscription limit

* Properly close supervisor status service connections
2024-10-30 17:28:56 -04:00
Moritz Eysholdt
4d27d3c64c
Disambiguate error message (#20329)
Change the error message to a unique statement so we can easier trace error messages to the originating line of code.
2024-10-29 10:06:55 -04:00
Filip Troníček
b1b2214bef
Provide a nicer image build failed message (#20281)
* Provide a nicer image build failed message

* an error message that actually shows up

* Tweak error message

* Make env retrieval consistent in supervisor config

* Fix broken docs link in dashboard
2024-10-15 05:53:11 -04:00
mustard
02b49524eb
Add full clone setting for prebuilds (#20177)
* proto update

Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>

* dashboard + server

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>
2024-09-11 04:44:57 -04:00
Gero Posmyk-Leinemann
994b6ec5d4
[supervisor] Make sure we read the last chunk of message when task is closed (#20062)
* [supervisor] Make sure we read the last chunk of message when task is closed

* [server, dashboard] Prebuild logs: stream as UInt8Array instead of string, and make sure we send the last chunk before closing the response

* Make log buffer more efficient

Merging done with `TypedArray.prototype.set()` as suggested here:
https://stackoverflow.com/a/73074813/10199319

* [dashboard] PrebuildTaskTab: use hash(err.message) as toastId

* [server] prebuild logs: Only call res.end after a timeout, so clients can continue reading from the stream

* [dashboard] prebuild logs emitter: If we receive code "200", forward prefixChunk, and stop streaming

* fixup! [dashboard] PrebuildTaskTab: use hash(err.message) as toastId

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-07-26 23:52:48 +02:00
Filip Troníček
a4c1a319cf
Implement gp tasks stop --force-success (#20067)
* Implement `gp tasks stop --force-success`

* Fix potential race
2024-07-26 22:21:48 +02:00
Filip Troníček
10810cee50
Various prebuild fixes (#20057)
* log it all

* fix failing image logs prebuild updates

* make sure we dispose of requests properly

* minor cleanup

* handle aborts gracefully

* Try using a tailing library for reading supervisor task logs

* Fix caching requests on Firefox

* Revert "Try using a tailing library for reading supervisor task logs"

This reverts commit fdc3183aa76cab7ac4976fb633d148482054722b.

* Change log order

Make sure we wait for the line to be written first

* Tweak abortion error message

* Remove extra log line
2024-07-24 15:48:33 +02:00
Filip Troníček
a43054a57a
Fix permissions checks for stopping prebuilds (#20043) 2024-07-17 14:08:56 +02:00
Pudong
132070dfeb
[openssh] upgrade openssh to v9.8p1 (#19994)
* [openssh] upgrade openssh to v9.8p1

* update
2024-07-02 15:57:15 +02:00
Huiwen
db5af8934d
Get java feature flags from server (#19984)
* Get java feature flags from server

* fix build
2024-07-01 19:01:14 +02:00
Filip Troníček
f24a6101ee
Enable displaying JB warmup tasks in the Prebuilds UI (#19945)
* Enable displaying JB warmup tasks in the Prebuilds UI

* a hacky comment

* shorten jb warmup task id prefix

* update converter tests

* Capitalize product names

* Fix IDE order

* update golden test results
2024-06-24 15:59:19 +02:00
Filip Troníček
71e963fa88
Add timeout for taskservice in supervisor (#19957) 2024-06-21 13:00:16 +02:00
Filip Troníček
31ef19ecf2
Introduce prebuild task tab component (#19916)
* Image builds in prebuilds UI

* update java gitignore

* Introduce a public API `watchWorkspaceImageBuildLogs`

* Use papi impl in prebuild logs

* Special case for missing prebuild tasks

* Add route handler for image build logs

* remove the papi method

* 404 if nothing was written

* remove unused converter changes

* update golden files

* Remove unused hook

* reset backoff when imagebuild logs are not ready

* Handle unavailable logs better

* Prebuild task tab component

* Fix tracking same URL

* conflict fixes

* Remove unused dep

* Update comment

* Clean up

* Simplify image build handling

It is no longer a special case

* Gracefully stop supervisor to fix abrupt connection termination for tasks (#19942)

* supervisor graceful stop

* Context consistency and server.shutdown

* Use a dedicated waitgroup for proper cleanup

* use the correct context

* Remove extra context wait

* remove terminal mux ctx changes

* remove debug logs

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-06-20 11:47:15 +02:00
Huiwen
7ff5edaf69
[cleanup] remove FF for supervisor publicapi (#19894) 2024-06-14 13:53:10 +08:00
Filip Troníček
b94aec1263
Integrate reading from log files into Supervisor's terminal.Listen (#19863)
* Integrate reading from log files into Supervisor's `terminal.Listen`

* Try with GetOutput

* do not bubble down and fail

* remove debug stuff

* definitions and impl of `task.proto`

* codegen

* update endpoint

* Implement `ListenToOutput`

* Try with one API (🤞)

* stream beginning from where we left off

* Do not watch closed tasks

* move closing of worker channel

* simplify one-off reading

* codegen

* consolidate for loops, optimize watching

* remove extra line

It makes sense to group the offset definition with the function below it

* Gpl/ft/supervisor-listen-files (#19878)

* commit step 1

* 2nd

* Changes from joint code review

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>

* Remove year bumps

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-06-12 21:37:08 +08:00
Sven Efftinge
07833a3b18
[java] add java ops for processor count and container support (#19846)
* [java] add java ops for processor count and container support

* remove wiping java_tool_options
2024-06-07 17:37:18 +08:00
Huiwen
dc67888a92
Fix JetBrains warmup configured both versions but only latest version takes effect (#19848)
* Make it build

* debug commit

* fixup

* fixup

* fix both

* Add large class

* revert preview config changes

* update func name
2024-06-07 15:29:18 +08:00
Gero Posmyk-Leinemann
4fb0c38c86
Cap length of GitStatus updates (#19810)
* [server] ValidateGitStatusLength (max: 4096)

Behind feature flag api_validate_git_status_length

* [supervisor] Cap length of GitStatus message

* [supervisor] cap gitstatus test
2024-05-31 18:14:12 +08:00
Gero Posmyk-Leinemann
504189b123
[supervisor] Fix race on terminal listener closing (#19774) 2024-05-24 19:59:05 +08:00
Huiwen
34b5546df7
Control whether to wait jb backend-plugin via supervisor (#19762)
* Control whether to wait jb backend-plugin via supervisor

* Add docs

* Log one line
2024-05-22 23:21:03 +08:00
Huiwen
92fccc81ef
Build - make backend-plugin readiness a condition of JetBrains IDEs readiness (#19710)
* Make backend-plugin readiness a condition of IDE readiness

* Add compatibility to `2022.3.3`

* fixup

* Observe ide readiness as Inf after 11 seconds

* shutdown after 10 minutes

* fix hot-deploy.sh

* Add shutdown reason

* address feedback

* Add Feature Flags

* fixup

* fix

* Add one line log

* address feedback
2024-05-14 18:02:52 +08:00
Sven Efftinge
2e8e2d9d60
[supervisor] hide JAVA_TOOL_OPTIONS hack behind feature flag (#19630) 2024-05-03 19:25:43 +08:00
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