Skip to content

Commit afb7246

Browse files
authored
Remove workspace_classes_backend feature flag (#16825)
1 parent 2c259c4 commit afb7246

File tree

2 files changed

+5
-34
lines changed

2 files changed

+5
-34
lines changed

components/ws-manager-bridge/src/cluster-service-server.ts

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -155,37 +155,13 @@ export class ClusterService implements IClusterServiceServer {
155155
tls,
156156
};
157157

158-
const enabled = await getExperimentsClientForBackend().getValueAsync(
159-
"workspace_classes_backend",
158+
let classConstraints = await getSupportedWorkspaceClasses(
159+
this.clientProvider,
160+
newCluster,
161+
this.config.installation,
160162
false,
161-
{},
162163
);
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);
189165

190166
await this.clusterDB.save(newCluster);
191167
log.info({}, "cluster registered", { cluster: req.name });

components/ws-manager-bridge/src/cluster-sync-service.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ export class ClusterSyncService {
4242
}
4343

4444
private async reconcile() {
45-
const enabled = await this.featureClient.getValueAsync("workspace_classes_backend", false, {});
46-
if (!enabled) {
47-
return;
48-
}
49-
5045
log.debug("reconciling workspace classes...");
5146
let allClusters = await this.clusterDB.findFiltered({ applicationCluster: this.config.installation });
5247
for (const cluster of allClusters) {

0 commit comments

Comments
 (0)