Skip to content
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

Add support for backing up and restoring workspaces from snapshot volumes #9475

Merged
merged 8 commits into from May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions 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.

4 changes: 4 additions & 0 deletions components/content-service-api/go/blobs_grpc.pb.go

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

4 changes: 2 additions & 2 deletions 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.

4 changes: 4 additions & 0 deletions components/content-service-api/go/content_grpc.pb.go

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

4 changes: 2 additions & 2 deletions 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.

4 changes: 4 additions & 0 deletions components/content-service-api/go/headless-log_grpc.pb.go

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

4 changes: 2 additions & 2 deletions 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.

4 changes: 4 additions & 0 deletions components/content-service-api/go/ideplugin_grpc.pb.go

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

93 changes: 52 additions & 41 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.

4 changes: 2 additions & 2 deletions 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: 4 additions & 0 deletions components/content-service-api/go/workspace_grpc.pb.go

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

1 change: 1 addition & 0 deletions components/content-service-api/initializer.proto
Expand Up @@ -124,6 +124,7 @@ message PrebuildInitializer {
// FromBackupInitializer initializes content from a previously made backup
message FromBackupInitializer {
string checkout_location = 1;
bool from_volume_snapshot = 2;
}

// GitStatus describes the current Git working copy status, akin to a combination of "git status" and "git branch"
Expand Down
8 changes: 1 addition & 7 deletions components/content-service-api/typescript/src/blobs_pb.js
Expand Up @@ -19,13 +19,7 @@

var jspb = require('google-protobuf');
var goog = jspb;
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 global = (function() { return this || window || global || self || Function('return this')(); }).call(null);

goog.exportSymbol('proto.contentservice.DeleteRequest', null, global);
goog.exportSymbol('proto.contentservice.DeleteRequest.NameCase', null, global);
Expand Down
Expand Up @@ -19,13 +19,7 @@

var jspb = require('google-protobuf');
var goog = jspb;
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 global = (function() { return this || window || global || self || Function('return this')(); }).call(null);

goog.exportSymbol('proto.contentservice.DeleteUserContentRequest', null, global);
goog.exportSymbol('proto.contentservice.DeleteUserContentResponse', null, global);
Expand Down
Expand Up @@ -19,13 +19,7 @@

var jspb = require('google-protobuf');
var goog = jspb;
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 global = (function() { return this || window || global || self || Function('return this')(); }).call(null);

goog.exportSymbol('proto.contentservice.ListLogsRequest', null, global);
goog.exportSymbol('proto.contentservice.ListLogsResponse', null, global);
Expand Down
Expand Up @@ -19,13 +19,7 @@

var jspb = require('google-protobuf');
var goog = jspb;
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 global = (function() { return this || window || global || self || Function('return this')(); }).call(null);

goog.exportSymbol('proto.ideplugin.PluginDownloadURLRequest', null, global);
goog.exportSymbol('proto.ideplugin.PluginDownloadURLResponse', null, global);
Expand Down
Expand Up @@ -300,6 +300,8 @@ export namespace PrebuildInitializer {
export class FromBackupInitializer extends jspb.Message {
getCheckoutLocation(): string;
setCheckoutLocation(value: string): FromBackupInitializer;
getFromVolumeSnapshot(): boolean;
setFromVolumeSnapshot(value: boolean): FromBackupInitializer;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): FromBackupInitializer.AsObject;
Expand All @@ -314,6 +316,7 @@ export class FromBackupInitializer extends jspb.Message {
export namespace FromBackupInitializer {
export type AsObject = {
checkoutLocation: string,
fromVolumeSnapshot: boolean,
}
}

Expand Down
40 changes: 32 additions & 8 deletions components/content-service-api/typescript/src/initializer_pb.js
Expand Up @@ -19,13 +19,7 @@

var jspb = require('google-protobuf');
var goog = jspb;
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 global = (function() { return this || window || global || self || Function('return this')(); }).call(null);

goog.exportSymbol('proto.contentservice.CloneTargetMode', null, global);
goog.exportSymbol('proto.contentservice.CompositeInitializer', null, global);
Expand Down Expand Up @@ -2328,7 +2322,8 @@ proto.contentservice.FromBackupInitializer.prototype.toObject = function(opt_inc
*/
proto.contentservice.FromBackupInitializer.toObject = function(includeInstance, msg) {
var f, obj = {
checkoutLocation: jspb.Message.getFieldWithDefault(msg, 1, "")
checkoutLocation: jspb.Message.getFieldWithDefault(msg, 1, ""),
fromVolumeSnapshot: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
};

if (includeInstance) {
Expand Down Expand Up @@ -2369,6 +2364,10 @@ proto.contentservice.FromBackupInitializer.deserializeBinaryFromReader = functio
var value = /** @type {string} */ (reader.readString());
msg.setCheckoutLocation(value);
break;
case 2:
var value = /** @type {boolean} */ (reader.readBool());
msg.setFromVolumeSnapshot(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -2405,6 +2404,13 @@ proto.contentservice.FromBackupInitializer.serializeBinaryToWriter = function(me
f
);
}
f = message.getFromVolumeSnapshot();
if (f) {
writer.writeBool(
2,
f
);
}
};


Expand All @@ -2426,6 +2432,24 @@ proto.contentservice.FromBackupInitializer.prototype.setCheckoutLocation = funct
};


/**
* optional bool from_volume_snapshot = 2;
* @return {boolean}
*/
proto.contentservice.FromBackupInitializer.prototype.getFromVolumeSnapshot = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
};


/**
* @param {boolean} value
* @return {!proto.contentservice.FromBackupInitializer} returns this
*/
proto.contentservice.FromBackupInitializer.prototype.setFromVolumeSnapshot = function(value) {
return jspb.Message.setProto3BooleanField(this, 2, value);
};



/**
* List of repeated fields within this message type.
Expand Down