Skip to content

Commit

Permalink
Remove checkoutLocation from StartWorkspaceReq
Browse files Browse the repository at this point in the history
  • Loading branch information
csweichel committed Mar 29, 2022
1 parent 3d4e0e4 commit cbc136e
Show file tree
Hide file tree
Showing 29 changed files with 277 additions and 258 deletions.
2 changes: 1 addition & 1 deletion components/content-service-api/go/blobs.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/content-service-api/go/content.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/content-service-api/go/headless-log.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/content-service-api/go/ideplugin.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 51 additions & 39 deletions components/content-service-api/go/initializer.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/content-service-api/go/workspace.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion components/content-service-api/initializer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ message PrebuildInitializer {
}

// FromBackupInitializer initializes content from a previously made backup
message FromBackupInitializer {}
message FromBackupInitializer {
string checkout_location = 1;
}

// GitStatus describes the current Git working copy status, akin to a combination of "git status" and "git branch"
message GitStatus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ export namespace PrebuildInitializer {
}

export class FromBackupInitializer extends jspb.Message {
getCheckoutLocation(): string;
setCheckoutLocation(value: string): FromBackupInitializer;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): FromBackupInitializer.AsObject;
Expand All @@ -311,6 +313,7 @@ export class FromBackupInitializer extends jspb.Message {

export namespace FromBackupInitializer {
export type AsObject = {
checkoutLocation: string,
}
}

Expand Down
31 changes: 30 additions & 1 deletion components/content-service-api/typescript/src/initializer_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2328,7 +2328,7 @@ proto.contentservice.FromBackupInitializer.prototype.toObject = function(opt_inc
*/
proto.contentservice.FromBackupInitializer.toObject = function(includeInstance, msg) {
var f, obj = {

checkoutLocation: jspb.Message.getFieldWithDefault(msg, 1, "")
};

if (includeInstance) {
Expand Down Expand Up @@ -2365,6 +2365,10 @@ proto.contentservice.FromBackupInitializer.deserializeBinaryFromReader = functio
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setCheckoutLocation(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -2394,6 +2398,31 @@ proto.contentservice.FromBackupInitializer.prototype.serializeBinary = function(
*/
proto.contentservice.FromBackupInitializer.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCheckoutLocation();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};


/**
* optional string checkout_location = 1;
* @return {string}
*/
proto.contentservice.FromBackupInitializer.prototype.getCheckoutLocation = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
* @param {string} value
* @return {!proto.contentservice.FromBackupInitializer} returns this
*/
proto.contentservice.FromBackupInitializer.prototype.setCheckoutLocation = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};


Expand Down
2 changes: 1 addition & 1 deletion components/gitpod-protocol/src/wsready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* See License-AGPL.txt in the project root for license information.
*/

// generated using github.com/32leaves/bel on 2022-02-15 11:53:18.380158212 +0000 UTC m=+0.011913675
// generated using github.com/32leaves/bel on 2022-03-29 17:08:06.113873917 +0000 UTC m=+0.010035965
// DO NOT MODIFY

export enum WorkspaceInitSource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ func (o *Orchestrator) Build(req *protocol.BuildRequest, resp protocol.ImageBuil
Owner: buildWorkspaceOwnerID,
},
Spec: &wsmanapi.StartWorkspaceSpec{
CheckoutLocation: ".",
Initializer: initializer,
Timeout: maxBuildRuntime.String(),
WorkspaceImage: o.Config.BuilderImage,
Expand Down
9 changes: 6 additions & 3 deletions components/server/src/workspace/workspace-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,6 @@ export class WorkspaceStarter {
}

const spec = new StartWorkspaceSpec();
spec.setCheckoutLocation(checkoutLocation!);
await createGitpodTokenPromise;
spec.setEnvvarsList(envvars);
spec.setGit(this.createGitSpec(workspace, user));
Expand All @@ -1188,7 +1187,7 @@ export class WorkspaceStarter {
spec.setIdeImage(startWorkspaceSpecIDEImage);
spec.setDeprecatedIdeImage(ideImage);
spec.setWorkspaceImage(instance.workspaceImage);
spec.setWorkspaceLocation(workspace.config.workspaceLocation || spec.getCheckoutLocation());
spec.setWorkspaceLocation(workspace.config.workspaceLocation || checkoutLocation);
spec.setFeatureFlagsList(this.toWorkspaceFeatureFlags(featureFlags));
if (workspace.type === "regular") {
spec.setTimeout(await userTimeoutPromise);
Expand Down Expand Up @@ -1317,7 +1316,11 @@ export class WorkspaceStarter {
const disp = new DisposableCollection();

if (mustHaveBackup) {
result.setBackup(new FromBackupInitializer());
const backup = new FromBackupInitializer();
if (CommitContext.is(context)) {
backup.setCheckoutLocation(context.checkoutLocation || "");
}
result.setBackup(backup);
} else if (SnapshotContext.is(context)) {
const snapshot = new SnapshotInitializer();
snapshot.setSnapshot(context.snapshotBucketId);
Expand Down
2 changes: 1 addition & 1 deletion components/ws-manager-api/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ message StartWorkspaceSpec {
repeated EnvironmentVariable envvars = 6;

// checkout_location describes where the code has been checked out to
string checkout_location = 7;
reserved 7;

// workspace_location describes where the workspace root of Theia will be
string workspace_location = 8;
Expand Down
Loading

0 comments on commit cbc136e

Please sign in to comment.