Skip to content

Remove workspace_classes_backend feature flag #16825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 5 additions & 29 deletions components/ws-manager-bridge/src/cluster-service-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,37 +155,13 @@ export class ClusterService implements IClusterServiceServer {
tls,
};

const enabled = await getExperimentsClientForBackend().getValueAsync(
"workspace_classes_backend",
let classConstraints = await getSupportedWorkspaceClasses(
this.clientProvider,
newCluster,
this.config.installation,
false,
{},
);
if (enabled) {
let classConstraints = await getSupportedWorkspaceClasses(
this.clientProvider,
newCluster,
this.config.installation,
false,
);
newCluster.admissionConstraints = admissionConstraints.concat(classConstraints);
} else {
// try to connect to validate the config. Throws an exception if it fails.
await new Promise<void>((resolve, reject) => {
const c = this.clientProvider.createConnection(WorkspaceManagerClient, newCluster);
c.getWorkspaces(new GetWorkspacesRequest(), (err: any) => {
if (err) {
reject(
new GRPCError(
grpc.status.FAILED_PRECONDITION,
`cannot reach ${req.url}: ${err.message}`,
),
);
} else {
resolve();
}
});
});
}
newCluster.admissionConstraints = admissionConstraints.concat(classConstraints);

await this.clusterDB.save(newCluster);
log.info({}, "cluster registered", { cluster: req.name });
Expand Down
5 changes: 0 additions & 5 deletions components/ws-manager-bridge/src/cluster-sync-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ export class ClusterSyncService {
}

private async reconcile() {
const enabled = await this.featureClient.getValueAsync("workspace_classes_backend", false, {});
if (!enabled) {
return;
}

log.debug("reconciling workspace classes...");
let allClusters = await this.clusterDB.findFiltered({ applicationCluster: this.config.installation });
for (const cluster of allClusters) {
Expand Down