Skip to content

[ws-daemon-api] add pvc flag to DisposeWorkspaceRequest #9811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions components/ws-daemon-api/daemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ message DisposeWorkspaceRequest {

// backup_logs triggers the upload of terminal logs
bool backup_logs = 3;

// persistent_volume_claim is enabled if workspace is using PVC
bool persistent_volume_claim = 4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't the workspace marked as PVC workspace within ws-daemon already? IMHO we send that information during InitWorkspace already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are 💯 right. Thank you for catching that. Closing this PR.

}

message DisposeWorkspaceResponse {
Expand Down
122 changes: 67 additions & 55 deletions components/ws-daemon-api/go/daemon.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/ws-daemon-api/go/daemon_grpc.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/ws-daemon-api/go/workspace_daemon.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/ws-daemon-api/go/workspace_daemon_grpc.pb.go

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

25 changes: 14 additions & 11 deletions components/ws-daemon-api/typescript/src/daemon_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import * as jspb from "google-protobuf";
import * as content_service_api_initializer_pb from "@gitpod/content-service/lib";

export class InitWorkspaceRequest extends jspb.Message {
export class InitWorkspaceRequest extends jspb.Message {
getId(): string;
setId(value: string): InitWorkspaceRequest;

Expand Down Expand Up @@ -62,7 +62,7 @@ export namespace InitWorkspaceRequest {
}
}

export class WorkspaceMetadata extends jspb.Message {
export class WorkspaceMetadata extends jspb.Message {
getOwner(): string;
setOwner(value: string): WorkspaceMetadata;
getMetaId(): string;
Expand All @@ -85,7 +85,7 @@ export namespace WorkspaceMetadata {
}
}

export class InitWorkspaceResponse extends jspb.Message {
export class InitWorkspaceResponse extends jspb.Message {

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InitWorkspaceResponse.AsObject;
Expand All @@ -102,7 +102,7 @@ export namespace InitWorkspaceResponse {
}
}

export class WaitForInitRequest extends jspb.Message {
export class WaitForInitRequest extends jspb.Message {
getId(): string;
setId(value: string): WaitForInitRequest;

Expand All @@ -122,7 +122,7 @@ export namespace WaitForInitRequest {
}
}

export class WaitForInitResponse extends jspb.Message {
export class WaitForInitResponse extends jspb.Message {

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): WaitForInitResponse.AsObject;
Expand All @@ -139,7 +139,7 @@ export namespace WaitForInitResponse {
}
}

export class TakeSnapshotRequest extends jspb.Message {
export class TakeSnapshotRequest extends jspb.Message {
getId(): string;
setId(value: string): TakeSnapshotRequest;
getReturnImmediately(): boolean;
Expand All @@ -162,7 +162,7 @@ export namespace TakeSnapshotRequest {
}
}

export class TakeSnapshotResponse extends jspb.Message {
export class TakeSnapshotResponse extends jspb.Message {
getUrl(): string;
setUrl(value: string): TakeSnapshotResponse;

Expand All @@ -182,13 +182,15 @@ export namespace TakeSnapshotResponse {
}
}

export class DisposeWorkspaceRequest extends jspb.Message {
export class DisposeWorkspaceRequest extends jspb.Message {
getId(): string;
setId(value: string): DisposeWorkspaceRequest;
getBackup(): boolean;
setBackup(value: boolean): DisposeWorkspaceRequest;
getBackupLogs(): boolean;
setBackupLogs(value: boolean): DisposeWorkspaceRequest;
getPersistentVolumeClaim(): boolean;
setPersistentVolumeClaim(value: boolean): DisposeWorkspaceRequest;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DisposeWorkspaceRequest.AsObject;
Expand All @@ -205,10 +207,11 @@ export namespace DisposeWorkspaceRequest {
id: string,
backup: boolean,
backupLogs: boolean,
persistentVolumeClaim: boolean,
}
}

export class DisposeWorkspaceResponse extends jspb.Message {
export class DisposeWorkspaceResponse extends jspb.Message {

hasGitStatus(): boolean;
clearGitStatus(): void;
Expand All @@ -231,7 +234,7 @@ export namespace DisposeWorkspaceResponse {
}
}

export class BackupWorkspaceRequest extends jspb.Message {
export class BackupWorkspaceRequest extends jspb.Message {
getId(): string;
setId(value: string): BackupWorkspaceRequest;

Expand All @@ -251,7 +254,7 @@ export namespace BackupWorkspaceRequest {
}
}

export class BackupWorkspaceResponse extends jspb.Message {
export class BackupWorkspaceResponse extends jspb.Message {
getUrl(): string;
setUrl(value: string): BackupWorkspaceResponse;

Expand Down
40 changes: 38 additions & 2 deletions components/ws-daemon-api/typescript/src/daemon_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global = (function() {
if (this) { return this; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
if (typeof self !== 'undefined') { return self; }
return Function('return this')();
}.call(null));

var content$service$api_initializer_pb = require('@gitpod/content-service/lib');
goog.object.extend(proto, content$service$api_initializer_pb);
Expand Down Expand Up @@ -1488,7 +1494,8 @@ proto.wsdaemon.DisposeWorkspaceRequest.toObject = function(includeInstance, msg)
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
backup: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
backupLogs: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
backupLogs: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
persistentVolumeClaim: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
};

if (includeInstance) {
Expand Down Expand Up @@ -1537,6 +1544,10 @@ proto.wsdaemon.DisposeWorkspaceRequest.deserializeBinaryFromReader = function(ms
var value = /** @type {boolean} */ (reader.readBool());
msg.setBackupLogs(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
msg.setPersistentVolumeClaim(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -1587,6 +1598,13 @@ proto.wsdaemon.DisposeWorkspaceRequest.serializeBinaryToWriter = function(messag
f
);
}
f = message.getPersistentVolumeClaim();
if (f) {
writer.writeBool(
4,
f
);
}
};


Expand Down Expand Up @@ -1644,6 +1662,24 @@ proto.wsdaemon.DisposeWorkspaceRequest.prototype.setBackupLogs = function(value)
};


/**
* optional bool persistent_volume_claim = 4;
* @return {boolean}
*/
proto.wsdaemon.DisposeWorkspaceRequest.prototype.getPersistentVolumeClaim = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
};


/**
* @param {boolean} value
* @return {!proto.wsdaemon.DisposeWorkspaceRequest} returns this
*/
proto.wsdaemon.DisposeWorkspaceRequest.prototype.setPersistentVolumeClaim = function(value) {
return jspb.Message.setProto3BooleanField(this, 4, value);
};





Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global = (function() {
if (this) { return this; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
if (typeof self !== 'undefined') { return self; }
return Function('return this')();
}.call(null));

goog.exportSymbol('proto.iws.EvacuateCGroupRequest', null, global);
goog.exportSymbol('proto.iws.EvacuateCGroupResponse', null, global);
Expand Down