Skip to content

Commit

Permalink
[server] Remove obsolete branch from createWorkspace
Browse files Browse the repository at this point in the history
We're no longer supporting `/prebuild` in context parser, thus this is obsolete.
  • Loading branch information
AlexTugarev committed Nov 22, 2023
1 parent 6ff405b commit aa5f1dc
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions components/server/src/workspace/gitpod-server-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
PrebuiltWorkspace,
PrebuiltWorkspaceContext,
SetWorkspaceTimeoutResult,
StartPrebuildContext,
StartWorkspaceResult,
Token,
User,
Expand Down Expand Up @@ -96,7 +95,6 @@ import { SupportedWorkspaceClass } from "@gitpod/gitpod-protocol/lib/workspace-c
import { WorkspaceManagerClientProvider } from "@gitpod/ws-manager/lib/client-provider";
import { StopWorkspacePolicy, TakeSnapshotRequest } from "@gitpod/ws-manager/lib/core_pb";
import { inject, injectable } from "inversify";
import { URL } from "url";
import { v4 as uuidv4, validate as uuidValidate } from "uuid";
import { Disposable, CancellationToken } from "vscode-jsonrpc";
import { IAnalyticsWriter } from "@gitpod/gitpod-protocol/lib/analytics";
Expand Down Expand Up @@ -1122,30 +1120,6 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
context = WithDefaultConfig.mark(context);
}

// if this is an explicit prebuild, check if the user wants to install an app.
if (
StartPrebuildContext.is(context) &&
CommitContext.is(context.actual) &&
context.actual.repository.cloneUrl
) {
const cloneUrl = context.actual.repository.cloneUrl;
const host = new URL(cloneUrl).hostname;
const hostContext = this.hostContextProvider.get(host);
const services = hostContext && hostContext.services;
if (!hostContext || !services) {
console.error("Unknown host: " + host);
} else {
// on purpose to not await on that installation process, because it‘s not required of workspace start
// See https://github.com/gitpod-io/gitpod/pull/6420#issuecomment-953499632 for more detail
(async () => {
if (await services.repositoryService.canInstallAutomatedPrebuilds(user, cloneUrl)) {
console.log("Installing automated prebuilds for " + cloneUrl);
await services.repositoryService.installAutomatedPrebuilds(user, cloneUrl);
}
})().catch((e) => console.error("Install automated prebuilds failed", e));
}
}

if (!options.ignoreRunningWorkspaceOnSameCommit && !context.forceCreateNewWorkspace) {
const runningForContext = await runningForContextPromise;
if (runningForContext.length > 0) {
Expand Down

0 comments on commit aa5f1dc

Please sign in to comment.