File tree Expand file tree Collapse file tree 2 files changed +5
-34
lines changed
components/ws-manager-bridge/src Expand file tree Collapse file tree 2 files changed +5
-34
lines changed Original file line number Diff line number Diff line change @@ -155,37 +155,13 @@ export class ClusterService implements IClusterServiceServer {
155
155
tls,
156
156
} ;
157
157
158
- const enabled = await getExperimentsClientForBackend ( ) . getValueAsync (
159
- "workspace_classes_backend" ,
158
+ let classConstraints = await getSupportedWorkspaceClasses (
159
+ this . clientProvider ,
160
+ newCluster ,
161
+ this . config . installation ,
160
162
false ,
161
- { } ,
162
163
) ;
163
- if ( enabled ) {
164
- let classConstraints = await getSupportedWorkspaceClasses (
165
- this . clientProvider ,
166
- newCluster ,
167
- this . config . installation ,
168
- false ,
169
- ) ;
170
- newCluster . admissionConstraints = admissionConstraints . concat ( classConstraints ) ;
171
- } else {
172
- // try to connect to validate the config. Throws an exception if it fails.
173
- await new Promise < void > ( ( resolve , reject ) => {
174
- const c = this . clientProvider . createConnection ( WorkspaceManagerClient , newCluster ) ;
175
- c . getWorkspaces ( new GetWorkspacesRequest ( ) , ( err : any ) => {
176
- if ( err ) {
177
- reject (
178
- new GRPCError (
179
- grpc . status . FAILED_PRECONDITION ,
180
- `cannot reach ${ req . url } : ${ err . message } ` ,
181
- ) ,
182
- ) ;
183
- } else {
184
- resolve ( ) ;
185
- }
186
- } ) ;
187
- } ) ;
188
- }
164
+ newCluster . admissionConstraints = admissionConstraints . concat ( classConstraints ) ;
189
165
190
166
await this . clusterDB . save ( newCluster ) ;
191
167
log . info ( { } , "cluster registered" , { cluster : req . name } ) ;
Original file line number Diff line number Diff line change @@ -42,11 +42,6 @@ export class ClusterSyncService {
42
42
}
43
43
44
44
private async reconcile ( ) {
45
- const enabled = await this . featureClient . getValueAsync ( "workspace_classes_backend" , false , { } ) ;
46
- if ( ! enabled ) {
47
- return ;
48
- }
49
-
50
45
log . debug ( "reconciling workspace classes..." ) ;
51
46
let allClusters = await this . clusterDB . findFiltered ( { applicationCluster : this . config . installation } ) ;
52
47
for ( const cluster of allClusters ) {
You can’t perform that action at this time.
0 commit comments