Skip to content

Commit

Permalink
[server] Remove feature flag workspace_start_controller (#18735)
Browse files Browse the repository at this point in the history
  • Loading branch information
geropl authored Oct 13, 2023
1 parent 547b8b3 commit 8202ae5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
13 changes: 0 additions & 13 deletions components/server/src/workspace/workspace-start-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Job } from "../jobs/runner";
import { DBWithTracing, TracedWorkspaceDB, UserDB, WorkspaceDB } from "@gitpod/gitpod-db/lib";
import { durationLongerThanSeconds } from "@gitpod/gitpod-protocol/lib/util/timeutil";
import { WorkspaceStarter } from "./workspace-starter";
import { getExperimentsClientForBackend } from "@gitpod/gitpod-protocol/lib/experiments/configcat-server";
import { log } from "@gitpod/gitpod-protocol/lib/util/logging";

@injectable()
Expand Down Expand Up @@ -53,18 +52,6 @@ export class WorkspaceStartController implements Job {
throw new Error("cannot find owner for workspace");
}

const isEnabled = await getExperimentsClientForBackend().getValueAsync(
"workspace_start_controller",
false,
{
user,
projectId: workspace.projectId,
},
);
if (!isEnabled) {
continue;
}

await this.workspaceStarter.reconcileWorkspaceStart(ctx, instance.id, user, workspace);
}
} catch (err) {
Expand Down
12 changes: 0 additions & 12 deletions components/server/src/workspace/workspace-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ import { WorkspaceClassesConfig } from "./workspace-classes";
import { SYSTEM_USER } from "../authorization/authorizer";
import { EnvVarService, ResolvedEnvVars } from "../user/env-var-service";
import { RedlockAbortSignal } from "redlock";
import { getExperimentsClientForBackend } from "@gitpod/gitpod-protocol/lib/experiments/configcat-server";
import { ConfigProvider } from "./config-provider";
import { isGrpcError } from "@gitpod/gitpod-protocol/lib/util/grpc";

Expand Down Expand Up @@ -382,17 +381,6 @@ export class WorkspaceStarter {
}
};

const runWithMutex = await getExperimentsClientForBackend().getValueAsync("workspace_start_controller", false, {
user,
projectId: workspace.projectId,
});
ctx.span.setTag("runWithMutex", runWithMutex);
if (!runWithMutex) {
const abortController = new AbortController();
await doReconcileWorkspaceStart(abortController.signal);
return;
}

// We try to acquire a mutex here, which we intend to hold until the workspace start request is sent to ws-manager.
// In case this container dies for whatever reason, the mutex is eventually released, and the instance can be picked up
// by another server process (cmp. WorkspaceStartController).
Expand Down

0 comments on commit 8202ae5

Please sign in to comment.