272 Commits

Author SHA1 Message Date
Gero Posmyk-Leinemann
5d557f73c8
[spicedb] Fix intermittent "Error: 4 DEADLINE_EXCEEDED...Waiting for LB pick" (#20637)
* [dev] Bump grpc/grpc-js 1.10.8 -> 1.12.6 and authzed/authzed-node 0.15.0 -> 1.2.2

Tool: gitpod/catfood.gitpod.cloud

* [server] Streamline spicedb gRPC client usage and creation options

 - instead of doing retries on two levels, rely on the gRPC-level retries
 - to mitigate the loss of insights, introduce createDebugLogInterceptor
  - client options: use sane defaults derived from the documentation instead of the excessive ones we had in place before
  - use "waitForReady" option: it should a) make our calls for responsive on re-connects, while b) - because we keep re-trying on DEADLINE_EXCEEDED - should be as reliable as before

Tool: gitpod/catfood.gitpod.cloud

* [protocol] Centralize grpc.isConnectionAlive

Tool: gitpod/catfood.gitpod.cloud

* [server] SpiceDB client: retry with new client on "Waiting for LB pick" error

Tool: gitpod/catfood.gitpod.cloud
2025-03-17 05:13:46 -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
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
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
iQQBot
b77f687492
[ws-daemon] start backup even pod still report the container is running after 5 minutes (#20382) 2024-11-22 05:13:59 -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
iQQBot
66a1ba00d4
Get more insights on workspace image (#20356)
* 1

* 1

* 1

* add timeout ctx

* addressed feedback
2024-11-12 08:25:51 -05:00
Gero Posmyk-Leinemann
2686bc2f47
[server, bridge] Bump grpc-js and authzed clients (#19849)
* [yarn] Bump @grpc/grpc-js to 1.10.8 and @authzed/authzed-node to 0.15.0

* [server] SpiceDB: explicit re-try on UNAVAILABLE

We tried to configured this inside the SpiceDBClientProvider already, but somehow it still surfaced.

* [server, bridge] Configure "grpc.dns_min_time_between_resolutions_ms" to be 2s instead of 30s
2024-06-06 13:57:19 +08:00
Gero Posmyk-Leinemann
b75162c5bb
[ws-manager-mk2] Make WorkspaceRunningCondition.LastTransitionTime stable (#19698) 2024-05-03 20:53:43 +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
Wouter Verlaek
c5ba13cdf2
[ws-daemon] Take backup once container has stopped (#19411) 2024-02-09 17:02:51 +02:00
Kyle Brennan
7e085ed5ad
[ws-manager-api] remove unused SSHKey field (#19287)
* [ws-manager-api] remove SSHKey field

It's no longer needed

* Ran kubebuilder `make generate`

* Ran kubebuilder's `make manifests`

* Update readme

* Cleanup
2024-01-03 17:00:41 +02:00
Anton Kosyakov
521e6a5aab
[dashboard] use HTTP endpoint for telemetry (#19223)
* [dashboard] use HTTP endpoint for telemetry

* 💄

---------

Co-authored-by: Jean Pierre <jeanpierre@gitpod.io>
2023-12-12 14:56:19 +02:00
Pudong
6ecc991ff5
[experimental] add ssh certificate authorities as feature flags (#19208) 2023-12-07 22:59:14 +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
Pudong
b983b6276f
[ws-manager] use workspace class description (#19164) 2023-11-29 14:11:06 +02:00
Manuel Alejandro de Brito Fontes
453bf6ea4a
Refactor configuration of workspace SSH key (#19059)
* Refactor configuration of workspace SSH key

* Update go modules

* Update CRD

* only add SSH Key to workspace CR (#19130)

---------

Co-authored-by: Pudong <tianshi8650@gmail.com>
2023-11-24 15:55:01 +02:00
Wouter Verlaek
185c0428c2
[scrubber] Improve KeyValue performance (#19052)
* [scrubber] Improve KeyValue performance

* Update benchmark comment

* update go mod

* Add metaID to hashed fields

---------

Co-authored-by: Pudong Zheng <pudong@gitpod.io>
2023-11-10 16:17:48 +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
Christian Weichel
9331ac5507
Add storage metadata to workspace CR (#19044)
* Adding volume fields to workspace CRs

* Move workspace volume details to status

* Add VolumeAttachRequest condition

* Add throughput condition (#18982)

---------

Co-authored-by: Alejandro de Brito Fontes <aledbf@gmail.com>
Co-authored-by: Thomas Schubart <24721048+Furisto@users.noreply.github.com>
2023-11-09 14:06:47 +02:00
Thomas Schubart
17f7b6c2a7
Add throughput condition (#18982) 2023-10-30 13:00:37 +02:00
Pudong
81ff3d16e4
[ws-manager-mk2] redact log (#18906)
* update to logrusr v4

* Add DeepCopyStruct to scrubber

* use DeepCopyStruct to scrub log

* mark wrokspace.stauts.url redact
2023-10-16 13:48:23 +03:00
Christian Weichel
f482e0a02d
Add subassembly service API (#18834)
* Add subassembly service API

* Make workspacekit image configurable
2023-09-28 14:55:07 +03:00
Manuel Alejandro de Brito Fontes
8ef82ff356
Update go modules to 1.21 (#18805) 2023-09-26 17:52:05 +03:00
Huiwen
181c983405
[server,dashboard] verify image accessibility when updating org workspace image setting (#18747)
* [server] verify image accessibility before update settings

* [dashboard] update org settings page

* fixup disable button for members

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

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

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

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

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

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

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

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

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

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

* hid change button for members

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

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

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

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

* update image hint

* Add description to WorkspaceImageButton

* Lighter description

* render desc list

---------

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
Co-authored-by: Filip Troníček <filip@gitpod.io>
2023-09-20 23:01:59 +02: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
Manuel Alejandro de Brito Fontes
258651f923
Filter subscriber reconciler events (v2) (#18696)
* Filter subscriber reconciler events (v2)

* Ignore LastActivity
2023-09-12 20:54:52 +02:00
Wouter Verlaek
2ac49194c6
Revert "Filter subscriber reconciler events (#18660)" (#18694)
This reverts commit 9470fb880093522021c1eaeecfb0373d087c39c3.
2023-09-11 11:28:09 +02:00
Manuel Alejandro de Brito Fontes
9470fb8800
Filter subscriber reconciler events (#18660)
* Filter subscriber reconciler events

* Notify changes in the port visibility

* Switch to reflect.DeepEquals

* Address feedback
2023-09-06 16:33:04 +02:00
Gero Posmyk-Leinemann
938f0ba841
[ws-manager-api] Remove deprecated fields (#18641) 2023-09-01 14:38:58 +02:00
Sven Efftinge
841b616c34
[spicedb] fix stale connection handling (#18631) 2023-09-01 12:53:58 +02:00
Manuel Alejandro de Brito Fontes
687f337899
Enable leader election in ws-manager-mk2 (v3) (#18539)
* Enable leader election in ws-manager-mk2

* Update go modules

* Move workspace activity to CRD

* Remove workspace activity

* Cleanup

* Update ws-manager-mk2 CRD

* Cleanup

* Restore lastActivity logic

* TEST

* Disable observability

* Start the grpc server after leader election

* Bount the source of subscribers to an informer

* Cleanup

* Avoid deepCopy

* Remove goroutine to execute OnReconcile

* Refactor last activity to be consistent acrtoss the controllers

* Address feedback
2023-08-26 22:28:52 +02:00
Wouter Verlaek
bf3d548266
[ws-manager-mk2] Scrub status fields, add vscode launch.json (#18595)
* [ws-manager-mk2] Scrub status fields, add vscode launch.json

* Fix scrubber panic on unexported pointer
2023-08-25 13:00:51 +02:00
Manuel Alejandro de Brito Fontes
513ca768f6
Update buildkit to v0.12.1 (#18505)
* Update buildkit to v0.12.1

* Update DisplaySolveStatus signature

* Switch to github.com/containerd/typeurl/v2
2023-08-15 09:17:40 +02:00
Kyle Brennan
34b4602286
[ws-manager-mk2] remove experimental mode feature (#18513)
* [installer] remove experimental mode

* [ws-manager-mk2] remove experimental node selector

* [ws-manager-api] remove ExperimentalMode from configuration

* Add `ws-manager-api` to vscode workspace

* [preview] remove experimental & bump deps

Depends on https://github.com/gitpod-io/gitpod-packer-gcp-image/pull/246

* [preview] LocalStorageCapacityIsolation is GA, no needed as a gate in 1.27
2023-08-15 06:37:41 +02:00
Manuel Alejandro de Brito Fontes
de4bbbea1c
Add a new trust bundle for custom SSL certificates (#18450)
* Add a new trust bundle for custom SSL certificates

* Mount the customer certificate in the workspace

* Use the custom certificate in components

* Cleanup

* Set env variables and mount the crt in a different file

* rename custom ca cert file name

* Fix the filename in env vars

* Enable custom SSL certificate conditionally

---------

Co-authored-by: nandajavarma <nandaja.varma@gmail.com>
2023-08-08 16:46:34 +02:00
Sven Efftinge
7f81d83956
fix watch mode (#18414) 2023-08-07 17:04:33 +02:00
Manuel Alejandro de Brito Fontes
61f89f8436
Update go modules (#18372) 2023-07-28 16:20:30 +08:00
Manuel Alejandro de Brito Fontes
8c6d8e28f3
Update dependencies (#18362)
* Update k8s dependencies to v1.27.3

* Update opencontainers/runtime-spec to v1.1.0

* Update controller runtime to v0.15.0

* Update go modules

* Fix build

* Cleanup

* Fix ws-manager e2e tests
2023-07-27 23:34:29 +08:00
Manuel Alejandro de Brito Fontes
54c2040632
Update go modules to 1.20 (#18360) 2023-07-27 22:24:29 +08:00
Alex Tugarev
afac02330b
Downgrade grpc-js (#18346)
Current version seems to have issues with tearing down the node processes.
2023-07-26 17:46:42 +08:00
Gero Posmyk-Leinemann
d7acfb662a
Updated outdated dependencies to avoid CVEs (#18144)
* Update grpc/grpc-js

* Update http-cache-semantics

* decode-uri-component
2023-07-04 16:40:21 +08:00
Manuel Alejandro de Brito Fontes
57c605ddc4
Cleanup scrubber go module dependency (#18149) 2023-07-04 16:37:21 +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
Anton Kosyakov
f580e6bd00
fix SID-285: hook scrubber as logrus formatter (#17781) 2023-06-29 17:16:47 +08:00
Wouter Verlaek
cbc8b38a91
[ws-daemon] Add OWI to logs (#18017) 2023-06-22 21:44:12 +08:00
Gero Posmyk-Leinemann
909955d2c4
[db, ts] Introduce a generic db.transaction() (#17980)
* [ts] Upgrade inversify 5.0.1 -> 6.0.1

* [server, db] Introduce TransactionalDB for User, Workspace, Projects

* Fix tests
2023-06-21 16:12:11 +08:00
Gero Posmyk-Leinemann
54307a551e
[server] Remove dead permissions code (#17918) 2023-06-19 17:45:10 +08:00
Thomas Schubart
20164cbb4a
[wsman-mk2] Simplify condition checking (#17961) 2023-06-17 22:59:07 +08:00