Skip to content

Commit

Permalink
StartWorkspaceSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusludmann committed Oct 26, 2021
1 parent 7fab584 commit 1fc23ff
Show file tree
Hide file tree
Showing 14 changed files with 637 additions and 932 deletions.
2 changes: 1 addition & 1 deletion components/ee/ws-scheduler/pkg/scaler/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (wspd *WorkspaceManagerPrescaleDriver) startGhostWorkspaces(ctx context.Con
Username: "gitpod-ghost",
},
DeprecatedIdeImage: wspd.Config.IDEImage,
IdeImage: &api.StartWorkspaceSpec_IDEImage{
IdeImage: &api.IDEImage{
WebRef: wspd.Config.IDEImage,
},
Initializer: &csapi.WorkspaceInitializer{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (o *Orchestrator) Build(req *protocol.BuildRequest, resp protocol.ImageBuil
Timeout: maxBuildRuntime.String(),
WorkspaceImage: o.Config.BuilderImage,
DeprecatedIdeImage: o.Config.BuilderImage,
IdeImage: &wsmanapi.StartWorkspaceSpec_IDEImage{
IdeImage: &wsmanapi.IDEImage{
WebRef: o.Config.BuilderImage,
},
WorkspaceLocation: contextPath,
Expand Down
4 changes: 2 additions & 2 deletions components/server/src/workspace/workspace-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { IAnalyticsWriter } from '@gitpod/gitpod-protocol/lib/analytics';
import { log } from '@gitpod/gitpod-protocol/lib/util/logging';
import { TraceContext } from "@gitpod/gitpod-protocol/lib/util/tracing";
import { BuildRegistryAuth, BuildRegistryAuthSelective, BuildRegistryAuthTotal, BuildRequest, BuildResponse, BuildSource, BuildSourceDockerfile, BuildSourceReference, BuildStatus, ImageBuilderClientProvider, ResolveBaseImageRequest, ResolveWorkspaceImageRequest } from "@gitpod/image-builder/lib";
import { StartWorkspaceSpec, WorkspaceFeatureFlag, StartWorkspaceResponse } from "@gitpod/ws-manager/lib";
import { StartWorkspaceSpec, WorkspaceFeatureFlag, StartWorkspaceResponse, IDEImage } from "@gitpod/ws-manager/lib";
import { WorkspaceManagerClientProvider } from "@gitpod/ws-manager/lib/client-provider";
import { AdmissionLevel, EnvironmentVariable, GitSpec, PortSpec, PortVisibility, StartWorkspaceRequest, WorkspaceMetadata, WorkspaceType } from "@gitpod/ws-manager/lib/core_pb";
import * as crypto from 'crypto';
Expand Down Expand Up @@ -723,7 +723,7 @@ export class WorkspaceStarter {
spec.setGit(this.createGitSpec(workspace, user));
spec.setPortsList(ports);
spec.setInitializer((await initializerPromise).initializer);
const startWorkspaceSpecIDEImage = new StartWorkspaceSpec.IDEImage();
const startWorkspaceSpecIDEImage = new IDEImage();
startWorkspaceSpecIDEImage.setWebRef(ideImage);
spec.setIdeImage(startWorkspaceSpecIDEImage);
spec.setWorkspaceImage(instance.workspaceImage);
Expand Down
12 changes: 2 additions & 10 deletions components/ws-manager-api/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ message WorkspaceStatus {
WorkspaceAuthentication auth = 9;
}

// WorkspaceSpec is the specification of a workspace at runtime
message WorkspaceSpec {
// IDEImage configures the IDE images a workspace will use
message IDEImage {
// web_ref is a reference to an OCI image used for serving the web-based IDE
Expand All @@ -278,6 +276,8 @@ message WorkspaceSpec {
string desktop_ref = 2;
}

// WorkspaceSpec is the specification of a workspace at runtime
message WorkspaceSpec {
// workspace_image is the name of the Docker image this workspace runs
string workspace_image = 1;

Expand Down Expand Up @@ -452,14 +452,6 @@ message WorkspaceAuthentication {

// StartWorkspaceSpec specifies the configuration of a workspace for a workspace start
message StartWorkspaceSpec {
// IDEImage configures the IDE images a workspace will use
message IDEImage {
// web_ref is a reference to an OCI image used for serving the web-based IDE
string web_ref = 1;
// desktop_ref is an optional reference to an OCI image used for serving desktop IDEs
string desktop_ref = 2;
}

// workspace_image is the Docker image name of the workspace container
string workspace_image = 1;

Expand Down
Loading

0 comments on commit 1fc23ff

Please sign in to comment.