658 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
Christian Weichel
337f8f3960
Bump golang.org/x/crypto (#20683)
* Bump golang.org/x/crypto

* Don't bump toolchain

* go mod tidy

* go mod tidy

* Fix proxy build
2025-03-21 06:49:50 -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
Kyle Brennan
58c9a1808a
[ws-manager-mk2] update to support k8s 0.30 API (#20580)
* [go components] Fixed "go test ./..." in various components

Tool: gitpod/catfood.gitpod.cloud

* [go components] Update k8s 0.29.3 -> 0.30.9 API

 - update the go-update-wc-deps.sh script to handle the brunt of that transition
 - fixes Maintenance- + Subscriber-Controller
 - document steps

Tool: gitpod/catfood.gitpod.cloud

* [ws-manager-mk2] Decide how to apply appamor config based on serverversion to support k8s 1.30+

Tool: gitpod/catfood.gitpod.cloud

* [gpctl] Missing go mod tidy

Tool: gitpod/catfood.gitpod.cloud

* Replace vulnerable outcaste-io/badger/v3 with original dgraph-io/badger/v3

Tool: gitpod/catfood.gitpod.cloud

* more go mod tidy

Tool: gitpod/catfood.gitpod.cloud

* [image-builder-bob, installer] Select the correct version of containerd....

Tool: gitpod/catfood.gitpod.cloud

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-02-07 03:58:22 -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
663fcb9587
[ws-proxy] upgrade golang-crypto (#20499)
* [ws-proxy] upgrade golang-crypto

* Upgrade all direct deps

* Upgrade `golang.org/x/crypto` to v0.31.0

* bump up

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2025-01-08 01:31:23 -05:00
Gero Posmyk-Leinemann
c095d11eab
[supervisor] init: Add logging around termination (#20380) 2024-11-21 03:20:59 -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
mustard
825fb445e7
Reapply "[supervisor] set pod failure reason when supervisor is reaped" (#20327)
* Revert "[supervisor] revert recent changes to reduce frequency of `supervisor run error with unexpected exit code` (#20325)"

This reverts commit 3f066ce935d282d20c3098fbc6c7f6d2d5b1f152.

* Ignore expected case: pod kill / process kill by supervisor

* Debug commit

* fix

* Revert "Debug commit"

This reverts commit 1473e3d147c5f20e65f0a44a67d48dfd8bf9b258.
2024-10-30 15:05: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
Kyle Brennan
3f066ce935
[supervisor] revert recent changes to reduce frequency of supervisor run error with unexpected exit code (#20325)
* Revert "[supervisor] switch lib back to use upstream `ramr/go-reaper` (#20322)"

This reverts commit 9442b52b9a1ade40857d16c65dca7993703bc5d9.

* Revert "[supervisor] set pod failure reason when supervisor is reaped (#20318)"

This reverts commit 9e8da3bdd041b1a42fd8d2ef1d732907bb0630c7.
2024-10-28 23:14:54 -04:00
mustard
9442b52b9a
[supervisor] switch lib back to use upstream ramr/go-reaper (#20322) 2024-10-28 05:53:54 -04:00
mustard
9e8da3bdd0
[supervisor] set pod failure reason when supervisor is reaped (#20318)
* [supervisor] set pod failed reason when supervisor been reap

* Debug commit

* upgrade pkg

* Revert "Debug commit"

This reverts commit 1b6bde80c410034b62e235438b8f7262fa7f63b6.
2024-10-25 09:04: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
Filip Troníček
19d8a73de3
Don't report supervisor_check_ready unless the FF is enabled (#20292) 2024-10-14 12:11: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
Filip Troníček
8e8a5db974
[PAPI] Retry steams upon not receiving data for 10 seconds (#20172)
* [PAPI] Retry steams upon not receiving data for 10 seconds

* [PAPI] Retry steams upon not receiving data for 10 seconds (#20176)

* debug message

* Do not listen for ws updates globally and do not timeout for those calls

* Timeout signal as a getter

* use ff for disablement

* accesor fn => getter

* send empty initial data in papi for global ws watch requests

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-09-06 04:31:49 -04:00
Gero Posmyk-Leinemann
414ee45983
[supervisor] Frontend: re-try + track "checkReady" (#20175)
* [ws-proxy] Log whenever we can't connect to an upstream

* [protocol] Fix linter error

* [supervisor] Frontend: re-connect every 5s + track behavior

* [supervisor] Frontend: Guard connection re-try with feature flag "supervisor_check_ready_retry"
2024-09-05 10:54:48 -04:00
Filip Troníček
acae8deec5
Lower fetch priority of metrics (#20158)
* Minor improvements to metrics requests

* Fix builds
2024-08-30 11:46:43 -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
Filip Troníček
2f45ecdb50
Deal with clipboard permission issues (#19687)
* Deal with clipboard permission issues

* Fix test types

* fix permission name
2024-05-02 15:40:42 +08:00
Manuel Alejandro de Brito Fontes
5992b0f614
Update go dependencies (#19577)
* Update go dependencies

* Update S3

* Caddy plugins cannot use 1.22

* Update controller runtime signatures

* Update webhook suite test

* Update IPFS signatures

* Update go modules

* Update ipfs-cluster to v1.0.8

* Fix node-labeler build

* Fix IPFS CID parsing

* Update ipfs-cluster version

* Update controller-runtime signature

* Update statefulset signature

* Disable controller-runtime metrics

* Add comments
2024-03-26 20:55:35 +01:00
Manuel Alejandro de Brito Fontes
236d7cf1f8
Rebuild dev-image for go v1.22 (#19572)
* Rebuild dev-image for go v1.22

* Update dev-image

* Update openssh to 9.7p1

* Refactor extraction of docker layer
2024-03-25 12:18:34 +01:00
Jean Pierre
e6bf79e5b7
Revert "Revert "Redirect on workspace stop" (#19323)" (#19325)
* Revert "Revert "Redirect on workspace stop" (#19323)"

This reverts commit 827a1a03127bd2ab24ce2503247a19b48326fca5.

* Fix

* Fix

* 💄
2024-01-18 01:06:56 +02:00
Sven Efftinge
827a1a0312
Revert "Redirect on workspace stop" (#19323) 2024-01-15 11:46:52 +02:00
Jean Pierre
10648e17f2
Redirect on workspace stop (#19314)
* Redirect to custom url when workspace stops

* Redirect to url when workspace stops

* Address feedback

* 💄

* 💄

* 💄

* 💄

* 💄
2024-01-12 16:33:49 +02:00
Manuel Alejandro de Brito Fontes
d3eb939dca
Update openssh to v9.6-P1 (#19282) 2023-12-19 12:23:26 +02:00
Manuel Alejandro de Brito Fontes
62ba5a8521
Update alpine to v3.19 (#19233)
* Update alpine to v3.19

* Update openssh to V_9_5_P1
2023-12-12 11:25:19 +02:00
Pudong
6d02689f65
[supervisor] always allow gitpod user ssh (#19182) 2023-12-02 06:34:09 +02:00