From 1963a8e6854f2bd48a0a32f2ea45af6df8c8b7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Tron=C3=AD=C4=8Dek?= Date: Mon, 26 Aug 2024 10:55:38 +0200 Subject: [PATCH] Feature flag for disabling listening for all prebuild updates (#20150) --- .../server/src/workspace/gitpod-server-impl.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/server/src/workspace/gitpod-server-impl.ts b/components/server/src/workspace/gitpod-server-impl.ts index c323dfe4a51946..67321f5c51733e 100644 --- a/components/server/src/workspace/gitpod-server-impl.ts +++ b/components/server/src/workspace/gitpod-server-impl.ts @@ -243,6 +243,20 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { if (!this.client) { return; } + + // todo(ft) disable registering for all updates from all projects by default and only listen to updates when the client is explicity interested in them + const disableWebsocketPrebuildUpdates = await getExperimentsClientForBackend().getValueAsync( + "disableWebsocketPrebuildUpdates", + false, + { + gitpodHost: this.config.hostUrl.url.host, + }, + ); + if (disableWebsocketPrebuildUpdates) { + log.info("ws prebuild updates disabled by feature flag"); + return; + } + // 'registering for prebuild updates for all projects this user has access to const projects = await this.getAccessibleProjects();