238 Commits

Author SHA1 Message Date
Gero Posmyk-Leinemann
198dea471d
[server, bridge] Bind metrics apps to "127.0.0.1" instead of "localhost" (#20719)
Tool: gitpod/catfood.gitpod.cloud
2025-03-31 08:57:59 -04:00
Gero Posmyk-Leinemann
4083e6f252
[server, bridge] Switch base-images to node:18.20.7-alpine to avoid CVEs (#20692)
Tool: gitpod/catfood.gitpod.cloud
2025-03-21 07:16:50 -04:00
Gero Posmyk-Leinemann
26f7f5d742
Add more initializer-related info to /insights API (#20572)
* [ws-manager, ws-daemon] Store initializer metrics in workspace.Status.InitializerMetrics

Tool: gitpod/catfood.gitpod.cloud

* [ws-mananger-api, -mk2] Emit new field .Status.InitializerMetrics

Tool: gitpod/catfood.gitpod.cloud

* [db] Introduce DBWorkspaceInstanceMetrics and persist all metrics from ws-manager-api into it

Tool: gitpod/catfood.gitpod.cloud

* [api] Expose session.Metrics.InitializerMetrics

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Export metrics into CSV

Tool: gitpod/catfood.gitpod.cloud

* [content-service] Fix: emit fromBackup stats

Tool: gitpod/catfood.gitpod.cloud

* Update components/ws-manager-api/core.proto

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

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2025-02-26 14:34:12 -05:00
Filip Troníček
9b574a9022
[server] make gRPC clients viable in non-HTTP/2-compatible environments (#20565)
* [server] make gRPC clients viable in non-HTTP/2-compatible environments

Tool: gitpod/catfood.gitpod.cloud

* Address review comments

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
Tool: gitpod/catfood.gitpod.cloud

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-01-30 07:00:19 -05:00
Filip Troníček
5bb738a530
Add WS image metrics to workspace instances (#20426)
* Add WS image metrics to workspace instances

* Update tests

* fix ws-manager-api field description

* Prefer existing DB values for metrics

* Copy proto comments over to protocol type
2024-12-09 05:01:16 -05:00
Gero Posmyk-Leinemann
99cc66b7cf
[ws-manager] Re-create workspace pods on rejection (#20243)
* [ws-manager] Re-create workspace pods (incl. test)

* [gpctl] Fix "workspaces list"

* [ws-daemon, ws-manager] Review comments, logging cleanups and ordering fix

* [dev/rejector] Add the tool we use to test PodRejection under "dev"

* [bridge] Log nested status shape (and properly scrubbing it)
2024-11-15 07:28:54 -05:00
Gero Posmyk-Leinemann
c489f17fc9
[bridge] Actually set deployedTime in ws-manager-bridge (#20194) 2024-09-11 02:58:57 -04:00
Gero Posmyk-Leinemann
333ec0af72
[ws-manager-bridge] Persist before publishing any update to maintain consistency guarantees (#20055) 2024-07-22 08:50:30 +02:00
Gero Posmyk-Leinemann
fbc0d76554
Prebuild issues roundup (#20000)
* redirect in the offline case

* [public-api] generate noise

* [server] Refactor Prebuild resolution to happen in a single place

* [dashboard, api] Show Prebuild details

* fixup! [server] Refactor Prebuild resolution to happen in a single place

* [bridge] Revive Prebuild QUEUED state: it's everything before running

* [server] Fix dead-end for streaming logs when starting too early

* [dashboard] Adds SHA + duration, fix re-rendering when prebuildId changes, and uses the new/old streaming logic

WIP because still has the "duplicate (sometimes triple!) logs" react re-rendering issue

* Prevent unnecessary re-renders of task output

* remove double-comment

* Duration display improvements

* Properly dismiss toasts and render durations

* Remove SHA from prebuild list

* Clean up and implement the `reset` event for workspace logs

* fix comment

* Tiny cleanup

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-07-10 04:50:55 -04:00
Pudong
f3ceb6b870
[ws-manager-bridge] add update cluster tls config (#19975) 2024-06-27 17:49:22 +02:00
Filip Troníček
aa8f8c4412
Fix dropped errors on available prebuilds (#19967)
* Fix dropped errors on available prebuilds

* Fix spacing

* Improve if statement readability

* Add a suite for `ws_manager_bridge_stopped_prebuild_statuses=true`

* comments
2024-06-25 17:22:20 +02:00
Gero Posmyk-Leinemann
024969da9d
[bridge] Fix logging/bridge.stop (#19782)
* [bridge] Fix logging

* [bridge] Fix: Actually dispose WorkspaceInstanceController once bridge is stopped

* more logging around wsman subscription
2024-05-28 14:37:08 +08:00
Sven Efftinge
ff186330e7
[bridge] add healthz endpoint (#19747) 2024-05-16 17:42:54 +08:00
Gero Posmyk-Leinemann
08847d07dd
[bridge] Remember last status update, and skip if they are identical (#19699)
* [bridge] Remember last status update, and skip if they are identical

* [bridge] More detailed logging, and fix workspaceType in metrics
2024-05-03 23:11:43 +08:00
Gero Posmyk-Leinemann
9be1fec2c0
[ts] Add metric gitpod_logs_total(level) for TS components (#19093) 2023-11-21 16:39:59 +02:00
Christian Weichel
bb51f07988
Collect workspace classes from workspace cluster (#19003)
* Extend ws-manager API to support workspace class descriptions

fixes ENG-1065

* Extend  DescribeCluster in ws-manager-mk2

to acurately report the available workspace classes

fixes ENG-1066

* Add workspace classes to cluster in DB

* Intergrate workspace cluster collection in ws-manager-bridge

* Feature flag off discovered workspace class usage

* Fix build

* Add unittest for getSupportedWorkspaceClasses

* Fix workspace class storage

* Adress review feedback
2023-11-10 13:13:48 +02:00
Anton Kosyakov
cf7d0e9500
remove supervisor_live_git_status (#18921)
and deprecated instance.status.repo
2023-10-16 17:20:24 +03:00
Alex Tugarev
0189623c4b
🧹 Update mocha and remove resolutions (#18736)
* remove resolutions in root package.json

update mocha to avoid pulling in minimatch@3.0.4

* adjust mocha config

* also consider *.spec.db.*

* re-add missing exclude of node_modules

* remove recursive

* fix mocha execution
2023-09-19 09:22:58 +02:00
Gero Posmyk-Leinemann
5cb145e57f
Reconcile startWorkspace (#18673)
* [server] Reconcile workspace starts using redlock

* [server] Check abortSignal before updating the DB state

* [server] Add feature flag workspace_start_controller

review comments
2023-09-14 08:40:53 +02:00
Robo Quat
9ad3360abf
update index (#18636)
Co-authored-by: roboquat <roboquat@users.noreply.github.com>
2023-09-03 19:02:00 +02:00
Alex Tugarev
5efb011c08
Update GitLab REST client library (#18523)
* [server] update gitlab REST client library

* clean up workspace packages

* Update gitlab rest client

* Fix yarn.lock

* Update chainguard node image

* Catch up with GitLab client library changes.

Several places relied on a particular shape of errors.

* [gitlab] fix project typings

---------

Co-authored-by: Jean Pierre <jeanp413@hotmail.com>
2023-08-28 16:09:55 +02:00
Alex Tugarev
c7e492b6ef
update node to 18.17.1 (#18525)
* update node to 18.17.1

* use new dev image

* fix webpack in supervisor-frontend

* bump webpack to 5.88.2 in dashboard

* streamline webpack versions

* Fix craco config

* streamline eslint versions

* Update eslint config and disable for now

* Enable eslint again

* Update vscode-jsonrpc for browser implementation

* Polyfill setimmeadiate

* Remove NODE_OPTIONS env var from supervisor front end scripts

* Fix css

* Fix css 2

* Fix checkboxchecked

* Add comment

* Fix yarn.lock

---------

Co-authored-by: Jean Pierre <jeanp413@hotmail.com>
2023-08-24 13:41:50 +02:00
Thomas Schubart
55c9165c0d
Support managed redis (#18581)
* [installer] Specify redis configuration for server

* [server] Configure Redis authentication

* [wsman-bridge] Configure Redis authentication

* [wsman-bridge] Add redis credentials to environment
2023-08-24 10:30:50 +02:00
Sven Efftinge
9b4cc8507d
[server] handle uncaught exception from grpc-js (#18437) 2023-08-04 19:25:29 +08:00
Alex Tugarev
436130bf26
Fix listeners leaks – EXP-206 (#18321)
* [server] fix leaking prebuild update listeners

- check for client be defined in gitpod-server-impl
- add prebuild subscribers only if the thing is not disposed yet
   - this might have happened frequently on very short living workspacePageClose events

* [server] fix metric registration

don't override default registry, which breaks other metrics.

* fixup for getMetricsAsArray

* [server] bump prom-client
2023-08-02 18:28:27 +08:00
Milan Pavlik
66df7ffb04
[db] Move redis publisher to gitpod-db WEB-621 (#18275)
* [db] Move redis publisher to gitpod-db

* Fix

* fix
2023-07-25 19:24:41 +08:00
Sven Efftinge
78e607d26b
[server] bump js target (#18334) 2023-07-25 16:50:41 +08:00
Milan Pavlik
bd9c0de53f
[gitpod-db] Include redis client to share WEB-621 (#18264)
* [gitpod-db] Include redis client to share

* fix

* fix

* fix
2023-07-25 15:47:41 +08:00
Milan Pavlik
a285a1c732
Remove gitpod-messagebus component WEB-618 (#18269)
* [server] Publish events during workspace starter

* retest

* fix

* fix

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* [server] Publish events during workspace starter

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* fix

* Remove gitpod-messagebus component
2023-07-24 21:49:40 +08:00
Milan Pavlik
a5b4a66e0f
[server, ws-man-bridge] Remove messagebus WEB-618 (#18238)
* [server] Publish events during workspace starter

* retest

* fix

* fix

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* [server] Broadcast prebuild updates from redis

* [server] Broadcast headless updates to subscribers

* Fix

* retest

* [server] Publish events during workspace starter

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* [server] Remove messagebus

* remove ws-man-bridge messagebus

* fix

* fix
2023-07-24 18:04:40 +08:00
Milan Pavlik
ed5191b55b
[ws-man-bridge] Refactor constructors and cleanup deps (#18263)
* [ws-man-bridge] Refactor constructors and cleanup deps

* fix

* Fix
2023-07-13 18:00:29 +08:00
Milan Pavlik
34002592b1
[server] Broadcast headless updates to subscribers WEB-598, WEB-600 (#18215)
* [server] Publish events during workspace starter

* retest

* fix

* fix

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* [server] Broadcast prebuild updates from redis

* [server] Broadcast headless updates to subscribers

* Fix

* Fix

* Fix

* fix

* fix

* retest
2023-07-12 22:59:29 +08:00
Milan Pavlik
0d745ca20b
[server] Publish events in workspace starter - WEB-622 (#18234)
* [server] Publish events during workspace starter

* add copy comment

* retest

* fix

* fix

* fix

* fix

* fix

* retest

* retest

* try?
2023-07-12 20:22:28 +08:00
Milan Pavlik
06916a12a0
[server] Broadcast prebuild updates from redis WEB-599, WEB-593 (#18214)
* retest

* retest

* [server] Broadcast prebuild updates from redis

* register

* fix

* Fix

* retest
2023-07-11 16:22:27 +08:00
Milan Pavlik
a095ddb3a2
[ws-man-bridge] Publish ownerID for WorkspaceInstance updates (#18211) 2023-07-10 21:58:27 +08:00
Milan Pavlik
8fd37fc8b7
[ws-man-bridge] Fix metric label reporting (#18197) 2023-07-07 17:35:24 +08:00
Sven Efftinge
02f976edb5
[ws-manager-bridge] fix path to entry point (#18175)
* [ws-manager-bridge] fix path to entry point

* Adjust docker start CMD

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2023-07-05 19:39:22 +08:00
Sven Efftinge
075e14c47f
[build] enabled some eslint rules (#18165) 2023-07-04 22:32:21 +08:00
Milan Pavlik
56d95d7fab
[ws-man-bridge] Publish ws-instance-update - WEB-592 (#18162)
* [ws-man-bridge] Publish ws-instance-update

* tests

* fix

* fix
2023-07-04 21:51:21 +08:00
Milan Pavlik
dfc1020570
[ws-man-bridge] Rename metric label to workspace-instance (#18161) 2023-07-04 21:05:21 +08:00
Sven Efftinge
3f86e66f14
[server] reduce build time (#18160)
* [server] reduce build time

Include the db tests in the regular `yarn test` script.
Also remove `prepare` as it would duplicate the build.

* [build] remove `prepare`task

it makes the our build run `yarn clean && yarn build` twice per packge.
2023-07-04 21:00:21 +08:00
Sven Efftinge
d7aa23ed03
[server, ws-bridge, protocol, db] added eslint (#18147) 2023-07-04 20:21:21 +08:00
Milan Pavlik
5ee1dbd9ec
[ws-man-bridge] Setup noop publisher WEB-595 (#18156)
* [ws-man-bridge] Setup redis

* fix

* fix

* [ws-man-bridge] Setup noop publisher

* fix

* fix

* fix
2023-07-04 20:11:21 +08:00
Milan Pavlik
4cb8fd08b4
[ws-man-bridge] Setup redis WEB-595 (#18155)
* [ws-man-bridge] Setup redis

* fix

* fix

* fix
2023-07-04 18:01:21 +08:00
Gero Posmyk-Leinemann
a10b412446
[server, bridge] Small messagebus cleanup (#18153) 2023-07-04 16:41:21 +08:00
Sven Efftinge
0aff5b1c77
[server] perm-check and test project service (#18111) 2023-07-03 23:34:20 +08:00
Gero Posmyk-Leinemann
cc52d25280
Upgrade yarn packages (#18128)
* [ts] Pin mimimatch and minimist

* [server] Update minio

* [ts] Remove superfluous node-pre-gyp dep

* [ts] Pin jsonwebtoken to 9.0.0

* [grpc] Update grpc-toolsis

* [ts] Upgrade from mocha-typescript to  @testdeck/mocha

* fix rimraf
2023-07-03 14:47:19 +08:00
Milan Pavlik
2933eeef54
Upgrade ts-node to 10.4 WEB-575, WEB-576 (#18102)
* Upgrade ts-node to 10.4

* [server] Make typings work in workspace AND leeway

* [leeway] Increase node heap size to 8GB

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2023-06-30 20:26:48 +08:00
Milan Pavlik
0d0ab3aef3
[ws-man-bridge] Remove EE (#18090)
* [ws-man-bridge] Remove EE

* fix

* fix
2023-06-28 20:11:46 +08:00
Milan Pavlik
3b6472b158
[ws-man-bridge] Use chainguard image WEB-576 (#18084)
* [ws-man-bridge] Use chainguard image

* fix

* retest

* Fix

* fix?

* fix
2023-06-28 18:32:46 +08:00