@@ -22,7 +22,6 @@ import {
22
22
WorkspaceInstanceUpdatesChannel ,
23
23
} from "@gitpod/gitpod-protocol" ;
24
24
import { log } from "@gitpod/gitpod-protocol/lib/util/logging" ;
25
- import { getExperimentsClientForBackend } from "@gitpod/gitpod-protocol/lib/experiments/configcat-server" ;
26
25
import {
27
26
reportRedisUpdateCompleted ,
28
27
reportRedisUpdateReceived ,
@@ -73,37 +72,12 @@ export class RedisSubscriber {
73
72
private async onMessage ( channel : string , message : string ) : Promise < void > {
74
73
switch ( channel ) {
75
74
case WorkspaceInstanceUpdatesChannel :
76
- const wsInstanceTypeEnabled = await this . isRedisPubSubByTypeEnabled ( "workspace-instance" ) ;
77
- if ( ! wsInstanceTypeEnabled ) {
78
- log . debug ( "[redis] Redis workspace instance update is disabled through feature flag" , {
79
- channel,
80
- message,
81
- } ) ;
82
- return ;
83
- }
84
-
85
75
return this . onInstanceUpdate ( JSON . parse ( message ) as RedisWorkspaceInstanceUpdate ) ;
86
76
87
77
case PrebuildUpdatesChannel :
88
- const prebuildTypeEnabled = await this . isRedisPubSubByTypeEnabled ( "prebuild" ) ;
89
- if ( ! prebuildTypeEnabled ) {
90
- log . debug ( "[redis] Redis prebuild update is disabled through feature flag" , {
91
- channel,
92
- message,
93
- } ) ;
94
- return ;
95
- }
96
78
return this . onPrebuildUpdate ( JSON . parse ( message ) as RedisPrebuildUpdate ) ;
97
79
98
80
case HeadlessUpdatesChannel :
99
- const headlessTypeEnabled = await this . isRedisPubSubByTypeEnabled ( "prebuild-updatable" ) ;
100
- if ( ! headlessTypeEnabled ) {
101
- log . debug ( "[redis] Redis headless update is disabled through feature flag" , {
102
- channel,
103
- message,
104
- } ) ;
105
- return ;
106
- }
107
81
return this . onHeadlessUpdate ( JSON . parse ( message ) as RedisHeadlessUpdate ) ;
108
82
109
83
default :
@@ -242,16 +216,4 @@ export class RedisSubscriber {
242
216
}
243
217
} ) ;
244
218
}
245
-
246
- private async isRedisPubSubByTypeEnabled (
247
- type : "workspace-instance" | "prebuild" | "prebuild-updatable" ,
248
- ) : Promise < boolean > {
249
- const enabledTypes = await getExperimentsClientForBackend ( ) . getValueAsync (
250
- "enableRedisPubSubByUpdateType" ,
251
- "none" ,
252
- { } ,
253
- ) ;
254
- log . debug ( "Enabled types in redis publisher:" , enabledTypes ) ;
255
- return enabledTypes . indexOf ( type ) >= 0 ;
256
- }
257
219
}
0 commit comments