Skip to content

Commit

Permalink
Remove deprecated '#prebuild/' context URL prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
jankeromnes committed Nov 29, 2022
1 parent 63d3b1a commit 0e4ccf1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 57 deletions.
18 changes: 0 additions & 18 deletions components/gitpod-protocol/src/context-url.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,6 @@ export class ContextUrlTest {
expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo.git");
}

@test public parseContextUrl_withPrebuild() {
const actual = ContextURL.getNormalizedURL({
contextURL: "prebuild/https://github.com/gitpod-io/gitpod-test-repo",
context: {},
} as WsContextUrl);
expect(actual?.host).to.equal("github.com");
expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo");
}

@test public parseContextUrl_withPrebuild_withoutSchema() {
const actual = ContextURL.getNormalizedURL({
contextURL: "prebuild/github.com/gitpod-io/gitpod-test-repo",
context: {},
} as WsContextUrl);
expect(actual?.host).to.equal("github.com");
expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo");
}

@test public parseContextUrl_badUrl() {
const actual = ContextURL.getNormalizedURL({ contextURL: "[Object object]", context: {} } as WsContextUrl);
expect(actual).to.be.undefined;
Expand Down
4 changes: 0 additions & 4 deletions components/gitpod-protocol/src/context-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import { Workspace } from ".";
* TODO(gpl) See if we can get this into `server` code to remove the burden from clients
*/
export namespace ContextURL {
export const INCREMENTAL_PREBUILD_PREFIX = "incremental-prebuild";
export const PREBUILD_PREFIX = "prebuild";
export const IMAGEBUILD_PREFIX = "imagebuild";
export const SNAPSHOT_PREFIX = "snapshot";
export const REFERRER_PREFIX = "referrer:";
Expand Down Expand Up @@ -90,8 +88,6 @@ export namespace ContextURL {

const firstSegment = segments[0];
if (
firstSegment === PREBUILD_PREFIX ||
firstSegment === INCREMENTAL_PREBUILD_PREFIX ||
firstSegment === IMAGEBUILD_PREFIX ||
firstSegment === SNAPSHOT_PREFIX ||
firstSegment.startsWith(REFERRER_PREFIX)
Expand Down
3 changes: 0 additions & 3 deletions components/server/ee/src/container-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import { GitLabApp } from "./prebuilds/gitlab-app";
import { BitbucketApp } from "./prebuilds/bitbucket-app";
import { GitHubEnterpriseApp } from "./prebuilds/github-enterprise-app";
import { IncrementalPrebuildsService } from "./prebuilds/incremental-prebuilds-service";
import { IPrefixContextParser } from "../../src/workspace/context-parser";
import { StartPrebuildContextParser } from "./prebuilds/start-prebuild-context-parser";
import { WorkspaceFactory } from "../../src/workspace/workspace-factory";
import { WorkspaceFactoryEE } from "./workspace/workspace-factory";
import { MonitoringEndpointsAppEE } from "./monitoring-endpoint-ee";
Expand Down Expand Up @@ -72,7 +70,6 @@ export const productionEEContainerModule = new ContainerModule((bind, unbind, is
rebind(MonitoringEndpointsApp).to(MonitoringEndpointsAppEE).inSingletonScope();

bind(PrebuildManager).toSelf().inSingletonScope();
bind(IPrefixContextParser).to(StartPrebuildContextParser).inSingletonScope();
bind(GithubApp).toSelf().inSingletonScope();
bind(GitHubAppSupport).toSelf().inSingletonScope();
bind(GithubAppRules).toSelf().inSingletonScope();
Expand Down

This file was deleted.

0 comments on commit 0e4ccf1

Please sign in to comment.