From 298cf16445912da22678baf57b3c773ac6193d3f Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Wed, 6 Apr 2022 01:26:18 +0000 Subject: [PATCH 1/8] snapshot volume support --- components/content-service-api/go/blobs.pb.go | 2 +- .../content-service-api/go/blobs_grpc.pb.go | 4 + .../content-service-api/go/content.pb.go | 2 +- .../content-service-api/go/content_grpc.pb.go | 4 + .../content-service-api/go/headless-log.pb.go | 2 +- .../go/headless-log_grpc.pb.go | 4 + .../content-service-api/go/ideplugin.pb.go | 2 +- .../go/ideplugin_grpc.pb.go | 4 + .../content-service-api/go/initializer.pb.go | 368 +++++---- .../content-service-api/go/workspace.pb.go | 2 +- .../go/workspace_grpc.pb.go | 4 + .../content-service-api/initializer.proto | 6 + .../typescript/src/initializer_pb.d.ts | 27 + .../typescript/src/initializer_pb.js | 210 ++++- .../pkg/initializer/initializer.go | 16 + .../content-service/pkg/layer/provider.go | 10 + .../server/src/workspace/workspace-starter.ts | 38 +- components/ws-daemon-api/daemon.proto | 3 + components/ws-daemon-api/go/daemon.pb.go | 122 +-- components/ws-daemon-api/go/daemon_grpc.pb.go | 2 +- .../ws-daemon-api/go/workspace_daemon.pb.go | 2 +- .../go/workspace_daemon_grpc.pb.go | 2 +- .../typescript/src/daemon_pb.d.ts | 25 +- .../ws-daemon-api/typescript/src/daemon_pb.js | 40 +- .../typescript/src/workspace_daemon_pb.js | 8 +- components/ws-daemon/pkg/content/service.go | 8 +- .../pkg/internal/session/workspace.go | 61 +- components/ws-manager-api/core.proto | 15 + components/ws-manager-api/go.mod | 2 + components/ws-manager-api/go.sum | 6 + components/ws-manager-api/go/core.pb.go | 744 ++++++++++-------- components/ws-manager-api/go/core_grpc.pb.go | 2 +- .../typescript/src/core_pb.d.ts | 35 + .../ws-manager-api/typescript/src/core_pb.js | 296 ++++++- components/ws-manager-bridge/src/bridge.ts | 19 + components/ws-manager/cmd/run.go | 6 + components/ws-manager/go.mod | 2 + components/ws-manager/go.sum | 4 + .../ws-manager/pkg/manager/annotations.go | 9 + components/ws-manager/pkg/manager/create.go | 22 +- components/ws-manager/pkg/manager/manager.go | 24 +- components/ws-manager/pkg/manager/monitor.go | 189 ++++- components/ws-manager/pkg/manager/status.go | 12 + .../status_brokenScheduler_UNKNOWN00.golden | 3 +- .../status_cannotPull_004_CREATING00.golden | 3 +- .../status_cannotPull_005_STOPPED00.golden | 3 +- .../status_containerd4214_STOPPING00.golden | 3 +- ...tus_contentInitFailed_005_STOPPED00.golden | 3 +- .../testdata/status_disposal_STOPPED01.golden | 3 +- .../testdata/status_disposal_STOPPED02.golden | 3 +- .../testdata/status_disposal_STOPPED03.golden | 3 +- .../status_disposal_STOPPING01.golden | 4 +- .../status_disposal_STOPPING02.golden | 3 +- .../manager/testdata/status_errimgpull.golden | 3 +- .../status_errimgpull_CREATING01.golden | 3 +- ...s_failedBeforeStopping_explicitFail.golden | 3 +- .../status_failedLogs_RUNNING00.golden | 3 +- ...tus_failedPending_evicted_UNKNOWN01.golden | 3 +- ...tus_failedPending_evicted_UNKNOWN02.golden | 3 +- ...atus_failedWorkspaceMount_PENDING00.golden | 3 +- .../status_firstUserActivity_RUNNING.golden | 3 +- ...tatus_headlessTaskFailed_STOPPING00.golden | 3 +- .../status_headless_STOPPING00.golden | 4 +- ...atus_ideFailedToStart_005_RUNNING00.golden | 3 +- .../status_imagespec_RUNNING00.golden | 3 +- .../testdata/status_interrupted.golden | 4 +- .../status_interrupted_CREATING00.golden | 4 +- ...rupted_networkNotReady_1_event_only.golden | 4 +- ...etworkNotReady_2_event_and_exitcode.golden | 3 +- ...orkNotReady_3_recovered_CONSTRUCTED.golden | 4 +- .../manager/testdata/status_metadata.golden | 4 +- .../manager/testdata/status_ownerToken.golden | 3 +- .../status_prebuildFail_STOPPED00.golden | 3 +- .../status_prebuildFail_STOPPING00.golden | 4 +- .../status_prebuildSuccess2_CREATING01.golden | 3 +- .../status_prebuildSuccess_STOPPED00.golden | 3 +- .../status_prebuildSuccess_STOPPING00.golden | 4 +- .../status_regularStart_Initializing00.golden | 4 +- ...atus_stoppedByRequest_000_RUNNING00.golden | 3 +- .../status_stuckInCreating_CREATING00.golden | 3 +- .../status_stuckInStopping_RUNNING00.golden | 3 +- .../status_stuckInStopping_STOPPING00.golden | 4 +- .../status_wsstartup_Creating00.golden | 3 +- 83 files changed, 1824 insertions(+), 672 deletions(-) diff --git a/components/content-service-api/go/blobs.pb.go b/components/content-service-api/go/blobs.pb.go index a92067d4e6ed4d..0dca7d3cef60dc 100644 --- a/components/content-service-api/go/blobs.pb.go +++ b/components/content-service-api/go/blobs.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.0 // protoc v3.19.4 // source: blobs.proto diff --git a/components/content-service-api/go/blobs_grpc.pb.go b/components/content-service-api/go/blobs_grpc.pb.go index e9fec073a75a26..0b1e04cf0e20f9 100644 --- a/components/content-service-api/go/blobs_grpc.pb.go +++ b/components/content-service-api/go/blobs_grpc.pb.go @@ -3,6 +3,10 @@ // See License-AGPL.txt in the project root for license information. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.4 +// source: blobs.proto package api diff --git a/components/content-service-api/go/content.pb.go b/components/content-service-api/go/content.pb.go index d0564559abbea2..1ebe717754a092 100644 --- a/components/content-service-api/go/content.pb.go +++ b/components/content-service-api/go/content.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.0 // protoc v3.19.4 // source: content.proto diff --git a/components/content-service-api/go/content_grpc.pb.go b/components/content-service-api/go/content_grpc.pb.go index 9b377b16fe061b..eadf6a97c7a217 100644 --- a/components/content-service-api/go/content_grpc.pb.go +++ b/components/content-service-api/go/content_grpc.pb.go @@ -3,6 +3,10 @@ // See License-AGPL.txt in the project root for license information. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.4 +// source: content.proto package api diff --git a/components/content-service-api/go/headless-log.pb.go b/components/content-service-api/go/headless-log.pb.go index ca4c3943f44d51..33487f7153a8e8 100644 --- a/components/content-service-api/go/headless-log.pb.go +++ b/components/content-service-api/go/headless-log.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.0 // protoc v3.19.4 // source: headless-log.proto diff --git a/components/content-service-api/go/headless-log_grpc.pb.go b/components/content-service-api/go/headless-log_grpc.pb.go index 70e0bd63989267..d553c611f0c3c7 100644 --- a/components/content-service-api/go/headless-log_grpc.pb.go +++ b/components/content-service-api/go/headless-log_grpc.pb.go @@ -3,6 +3,10 @@ // See License-AGPL.txt in the project root for license information. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.4 +// source: headless-log.proto package api diff --git a/components/content-service-api/go/ideplugin.pb.go b/components/content-service-api/go/ideplugin.pb.go index e5ab96189dd1e7..de3d1baf011edc 100644 --- a/components/content-service-api/go/ideplugin.pb.go +++ b/components/content-service-api/go/ideplugin.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.0 // protoc v3.19.4 // source: ideplugin.proto diff --git a/components/content-service-api/go/ideplugin_grpc.pb.go b/components/content-service-api/go/ideplugin_grpc.pb.go index 6076be955215fe..80796aa07f5b42 100644 --- a/components/content-service-api/go/ideplugin_grpc.pb.go +++ b/components/content-service-api/go/ideplugin_grpc.pb.go @@ -3,6 +3,10 @@ // See License-AGPL.txt in the project root for license information. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.4 +// source: ideplugin.proto package api diff --git a/components/content-service-api/go/initializer.pb.go b/components/content-service-api/go/initializer.pb.go index 0cded485264565..6dc9946db1a1ba 100644 --- a/components/content-service-api/go/initializer.pb.go +++ b/components/content-service-api/go/initializer.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.0 // protoc v3.19.4 // source: initializer.proto @@ -149,6 +149,7 @@ type WorkspaceInitializer struct { // *WorkspaceInitializer_Composite // *WorkspaceInitializer_Download // *WorkspaceInitializer_Backup + // *WorkspaceInitializer_SnapshotVolume Spec isWorkspaceInitializer_Spec `protobuf_oneof:"spec"` } @@ -240,6 +241,13 @@ func (x *WorkspaceInitializer) GetBackup() *FromBackupInitializer { return nil } +func (x *WorkspaceInitializer) GetSnapshotVolume() *FromSnapshotVolumeInitializer { + if x, ok := x.GetSpec().(*WorkspaceInitializer_SnapshotVolume); ok { + return x.SnapshotVolume + } + return nil +} + type isWorkspaceInitializer_Spec interface { isWorkspaceInitializer_Spec() } @@ -272,6 +280,10 @@ type WorkspaceInitializer_Backup struct { Backup *FromBackupInitializer `protobuf:"bytes,7,opt,name=backup,proto3,oneof"` } +type WorkspaceInitializer_SnapshotVolume struct { + SnapshotVolume *FromSnapshotVolumeInitializer `protobuf:"bytes,8,opt,name=snapshot_volume,json=snapshotVolume,proto3,oneof"` +} + func (*WorkspaceInitializer_Empty) isWorkspaceInitializer_Spec() {} func (*WorkspaceInitializer_Git) isWorkspaceInitializer_Spec() {} @@ -286,6 +298,8 @@ func (*WorkspaceInitializer_Download) isWorkspaceInitializer_Spec() {} func (*WorkspaceInitializer_Backup) isWorkspaceInitializer_Spec() {} +func (*WorkspaceInitializer_SnapshotVolume) isWorkspaceInitializer_Spec() {} + // CompositeInitializer uses a collection of initializer to produce workspace content. // All initializer are executed in the order they're provided. type CompositeInitializer struct { @@ -760,6 +774,54 @@ func (x *FromBackupInitializer) GetCheckoutLocation() string { return "" } +// FromSnapshotVolumeInitializer empty initializer when workspace is created from snapshot volume +type FromSnapshotVolumeInitializer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CheckoutLocation string `protobuf:"bytes,1,opt,name=checkout_location,json=checkoutLocation,proto3" json:"checkout_location,omitempty"` +} + +func (x *FromSnapshotVolumeInitializer) Reset() { + *x = FromSnapshotVolumeInitializer{} + if protoimpl.UnsafeEnabled { + mi := &file_initializer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FromSnapshotVolumeInitializer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FromSnapshotVolumeInitializer) ProtoMessage() {} + +func (x *FromSnapshotVolumeInitializer) ProtoReflect() protoreflect.Message { + mi := &file_initializer_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FromSnapshotVolumeInitializer.ProtoReflect.Descriptor instead. +func (*FromSnapshotVolumeInitializer) Descriptor() ([]byte, []int) { + return file_initializer_proto_rawDescGZIP(), []int{9} +} + +func (x *FromSnapshotVolumeInitializer) GetCheckoutLocation() string { + if x != nil { + return x.CheckoutLocation + } + return "" +} + // GitStatus describes the current Git working copy status, akin to a combination of "git status" and "git branch" type GitStatus struct { state protoimpl.MessageState @@ -787,7 +849,7 @@ type GitStatus struct { func (x *GitStatus) Reset() { *x = GitStatus{} if protoimpl.UnsafeEnabled { - mi := &file_initializer_proto_msgTypes[9] + mi := &file_initializer_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -800,7 +862,7 @@ func (x *GitStatus) String() string { func (*GitStatus) ProtoMessage() {} func (x *GitStatus) ProtoReflect() protoreflect.Message { - mi := &file_initializer_proto_msgTypes[9] + mi := &file_initializer_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -813,7 +875,7 @@ func (x *GitStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use GitStatus.ProtoReflect.Descriptor instead. func (*GitStatus) Descriptor() ([]byte, []int) { - return file_initializer_proto_rawDescGZIP(), []int{9} + return file_initializer_proto_rawDescGZIP(), []int{10} } func (x *GitStatus) GetBranch() string { @@ -892,7 +954,7 @@ type FileDownloadInitializer_FileInfo struct { func (x *FileDownloadInitializer_FileInfo) Reset() { *x = FileDownloadInitializer_FileInfo{} if protoimpl.UnsafeEnabled { - mi := &file_initializer_proto_msgTypes[10] + mi := &file_initializer_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -905,7 +967,7 @@ func (x *FileDownloadInitializer_FileInfo) String() string { func (*FileDownloadInitializer_FileInfo) ProtoMessage() {} func (x *FileDownloadInitializer_FileInfo) ProtoReflect() protoreflect.Message { - mi := &file_initializer_proto_msgTypes[10] + mi := &file_initializer_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -947,7 +1009,7 @@ var File_initializer_proto protoreflect.FileDescriptor var file_initializer_proto_rawDesc = []byte{ 0x0a, 0x11, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x22, 0xe0, 0x03, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x69, 0x63, 0x65, 0x22, 0xba, 0x04, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, @@ -976,120 +1038,131 @@ var file_initializer_proto_rawDesc = []byte{ 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x06, - 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x5e, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x46, - 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x22, 0xdd, 0x01, 0x0a, 0x17, 0x46, 0x69, 0x6c, 0x65, 0x44, - 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x72, 0x12, 0x46, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x49, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0x51, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, - 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x49, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x22, 0xa2, 0x02, 0x0a, 0x0e, 0x47, - 0x69, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x1d, 0x0a, - 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x55, 0x72, 0x69, 0x12, 0x2e, 0x0a, 0x13, - 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, - 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x55, 0x72, 0x69, 0x12, 0x40, 0x0a, 0x0b, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x6f, - 0x64, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x65, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x67, 0x65, 0x74, 0x12, - 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x06, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, - 0xc2, 0x02, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, - 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x45, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, - 0x5f, 0x6f, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, - 0x4f, 0x74, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x31, 0x0a, 0x13, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, - 0x3f, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x12, 0x30, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, - 0x69, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x03, 0x67, - 0x69, 0x74, 0x22, 0x44, 0x0a, 0x15, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe7, 0x02, 0x0a, 0x09, 0x47, 0x69, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x23, - 0x0a, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, - 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, - 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x34, - 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, - 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x75, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, - 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, - 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, 0x70, - 0x75, 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x73, 0x2a, 0x5a, 0x0a, 0x0f, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, - 0x48, 0x45, 0x41, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, - 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x4d, - 0x4f, 0x54, 0x45, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, - 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x03, 0x2a, 0x40, - 0x0a, 0x0d, 0x47, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, - 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, - 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, - 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x4f, 0x54, 0x53, 0x10, 0x02, - 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, - 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x7a, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x58, + 0x0a, 0x0f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x22, 0x5e, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, + 0x22, 0xdd, 0x01, 0x0a, 0x17, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, + 0x64, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x05, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x69, 0x6c, + 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x51, 0x0a, + 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x22, 0x12, 0x0a, 0x10, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x72, 0x22, 0xa2, 0x02, 0x0a, 0x0e, 0x47, 0x69, 0x74, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x55, 0x72, 0x69, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x5f, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x55, 0x72, 0x69, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6c, 0x6f, + 0x6e, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x6f, 0x6e, + 0x65, 0x5f, 0x74, 0x61, 0x67, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, + 0x6c, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x67, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc2, 0x02, 0x0a, 0x09, 0x47, 0x69, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0e, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x12, 0x23, 0x0a, + 0x0d, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6f, 0x74, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4f, 0x74, 0x73, 0x1a, 0x3f, 0x0a, + 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x31, + 0x0a, 0x13, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x22, 0x88, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x70, 0x72, 0x65, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, + 0x52, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x30, 0x0a, 0x03, 0x67, 0x69, + 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x03, 0x67, 0x69, 0x74, 0x22, 0x44, 0x0a, 0x15, + 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, + 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x4c, 0x0a, 0x1d, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xe7, 0x02, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x75, + 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, + 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x70, + 0x75, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, + 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x70, 0x75, 0x73, + 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x2a, 0x5a, 0x0a, 0x0f, 0x43, 0x6c, + 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, + 0x0b, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, + 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x42, 0x52, 0x41, 0x4e, + 0x43, 0x48, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x42, 0x52, + 0x41, 0x4e, 0x43, 0x48, 0x10, 0x03, 0x2a, 0x40, 0x0a, 0x0d, 0x47, 0x69, 0x74, 0x41, 0x75, 0x74, + 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x41, 0x55, + 0x54, 0x48, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x41, 0x55, + 0x54, 0x48, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x41, 0x55, + 0x54, 0x48, 0x5f, 0x4f, 0x54, 0x53, 0x10, 0x02, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, + 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1105,7 +1178,7 @@ func file_initializer_proto_rawDescGZIP() []byte { } var file_initializer_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_initializer_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_initializer_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_initializer_proto_goTypes = []interface{}{ (CloneTargetMode)(0), // 0: contentservice.CloneTargetMode (GitAuthMethod)(0), // 1: contentservice.GitAuthMethod @@ -1118,9 +1191,10 @@ var file_initializer_proto_goTypes = []interface{}{ (*SnapshotInitializer)(nil), // 8: contentservice.SnapshotInitializer (*PrebuildInitializer)(nil), // 9: contentservice.PrebuildInitializer (*FromBackupInitializer)(nil), // 10: contentservice.FromBackupInitializer - (*GitStatus)(nil), // 11: contentservice.GitStatus - (*FileDownloadInitializer_FileInfo)(nil), // 12: contentservice.FileDownloadInitializer.FileInfo - nil, // 13: contentservice.GitConfig.CustomConfigEntry + (*FromSnapshotVolumeInitializer)(nil), // 11: contentservice.FromSnapshotVolumeInitializer + (*GitStatus)(nil), // 12: contentservice.GitStatus + (*FileDownloadInitializer_FileInfo)(nil), // 13: contentservice.FileDownloadInitializer.FileInfo + nil, // 14: contentservice.GitConfig.CustomConfigEntry } var file_initializer_proto_depIdxs = []int32{ 5, // 0: contentservice.WorkspaceInitializer.empty:type_name -> contentservice.EmptyInitializer @@ -1130,19 +1204,20 @@ var file_initializer_proto_depIdxs = []int32{ 3, // 4: contentservice.WorkspaceInitializer.composite:type_name -> contentservice.CompositeInitializer 4, // 5: contentservice.WorkspaceInitializer.download:type_name -> contentservice.FileDownloadInitializer 10, // 6: contentservice.WorkspaceInitializer.backup:type_name -> contentservice.FromBackupInitializer - 2, // 7: contentservice.CompositeInitializer.initializer:type_name -> contentservice.WorkspaceInitializer - 12, // 8: contentservice.FileDownloadInitializer.files:type_name -> contentservice.FileDownloadInitializer.FileInfo - 0, // 9: contentservice.GitInitializer.target_mode:type_name -> contentservice.CloneTargetMode - 7, // 10: contentservice.GitInitializer.config:type_name -> contentservice.GitConfig - 13, // 11: contentservice.GitConfig.custom_config:type_name -> contentservice.GitConfig.CustomConfigEntry - 1, // 12: contentservice.GitConfig.authentication:type_name -> contentservice.GitAuthMethod - 8, // 13: contentservice.PrebuildInitializer.prebuild:type_name -> contentservice.SnapshotInitializer - 6, // 14: contentservice.PrebuildInitializer.git:type_name -> contentservice.GitInitializer - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 11, // 7: contentservice.WorkspaceInitializer.snapshot_volume:type_name -> contentservice.FromSnapshotVolumeInitializer + 2, // 8: contentservice.CompositeInitializer.initializer:type_name -> contentservice.WorkspaceInitializer + 13, // 9: contentservice.FileDownloadInitializer.files:type_name -> contentservice.FileDownloadInitializer.FileInfo + 0, // 10: contentservice.GitInitializer.target_mode:type_name -> contentservice.CloneTargetMode + 7, // 11: contentservice.GitInitializer.config:type_name -> contentservice.GitConfig + 14, // 12: contentservice.GitConfig.custom_config:type_name -> contentservice.GitConfig.CustomConfigEntry + 1, // 13: contentservice.GitConfig.authentication:type_name -> contentservice.GitAuthMethod + 8, // 14: contentservice.PrebuildInitializer.prebuild:type_name -> contentservice.SnapshotInitializer + 6, // 15: contentservice.PrebuildInitializer.git:type_name -> contentservice.GitInitializer + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_initializer_proto_init() } @@ -1260,7 +1335,7 @@ func file_initializer_proto_init() { } } file_initializer_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GitStatus); i { + switch v := v.(*FromSnapshotVolumeInitializer); i { case 0: return &v.state case 1: @@ -1272,6 +1347,18 @@ func file_initializer_proto_init() { } } file_initializer_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GitStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_initializer_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileDownloadInitializer_FileInfo); i { case 0: return &v.state @@ -1292,6 +1379,7 @@ func file_initializer_proto_init() { (*WorkspaceInitializer_Composite)(nil), (*WorkspaceInitializer_Download)(nil), (*WorkspaceInitializer_Backup)(nil), + (*WorkspaceInitializer_SnapshotVolume)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1299,7 +1387,7 @@ func file_initializer_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_initializer_proto_rawDesc, NumEnums: 2, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/components/content-service-api/go/workspace.pb.go b/components/content-service-api/go/workspace.pb.go index 4857472a22fc92..562d458cdbc2b7 100644 --- a/components/content-service-api/go/workspace.pb.go +++ b/components/content-service-api/go/workspace.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.0 // protoc v3.19.4 // source: workspace.proto diff --git a/components/content-service-api/go/workspace_grpc.pb.go b/components/content-service-api/go/workspace_grpc.pb.go index 932ebebbdf8c68..1e2e9a4ec4539c 100644 --- a/components/content-service-api/go/workspace_grpc.pb.go +++ b/components/content-service-api/go/workspace_grpc.pb.go @@ -3,6 +3,10 @@ // See License-AGPL.txt in the project root for license information. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.4 +// source: workspace.proto package api diff --git a/components/content-service-api/initializer.proto b/components/content-service-api/initializer.proto index 87f8cc0b4415ae..a68131570acd52 100644 --- a/components/content-service-api/initializer.proto +++ b/components/content-service-api/initializer.proto @@ -14,6 +14,7 @@ message WorkspaceInitializer { CompositeInitializer composite = 5; FileDownloadInitializer download = 6; FromBackupInitializer backup = 7; + FromSnapshotVolumeInitializer snapshot_volume = 8; } } @@ -126,6 +127,11 @@ message FromBackupInitializer { string checkout_location = 1; } +// FromSnapshotVolumeInitializer initializes content when workspace is created from snapshot volume +message FromSnapshotVolumeInitializer { + string checkout_location = 1; +} + // GitStatus describes the current Git working copy status, akin to a combination of "git status" and "git branch" message GitStatus { // branch is branch we're currently on diff --git a/components/content-service-api/typescript/src/initializer_pb.d.ts b/components/content-service-api/typescript/src/initializer_pb.d.ts index c2540034c6f4fd..7b41da7ece37a3 100644 --- a/components/content-service-api/typescript/src/initializer_pb.d.ts +++ b/components/content-service-api/typescript/src/initializer_pb.d.ts @@ -49,6 +49,11 @@ export class WorkspaceInitializer extends jspb.Message { getBackup(): FromBackupInitializer | undefined; setBackup(value?: FromBackupInitializer): WorkspaceInitializer; + hasSnapshotVolume(): boolean; + clearSnapshotVolume(): void; + getSnapshotVolume(): FromSnapshotVolumeInitializer | undefined; + setSnapshotVolume(value?: FromSnapshotVolumeInitializer): WorkspaceInitializer; + getSpecCase(): WorkspaceInitializer.SpecCase; serializeBinary(): Uint8Array; @@ -70,6 +75,7 @@ export namespace WorkspaceInitializer { composite?: CompositeInitializer.AsObject, download?: FileDownloadInitializer.AsObject, backup?: FromBackupInitializer.AsObject, + snapshotVolume?: FromSnapshotVolumeInitializer.AsObject, } export enum SpecCase { @@ -81,6 +87,7 @@ export namespace WorkspaceInitializer { COMPOSITE = 5, DOWNLOAD = 6, BACKUP = 7, + SNAPSHOT_VOLUME = 8, } } @@ -317,6 +324,26 @@ export namespace FromBackupInitializer { } } +export class FromSnapshotVolumeInitializer extends jspb.Message { + getCheckoutLocation(): string; + setCheckoutLocation(value: string): FromSnapshotVolumeInitializer; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FromSnapshotVolumeInitializer.AsObject; + static toObject(includeInstance: boolean, msg: FromSnapshotVolumeInitializer): FromSnapshotVolumeInitializer.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FromSnapshotVolumeInitializer, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FromSnapshotVolumeInitializer; + static deserializeBinaryFromReader(message: FromSnapshotVolumeInitializer, reader: jspb.BinaryReader): FromSnapshotVolumeInitializer; +} + +export namespace FromSnapshotVolumeInitializer { + export type AsObject = { + checkoutLocation: string, + } +} + export class GitStatus extends jspb.Message { getBranch(): string; setBranch(value: string): GitStatus; diff --git a/components/content-service-api/typescript/src/initializer_pb.js b/components/content-service-api/typescript/src/initializer_pb.js index d883301c3e39c6..7beb6b5fee8638 100644 --- a/components/content-service-api/typescript/src/initializer_pb.js +++ b/components/content-service-api/typescript/src/initializer_pb.js @@ -33,6 +33,7 @@ goog.exportSymbol('proto.contentservice.EmptyInitializer', null, global); goog.exportSymbol('proto.contentservice.FileDownloadInitializer', null, global); goog.exportSymbol('proto.contentservice.FileDownloadInitializer.FileInfo', null, global); goog.exportSymbol('proto.contentservice.FromBackupInitializer', null, global); +goog.exportSymbol('proto.contentservice.FromSnapshotVolumeInitializer', null, global); goog.exportSymbol('proto.contentservice.GitAuthMethod', null, global); goog.exportSymbol('proto.contentservice.GitConfig', null, global); goog.exportSymbol('proto.contentservice.GitInitializer', null, global); @@ -251,6 +252,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.contentservice.FromBackupInitializer.displayName = 'proto.contentservice.FromBackupInitializer'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.contentservice.FromSnapshotVolumeInitializer = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.contentservice.FromSnapshotVolumeInitializer, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.contentservice.FromSnapshotVolumeInitializer.displayName = 'proto.contentservice.FromSnapshotVolumeInitializer'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -281,7 +303,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array>} * @const */ -proto.contentservice.WorkspaceInitializer.oneofGroups_ = [[1,2,3,4,5,6,7]]; +proto.contentservice.WorkspaceInitializer.oneofGroups_ = [[1,2,3,4,5,6,7,8]]; /** * @enum {number} @@ -294,7 +316,8 @@ proto.contentservice.WorkspaceInitializer.SpecCase = { PREBUILD: 4, COMPOSITE: 5, DOWNLOAD: 6, - BACKUP: 7 + BACKUP: 7, + SNAPSHOT_VOLUME: 8 }; /** @@ -341,7 +364,8 @@ proto.contentservice.WorkspaceInitializer.toObject = function(includeInstance, m prebuild: (f = msg.getPrebuild()) && proto.contentservice.PrebuildInitializer.toObject(includeInstance, f), composite: (f = msg.getComposite()) && proto.contentservice.CompositeInitializer.toObject(includeInstance, f), download: (f = msg.getDownload()) && proto.contentservice.FileDownloadInitializer.toObject(includeInstance, f), - backup: (f = msg.getBackup()) && proto.contentservice.FromBackupInitializer.toObject(includeInstance, f) + backup: (f = msg.getBackup()) && proto.contentservice.FromBackupInitializer.toObject(includeInstance, f), + snapshotVolume: (f = msg.getSnapshotVolume()) && proto.contentservice.FromSnapshotVolumeInitializer.toObject(includeInstance, f) }; if (includeInstance) { @@ -413,6 +437,11 @@ proto.contentservice.WorkspaceInitializer.deserializeBinaryFromReader = function reader.readMessage(value,proto.contentservice.FromBackupInitializer.deserializeBinaryFromReader); msg.setBackup(value); break; + case 8: + var value = new proto.contentservice.FromSnapshotVolumeInitializer; + reader.readMessage(value,proto.contentservice.FromSnapshotVolumeInitializer.deserializeBinaryFromReader); + msg.setSnapshotVolume(value); + break; default: reader.skipField(); break; @@ -498,6 +527,14 @@ proto.contentservice.WorkspaceInitializer.serializeBinaryToWriter = function(mes proto.contentservice.FromBackupInitializer.serializeBinaryToWriter ); } + f = message.getSnapshotVolume(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.contentservice.FromSnapshotVolumeInitializer.serializeBinaryToWriter + ); + } }; @@ -760,6 +797,43 @@ proto.contentservice.WorkspaceInitializer.prototype.hasBackup = function() { }; +/** + * optional FromSnapshotVolumeInitializer snapshot_volume = 8; + * @return {?proto.contentservice.FromSnapshotVolumeInitializer} + */ +proto.contentservice.WorkspaceInitializer.prototype.getSnapshotVolume = function() { + return /** @type{?proto.contentservice.FromSnapshotVolumeInitializer} */ ( + jspb.Message.getWrapperField(this, proto.contentservice.FromSnapshotVolumeInitializer, 8)); +}; + + +/** + * @param {?proto.contentservice.FromSnapshotVolumeInitializer|undefined} value + * @return {!proto.contentservice.WorkspaceInitializer} returns this +*/ +proto.contentservice.WorkspaceInitializer.prototype.setSnapshotVolume = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.contentservice.WorkspaceInitializer.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.contentservice.WorkspaceInitializer} returns this + */ +proto.contentservice.WorkspaceInitializer.prototype.clearSnapshotVolume = function() { + return this.setSnapshotVolume(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.contentservice.WorkspaceInitializer.prototype.hasSnapshotVolume = function() { + return jspb.Message.getField(this, 8) != null; +}; + + /** * List of repeated fields within this message type. @@ -2427,6 +2501,136 @@ proto.contentservice.FromBackupInitializer.prototype.setCheckoutLocation = funct + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.contentservice.FromSnapshotVolumeInitializer.prototype.toObject = function(opt_includeInstance) { + return proto.contentservice.FromSnapshotVolumeInitializer.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.contentservice.FromSnapshotVolumeInitializer} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.contentservice.FromSnapshotVolumeInitializer.toObject = function(includeInstance, msg) { + var f, obj = { + checkoutLocation: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.contentservice.FromSnapshotVolumeInitializer} + */ +proto.contentservice.FromSnapshotVolumeInitializer.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.contentservice.FromSnapshotVolumeInitializer; + return proto.contentservice.FromSnapshotVolumeInitializer.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.contentservice.FromSnapshotVolumeInitializer} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.contentservice.FromSnapshotVolumeInitializer} + */ +proto.contentservice.FromSnapshotVolumeInitializer.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCheckoutLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.contentservice.FromSnapshotVolumeInitializer.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.contentservice.FromSnapshotVolumeInitializer.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.contentservice.FromSnapshotVolumeInitializer} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.contentservice.FromSnapshotVolumeInitializer.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.FromSnapshotVolumeInitializer.prototype.getCheckoutLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.contentservice.FromSnapshotVolumeInitializer} returns this + */ +proto.contentservice.FromSnapshotVolumeInitializer.prototype.setCheckoutLocation = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + /** * List of repeated fields within this message type. * @private {!Array} diff --git a/components/content-service/pkg/initializer/initializer.go b/components/content-service/pkg/initializer/initializer.go index cadede9018aba9..d040df101b2811 100644 --- a/components/content-service/pkg/initializer/initializer.go +++ b/components/content-service/pkg/initializer/initializer.go @@ -136,6 +136,8 @@ func NewFromRequest(ctx context.Context, loc string, rs storage.DirectDownloader initializer, err = newFileDownloadInitializer(loc, ir.Download) } else if ir, ok := spec.(*csapi.WorkspaceInitializer_Backup); ok { initializer, err = newFromBackupInitializer(loc, rs, ir.Backup) + } else if ir, ok := spec.(*csapi.WorkspaceInitializer_SnapshotVolume); ok { + initializer, err = newFromSnapshotVolumeInitializer(ir.SnapshotVolume) } else { initializer = &EmptyInitializer{} } @@ -193,6 +195,18 @@ func (bi *fromBackupInitializer) Run(ctx context.Context, mappings []archive.IDM return csapi.WorkspaceInitFromBackup, nil } +// newFromSnapshotVolumeInitializer is a fake\empty initializer when workspace is created from snapshot volume +func newFromSnapshotVolumeInitializer(req *csapi.FromSnapshotVolumeInitializer) (*fromSnapshotVolumeInitializer, error) { + return &fromSnapshotVolumeInitializer{}, nil +} + +type fromSnapshotVolumeInitializer struct { +} + +func (bi *fromSnapshotVolumeInitializer) Run(ctx context.Context, mappings []archive.IDMapping) (src csapi.WorkspaceInitSource, err error) { + return csapi.WorkspaceInitFromBackup, nil +} + // newGitInitializer creates a Git initializer based on the request. // Returns gRPC errors. func newGitInitializer(ctx context.Context, loc string, req *csapi.GitInitializer, forceGitpodUser bool) (*GitInitializer, error) { @@ -521,6 +535,8 @@ func GetCheckoutLocationsFromInitializer(init *csapi.WorkspaceInitializer) []str switch { case init.GetGit() != nil: return []string{init.GetGit().CheckoutLocation} + case init.GetSnapshotVolume() != nil: + return []string{init.GetSnapshotVolume().CheckoutLocation} case init.GetPrebuild() != nil && len(init.GetPrebuild().Git) > 0: var result = make([]string, len(init.GetPrebuild().Git)) for i, c := range init.GetPrebuild().Git { diff --git a/components/content-service/pkg/layer/provider.go b/components/content-service/pkg/layer/provider.go index 26efc47857285c..366a78cf089584 100644 --- a/components/content-service/pkg/layer/provider.go +++ b/components/content-service/pkg/layer/provider.go @@ -269,6 +269,16 @@ func (s *Provider) GetContentLayerPVC(ctx context.Context, owner, workspaceID st return l, manifest, nil } + if svi := initializer.GetSnapshotVolume(); svi != nil { + layer, err = contentDescriptorToLayerPVC([]byte{}) + if err != nil { + return nil, nil, err + } + + l = []Layer{*layer} + return l, manifest, nil + } + // At this point we've found neither a full-workspace-backup, nor a legacy backup. // It's time to use the initializer. if gis := initializer.GetSnapshot(); gis != nil { diff --git a/components/server/src/workspace/workspace-starter.ts b/components/server/src/workspace/workspace-starter.ts index f396318c400418..0703d5a2e9a8f5 100644 --- a/components/server/src/workspace/workspace-starter.ts +++ b/components/server/src/workspace/workspace-starter.ts @@ -14,7 +14,11 @@ import { SnapshotInitializer, WorkspaceInitializer, } from "@gitpod/content-service/lib"; -import { CompositeInitializer, FromBackupInitializer } from "@gitpod/content-service/lib/initializer_pb"; +import { + CompositeInitializer, + FromBackupInitializer, + FromSnapshotVolumeInitializer, +} from "@gitpod/content-service/lib/initializer_pb"; import { DBUser, DBWithTracing, @@ -86,6 +90,7 @@ import { StartWorkspaceRequest, WorkspaceMetadata, WorkspaceType, + PvcSnapshotVolumeInfo, } from "@gitpod/ws-manager/lib/core_pb"; import * as crypto from "crypto"; import { inject, injectable } from "inversify"; @@ -856,6 +861,7 @@ export class WorkspaceStarter { workspace.context, user, false, + false, ); source = initializer; disp.push(disposable); @@ -1257,7 +1263,25 @@ export class WorkspaceStarter { checkoutLocation = "."; } } - const initializerPromise = this.createInitializer(traceCtx, workspace, workspace.context, user, mustHaveBackup); + + let volumeSnapshotInfo = new PvcSnapshotVolumeInfo(); + const volumeSnapshots = await this.workspaceDb.trace(traceCtx).findVolumeSnapshotsByWorkspaceId(workspace.id); + if (volumeSnapshots.length > 0) { + const latestVolumeSnapshot = volumeSnapshots.reduce((previousValue, currentValue) => + currentValue.creationTime > previousValue.creationTime ? currentValue : previousValue, + ); + volumeSnapshotInfo.setSnapshotVolumeName(latestVolumeSnapshot.id); + volumeSnapshotInfo.setSnapshotVolumeHandle(latestVolumeSnapshot.volumeHandle); + } + + const initializerPromise = this.createInitializer( + traceCtx, + workspace, + workspace.context, + user, + mustHaveBackup, + volumeSnapshotInfo.getSnapshotVolumeName() != "", + ); const userTimeoutPromise = this.userService.getDefaultWorkspaceTimeout(user); const featureFlags = instance.configuration!.featureFlags || []; @@ -1288,6 +1312,7 @@ export class WorkspaceStarter { spec.setTimeout(this.userService.workspaceTimeoutToDuration(await userTimeoutPromise)); } spec.setAdmission(admissionLevel); + spec.setVolumeSnapshot(volumeSnapshotInfo); return spec; } @@ -1406,11 +1431,18 @@ export class WorkspaceStarter { context: WorkspaceContext, user: User, mustHaveBackup: boolean, + hasVolumeSnapshot: boolean, ): Promise<{ initializer: WorkspaceInitializer; disposable: Disposable }> { let result = new WorkspaceInitializer(); const disp = new DisposableCollection(); - if (mustHaveBackup) { + if (hasVolumeSnapshot) { + const snapshotVolume = new FromSnapshotVolumeInitializer(); + if (CommitContext.is(context)) { + snapshotVolume.setCheckoutLocation(context.checkoutLocation || ""); + } + result.setSnapshotVolume(snapshotVolume); + } else if (mustHaveBackup) { const backup = new FromBackupInitializer(); if (CommitContext.is(context)) { backup.setCheckoutLocation(context.checkoutLocation || ""); diff --git a/components/ws-daemon-api/daemon.proto b/components/ws-daemon-api/daemon.proto index 5e8ead2d3038c3..529589d45f188a 100644 --- a/components/ws-daemon-api/daemon.proto +++ b/components/ws-daemon-api/daemon.proto @@ -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; } message DisposeWorkspaceResponse { diff --git a/components/ws-daemon-api/go/daemon.pb.go b/components/ws-daemon-api/go/daemon.pb.go index 9ece9648f97e1e..0bd872594cf900 100644 --- a/components/ws-daemon-api/go/daemon.pb.go +++ b/components/ws-daemon-api/go/daemon.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.20.0 +// protoc v3.19.4 // source: daemon.proto package api @@ -502,6 +502,8 @@ type DisposeWorkspaceRequest struct { Backup bool `protobuf:"varint,2,opt,name=backup,proto3" json:"backup,omitempty"` // backup_logs triggers the upload of terminal logs BackupLogs bool `protobuf:"varint,3,opt,name=backup_logs,json=backupLogs,proto3" json:"backupLogs,omitempty"` + // persistent_volume_claim is enabled if workspace is using PVC + PersistentVolumeClaim bool `protobuf:"varint,4,opt,name=persistent_volume_claim,json=persistentVolumeClaim,proto3" json:"persistentVolumeClaim,omitempty"` } func (x *DisposeWorkspaceRequest) Reset() { @@ -557,6 +559,13 @@ func (x *DisposeWorkspaceRequest) GetBackupLogs() bool { return false } +func (x *DisposeWorkspaceRequest) GetPersistentVolumeClaim() bool { + if x != nil { + return x.PersistentVolumeClaim + } + return false +} + type DisposeWorkspaceResponse struct { state protoimpl.MessageState `json:"state,omitempty"` sizeCache protoimpl.SizeCache `json:"sizeCache,omitempty"` @@ -755,61 +764,64 @@ var file_daemon_proto_rawDesc = []byte{ 0x75, 0x72, 0x6e, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x22, 0x28, 0x0a, 0x14, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x62, 0x0a, 0x17, 0x44, 0x69, 0x73, 0x70, - 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x62, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x54, 0x0a, 0x18, - 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x67, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0x28, 0x0a, 0x16, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x17, - 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x2a, 0x51, 0x0a, 0x15, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, - 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x57, - 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x50, 0x10, 0x03, 0x32, 0xc3, 0x03, 0x0a, - 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x49, 0x6e, 0x69, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x77, 0x73, 0x64, 0x61, - 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x73, 0x64, 0x61, - 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, - 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x1c, 0x2e, 0x77, 0x73, - 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, - 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x73, 0x64, 0x61, - 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x69, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x54, 0x61, - 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x73, 0x64, - 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x73, 0x64, 0x61, - 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x10, 0x44, - 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x21, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6f, - 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x69, - 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x77, 0x73, - 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x9a, 0x01, 0x0a, 0x17, 0x44, 0x69, 0x73, + 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x1f, 0x0a, 0x0b, + 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x36, 0x0a, + 0x17, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, + 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x22, 0x54, 0x0a, 0x18, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x09, 0x67, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x28, 0x0a, 0x16, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x17, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, - 0x64, 0x2f, 0x77, 0x73, 0x2d, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x2a, 0x51, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, + 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, + 0x5f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, + 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, + 0x5f, 0x55, 0x50, 0x10, 0x03, 0x32, 0xc3, 0x03, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, + 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, + 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, + 0x49, 0x6e, 0x69, 0x74, 0x12, 0x1c, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, + 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x57, 0x61, + 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, + 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, + 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, + 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x73, + 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, + 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2b, 0x5a, 0x29, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, + 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x77, 0x73, 0x2d, 0x64, 0x61, + 0x65, 0x6d, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/components/ws-daemon-api/go/daemon_grpc.pb.go b/components/ws-daemon-api/go/daemon_grpc.pb.go index 4f59ebc6f29d58..b2f81e6c1b3b16 100644 --- a/components/ws-daemon-api/go/daemon_grpc.pb.go +++ b/components/ws-daemon-api/go/daemon_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.20.0 +// - protoc v3.19.4 // source: daemon.proto package api diff --git a/components/ws-daemon-api/go/workspace_daemon.pb.go b/components/ws-daemon-api/go/workspace_daemon.pb.go index 5e67b5dd32394c..768ad921a83b7a 100644 --- a/components/ws-daemon-api/go/workspace_daemon.pb.go +++ b/components/ws-daemon-api/go/workspace_daemon.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.20.0 +// protoc v3.19.4 // source: workspace_daemon.proto package api diff --git a/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go b/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go index 5d075fc8c6fb00..652c85d07626e9 100644 --- a/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go +++ b/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.20.0 +// - protoc v3.19.4 // source: workspace_daemon.proto package api diff --git a/components/ws-daemon-api/typescript/src/daemon_pb.d.ts b/components/ws-daemon-api/typescript/src/daemon_pb.d.ts index 0622963e7a4af2..65b348d6559ef0 100644 --- a/components/ws-daemon-api/typescript/src/daemon_pb.d.ts +++ b/components/ws-daemon-api/typescript/src/daemon_pb.d.ts @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; diff --git a/components/ws-daemon-api/typescript/src/daemon_pb.js b/components/ws-daemon-api/typescript/src/daemon_pb.js index 68521ba99a3d7a..b4f4eeaca0e290 100644 --- a/components/ws-daemon-api/typescript/src/daemon_pb.js +++ b/components/ws-daemon-api/typescript/src/daemon_pb.js @@ -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); @@ -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) { @@ -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; @@ -1587,6 +1598,13 @@ proto.wsdaemon.DisposeWorkspaceRequest.serializeBinaryToWriter = function(messag f ); } + f = message.getPersistentVolumeClaim(); + if (f) { + writer.writeBool( + 4, + f + ); + } }; @@ -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); +}; + + diff --git a/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js b/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js index 3fbb7fea7caf98..b18b38bfdd94dc 100644 --- a/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js +++ b/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js @@ -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); diff --git a/components/ws-daemon/pkg/content/service.go b/components/ws-daemon/pkg/content/service.go index c028bd975ea9d8..9f86f11b2d4aed 100644 --- a/components/ws-daemon/pkg/content/service.go +++ b/components/ws-daemon/pkg/content/service.go @@ -154,7 +154,7 @@ func (s *WorkspaceService) InitWorkspace(ctx context.Context, req *api.InitWorks var ( wsloc string ) - if req.FullWorkspaceBackup || req.PersistentVolumeClaim { + if req.FullWorkspaceBackup { var mf csapi.WorkspaceContentManifest if len(req.ContentManifest) == 0 { return nil, status.Errorf(codes.InvalidArgument, "content manifest is required") @@ -163,10 +163,6 @@ func (s *WorkspaceService) InitWorkspace(ctx context.Context, req *api.InitWorks if err != nil { return nil, status.Errorf(codes.InvalidArgument, "invalid content manifest: %s", err.Error()) } - if req.PersistentVolumeClaim { - // todo(pavel): setting wsloc as otherwise mkdir fails later on. - wsloc = filepath.Join(s.store.Location, req.Id) - } } else { wsloc = filepath.Join(s.store.Location, req.Id) } @@ -375,7 +371,7 @@ func (s *WorkspaceService) DisposeWorkspace(ctx context.Context, req *api.Dispos } // Update the git status prior to deleting the workspace - repo, err = sess.UpdateGitStatus(ctx) + repo, err = sess.UpdateGitStatus(ctx, req.PersistentVolumeClaim) if err != nil { log.WithError(err).WithField("workspaceId", req.Id).Error("cannot get git status") span.LogKV("error", err.Error()) diff --git a/components/ws-daemon/pkg/internal/session/workspace.go b/components/ws-daemon/pkg/internal/session/workspace.go index fed50c4bd460ec..68ca0446b28eb2 100644 --- a/components/ws-daemon/pkg/internal/session/workspace.go +++ b/components/ws-daemon/pkg/internal/session/workspace.go @@ -280,35 +280,46 @@ func (s *Workspace) UpdateGitSafeDirectory(ctx context.Context) (err error) { } // UpdateGitStatus attempts to update the LastGitStatus from the workspace's local working copy. -func (s *Workspace) UpdateGitStatus(ctx context.Context) (res *csapi.GitStatus, err error) { - loc := s.Location - if loc == "" { - // FWB workspaces don't have `Location` set, but rather ServiceLocDaemon and ServiceLocNode. - // We'd can't easily produce the Git status, because in this context `mark` isn't mounted, and `upper` - // only contains the full git working copy if the content was just initialised. - // Something like - // loc = filepath.Join(s.ServiceLocDaemon, "mark", "workspace") - // does not work. - // - // TODO(cw): figure out a way to get ahold of the Git status. - log.WithField("loc", loc).WithFields(s.OWI()).Debug("not updating Git status of FWB workspace") - return - } +func (s *Workspace) UpdateGitStatus(ctx context.Context, persistent_volume_claim bool) (res *csapi.GitStatus, err error) { + var loc string + if persistent_volume_claim { + loc = filepath.Join(s.ServiceLocDaemon, "prestophookdata") + stat, err := git.GitStatusFromFiles(ctx, loc) + if err != nil { + return nil, err + } - loc = filepath.Join(loc, s.CheckoutLocation) - if !git.IsWorkingCopy(loc) { - log.WithField("loc", loc).WithField("checkout location", s.CheckoutLocation).WithFields(s.OWI()).Debug("did not find a Git working copy - not updating Git status") - return nil, nil - } + s.LastGitStatus = toGitStatus(stat) + } else { + loc = s.Location + if loc == "" { + // FWB workspaces don't have `Location` set, but rather ServiceLocDaemon and ServiceLocNode. + // We'd can't easily produce the Git status, because in this context `mark` isn't mounted, and `upper` + // only contains the full git working copy if the content was just initialised. + // Something like + // loc = filepath.Join(s.ServiceLocDaemon, "mark", "workspace") + // does not work. + // + // TODO(cw): figure out a way to get ahold of the Git status. + log.WithField("loc", loc).WithFields(s.OWI()).Debug("not updating Git status of FWB workspace") + return + } - c := git.Client{Location: loc} + loc = filepath.Join(loc, s.CheckoutLocation) + if !git.IsWorkingCopy(loc) { + log.WithField("loc", loc).WithField("checkout location", s.CheckoutLocation).WithFields(s.OWI()).Debug("did not find a Git working copy - not updating Git status") + return nil, nil + } - stat, err := c.Status(ctx) - if err != nil { - return nil, err - } + c := git.Client{Location: loc} - s.LastGitStatus = toGitStatus(stat) + stat, err := c.Status(ctx) + if err != nil { + return nil, err + } + + s.LastGitStatus = toGitStatus(stat) + } err = s.persist() if err != nil { diff --git a/components/ws-manager-api/core.proto b/components/ws-manager-api/core.proto index 60efd04d853edf..757c44115c4c2a 100644 --- a/components/ws-manager-api/core.proto +++ b/components/ws-manager-api/core.proto @@ -337,6 +337,15 @@ enum PortVisibility { PORT_VISIBILITY_PUBLIC = 1; } +// PvcSnapshotVolumeInfo defines snapshot volume information +message PvcSnapshotVolumeInfo { + // snapshot_volume_name is the name of snapshot volume + string snapshot_volume_name = 1; + + // snapshot_volume_handle is a handle that is used to restore snapshot volume + string snapshot_volume_handle = 2; +} + // WorkspaceCondition gives more detailed information as to the state of the workspace. Which condition actually // has a value depends on the phase the workspace is in. message WorkspaceConditions { @@ -373,6 +382,9 @@ message WorkspaceConditions { // stopped_by_request is true if the workspace was stopped using a StopWorkspace call WorkspaceConditionBool stopped_by_request = 11; + + // pvc_snapshot_volume contains info about snapshot volume that was used to save persistent volume + PvcSnapshotVolumeInfo pvc_snapshot_volume = 12; } // WorkspaceConditionBool is a trinary bool: true/false/empty @@ -499,6 +511,9 @@ message StartWorkspaceSpec { // Class denotes the class of the workspace we ought to start string class = 13; + + // volume_snapshot_id to use to restore PVC from, if set + PvcSnapshotVolumeInfo volume_snapshot = 14; } // WorkspaceFeatureFlag enable non-standard behaviour in workspaces diff --git a/components/ws-manager-api/go.mod b/components/ws-manager-api/go.mod index 6d290344d12b55..86b69e9026bd2e 100644 --- a/components/ws-manager-api/go.mod +++ b/components/ws-manager-api/go.mod @@ -1,3 +1,5 @@ module github.com/gitpod-io/generated_code_dependencies go 1.18 + +require google.golang.org/protobuf v1.28.0 // indirect diff --git a/components/ws-manager-api/go.sum b/components/ws-manager-api/go.sum index e69de29bb2d1d6..e38d2e36121ca0 100644 --- a/components/ws-manager-api/go.sum +++ b/components/ws-manager-api/go.sum @@ -0,0 +1,6 @@ +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/components/ws-manager-api/go/core.pb.go b/components/ws-manager-api/go/core.pb.go index 497124d2630217..7c009f83c428ba 100644 --- a/components/ws-manager-api/go/core.pb.go +++ b/components/ws-manager-api/go/core.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.20.0 +// protoc v3.19.4 // source: core.proto package api @@ -2036,6 +2036,64 @@ func (x *PortSpec) GetUrl() string { return "" } +// PvcSnapshotVolumeInfo defines snapshot volume information +type PvcSnapshotVolumeInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // snapshot_volume_name is the name of snapshot volume + SnapshotVolumeName string `protobuf:"bytes,1,opt,name=snapshot_volume_name,json=snapshotVolumeName,proto3" json:"snapshot_volume_name,omitempty"` + // snapshot_volume_handle is a handle that is used to restore snapshot volume + SnapshotVolumeHandle string `protobuf:"bytes,2,opt,name=snapshot_volume_handle,json=snapshotVolumeHandle,proto3" json:"snapshot_volume_handle,omitempty"` +} + +func (x *PvcSnapshotVolumeInfo) Reset() { + *x = PvcSnapshotVolumeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_core_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PvcSnapshotVolumeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PvcSnapshotVolumeInfo) ProtoMessage() {} + +func (x *PvcSnapshotVolumeInfo) ProtoReflect() protoreflect.Message { + mi := &file_core_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PvcSnapshotVolumeInfo.ProtoReflect.Descriptor instead. +func (*PvcSnapshotVolumeInfo) Descriptor() ([]byte, []int) { + return file_core_proto_rawDescGZIP(), []int{27} +} + +func (x *PvcSnapshotVolumeInfo) GetSnapshotVolumeName() string { + if x != nil { + return x.SnapshotVolumeName + } + return "" +} + +func (x *PvcSnapshotVolumeInfo) GetSnapshotVolumeHandle() string { + if x != nil { + return x.SnapshotVolumeHandle + } + return "" +} + // WorkspaceCondition gives more detailed information as to the state of the workspace. Which condition actually // has a value depends on the phase the workspace is in. type WorkspaceConditions struct { @@ -2064,12 +2122,14 @@ type WorkspaceConditions struct { HeadlessTaskFailed string `protobuf:"bytes,10,opt,name=headless_task_failed,json=headlessTaskFailed,proto3" json:"headless_task_failed,omitempty"` // stopped_by_request is true if the workspace was stopped using a StopWorkspace call StoppedByRequest WorkspaceConditionBool `protobuf:"varint,11,opt,name=stopped_by_request,json=stoppedByRequest,proto3,enum=wsman.WorkspaceConditionBool" json:"stopped_by_request,omitempty"` + // pvc_snapshot_volume contains info about snapshot volume that was used to save persistent volume + PvcSnapshotVolume *PvcSnapshotVolumeInfo `protobuf:"bytes,12,opt,name=pvc_snapshot_volume,json=pvcSnapshotVolume,proto3" json:"pvc_snapshot_volume,omitempty"` } func (x *WorkspaceConditions) Reset() { *x = WorkspaceConditions{} if protoimpl.UnsafeEnabled { - mi := &file_core_proto_msgTypes[27] + mi := &file_core_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2082,7 +2142,7 @@ func (x *WorkspaceConditions) String() string { func (*WorkspaceConditions) ProtoMessage() {} func (x *WorkspaceConditions) ProtoReflect() protoreflect.Message { - mi := &file_core_proto_msgTypes[27] + mi := &file_core_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2095,7 +2155,7 @@ func (x *WorkspaceConditions) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspaceConditions.ProtoReflect.Descriptor instead. func (*WorkspaceConditions) Descriptor() ([]byte, []int) { - return file_core_proto_rawDescGZIP(), []int{27} + return file_core_proto_rawDescGZIP(), []int{28} } func (x *WorkspaceConditions) GetFailed() string { @@ -2168,6 +2228,13 @@ func (x *WorkspaceConditions) GetStoppedByRequest() WorkspaceConditionBool { return WorkspaceConditionBool_FALSE } +func (x *WorkspaceConditions) GetPvcSnapshotVolume() *PvcSnapshotVolumeInfo { + if x != nil { + return x.PvcSnapshotVolume + } + return nil +} + // WorkspaceMetadata is data associated with a workspace that's required for other parts of the system to function type WorkspaceMetadata struct { state protoimpl.MessageState @@ -2188,7 +2255,7 @@ type WorkspaceMetadata struct { func (x *WorkspaceMetadata) Reset() { *x = WorkspaceMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_core_proto_msgTypes[28] + mi := &file_core_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2201,7 +2268,7 @@ func (x *WorkspaceMetadata) String() string { func (*WorkspaceMetadata) ProtoMessage() {} func (x *WorkspaceMetadata) ProtoReflect() protoreflect.Message { - mi := &file_core_proto_msgTypes[28] + mi := &file_core_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2214,7 +2281,7 @@ func (x *WorkspaceMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspaceMetadata.ProtoReflect.Descriptor instead. func (*WorkspaceMetadata) Descriptor() ([]byte, []int) { - return file_core_proto_rawDescGZIP(), []int{28} + return file_core_proto_rawDescGZIP(), []int{29} } func (x *WorkspaceMetadata) GetOwner() string { @@ -2264,7 +2331,7 @@ type WorkspaceRuntimeInfo struct { func (x *WorkspaceRuntimeInfo) Reset() { *x = WorkspaceRuntimeInfo{} if protoimpl.UnsafeEnabled { - mi := &file_core_proto_msgTypes[29] + mi := &file_core_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2277,7 +2344,7 @@ func (x *WorkspaceRuntimeInfo) String() string { func (*WorkspaceRuntimeInfo) ProtoMessage() {} func (x *WorkspaceRuntimeInfo) ProtoReflect() protoreflect.Message { - mi := &file_core_proto_msgTypes[29] + mi := &file_core_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2290,7 +2357,7 @@ func (x *WorkspaceRuntimeInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspaceRuntimeInfo.ProtoReflect.Descriptor instead. func (*WorkspaceRuntimeInfo) Descriptor() ([]byte, []int) { - return file_core_proto_rawDescGZIP(), []int{29} + return file_core_proto_rawDescGZIP(), []int{30} } func (x *WorkspaceRuntimeInfo) GetNodeName() string { @@ -2330,7 +2397,7 @@ type WorkspaceAuthentication struct { func (x *WorkspaceAuthentication) Reset() { *x = WorkspaceAuthentication{} if protoimpl.UnsafeEnabled { - mi := &file_core_proto_msgTypes[30] + mi := &file_core_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2343,7 +2410,7 @@ func (x *WorkspaceAuthentication) String() string { func (*WorkspaceAuthentication) ProtoMessage() {} func (x *WorkspaceAuthentication) ProtoReflect() protoreflect.Message { - mi := &file_core_proto_msgTypes[30] + mi := &file_core_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2356,7 +2423,7 @@ func (x *WorkspaceAuthentication) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspaceAuthentication.ProtoReflect.Descriptor instead. func (*WorkspaceAuthentication) Descriptor() ([]byte, []int) { - return file_core_proto_rawDescGZIP(), []int{30} + return file_core_proto_rawDescGZIP(), []int{31} } func (x *WorkspaceAuthentication) GetAdmission() AdmissionLevel { @@ -2404,12 +2471,14 @@ type StartWorkspaceSpec struct { IdeImage *IDEImage `protobuf:"bytes,12,opt,name=ide_image,json=ideImage,proto3" json:"ide_image,omitempty"` // Class denotes the class of the workspace we ought to start Class string `protobuf:"bytes,13,opt,name=class,proto3" json:"class,omitempty"` + // volume_snapshot_id to use to restore PVC from, if set + VolumeSnapshot *PvcSnapshotVolumeInfo `protobuf:"bytes,14,opt,name=volume_snapshot,json=volumeSnapshot,proto3" json:"volume_snapshot,omitempty"` } func (x *StartWorkspaceSpec) Reset() { *x = StartWorkspaceSpec{} if protoimpl.UnsafeEnabled { - mi := &file_core_proto_msgTypes[31] + mi := &file_core_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2422,7 +2491,7 @@ func (x *StartWorkspaceSpec) String() string { func (*StartWorkspaceSpec) ProtoMessage() {} func (x *StartWorkspaceSpec) ProtoReflect() protoreflect.Message { - mi := &file_core_proto_msgTypes[31] + mi := &file_core_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2435,7 +2504,7 @@ func (x *StartWorkspaceSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use StartWorkspaceSpec.ProtoReflect.Descriptor instead. func (*StartWorkspaceSpec) Descriptor() ([]byte, []int) { - return file_core_proto_rawDescGZIP(), []int{31} + return file_core_proto_rawDescGZIP(), []int{32} } func (x *StartWorkspaceSpec) GetWorkspaceImage() string { @@ -2522,6 +2591,13 @@ func (x *StartWorkspaceSpec) GetClass() string { return "" } +func (x *StartWorkspaceSpec) GetVolumeSnapshot() *PvcSnapshotVolumeInfo { + if x != nil { + return x.VolumeSnapshot + } + return nil +} + // GitSpec configures the Git available within the workspace type GitSpec struct { state protoimpl.MessageState @@ -2537,7 +2613,7 @@ type GitSpec struct { func (x *GitSpec) Reset() { *x = GitSpec{} if protoimpl.UnsafeEnabled { - mi := &file_core_proto_msgTypes[32] + mi := &file_core_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2550,7 +2626,7 @@ func (x *GitSpec) String() string { func (*GitSpec) ProtoMessage() {} func (x *GitSpec) ProtoReflect() protoreflect.Message { - mi := &file_core_proto_msgTypes[32] + mi := &file_core_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2563,7 +2639,7 @@ func (x *GitSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use GitSpec.ProtoReflect.Descriptor instead. func (*GitSpec) Descriptor() ([]byte, []int) { - return file_core_proto_rawDescGZIP(), []int{32} + return file_core_proto_rawDescGZIP(), []int{33} } func (x *GitSpec) GetUsername() string { @@ -2597,7 +2673,7 @@ type EnvironmentVariable struct { func (x *EnvironmentVariable) Reset() { *x = EnvironmentVariable{} if protoimpl.UnsafeEnabled { - mi := &file_core_proto_msgTypes[33] + mi := &file_core_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2610,7 +2686,7 @@ func (x *EnvironmentVariable) String() string { func (*EnvironmentVariable) ProtoMessage() {} func (x *EnvironmentVariable) ProtoReflect() protoreflect.Message { - mi := &file_core_proto_msgTypes[33] + mi := &file_core_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2623,7 +2699,7 @@ func (x *EnvironmentVariable) ProtoReflect() protoreflect.Message { // Deprecated: Use EnvironmentVariable.ProtoReflect.Descriptor instead. func (*EnvironmentVariable) Descriptor() ([]byte, []int) { - return file_core_proto_rawDescGZIP(), []int{33} + return file_core_proto_rawDescGZIP(), []int{34} } func (x *EnvironmentVariable) GetName() string { @@ -2660,7 +2736,7 @@ type ExposedPorts struct { func (x *ExposedPorts) Reset() { *x = ExposedPorts{} if protoimpl.UnsafeEnabled { - mi := &file_core_proto_msgTypes[34] + mi := &file_core_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2673,7 +2749,7 @@ func (x *ExposedPorts) String() string { func (*ExposedPorts) ProtoMessage() {} func (x *ExposedPorts) ProtoReflect() protoreflect.Message { - mi := &file_core_proto_msgTypes[34] + mi := &file_core_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2686,7 +2762,7 @@ func (x *ExposedPorts) ProtoReflect() protoreflect.Message { // Deprecated: Use ExposedPorts.ProtoReflect.Descriptor instead. func (*ExposedPorts) Descriptor() ([]byte, []int) { - return file_core_proto_rawDescGZIP(), []int{34} + return file_core_proto_rawDescGZIP(), []int{35} } func (x *ExposedPorts) GetPorts() []*PortSpec { @@ -2708,7 +2784,7 @@ type EnvironmentVariable_SecretKeyRef struct { func (x *EnvironmentVariable_SecretKeyRef) Reset() { *x = EnvironmentVariable_SecretKeyRef{} if protoimpl.UnsafeEnabled { - mi := &file_core_proto_msgTypes[38] + mi := &file_core_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2721,7 +2797,7 @@ func (x *EnvironmentVariable_SecretKeyRef) String() string { func (*EnvironmentVariable_SecretKeyRef) ProtoMessage() {} func (x *EnvironmentVariable_SecretKeyRef) ProtoReflect() protoreflect.Message { - mi := &file_core_proto_msgTypes[38] + mi := &file_core_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2734,7 +2810,7 @@ func (x *EnvironmentVariable_SecretKeyRef) ProtoReflect() protoreflect.Message { // Deprecated: Use EnvironmentVariable_SecretKeyRef.ProtoReflect.Descriptor instead. func (*EnvironmentVariable_SecretKeyRef) Descriptor() ([]byte, []int) { - return file_core_proto_rawDescGZIP(), []int{33, 0} + return file_core_proto_rawDescGZIP(), []int{34, 0} } func (x *EnvironmentVariable_SecretKeyRef) GetSecretName() string { @@ -2937,226 +3013,243 @@ var file_core_proto_rawDesc = []byte{ 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xd3, - 0x04, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x0e, 0x70, 0x75, 0x6c, 0x6c, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x7f, + 0x0a, 0x15, 0x50, 0x76, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x68, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, + 0xa1, 0x05, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x0e, 0x70, 0x75, 0x6c, + 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, + 0x52, 0x0d, 0x70, 0x75, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x51, 0x0a, 0x15, 0x66, + 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, + 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x39, + 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, - 0x0d, 0x70, 0x75, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x51, 0x0a, 0x15, 0x66, 0x69, - 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, - 0x65, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, - 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x42, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x39, 0x0a, - 0x08, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x08, - 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x12, 0x49, 0x0a, 0x11, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, - 0x6f, 0x6c, 0x52, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x6f, 0x74, 0x52, 0x65, - 0x61, 0x64, 0x79, 0x12, 0x4a, 0x0a, 0x13, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x66, 0x69, - 0x72, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, - 0x30, 0x0a, 0x14, 0x68, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x61, 0x73, 0x6b, - 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, - 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x12, 0x4b, 0x0a, 0x12, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, - 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x10, 0x73, 0x74, - 0x6f, 0x70, 0x70, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4a, 0x04, - 0x08, 0x04, 0x10, 0x05, 0x22, 0x8a, 0x02, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x61, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x73, 0x6d, 0x61, - 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x67, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, - 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x70, 0x22, 0x6f, 0x0a, 0x17, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, - 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xc0, 0x04, 0x0a, 0x12, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x49, 0x64, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, - 0x0d, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, - 0x67, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, - 0x46, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, - 0x6f, 0x72, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x34, - 0x0a, 0x07, 0x65, 0x6e, 0x76, 0x76, 0x61, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x76, - 0x76, 0x61, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x52, 0x03, 0x67, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x33, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x09, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, - 0x49, 0x44, 0x45, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x08, 0x69, 0x64, 0x65, 0x49, 0x6d, 0x61, - 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0x3b, - 0x0a, 0x07, 0x47, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0xc3, 0x01, 0x0a, 0x13, - 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, - 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x66, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, 0x41, - 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x66, 0x12, 0x1f, - 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x22, 0x35, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, - 0x73, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x53, 0x70, 0x65, - 0x63, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2a, 0x34, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x4c, 0x59, 0x10, 0x00, 0x12, 0x0f, 0x0a, - 0x0b, 0x49, 0x4d, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x54, 0x45, 0x4c, 0x59, 0x10, 0x01, 0x2a, 0x3a, - 0x0a, 0x0e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x12, 0x14, 0x0a, 0x10, 0x41, 0x44, 0x4d, 0x49, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, - 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x44, 0x4d, 0x49, 0x54, 0x5f, - 0x45, 0x56, 0x45, 0x52, 0x59, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x2a, 0x49, 0x0a, 0x0e, 0x50, 0x6f, - 0x72, 0x74, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x17, - 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, - 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f, 0x52, - 0x54, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, - 0x4c, 0x49, 0x43, 0x10, 0x01, 0x2a, 0x38, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x12, - 0x09, 0x0a, 0x05, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x52, - 0x55, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x02, 0x2a, - 0x83, 0x01, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x68, 0x61, - 0x73, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, - 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, - 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, - 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x54, - 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, - 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, - 0x50, 0x45, 0x44, 0x10, 0x06, 0x2a, 0x85, 0x01, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, - 0x0a, 0x04, 0x4e, 0x4f, 0x4f, 0x50, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x55, 0x4c, 0x4c, - 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x55, - 0x50, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x45, 0x52, 0x53, - 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x43, 0x4c, - 0x41, 0x49, 0x4d, 0x10, 0x07, 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, - 0x02, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x22, 0x04, 0x08, 0x06, 0x10, 0x06, 0x2a, 0x4b, 0x0a, - 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x52, 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, - 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, - 0x42, 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x42, 0x55, 0x49, - 0x4c, 0x44, 0x10, 0x04, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x32, 0xe5, 0x06, 0x0a, 0x10, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, - 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, - 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, - 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x77, - 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x11, + 0x08, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x12, 0x49, 0x0a, 0x11, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x6f, 0x6f, 0x6c, 0x52, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x6f, 0x74, 0x52, + 0x65, 0x61, 0x64, 0x79, 0x12, 0x4a, 0x0a, 0x13, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, + 0x12, 0x30, 0x0a, 0x14, 0x68, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x68, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, + 0x65, 0x64, 0x12, 0x4b, 0x0a, 0x12, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x62, 0x79, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x10, 0x73, + 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x4c, 0x0a, 0x13, 0x70, 0x76, 0x63, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, + 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x76, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x70, 0x76, 0x63, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x22, 0x8a, 0x02, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, + 0x17, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6d, 0x65, 0x74, 0x61, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x67, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x70, 0x22, 0x6f, 0x0a, 0x17, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, + 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x09, + 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x87, 0x05, 0x0a, 0x12, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x49, 0x64, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x0d, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, + 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x46, + 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x6f, + 0x72, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x34, 0x0a, + 0x07, 0x65, 0x6e, 0x76, 0x76, 0x61, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x76, + 0x61, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x03, 0x67, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x33, + 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x09, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x49, + 0x44, 0x45, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x08, 0x69, 0x64, 0x65, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x76, 0x63, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4a, 0x04, + 0x08, 0x07, 0x10, 0x08, 0x22, 0x3b, 0x0a, 0x07, 0x47, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x22, 0xc3, 0x01, 0x0a, 0x13, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x2e, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x66, 0x52, 0x06, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x1a, 0x41, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x66, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x35, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6f, 0x73, + 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, + 0x6f, 0x72, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2a, 0x34, + 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x4c, + 0x59, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4d, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x54, 0x45, + 0x4c, 0x59, 0x10, 0x01, 0x2a, 0x3a, 0x0a, 0x0e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x44, 0x4d, 0x49, 0x54, 0x5f, + 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, + 0x41, 0x44, 0x4d, 0x49, 0x54, 0x5f, 0x45, 0x56, 0x45, 0x52, 0x59, 0x4f, 0x4e, 0x45, 0x10, 0x01, + 0x2a, 0x49, 0x0a, 0x0e, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, + 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, + 0x1a, 0x0a, 0x16, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, + 0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x2a, 0x38, 0x0a, 0x16, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, + 0x50, 0x54, 0x59, 0x10, 0x02, 0x2a, 0x83, 0x01, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, + 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x02, + 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, + 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, + 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x45, 0x44, 0x10, 0x07, + 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x0b, + 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x06, 0x2a, 0x85, 0x01, 0x0a, 0x14, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4f, 0x50, 0x10, 0x00, 0x12, 0x19, + 0x0a, 0x15, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, + 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x58, + 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x05, 0x12, 0x1b, + 0x0a, 0x17, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x4f, 0x4c, + 0x55, 0x4d, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x10, 0x07, 0x22, 0x04, 0x08, 0x01, 0x10, + 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x22, 0x04, 0x08, + 0x06, 0x10, 0x06, 0x2a, 0x4b, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52, 0x10, + 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4d, + 0x41, 0x47, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x04, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, + 0x32, 0xe5, 0x06, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, + 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x58, 0x0a, 0x11, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, - 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x17, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x43, - 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x77, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, + 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0f, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x42, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x17, 0x2e, + 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, - 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, - 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x49, 0x0a, 0x0c, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x12, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, - 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x1e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, - 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, - 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, - 0x64, 0x2f, 0x77, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x65, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, + 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, + 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x19, 0x2e, + 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0c, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, + 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x55, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, + 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x77, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3172,7 +3265,7 @@ func file_core_proto_rawDescGZIP() []byte { } var file_core_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_core_proto_msgTypes = make([]protoimpl.MessageInfo, 39) +var file_core_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_core_proto_goTypes = []interface{}{ (StopWorkspacePolicy)(0), // 0: wsman.StopWorkspacePolicy (AdmissionLevel)(0), // 1: wsman.AdmissionLevel @@ -3208,43 +3301,44 @@ var file_core_proto_goTypes = []interface{}{ (*IDEImage)(nil), // 31: wsman.IDEImage (*WorkspaceSpec)(nil), // 32: wsman.WorkspaceSpec (*PortSpec)(nil), // 33: wsman.PortSpec - (*WorkspaceConditions)(nil), // 34: wsman.WorkspaceConditions - (*WorkspaceMetadata)(nil), // 35: wsman.WorkspaceMetadata - (*WorkspaceRuntimeInfo)(nil), // 36: wsman.WorkspaceRuntimeInfo - (*WorkspaceAuthentication)(nil), // 37: wsman.WorkspaceAuthentication - (*StartWorkspaceSpec)(nil), // 38: wsman.StartWorkspaceSpec - (*GitSpec)(nil), // 39: wsman.GitSpec - (*EnvironmentVariable)(nil), // 40: wsman.EnvironmentVariable - (*ExposedPorts)(nil), // 41: wsman.ExposedPorts - nil, // 42: wsman.MetadataFilter.AnnotationsEntry - nil, // 43: wsman.SubscribeResponse.HeaderEntry - nil, // 44: wsman.WorkspaceMetadata.AnnotationsEntry - (*EnvironmentVariable_SecretKeyRef)(nil), // 45: wsman.EnvironmentVariable.SecretKeyRef - (*api.GitStatus)(nil), // 46: contentservice.GitStatus - (*timestamppb.Timestamp)(nil), // 47: google.protobuf.Timestamp - (*api.WorkspaceInitializer)(nil), // 48: contentservice.WorkspaceInitializer + (*PvcSnapshotVolumeInfo)(nil), // 34: wsman.PvcSnapshotVolumeInfo + (*WorkspaceConditions)(nil), // 35: wsman.WorkspaceConditions + (*WorkspaceMetadata)(nil), // 36: wsman.WorkspaceMetadata + (*WorkspaceRuntimeInfo)(nil), // 37: wsman.WorkspaceRuntimeInfo + (*WorkspaceAuthentication)(nil), // 38: wsman.WorkspaceAuthentication + (*StartWorkspaceSpec)(nil), // 39: wsman.StartWorkspaceSpec + (*GitSpec)(nil), // 40: wsman.GitSpec + (*EnvironmentVariable)(nil), // 41: wsman.EnvironmentVariable + (*ExposedPorts)(nil), // 42: wsman.ExposedPorts + nil, // 43: wsman.MetadataFilter.AnnotationsEntry + nil, // 44: wsman.SubscribeResponse.HeaderEntry + nil, // 45: wsman.WorkspaceMetadata.AnnotationsEntry + (*EnvironmentVariable_SecretKeyRef)(nil), // 46: wsman.EnvironmentVariable.SecretKeyRef + (*api.GitStatus)(nil), // 47: contentservice.GitStatus + (*timestamppb.Timestamp)(nil), // 48: google.protobuf.Timestamp + (*api.WorkspaceInitializer)(nil), // 49: contentservice.WorkspaceInitializer } var file_core_proto_depIdxs = []int32{ - 42, // 0: wsman.MetadataFilter.annotations:type_name -> wsman.MetadataFilter.AnnotationsEntry + 43, // 0: wsman.MetadataFilter.annotations:type_name -> wsman.MetadataFilter.AnnotationsEntry 7, // 1: wsman.GetWorkspacesRequest.must_match:type_name -> wsman.MetadataFilter 30, // 2: wsman.GetWorkspacesResponse.status:type_name -> wsman.WorkspaceStatus - 35, // 3: wsman.StartWorkspaceRequest.metadata:type_name -> wsman.WorkspaceMetadata - 38, // 4: wsman.StartWorkspaceRequest.spec:type_name -> wsman.StartWorkspaceSpec + 36, // 3: wsman.StartWorkspaceRequest.metadata:type_name -> wsman.WorkspaceMetadata + 39, // 4: wsman.StartWorkspaceRequest.spec:type_name -> wsman.StartWorkspaceSpec 6, // 5: wsman.StartWorkspaceRequest.type:type_name -> wsman.WorkspaceType 0, // 6: wsman.StopWorkspaceRequest.policy:type_name -> wsman.StopWorkspacePolicy 30, // 7: wsman.DescribeWorkspaceResponse.status:type_name -> wsman.WorkspaceStatus 7, // 8: wsman.SubscribeRequest.must_match:type_name -> wsman.MetadataFilter 30, // 9: wsman.SubscribeResponse.status:type_name -> wsman.WorkspaceStatus - 43, // 10: wsman.SubscribeResponse.header:type_name -> wsman.SubscribeResponse.HeaderEntry + 44, // 10: wsman.SubscribeResponse.header:type_name -> wsman.SubscribeResponse.HeaderEntry 33, // 11: wsman.ControlPortRequest.spec:type_name -> wsman.PortSpec 1, // 12: wsman.ControlAdmissionRequest.level:type_name -> wsman.AdmissionLevel - 35, // 13: wsman.WorkspaceStatus.metadata:type_name -> wsman.WorkspaceMetadata + 36, // 13: wsman.WorkspaceStatus.metadata:type_name -> wsman.WorkspaceMetadata 32, // 14: wsman.WorkspaceStatus.spec:type_name -> wsman.WorkspaceSpec 4, // 15: wsman.WorkspaceStatus.phase:type_name -> wsman.WorkspacePhase - 34, // 16: wsman.WorkspaceStatus.conditions:type_name -> wsman.WorkspaceConditions - 46, // 17: wsman.WorkspaceStatus.repo:type_name -> contentservice.GitStatus - 36, // 18: wsman.WorkspaceStatus.runtime:type_name -> wsman.WorkspaceRuntimeInfo - 37, // 19: wsman.WorkspaceStatus.auth:type_name -> wsman.WorkspaceAuthentication + 35, // 16: wsman.WorkspaceStatus.conditions:type_name -> wsman.WorkspaceConditions + 47, // 17: wsman.WorkspaceStatus.repo:type_name -> contentservice.GitStatus + 37, // 18: wsman.WorkspaceStatus.runtime:type_name -> wsman.WorkspaceRuntimeInfo + 38, // 19: wsman.WorkspaceStatus.auth:type_name -> wsman.WorkspaceAuthentication 33, // 20: wsman.WorkspaceSpec.exposed_ports:type_name -> wsman.PortSpec 6, // 21: wsman.WorkspaceSpec.type:type_name -> wsman.WorkspaceType 31, // 22: wsman.WorkspaceSpec.ide_image:type_name -> wsman.IDEImage @@ -3253,47 +3347,49 @@ var file_core_proto_depIdxs = []int32{ 3, // 25: wsman.WorkspaceConditions.final_backup_complete:type_name -> wsman.WorkspaceConditionBool 3, // 26: wsman.WorkspaceConditions.deployed:type_name -> wsman.WorkspaceConditionBool 3, // 27: wsman.WorkspaceConditions.network_not_ready:type_name -> wsman.WorkspaceConditionBool - 47, // 28: wsman.WorkspaceConditions.first_user_activity:type_name -> google.protobuf.Timestamp + 48, // 28: wsman.WorkspaceConditions.first_user_activity:type_name -> google.protobuf.Timestamp 3, // 29: wsman.WorkspaceConditions.stopped_by_request:type_name -> wsman.WorkspaceConditionBool - 47, // 30: wsman.WorkspaceMetadata.started_at:type_name -> google.protobuf.Timestamp - 44, // 31: wsman.WorkspaceMetadata.annotations:type_name -> wsman.WorkspaceMetadata.AnnotationsEntry - 1, // 32: wsman.WorkspaceAuthentication.admission:type_name -> wsman.AdmissionLevel - 5, // 33: wsman.StartWorkspaceSpec.feature_flags:type_name -> wsman.WorkspaceFeatureFlag - 48, // 34: wsman.StartWorkspaceSpec.initializer:type_name -> contentservice.WorkspaceInitializer - 33, // 35: wsman.StartWorkspaceSpec.ports:type_name -> wsman.PortSpec - 40, // 36: wsman.StartWorkspaceSpec.envvars:type_name -> wsman.EnvironmentVariable - 39, // 37: wsman.StartWorkspaceSpec.git:type_name -> wsman.GitSpec - 1, // 38: wsman.StartWorkspaceSpec.admission:type_name -> wsman.AdmissionLevel - 31, // 39: wsman.StartWorkspaceSpec.ide_image:type_name -> wsman.IDEImage - 45, // 40: wsman.EnvironmentVariable.secret:type_name -> wsman.EnvironmentVariable.SecretKeyRef - 33, // 41: wsman.ExposedPorts.ports:type_name -> wsman.PortSpec - 8, // 42: wsman.WorkspaceManager.GetWorkspaces:input_type -> wsman.GetWorkspacesRequest - 10, // 43: wsman.WorkspaceManager.StartWorkspace:input_type -> wsman.StartWorkspaceRequest - 12, // 44: wsman.WorkspaceManager.StopWorkspace:input_type -> wsman.StopWorkspaceRequest - 14, // 45: wsman.WorkspaceManager.DescribeWorkspace:input_type -> wsman.DescribeWorkspaceRequest - 28, // 46: wsman.WorkspaceManager.BackupWorkspace:input_type -> wsman.BackupWorkspaceRequest - 16, // 47: wsman.WorkspaceManager.Subscribe:input_type -> wsman.SubscribeRequest - 18, // 48: wsman.WorkspaceManager.MarkActive:input_type -> wsman.MarkActiveRequest - 20, // 49: wsman.WorkspaceManager.SetTimeout:input_type -> wsman.SetTimeoutRequest - 22, // 50: wsman.WorkspaceManager.ControlPort:input_type -> wsman.ControlPortRequest - 24, // 51: wsman.WorkspaceManager.TakeSnapshot:input_type -> wsman.TakeSnapshotRequest - 26, // 52: wsman.WorkspaceManager.ControlAdmission:input_type -> wsman.ControlAdmissionRequest - 9, // 53: wsman.WorkspaceManager.GetWorkspaces:output_type -> wsman.GetWorkspacesResponse - 11, // 54: wsman.WorkspaceManager.StartWorkspace:output_type -> wsman.StartWorkspaceResponse - 13, // 55: wsman.WorkspaceManager.StopWorkspace:output_type -> wsman.StopWorkspaceResponse - 15, // 56: wsman.WorkspaceManager.DescribeWorkspace:output_type -> wsman.DescribeWorkspaceResponse - 29, // 57: wsman.WorkspaceManager.BackupWorkspace:output_type -> wsman.BackupWorkspaceResponse - 17, // 58: wsman.WorkspaceManager.Subscribe:output_type -> wsman.SubscribeResponse - 19, // 59: wsman.WorkspaceManager.MarkActive:output_type -> wsman.MarkActiveResponse - 21, // 60: wsman.WorkspaceManager.SetTimeout:output_type -> wsman.SetTimeoutResponse - 23, // 61: wsman.WorkspaceManager.ControlPort:output_type -> wsman.ControlPortResponse - 25, // 62: wsman.WorkspaceManager.TakeSnapshot:output_type -> wsman.TakeSnapshotResponse - 27, // 63: wsman.WorkspaceManager.ControlAdmission:output_type -> wsman.ControlAdmissionResponse - 53, // [53:64] is the sub-list for method output_type - 42, // [42:53] is the sub-list for method input_type - 42, // [42:42] is the sub-list for extension type_name - 42, // [42:42] is the sub-list for extension extendee - 0, // [0:42] is the sub-list for field type_name + 34, // 30: wsman.WorkspaceConditions.pvc_snapshot_volume:type_name -> wsman.PvcSnapshotVolumeInfo + 48, // 31: wsman.WorkspaceMetadata.started_at:type_name -> google.protobuf.Timestamp + 45, // 32: wsman.WorkspaceMetadata.annotations:type_name -> wsman.WorkspaceMetadata.AnnotationsEntry + 1, // 33: wsman.WorkspaceAuthentication.admission:type_name -> wsman.AdmissionLevel + 5, // 34: wsman.StartWorkspaceSpec.feature_flags:type_name -> wsman.WorkspaceFeatureFlag + 49, // 35: wsman.StartWorkspaceSpec.initializer:type_name -> contentservice.WorkspaceInitializer + 33, // 36: wsman.StartWorkspaceSpec.ports:type_name -> wsman.PortSpec + 41, // 37: wsman.StartWorkspaceSpec.envvars:type_name -> wsman.EnvironmentVariable + 40, // 38: wsman.StartWorkspaceSpec.git:type_name -> wsman.GitSpec + 1, // 39: wsman.StartWorkspaceSpec.admission:type_name -> wsman.AdmissionLevel + 31, // 40: wsman.StartWorkspaceSpec.ide_image:type_name -> wsman.IDEImage + 34, // 41: wsman.StartWorkspaceSpec.volume_snapshot:type_name -> wsman.PvcSnapshotVolumeInfo + 46, // 42: wsman.EnvironmentVariable.secret:type_name -> wsman.EnvironmentVariable.SecretKeyRef + 33, // 43: wsman.ExposedPorts.ports:type_name -> wsman.PortSpec + 8, // 44: wsman.WorkspaceManager.GetWorkspaces:input_type -> wsman.GetWorkspacesRequest + 10, // 45: wsman.WorkspaceManager.StartWorkspace:input_type -> wsman.StartWorkspaceRequest + 12, // 46: wsman.WorkspaceManager.StopWorkspace:input_type -> wsman.StopWorkspaceRequest + 14, // 47: wsman.WorkspaceManager.DescribeWorkspace:input_type -> wsman.DescribeWorkspaceRequest + 28, // 48: wsman.WorkspaceManager.BackupWorkspace:input_type -> wsman.BackupWorkspaceRequest + 16, // 49: wsman.WorkspaceManager.Subscribe:input_type -> wsman.SubscribeRequest + 18, // 50: wsman.WorkspaceManager.MarkActive:input_type -> wsman.MarkActiveRequest + 20, // 51: wsman.WorkspaceManager.SetTimeout:input_type -> wsman.SetTimeoutRequest + 22, // 52: wsman.WorkspaceManager.ControlPort:input_type -> wsman.ControlPortRequest + 24, // 53: wsman.WorkspaceManager.TakeSnapshot:input_type -> wsman.TakeSnapshotRequest + 26, // 54: wsman.WorkspaceManager.ControlAdmission:input_type -> wsman.ControlAdmissionRequest + 9, // 55: wsman.WorkspaceManager.GetWorkspaces:output_type -> wsman.GetWorkspacesResponse + 11, // 56: wsman.WorkspaceManager.StartWorkspace:output_type -> wsman.StartWorkspaceResponse + 13, // 57: wsman.WorkspaceManager.StopWorkspace:output_type -> wsman.StopWorkspaceResponse + 15, // 58: wsman.WorkspaceManager.DescribeWorkspace:output_type -> wsman.DescribeWorkspaceResponse + 29, // 59: wsman.WorkspaceManager.BackupWorkspace:output_type -> wsman.BackupWorkspaceResponse + 17, // 60: wsman.WorkspaceManager.Subscribe:output_type -> wsman.SubscribeResponse + 19, // 61: wsman.WorkspaceManager.MarkActive:output_type -> wsman.MarkActiveResponse + 21, // 62: wsman.WorkspaceManager.SetTimeout:output_type -> wsman.SetTimeoutResponse + 23, // 63: wsman.WorkspaceManager.ControlPort:output_type -> wsman.ControlPortResponse + 25, // 64: wsman.WorkspaceManager.TakeSnapshot:output_type -> wsman.TakeSnapshotResponse + 27, // 65: wsman.WorkspaceManager.ControlAdmission:output_type -> wsman.ControlAdmissionResponse + 55, // [55:66] is the sub-list for method output_type + 44, // [44:55] is the sub-list for method input_type + 44, // [44:44] is the sub-list for extension type_name + 44, // [44:44] is the sub-list for extension extendee + 0, // [0:44] is the sub-list for field type_name } func init() { file_core_proto_init() } @@ -3627,7 +3723,7 @@ func file_core_proto_init() { } } file_core_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceConditions); i { + switch v := v.(*PvcSnapshotVolumeInfo); i { case 0: return &v.state case 1: @@ -3639,7 +3735,7 @@ func file_core_proto_init() { } } file_core_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceMetadata); i { + switch v := v.(*WorkspaceConditions); i { case 0: return &v.state case 1: @@ -3651,7 +3747,7 @@ func file_core_proto_init() { } } file_core_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceRuntimeInfo); i { + switch v := v.(*WorkspaceMetadata); i { case 0: return &v.state case 1: @@ -3663,7 +3759,7 @@ func file_core_proto_init() { } } file_core_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceAuthentication); i { + switch v := v.(*WorkspaceRuntimeInfo); i { case 0: return &v.state case 1: @@ -3675,7 +3771,7 @@ func file_core_proto_init() { } } file_core_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartWorkspaceSpec); i { + switch v := v.(*WorkspaceAuthentication); i { case 0: return &v.state case 1: @@ -3687,7 +3783,7 @@ func file_core_proto_init() { } } file_core_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GitSpec); i { + switch v := v.(*StartWorkspaceSpec); i { case 0: return &v.state case 1: @@ -3699,7 +3795,7 @@ func file_core_proto_init() { } } file_core_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnvironmentVariable); i { + switch v := v.(*GitSpec); i { case 0: return &v.state case 1: @@ -3711,6 +3807,18 @@ func file_core_proto_init() { } } file_core_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnvironmentVariable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExposedPorts); i { case 0: return &v.state @@ -3722,7 +3830,7 @@ func file_core_proto_init() { return nil } } - file_core_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_core_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnvironmentVariable_SecretKeyRef); i { case 0: return &v.state @@ -3741,7 +3849,7 @@ func file_core_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_core_proto_rawDesc, NumEnums: 7, - NumMessages: 39, + NumMessages: 40, NumExtensions: 0, NumServices: 1, }, diff --git a/components/ws-manager-api/go/core_grpc.pb.go b/components/ws-manager-api/go/core_grpc.pb.go index 811c88e8f1bf5d..72b460b2dddb59 100644 --- a/components/ws-manager-api/go/core_grpc.pb.go +++ b/components/ws-manager-api/go/core_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.20.0 +// - protoc v3.19.4 // source: core.proto package api diff --git a/components/ws-manager-api/typescript/src/core_pb.d.ts b/components/ws-manager-api/typescript/src/core_pb.d.ts index 99454d1c1b3637..320815c19c5e1a 100644 --- a/components/ws-manager-api/typescript/src/core_pb.d.ts +++ b/components/ws-manager-api/typescript/src/core_pb.d.ts @@ -700,6 +700,29 @@ export namespace PortSpec { } } +export class PvcSnapshotVolumeInfo extends jspb.Message { + getSnapshotVolumeName(): string; + setSnapshotVolumeName(value: string): PvcSnapshotVolumeInfo; + getSnapshotVolumeHandle(): string; + setSnapshotVolumeHandle(value: string): PvcSnapshotVolumeInfo; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PvcSnapshotVolumeInfo.AsObject; + static toObject(includeInstance: boolean, msg: PvcSnapshotVolumeInfo): PvcSnapshotVolumeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PvcSnapshotVolumeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PvcSnapshotVolumeInfo; + static deserializeBinaryFromReader(message: PvcSnapshotVolumeInfo, reader: jspb.BinaryReader): PvcSnapshotVolumeInfo; +} + +export namespace PvcSnapshotVolumeInfo { + export type AsObject = { + snapshotVolumeName: string, + snapshotVolumeHandle: string, + } +} + export class WorkspaceConditions extends jspb.Message { getFailed(): string; setFailed(value: string): WorkspaceConditions; @@ -725,6 +748,11 @@ export class WorkspaceConditions extends jspb.Message { getStoppedByRequest(): WorkspaceConditionBool; setStoppedByRequest(value: WorkspaceConditionBool): WorkspaceConditions; + hasPvcSnapshotVolume(): boolean; + clearPvcSnapshotVolume(): void; + getPvcSnapshotVolume(): PvcSnapshotVolumeInfo | undefined; + setPvcSnapshotVolume(value?: PvcSnapshotVolumeInfo): WorkspaceConditions; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WorkspaceConditions.AsObject; static toObject(includeInstance: boolean, msg: WorkspaceConditions): WorkspaceConditions.AsObject; @@ -747,6 +775,7 @@ export namespace WorkspaceConditions { firstUserActivity?: google_protobuf_timestamp_pb.Timestamp.AsObject, headlessTaskFailed: string, stoppedByRequest: WorkspaceConditionBool, + pvcSnapshotVolume?: PvcSnapshotVolumeInfo.AsObject, } } @@ -874,6 +903,11 @@ export class StartWorkspaceSpec extends jspb.Message { getClass(): string; setClass(value: string): StartWorkspaceSpec; + hasVolumeSnapshot(): boolean; + clearVolumeSnapshot(): void; + getVolumeSnapshot(): PvcSnapshotVolumeInfo | undefined; + setVolumeSnapshot(value?: PvcSnapshotVolumeInfo): StartWorkspaceSpec; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): StartWorkspaceSpec.AsObject; static toObject(includeInstance: boolean, msg: StartWorkspaceSpec): StartWorkspaceSpec.AsObject; @@ -898,6 +932,7 @@ export namespace StartWorkspaceSpec { admission: AdmissionLevel, ideImage?: IDEImage.AsObject, pb_class: string, + volumeSnapshot?: PvcSnapshotVolumeInfo.AsObject, } } diff --git a/components/ws-manager-api/typescript/src/core_pb.js b/components/ws-manager-api/typescript/src/core_pb.js index 29b855477a4c74..c10097c45b32d3 100644 --- a/components/ws-manager-api/typescript/src/core_pb.js +++ b/components/ws-manager-api/typescript/src/core_pb.js @@ -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); @@ -46,6 +52,7 @@ goog.exportSymbol('proto.wsman.MarkActiveResponse', null, global); goog.exportSymbol('proto.wsman.MetadataFilter', null, global); goog.exportSymbol('proto.wsman.PortSpec', null, global); goog.exportSymbol('proto.wsman.PortVisibility', null, global); +goog.exportSymbol('proto.wsman.PvcSnapshotVolumeInfo', null, global); goog.exportSymbol('proto.wsman.SetTimeoutRequest', null, global); goog.exportSymbol('proto.wsman.SetTimeoutResponse', null, global); goog.exportSymbol('proto.wsman.StartWorkspaceRequest', null, global); @@ -635,6 +642,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.wsman.PortSpec.displayName = 'proto.wsman.PortSpec'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.wsman.PvcSnapshotVolumeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.wsman.PvcSnapshotVolumeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.wsman.PvcSnapshotVolumeInfo.displayName = 'proto.wsman.PvcSnapshotVolumeInfo'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -5662,6 +5690,166 @@ proto.wsman.PortSpec.prototype.setUrl = function(value) { +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsman.PvcSnapshotVolumeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.wsman.PvcSnapshotVolumeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsman.PvcSnapshotVolumeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsman.PvcSnapshotVolumeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + snapshotVolumeName: jspb.Message.getFieldWithDefault(msg, 1, ""), + snapshotVolumeHandle: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.wsman.PvcSnapshotVolumeInfo} + */ +proto.wsman.PvcSnapshotVolumeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsman.PvcSnapshotVolumeInfo; + return proto.wsman.PvcSnapshotVolumeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.wsman.PvcSnapshotVolumeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.wsman.PvcSnapshotVolumeInfo} + */ +proto.wsman.PvcSnapshotVolumeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSnapshotVolumeName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSnapshotVolumeHandle(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.wsman.PvcSnapshotVolumeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsman.PvcSnapshotVolumeInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.wsman.PvcSnapshotVolumeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsman.PvcSnapshotVolumeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSnapshotVolumeName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSnapshotVolumeHandle(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string snapshot_volume_name = 1; + * @return {string} + */ +proto.wsman.PvcSnapshotVolumeInfo.prototype.getSnapshotVolumeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.wsman.PvcSnapshotVolumeInfo} returns this + */ +proto.wsman.PvcSnapshotVolumeInfo.prototype.setSnapshotVolumeName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string snapshot_volume_handle = 2; + * @return {string} + */ +proto.wsman.PvcSnapshotVolumeInfo.prototype.getSnapshotVolumeHandle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.wsman.PvcSnapshotVolumeInfo} returns this + */ +proto.wsman.PvcSnapshotVolumeInfo.prototype.setSnapshotVolumeHandle = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -5700,7 +5888,8 @@ proto.wsman.WorkspaceConditions.toObject = function(includeInstance, msg) { networkNotReady: jspb.Message.getFieldWithDefault(msg, 8, 0), firstUserActivity: (f = msg.getFirstUserActivity()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), headlessTaskFailed: jspb.Message.getFieldWithDefault(msg, 10, ""), - stoppedByRequest: jspb.Message.getFieldWithDefault(msg, 11, 0) + stoppedByRequest: jspb.Message.getFieldWithDefault(msg, 11, 0), + pvcSnapshotVolume: (f = msg.getPvcSnapshotVolume()) && proto.wsman.PvcSnapshotVolumeInfo.toObject(includeInstance, f) }; if (includeInstance) { @@ -5778,6 +5967,11 @@ proto.wsman.WorkspaceConditions.deserializeBinaryFromReader = function(msg, read var value = /** @type {!proto.wsman.WorkspaceConditionBool} */ (reader.readEnum()); msg.setStoppedByRequest(value); break; + case 12: + var value = new proto.wsman.PvcSnapshotVolumeInfo; + reader.readMessage(value,proto.wsman.PvcSnapshotVolumeInfo.deserializeBinaryFromReader); + msg.setPvcSnapshotVolume(value); + break; default: reader.skipField(); break; @@ -5878,6 +6072,14 @@ proto.wsman.WorkspaceConditions.serializeBinaryToWriter = function(message, writ f ); } + f = message.getPvcSnapshotVolume(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.wsman.PvcSnapshotVolumeInfo.serializeBinaryToWriter + ); + } }; @@ -6080,6 +6282,43 @@ proto.wsman.WorkspaceConditions.prototype.setStoppedByRequest = function(value) }; +/** + * optional PvcSnapshotVolumeInfo pvc_snapshot_volume = 12; + * @return {?proto.wsman.PvcSnapshotVolumeInfo} + */ +proto.wsman.WorkspaceConditions.prototype.getPvcSnapshotVolume = function() { + return /** @type{?proto.wsman.PvcSnapshotVolumeInfo} */ ( + jspb.Message.getWrapperField(this, proto.wsman.PvcSnapshotVolumeInfo, 12)); +}; + + +/** + * @param {?proto.wsman.PvcSnapshotVolumeInfo|undefined} value + * @return {!proto.wsman.WorkspaceConditions} returns this +*/ +proto.wsman.WorkspaceConditions.prototype.setPvcSnapshotVolume = function(value) { + return jspb.Message.setWrapperField(this, 12, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.wsman.WorkspaceConditions} returns this + */ +proto.wsman.WorkspaceConditions.prototype.clearPvcSnapshotVolume = function() { + return this.setPvcSnapshotVolume(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.wsman.WorkspaceConditions.prototype.hasPvcSnapshotVolume = function() { + return jspb.Message.getField(this, 12) != null; +}; + + @@ -6726,7 +6965,8 @@ proto.wsman.StartWorkspaceSpec.toObject = function(includeInstance, msg) { timeout: jspb.Message.getFieldWithDefault(msg, 10, ""), admission: jspb.Message.getFieldWithDefault(msg, 11, 0), ideImage: (f = msg.getIdeImage()) && proto.wsman.IDEImage.toObject(includeInstance, f), - pb_class: jspb.Message.getFieldWithDefault(msg, 13, "") + pb_class: jspb.Message.getFieldWithDefault(msg, 13, ""), + volumeSnapshot: (f = msg.getVolumeSnapshot()) && proto.wsman.PvcSnapshotVolumeInfo.toObject(includeInstance, f) }; if (includeInstance) { @@ -6818,6 +7058,11 @@ proto.wsman.StartWorkspaceSpec.deserializeBinaryFromReader = function(msg, reade var value = /** @type {string} */ (reader.readString()); msg.setClass(value); break; + case 14: + var value = new proto.wsman.PvcSnapshotVolumeInfo; + reader.readMessage(value,proto.wsman.PvcSnapshotVolumeInfo.deserializeBinaryFromReader); + msg.setVolumeSnapshot(value); + break; default: reader.skipField(); break; @@ -6936,6 +7181,14 @@ proto.wsman.StartWorkspaceSpec.serializeBinaryToWriter = function(message, write f ); } + f = message.getVolumeSnapshot(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.wsman.PvcSnapshotVolumeInfo.serializeBinaryToWriter + ); + } }; @@ -7271,6 +7524,43 @@ proto.wsman.StartWorkspaceSpec.prototype.setClass = function(value) { }; +/** + * optional PvcSnapshotVolumeInfo volume_snapshot = 14; + * @return {?proto.wsman.PvcSnapshotVolumeInfo} + */ +proto.wsman.StartWorkspaceSpec.prototype.getVolumeSnapshot = function() { + return /** @type{?proto.wsman.PvcSnapshotVolumeInfo} */ ( + jspb.Message.getWrapperField(this, proto.wsman.PvcSnapshotVolumeInfo, 14)); +}; + + +/** + * @param {?proto.wsman.PvcSnapshotVolumeInfo|undefined} value + * @return {!proto.wsman.StartWorkspaceSpec} returns this +*/ +proto.wsman.StartWorkspaceSpec.prototype.setVolumeSnapshot = function(value) { + return jspb.Message.setWrapperField(this, 14, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.wsman.StartWorkspaceSpec} returns this + */ +proto.wsman.StartWorkspaceSpec.prototype.clearVolumeSnapshot = function() { + return this.setVolumeSnapshot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.wsman.StartWorkspaceSpec.prototype.hasVolumeSnapshot = function() { + return jspb.Message.getField(this, 14) != null; +}; + + diff --git a/components/ws-manager-bridge/src/bridge.ts b/components/ws-manager-bridge/src/bridge.ts index da213e346942e0..b4a920982963fe 100644 --- a/components/ws-manager-bridge/src/bridge.ts +++ b/components/ws-manager-bridge/src/bridge.ts @@ -354,6 +354,25 @@ export class WorkspaceManagerBridge implements Disposable { // now notify all prebuild listeners about updates - and update DB if needed await this.updatePrebuiltWorkspace({ span }, userId, status, writeToDB); + // update volume snapshot information + if ( + status.conditions.pvcSnapshotVolume && + status.conditions.pvcSnapshotVolume.snapshotVolumeName != "" && + writeToDB + ) { + let existingSnapshot = await this.workspaceDB + .trace(ctx) + .findVolumeSnapshotById(status.conditions.pvcSnapshotVolume.snapshotVolumeName); + if (existingSnapshot === undefined) { + await this.workspaceDB.trace(ctx).storeVolumeSnapshot({ + id: status.conditions.pvcSnapshotVolume.snapshotVolumeName, + creationTime: new Date().toISOString(), + originalWorkspaceId: workspaceId, + volumeHandle: status.conditions.pvcSnapshotVolume.snapshotVolumeHandle, + }); + } + } + if (writeToDB) { await this.workspaceDB.trace(ctx).storeInstance(instance); diff --git a/components/ws-manager/cmd/run.go b/components/ws-manager/cmd/run.go index 2a53daca0d5e20..285a214b93e819 100644 --- a/components/ws-manager/cmd/run.go +++ b/components/ws-manager/cmd/run.go @@ -32,6 +32,7 @@ import ( imgbldr "github.com/gitpod-io/gitpod/image-builder/api" "github.com/gitpod-io/gitpod/ws-manager/pkg/manager" "github.com/gitpod-io/gitpod/ws-manager/pkg/proxy" + volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1" ) // serveCmd represents the serve command @@ -99,6 +100,11 @@ var runCmd = &cobra.Command{ log.WithError(err).Fatal("invalid content provider configuration") } + err = volumesnapshotv1.AddToScheme(mgr.GetScheme()) + if err != nil { + log.WithError(err).Fatal("cannot register Kubernetes volumesnapshotv1 schema - this should never happen") + } + mgmt, err := manager.New(cfg.Manager, mgr.GetClient(), clientset, cp) if err != nil { log.WithError(err).Fatal("cannot create manager") diff --git a/components/ws-manager/go.mod b/components/ws-manager/go.mod index 63115fdcd8495c..ac06a70b605f47 100644 --- a/components/ws-manager/go.mod +++ b/components/ws-manager/go.mod @@ -74,6 +74,8 @@ require ( github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid v1.3.1 // indirect + github.com/klauspost/pgzip v1.2.5 // indirect + github.com/kubernetes-csi/external-snapshotter/client/v6 v6.0.0-rc4 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/minio/md5-simd v1.1.0 // indirect github.com/minio/minio-go/v7 v7.0.11 // indirect diff --git a/components/ws-manager/go.sum b/components/ws-manager/go.sum index 9f62189f5776dd..51ba60df631e1f 100644 --- a/components/ws-manager/go.sum +++ b/components/ws-manager/go.sum @@ -408,6 +408,10 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= +github.com/kubernetes-csi/external-snapshotter/client/v6 v6.0.0-rc4 h1:uspy64y8fTrwchSk4dKx/CAndt0y2V70BFM2C9/jTIE= +github.com/kubernetes-csi/external-snapshotter/client/v6 v6.0.0-rc4/go.mod h1:tnHiLn3P10N95fjn7O40QH5ovN0EFGAxqdTpUMrX6bU= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= diff --git a/components/ws-manager/pkg/manager/annotations.go b/components/ws-manager/pkg/manager/annotations.go index f5bf12f1361c75..8ecaa28bec42d0 100644 --- a/components/ws-manager/pkg/manager/annotations.go +++ b/components/ws-manager/pkg/manager/annotations.go @@ -66,6 +66,9 @@ const ( // pvcWorkspaceFeatureAnnotation is set on workspaces which are using persistent_volume_claim feature pvcWorkspaceFeatureAnnotation = "gitpod.io/pvcFeature" + // pvcWorkspaceSnapshotVolumeAnnotation stores snapshot volume name when snapshot was created from pvc + pvcWorkspaceSnapshotVolumeAnnotation = "gitpod.io/snapshotVolumeName" + // startedDisposalAnnotation sets to true when finalizeWorkspaceContent is called to prevent finalize from // being called more then once, which can happen due to race between disposalStatusAnnotation update and actOnPodEvent startedDisposalAnnotation = "gitpod.io/startedDisposal" @@ -172,6 +175,12 @@ type workspaceDisposalStatus struct { GitStatus *csapi.GitStatus `json:"gitStatus,omitempty"` } +// workspaceSnapshotVolumeStatus stores the status of snapshot volume +type workspaceSnapshotVolumeStatus struct { + PvcSnapshotVolumeName string `json:"pvcSnapshotVolumeName,omitempty"` + PvcSnapshotVolumeHandle string `json:"pvcSnapshotVolumeHandle,omitempty"` +} + func (m *Manager) modifyFinalizer(ctx context.Context, workspaceID string, finalizer string, add bool) error { // Retry on failure. Sometimes this doesn't work because of concurrent modification. The Kuberentes way is to just try again after waiting a bit. return retry.RetryOnConflict(retry.DefaultBackoff, func() (err error) { diff --git a/components/ws-manager/pkg/manager/create.go b/components/ws-manager/pkg/manager/create.go index fb1eb976b0df99..d5e31f9e99be31 100644 --- a/components/ws-manager/pkg/manager/create.go +++ b/components/ws-manager/pkg/manager/create.go @@ -238,7 +238,7 @@ func (m *Manager) createPVCForWorkspacePod(startContext *startWorkspaceContext) PVCConfig = startContext.Class.PVC } - pvc := &corev1.PersistentVolumeClaim{ + PVC := &corev1.PersistentVolumeClaim{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%s", prefix, req.Id), Namespace: m.Config.Namespace, @@ -256,10 +256,19 @@ func (m *Manager) createPVCForWorkspacePod(startContext *startWorkspaceContext) // Specify the storageClassName when the storage class is non-empty. // This way, the Kubernetes uses the default StorageClass within the cluster. // Otherwise, the Kubernetes would try to request the PVC with no class. - pvc.Spec.StorageClassName = &PVCConfig.StorageClass + PVC.Spec.StorageClassName = &PVCConfig.StorageClass } - return pvc, nil + if startContext.VolumeSnapshot.PvcSnapshotVolumeName != "" { + snapshotApiGroup := "snapshot.storage.k8s.io" + PVC.Spec.DataSource = &corev1.TypedLocalObjectReference{ + APIGroup: &snapshotApiGroup, + Kind: "VolumeSnapshot", + Name: startContext.VolumeSnapshot.PvcSnapshotVolumeName, + } + } + + return PVC, nil } // createDefiniteWorkspacePod creates a workspace pod without regard for any template. @@ -898,6 +907,12 @@ func (m *Manager) newStartWorkspaceContext(ctx context.Context, req *api.StartWo workspaceClassLabel: clsName, } + var snapshotVolume workspaceSnapshotVolumeStatus + if req.Spec.VolumeSnapshot != nil { + snapshotVolume.PvcSnapshotVolumeName = req.Spec.VolumeSnapshot.SnapshotVolumeName + snapshotVolume.PvcSnapshotVolumeHandle = req.Spec.VolumeSnapshot.SnapshotVolumeHandle + } + return &startWorkspaceContext{ Labels: labels, CLIAPIKey: cliAPIKey, @@ -909,6 +924,7 @@ func (m *Manager) newStartWorkspaceContext(ctx context.Context, req *api.StartWo TraceID: traceID, Headless: headless, Class: class, + VolumeSnapshot: snapshotVolume, }, nil } diff --git a/components/ws-manager/pkg/manager/manager.go b/components/ws-manager/pkg/manager/manager.go index da8ce4112846ce..c029779c2698ce 100644 --- a/components/ws-manager/pkg/manager/manager.go +++ b/components/ws-manager/pkg/manager/manager.go @@ -68,16 +68,17 @@ type Manager struct { } type startWorkspaceContext struct { - Request *api.StartWorkspaceRequest `json:"request"` - Labels map[string]string `json:"labels"` - CLIAPIKey string `json:"cliApiKey"` - OwnerToken string `json:"ownerToken"` - IDEPort int32 `json:"idePort"` - SupervisorPort int32 `json:"supervisorPort"` - WorkspaceURL string `json:"workspaceURL"` - TraceID string `json:"traceID"` - Headless bool `json:"headless"` - Class *config.WorkspaceClass `json:"class"` + Request *api.StartWorkspaceRequest `json:"request"` + Labels map[string]string `json:"labels"` + CLIAPIKey string `json:"cliApiKey"` + OwnerToken string `json:"ownerToken"` + IDEPort int32 `json:"idePort"` + SupervisorPort int32 `json:"supervisorPort"` + WorkspaceURL string `json:"workspaceURL"` + TraceID string `json:"traceID"` + Headless bool `json:"headless"` + Class *config.WorkspaceClass `json:"class"` + VolumeSnapshot workspaceSnapshotVolumeStatus `json:"volumeSnapshot"` } func (swctx *startWorkspaceContext) ContainerConfiguration() config.ContainerConfiguration { @@ -260,7 +261,8 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq return false, err } - err = wait.PollWithContext(ctx, 100*time.Millisecond, 5*time.Second, podRunning(m.Clientset, pod.Name, pod.Namespace)) + // wait at least 60 seconds before deleting pending pod and trying again due to pending PVC attachment + err = wait.PollWithContext(ctx, 100*time.Millisecond, 60*time.Second, podRunning(m.Clientset, pod.Name, pod.Namespace)) if err != nil { jsonPod, _ := json.Marshal(pod) safePod, _ := log.RedactJSON(jsonPod) diff --git a/components/ws-manager/pkg/manager/monitor.go b/components/ws-manager/pkg/manager/monitor.go index 04e5ad5a2abef8..49586e40085258 100644 --- a/components/ws-manager/pkg/manager/monitor.go +++ b/components/ws-manager/pkg/manager/monitor.go @@ -22,8 +22,12 @@ import ( grpc_status "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" corev1 "k8s.io/api/core/v1" + k8serr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/uuid" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "sigs.k8s.io/controller-runtime/pkg/client" @@ -35,6 +39,8 @@ import ( wsdaemon "github.com/gitpod-io/gitpod/ws-daemon/api" "github.com/gitpod-io/gitpod/ws-manager/api" "github.com/gitpod-io/gitpod/ws-manager/pkg/manager/internal/workpool" + + volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1" ) const ( @@ -715,7 +721,7 @@ func (m *Monitor) initializeWorkspaceContent(ctx context.Context, pod *corev1.Po return xerrors.Errorf("cannot unmarshal init config: %w", err) } - if fullWorkspaceBackup || pvcFeatureEnabled { + if fullWorkspaceBackup { _, mf, err := m.manager.Content.GetContentLayer(ctx, workspaceMeta.Owner, workspaceMeta.MetaId, &initializer) if err != nil { return xerrors.Errorf("cannot download workspace content manifest: %w", err) @@ -859,6 +865,26 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb tpe = api.WorkspaceType_REGULAR } + var ( + createdSnapshotVolume bool + readySnapshotVolume bool + deletedPVC bool + pvcFeatureEnabled bool + markSnapshotVolumeAnnotation bool + pvcSnapshotVolumeName string + pvcSnapshotContentName string + pvcSnapshotClassName string + ) + if wso.Pod != nil { + _, pvcFeatureEnabled = wso.Pod.Labels[pvcWorkspaceFeatureAnnotation] + pvcSnapshotVolumeName = string(uuid.NewUUID()) + wsClassName := "" + if _, ok := wso.Pod.Labels[workspaceClassLabel]; ok { + wsClassName = wso.Pod.Labels[workspaceClassLabel] + } + pvcSnapshotClassName = m.manager.Config.WorkspaceClasses[wsClassName].PVC.SnapshotClass + } + doBackup := wso.WasEverReady() && !wso.IsWorkspaceHeadless() doBackupLogs := tpe == api.WorkspaceType_PREBUILD doSnapshot := tpe == api.WorkspaceType_PREBUILD @@ -870,30 +896,6 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb return false, nil, nil } - // todo(pavel): once we add snapshot objects, this will be moved to a better place - if wso.Pod != nil { - _, pvcFeatureEnabled := wso.Pod.Labels[pvcWorkspaceFeatureAnnotation] - if pvcFeatureEnabled { - // pvc name is the same as pod name - pvcName := wso.Pod.Name - log.Infof("Deleting PVC: %s", pvcName) - // todo: once we add snapshot objects, this will be changed to create snapshot object first - pvcErr := m.manager.Clientset.Delete(ctx, - &corev1.PersistentVolumeClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: pvcName, - Namespace: m.manager.Config.Namespace, - }, - }, - ) - span.LogKV("event", "pvc deleted") - - if pvcErr != nil { - log.WithError(pvcErr).Errorf("failed to delete pvc `%s`", pvcName) - } - } - } - // Maybe the workspace never made it to a phase where we actually initialized a workspace. // Assuming that once we've had a nodeName we've spoken to ws-daemon it's safe to assume that if // we don't have a nodeName we don't need to dipose the workspace. @@ -927,40 +929,143 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb log.WithError(err).Error("was unable to update pod's start disposal state - this might cause an incorrect disposal state") } - if doSnapshot { - // if this is a prebuild take a snapshot and mark the workspace - var res *wsdaemon.TakeSnapshotResponse - res, err = snc.TakeSnapshot(ctx, &wsdaemon.TakeSnapshotRequest{Id: workspaceID}) - if err != nil { - tracing.LogError(span, err) - log.WithError(err).Warn("cannot take snapshot") - err = xerrors.Errorf("cannot take snapshot: %v", err) - err = m.manager.markWorkspace(ctx, workspaceID, addMark(workspaceExplicitFailAnnotation, err.Error())) + if pvcFeatureEnabled { + pvcName := wso.Pod.Name + if !createdSnapshotVolume { + // create snapshot object out of PVC + volumeSnapshot := &volumesnapshotv1.VolumeSnapshot{ + ObjectMeta: metav1.ObjectMeta{ + Name: pvcSnapshotVolumeName, + Namespace: m.manager.Config.Namespace, + Labels: map[string]string{ + "workspaceID": workspaceID, + }, + }, + Spec: volumesnapshotv1.VolumeSnapshotSpec{ + Source: volumesnapshotv1.VolumeSnapshotSource{ + PersistentVolumeClaimName: &pvcName, + }, + VolumeSnapshotClassName: &pvcSnapshotClassName, + }, + } + + err = m.manager.Clientset.Create(ctx, volumeSnapshot) if err != nil { - log.WithError(err).Warn("was unable to mark workspace as failed") + err = xerrors.Errorf("cannot create volumesnapshot: %v", err) + return true, nil, err } + createdSnapshotVolume = true } + if createdSnapshotVolume { + backoff := wait.Backoff{ + Steps: 30, + Duration: 100 * time.Millisecond, + Factor: 1.5, + Jitter: 0.1, + Cap: 10 * time.Minute, + } + err = wait.ExponentialBackoff(backoff, func() (bool, error) { + var volumeSnapshot volumesnapshotv1.VolumeSnapshot + err := m.manager.Clientset.Get(ctx, types.NamespacedName{Namespace: m.manager.Config.Namespace, Name: pvcSnapshotVolumeName}, &volumeSnapshot) + if err != nil { + if k8serr.IsNotFound(err) { + // volumesnapshot doesn't exist yet, retry again + return false, nil + } + log.WithError(err).WithField("VolumeSnapshot.Name", pvcSnapshotVolumeName).Error("was unable to get volume snapshot") + return false, err + } + if volumeSnapshot.Status != nil && volumeSnapshot.Status.ReadyToUse != nil && *(volumeSnapshot.Status.ReadyToUse) { + pvcSnapshotContentName = *volumeSnapshot.Status.BoundVolumeSnapshotContentName + return true, nil + } + return false, nil + }) + if err != nil { + log.WithError(err).Errorf("failed to get volume snapshot `%s`", pvcSnapshotVolumeName) + return true, nil, err + } + readySnapshotVolume = true - if res != nil { - err = m.manager.markWorkspace(context.Background(), workspaceID, addMark(workspaceSnapshotAnnotation, res.Url)) + } + if readySnapshotVolume && !markSnapshotVolumeAnnotation { + var volumeSnapshotContent volumesnapshotv1.VolumeSnapshotContent + err := m.manager.Clientset.Get(ctx, types.NamespacedName{Namespace: "", Name: pvcSnapshotContentName}, &volumeSnapshotContent) + if err != nil { + log.WithError(err).WithField("VolumeSnapshotContent.Name", pvcSnapshotContentName).Error("was unable to get volume snapshot content") + return true, nil, err + } + + snapshotHandle := *volumeSnapshotContent.Status.SnapshotHandle + + log.Infof("snapshot name: %s, handle: %s", pvcSnapshotVolumeName, snapshotHandle) + b, err := json.Marshal(workspaceSnapshotVolumeStatus{PvcSnapshotVolumeName: pvcSnapshotVolumeName, PvcSnapshotVolumeHandle: snapshotHandle}) + if err != nil { + return true, nil, err + } + + err = m.manager.markWorkspace(context.Background(), workspaceID, addMark(pvcWorkspaceSnapshotVolumeAnnotation, string(b))) + if err != nil { + log.WithError(err).Error("cannot mark workspace with snapshot volume name - snapshot will be orphaned and backup lost") + return true, nil, err + } + + markSnapshotVolumeAnnotation = true + } + + // backup is done and we are ready to kill the pod, mark PVC for deletion + if readySnapshotVolume && !deletedPVC { + // todo: once we add snapshot objects, this will be changed to create snapshot object first + pvcErr := m.manager.Clientset.Delete(ctx, + &corev1.PersistentVolumeClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: pvcName, + Namespace: m.manager.Config.Namespace, + }, + }, + ) + if pvcErr != nil { + log.WithError(pvcErr).Errorf("failed to delete pvc `%s`", pvcName) + } + deletedPVC = true + } + } else { + if doSnapshot { + // if this is a prebuild take a snapshot and mark the workspace + var res *wsdaemon.TakeSnapshotResponse + res, err = snc.TakeSnapshot(ctx, &wsdaemon.TakeSnapshotRequest{Id: workspaceID}) if err != nil { tracing.LogError(span, err) - log.WithError(err).Warn("cannot mark headless workspace with snapshot - that's one prebuild lost") - err = xerrors.Errorf("cannot remember snapshot: %v", err) + log.WithError(err).Warn("cannot take snapshot") + err = xerrors.Errorf("cannot take snapshot: %v", err) err = m.manager.markWorkspace(ctx, workspaceID, addMark(workspaceExplicitFailAnnotation, err.Error())) if err != nil { log.WithError(err).Warn("was unable to mark workspace as failed") } } + + if res != nil { + err = m.manager.markWorkspace(context.Background(), workspaceID, addMark(workspaceSnapshotAnnotation, res.Url)) + if err != nil { + tracing.LogError(span, err) + log.WithError(err).Warn("cannot mark headless workspace with snapshot - that's one prebuild lost") + err = xerrors.Errorf("cannot remember snapshot: %v", err) + err = m.manager.markWorkspace(ctx, workspaceID, addMark(workspaceExplicitFailAnnotation, err.Error())) + if err != nil { + log.WithError(err).Warn("was unable to mark workspace as failed") + } + } + } } } // DiposeWorkspace will "degenerate" to a simple wait if the finalization/disposal process is already running. // This is unlike the initialization process where we wait for things to finish in a later phase. resp, err := snc.DisposeWorkspace(ctx, &wsdaemon.DisposeWorkspaceRequest{ - Id: workspaceID, - Backup: doBackup, - BackupLogs: doBackupLogs, + Id: workspaceID, + Backup: doBackup && !pvcFeatureEnabled, + BackupLogs: doBackupLogs, + PersistentVolumeClaim: pvcFeatureEnabled, }) if resp != nil { gitStatus = resp.GitStatus diff --git a/components/ws-manager/pkg/manager/status.go b/components/ws-manager/pkg/manager/status.go index c6c478881d98cc..a6be6d39b3f671 100644 --- a/components/ws-manager/pkg/manager/status.go +++ b/components/ws-manager/pkg/manager/status.go @@ -230,6 +230,14 @@ func (m *Manager) getWorkspaceStatus(wso workspaceObjects) (*api.WorkspaceStatus admission = api.AdmissionLevel(av) } + var snapshotVolumeStatus workspaceSnapshotVolumeStatus + if rawSnapshotVolumeStatus, ok := wso.Pod.Annotations[pvcWorkspaceSnapshotVolumeAnnotation]; ok { + err := json.Unmarshal([]byte(rawSnapshotVolumeStatus), &snapshotVolumeStatus) + if err != nil { + return nil, xerrors.Errorf("invalid snapshot volume status: %w", err) + } + } + status = &api.WorkspaceStatus{ Id: id, StatusVersion: m.clock.Tick(), @@ -250,6 +258,10 @@ func (m *Manager) getWorkspaceStatus(wso workspaceObjects) (*api.WorkspaceStatus }, Conditions: &api.WorkspaceConditions{ Snapshot: wso.Pod.Annotations[workspaceSnapshotAnnotation], + PvcSnapshotVolume: &api.PvcSnapshotVolumeInfo{ + SnapshotVolumeName: snapshotVolumeStatus.PvcSnapshotVolumeName, + SnapshotVolumeHandle: snapshotVolumeStatus.PvcSnapshotVolumeHandle, + }, }, Runtime: &api.WorkspaceRuntimeInfo{ NodeName: wso.Pod.Spec.NodeName, diff --git a/components/ws-manager/pkg/manager/testdata/status_brokenScheduler_UNKNOWN00.golden b/components/ws-manager/pkg/manager/testdata/status_brokenScheduler_UNKNOWN00.golden index 0c4d564147b57d..5c9b76a1d01163 100644 --- a/components/ws-manager/pkg/manager/testdata/status_brokenScheduler_UNKNOWN00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_brokenScheduler_UNKNOWN00.golden @@ -15,7 +15,8 @@ "ide_image": {} }, "conditions": { - "failed": "MatchNodeSelector: Pod Predicate MatchNodeSelector failed" + "failed": "MatchNodeSelector: Pod Predicate MatchNodeSelector failed", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-gitpod-dev-default-pool-b25aa276-3tl2", diff --git a/components/ws-manager/pkg/manager/testdata/status_cannotPull_004_CREATING00.golden b/components/ws-manager/pkg/manager/testdata/status_cannotPull_004_CREATING00.golden index fcf1e41f8305a8..09a28fcba94318 100644 --- a/components/ws-manager/pkg/manager/testdata/status_cannotPull_004_CREATING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_cannotPull_004_CREATING00.golden @@ -26,7 +26,8 @@ }, "phase": 2, "conditions": { - "failed": "cannot pull image: rpc error: code = FailedPrecondition desc = failed to pull and unpack image \"reg.gitpod.io:31001/remote/5031df46-db5e-43ae-91bd-1448305c001d:latest\": failed commit on ref \"layer-sha256:6633ce2524dfae110cac2159a4f8490d198612d12abc1420486c52fbcf30b8b1\": \"layer-sha256:6633ce2524dfae110cac2159a4f8490d198612d12abc1420486c52fbcf30b8b1\" failed size validation: 33554502 != 64598931: failed precondition" + "failed": "cannot pull image: rpc error: code = FailedPrecondition desc = failed to pull and unpack image \"reg.gitpod.io:31001/remote/5031df46-db5e-43ae-91bd-1448305c001d:latest\": failed commit on ref \"layer-sha256:6633ce2524dfae110cac2159a4f8490d198612d12abc1420486c52fbcf30b8b1\": \"layer-sha256:6633ce2524dfae110cac2159a4f8490d198612d12abc1420486c52fbcf30b8b1\" failed size validation: 33554502 != 64598931: failed precondition", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-gp-prod-ws-us14-us-workspace-pool-61eed5be-kq0k", diff --git a/components/ws-manager/pkg/manager/testdata/status_cannotPull_005_STOPPED00.golden b/components/ws-manager/pkg/manager/testdata/status_cannotPull_005_STOPPED00.golden index b99d818387e483..50675a1282543b 100644 --- a/components/ws-manager/pkg/manager/testdata/status_cannotPull_005_STOPPED00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_cannotPull_005_STOPPED00.golden @@ -26,7 +26,8 @@ }, "phase": 6, "conditions": { - "failed": "cannot pull image: Back-off pulling image \"reg.gitpod.io:31001/remote/5031df46-db5e-43ae-91bd-1448305c001d\"" + "failed": "cannot pull image: Back-off pulling image \"reg.gitpod.io:31001/remote/5031df46-db5e-43ae-91bd-1448305c001d\"", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-gp-prod-ws-us14-us-workspace-pool-61eed5be-kq0k", diff --git a/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.golden index cf3e2351c6078e..06ed05ffcfd574 100644 --- a/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.golden @@ -20,7 +20,8 @@ }, "phase": 6, "conditions": { - "final_backup_complete": 1 + "final_backup_complete": 1, + "pvc_snapshot_volume": {} }, "repo": { "branch": "master", diff --git a/components/ws-manager/pkg/manager/testdata/status_contentInitFailed_005_STOPPED00.golden b/components/ws-manager/pkg/manager/testdata/status_contentInitFailed_005_STOPPED00.golden index d52550775de1a4..c52eecb7275188 100644 --- a/components/ws-manager/pkg/manager/testdata/status_contentInitFailed_005_STOPPED00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_contentInitFailed_005_STOPPED00.golden @@ -21,7 +21,8 @@ }, "phase": 6, "conditions": { - "failed": "cannot initialize workspace: cannot initialize workspace: content initializer failed" + "failed": "cannot initialize workspace: cannot initialize workspace: content initializer failed", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-gp-prod-ws-us15-us--headless-pool-64a87cf8-bw7v", diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.golden b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.golden index a30da401af2662..836b3447d26449 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.golden +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.golden @@ -21,7 +21,8 @@ "phase": 6, "conditions": { "failed": "last backup failed: testing the backup failure mode.", - "final_backup_complete": 1 + "final_backup_complete": 1, + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-dev-workload-1-49d27f81-n6zr", diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.golden b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.golden index 6150d817593dda..d92ccd931f9a20 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.golden +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.golden @@ -20,7 +20,8 @@ }, "phase": 6, "conditions": { - "final_backup_complete": 1 + "final_backup_complete": 1, + "pvc_snapshot_volume": {} }, "repo": { "branch": "master", diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.golden b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.golden index 837e60135b5515..77517f8b88d4ee 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.golden +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.golden @@ -32,7 +32,8 @@ }, "phase": 6, "conditions": { - "final_backup_complete": 1 + "final_backup_complete": 1, + "pvc_snapshot_volume": {} }, "repo": { "branch": "master", diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.golden b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.golden index 7228299dbfffef..f4082d2162c75c 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.golden +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.golden @@ -31,7 +31,9 @@ } }, "phase": 5, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "runtime": { "node_name": "gke-dev-workload-1-49d27f81-n6zr", "pod_name": "ws-60a694b3-ac7d-4a24-8ad9-2d8d5eb56de0", diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.golden b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.golden index 298b6b74e220ac..244ccc39a92df4 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.golden +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.golden @@ -20,7 +20,8 @@ }, "phase": 6, "conditions": { - "final_backup_complete": 1 + "final_backup_complete": 1, + "pvc_snapshot_volume": {} }, "repo": { "branch": "master", diff --git a/components/ws-manager/pkg/manager/testdata/status_errimgpull.golden b/components/ws-manager/pkg/manager/testdata/status_errimgpull.golden index b2fd2c1261bc1e..c584ddf91740fc 100644 --- a/components/ws-manager/pkg/manager/testdata/status_errimgpull.golden +++ b/components/ws-manager/pkg/manager/testdata/status_errimgpull.golden @@ -16,7 +16,8 @@ }, "phase": 2, "conditions": { - "failed": "cannot pull image: rpc error: code = Unknown desc = Error response from daemon: Get https://registry.staging-cw-minio-core.svc.cluster.local/v1/_ping: dial tcp: lookup registry.staging-cw-minio-core.svc.cluster.local: no such host" + "failed": "cannot pull image: rpc error: code = Unknown desc = Error response from daemon: Get https://registry.staging-cw-minio-core.svc.cluster.local/v1/_ping: dial tcp: lookup registry.staging-cw-minio-core.svc.cluster.local: no such host", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-gitpod-dev-worker-pool-2-184c607e-wl2d", diff --git a/components/ws-manager/pkg/manager/testdata/status_errimgpull_CREATING01.golden b/components/ws-manager/pkg/manager/testdata/status_errimgpull_CREATING01.golden index 481a83ed0b592d..1c4c0e8babe9c1 100644 --- a/components/ws-manager/pkg/manager/testdata/status_errimgpull_CREATING01.golden +++ b/components/ws-manager/pkg/manager/testdata/status_errimgpull_CREATING01.golden @@ -20,7 +20,8 @@ }, "phase": 6, "conditions": { - "failed": "cannot pull image: Back-off pulling image \"reg.gitpod.io:227/i/79be1e8b-a6de-4572-8627-99ef12303a88:latest\"" + "failed": "cannot pull image: Back-off pulling image \"reg.gitpod.io:227/i/79be1e8b-a6de-4572-8627-99ef12303a88:latest\"", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-gitpod-dev-worker-pool-1-f039fa9e-2jrb", diff --git a/components/ws-manager/pkg/manager/testdata/status_failedBeforeStopping_explicitFail.golden b/components/ws-manager/pkg/manager/testdata/status_failedBeforeStopping_explicitFail.golden index e823c25b6056b4..7c7557164288a5 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedBeforeStopping_explicitFail.golden +++ b/components/ws-manager/pkg/manager/testdata/status_failedBeforeStopping_explicitFail.golden @@ -16,7 +16,8 @@ }, "phase": 6, "conditions": { - "failed": "cannot init workspace content: rpc error: code = Internal desc = cannot initialize workspace" + "failed": "cannot init workspace content: rpc error: code = Internal desc = cannot initialize workspace", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-gitpod-dev-worker-pool-2-184c607e-fltt", diff --git a/components/ws-manager/pkg/manager/testdata/status_failedLogs_RUNNING00.golden b/components/ws-manager/pkg/manager/testdata/status_failedLogs_RUNNING00.golden index 4da8240449ca27..7a049186e341b2 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedLogs_RUNNING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_failedLogs_RUNNING00.golden @@ -27,7 +27,8 @@ }, "phase": 4, "conditions": { - "failed": "IDE failed to start: fork/exec /theia/node_modules/@gitpod/gitpod-ide/startup.sh: no such file or directory" + "failed": "IDE failed to start: fork/exec /theia/node_modules/@gitpod/gitpod-ide/startup.sh: no such file or directory", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-dev-workload-7fd27879-kn1v", diff --git a/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN01.golden b/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN01.golden index 3489c328886bf1..dfccfdda6856ee 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN01.golden +++ b/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN01.golden @@ -16,7 +16,8 @@ "ide_image": {} }, "conditions": { - "failed": "Evicted: Pod The node was low on resource: [DiskPressure]. " + "failed": "Evicted: Pod The node was low on resource: [DiskPressure]. ", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-production--gitp-workspace-pool-2-a3afc0b4-nmbw", diff --git a/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN02.golden b/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN02.golden index e21562351b5a5e..1afaa6d7c45ae0 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN02.golden +++ b/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN02.golden @@ -17,7 +17,8 @@ }, "phase": 6, "conditions": { - "failed": "Evicted: Pod The node was low on resource: [DiskPressure]. " + "failed": "Evicted: Pod The node was low on resource: [DiskPressure]. ", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-production--gitp-workspace-pool-2-a3afc0b4-nmbw", diff --git a/components/ws-manager/pkg/manager/testdata/status_failedWorkspaceMount_PENDING00.golden b/components/ws-manager/pkg/manager/testdata/status_failedWorkspaceMount_PENDING00.golden index fda348dfd90a79..3571bc91371a28 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedWorkspaceMount_PENDING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_failedWorkspaceMount_PENDING00.golden @@ -16,7 +16,8 @@ }, "phase": 1, "conditions": { - "failed": "cannot mount workspace" + "failed": "cannot mount workspace", + "pvc_snapshot_volume": {} }, "message": "pod is pending", "runtime": { diff --git a/components/ws-manager/pkg/manager/testdata/status_firstUserActivity_RUNNING.golden b/components/ws-manager/pkg/manager/testdata/status_firstUserActivity_RUNNING.golden index 019abb33cac7fe..90ade6810fcacb 100644 --- a/components/ws-manager/pkg/manager/testdata/status_firstUserActivity_RUNNING.golden +++ b/components/ws-manager/pkg/manager/testdata/status_firstUserActivity_RUNNING.golden @@ -67,7 +67,8 @@ "first_user_activity": { "seconds": 1582886676, "nanos": 995133911 - } + }, + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-staging--gitpod--workspace-pool-2-331a2b32-mgbq", diff --git a/components/ws-manager/pkg/manager/testdata/status_headlessTaskFailed_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_headlessTaskFailed_STOPPING00.golden index d52ad25a219746..b8fd71ccd025c1 100644 --- a/components/ws-manager/pkg/manager/testdata/status_headlessTaskFailed_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_headlessTaskFailed_STOPPING00.golden @@ -21,7 +21,8 @@ }, "phase": 5, "conditions": { - "headless_task_failed": "headless task failed" + "headless_task_failed": "headless task failed", + "pvc_snapshot_volume": {} }, "message": "headless workspace is stopping", "runtime": { diff --git a/components/ws-manager/pkg/manager/testdata/status_headless_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_headless_STOPPING00.golden index 4ecee525da23a1..bfbc43d5626a31 100644 --- a/components/ws-manager/pkg/manager/testdata/status_headless_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_headless_STOPPING00.golden @@ -25,7 +25,9 @@ } }, "phase": 5, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "message": "headless workspace is stopping", "runtime": { "node_name": "gke-dev-workload-1-49d27f81-8s5c", diff --git a/components/ws-manager/pkg/manager/testdata/status_ideFailedToStart_005_RUNNING00.golden b/components/ws-manager/pkg/manager/testdata/status_ideFailedToStart_005_RUNNING00.golden index 98b66c113235b5..8f551684cea6cf 100644 --- a/components/ws-manager/pkg/manager/testdata/status_ideFailedToStart_005_RUNNING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_ideFailedToStart_005_RUNNING00.golden @@ -20,7 +20,8 @@ }, "phase": 4, "conditions": { - "failed": "IDE failed to start: exit status 127" + "failed": "IDE failed to start: exit status 127", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-gp-prod-ws-eu14-eu-workspace-pool-b6e0759a-3lb1", diff --git a/components/ws-manager/pkg/manager/testdata/status_imagespec_RUNNING00.golden b/components/ws-manager/pkg/manager/testdata/status_imagespec_RUNNING00.golden index ab3ebfe11606f1..294b87d43c44a6 100644 --- a/components/ws-manager/pkg/manager/testdata/status_imagespec_RUNNING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_imagespec_RUNNING00.golden @@ -29,7 +29,8 @@ "first_user_activity": { "seconds": 1583767886, "nanos": 855961185 - } + }, + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-gitpod-dev-worker-pool-1-3df476cf-qxwr", diff --git a/components/ws-manager/pkg/manager/testdata/status_interrupted.golden b/components/ws-manager/pkg/manager/testdata/status_interrupted.golden index add5c7212207cc..885d960c8505ba 100644 --- a/components/ws-manager/pkg/manager/testdata/status_interrupted.golden +++ b/components/ws-manager/pkg/manager/testdata/status_interrupted.golden @@ -23,7 +23,9 @@ "ide_image": {} }, "phase": 7, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "message": "container workspace was terminated unexpectedly - workspace should recover", "runtime": { "node_name": "gke-gitpod-staging-e-workspace-pool-2-2eb903d0-g86k", diff --git a/components/ws-manager/pkg/manager/testdata/status_interrupted_CREATING00.golden b/components/ws-manager/pkg/manager/testdata/status_interrupted_CREATING00.golden index d7b1ed5df891c3..3fd307eed3adc0 100644 --- a/components/ws-manager/pkg/manager/testdata/status_interrupted_CREATING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_interrupted_CREATING00.golden @@ -15,7 +15,9 @@ "ide_image": {} }, "phase": 7, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "message": "container workspace was terminated unexpectedly - workspace is recovering", "runtime": { "node_name": "gke-gitpod-dev-worker-pool-2-184c607e-rl94", diff --git a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_1_event_only.golden b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_1_event_only.golden index 1c0fbca8e4507a..8ab90647c8c497 100644 --- a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_1_event_only.golden +++ b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_1_event_only.golden @@ -22,7 +22,9 @@ "ide_image": {} }, "phase": 4, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "runtime": { "node_name": "gke-production--gitp-workspace-pool-1-ee6c94af-h6lj", "pod_name": "ws-da9ffbf1-a12d-4a58-8593-475394eedb00", diff --git a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_2_event_and_exitcode.golden b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_2_event_and_exitcode.golden index 7079e08e94512d..03d4e80a570cf7 100644 --- a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_2_event_and_exitcode.golden +++ b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_2_event_and_exitcode.golden @@ -23,7 +23,8 @@ }, "phase": 7, "conditions": { - "network_not_ready": 1 + "network_not_ready": 1, + "pvc_snapshot_volume": {} }, "message": "container network not ready - workspace should recover shortly", "runtime": { diff --git a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_3_recovered_CONSTRUCTED.golden b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_3_recovered_CONSTRUCTED.golden index 63c0c29797532a..de592b2ade1e32 100644 --- a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_3_recovered_CONSTRUCTED.golden +++ b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_3_recovered_CONSTRUCTED.golden @@ -22,7 +22,9 @@ "ide_image": {} }, "phase": 4, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "runtime": { "node_name": "gke-production--gitp-workspace-pool-1-c73d13c7-fzbk", "pod_name": "ws-0c5a8ef3-052b-44a7-b11c-3542a0928076", diff --git a/components/ws-manager/pkg/manager/testdata/status_metadata.golden b/components/ws-manager/pkg/manager/testdata/status_metadata.golden index f824c45a885cc9..761ecacdb3dfbf 100644 --- a/components/ws-manager/pkg/manager/testdata/status_metadata.golden +++ b/components/ws-manager/pkg/manager/testdata/status_metadata.golden @@ -23,7 +23,9 @@ "ide_image": {} }, "phase": 4, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "runtime": { "node_name": "minikube", "pod_name": "ws-foobas", diff --git a/components/ws-manager/pkg/manager/testdata/status_ownerToken.golden b/components/ws-manager/pkg/manager/testdata/status_ownerToken.golden index 3914b85fe9c698..603831a1f8fcba 100644 --- a/components/ws-manager/pkg/manager/testdata/status_ownerToken.golden +++ b/components/ws-manager/pkg/manager/testdata/status_ownerToken.golden @@ -66,7 +66,8 @@ "first_user_activity": { "seconds": 1582886676, "nanos": 995133911 - } + }, + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-staging--gitpod--workspace-pool-2-331a2b32-mgbq", diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden index 1f2c59353a6817..f41ec865ce5167 100644 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden @@ -83,7 +83,8 @@ "phase": 6, "conditions": { "snapshot": "workspaces/gray-lemming-0wlyvzy5/snapshot-1622467387276004249.tar@gitpod-user-a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", - "final_backup_complete": 1 + "final_backup_complete": 1, + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-dev-workload-1-49d27f81-3xfh", diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden index 80d4decca7fdfd..6ccb228ceff240 100644 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden @@ -81,7 +81,9 @@ } }, "phase": 5, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "message": "headless workspace is stopping", "runtime": { "node_name": "gke-dev-workload-1-49d27f81-3xfh", diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden index efb49c148a5eb6..36911701e1f318 100644 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden @@ -82,7 +82,8 @@ }, "phase": 2, "conditions": { - "pulling_images": 1 + "pulling_images": 1, + "pvc_snapshot_volume": {} }, "message": "containers are being created", "runtime": { diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden index e59590b9d641ff..48582e0790e650 100644 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden @@ -83,7 +83,8 @@ "phase": 6, "conditions": { "snapshot": "workspaces/green-wombat-62dzneud/snapshot-1622206186881521445.tar@gitpod-user-d98c5b92-2066-4fce-bea6-1e08b58642ab", - "final_backup_complete": 1 + "final_backup_complete": 1, + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-dev-workload-1-49d27f81-pd35", diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden index ead95109504f62..5c2af394c7329b 100644 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden @@ -81,7 +81,9 @@ } }, "phase": 5, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "message": "headless workspace is stopping", "runtime": { "node_name": "gke-dev-workload-1-49d27f81-pd35", diff --git a/components/ws-manager/pkg/manager/testdata/status_regularStart_Initializing00.golden b/components/ws-manager/pkg/manager/testdata/status_regularStart_Initializing00.golden index f89402ad06f65f..a17b5bafc359a1 100644 --- a/components/ws-manager/pkg/manager/testdata/status_regularStart_Initializing00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_regularStart_Initializing00.golden @@ -15,7 +15,9 @@ "ide_image": {} }, "phase": 3, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "message": "workspace initializer is running", "runtime": { "node_name": "minikube", diff --git a/components/ws-manager/pkg/manager/testdata/status_stoppedByRequest_000_RUNNING00.golden b/components/ws-manager/pkg/manager/testdata/status_stoppedByRequest_000_RUNNING00.golden index 6c352200c7ca67..863c9c9e60252e 100644 --- a/components/ws-manager/pkg/manager/testdata/status_stoppedByRequest_000_RUNNING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_stoppedByRequest_000_RUNNING00.golden @@ -38,7 +38,8 @@ "seconds": 1634238703, "nanos": 983492544 }, - "stopped_by_request": 1 + "stopped_by_request": 1, + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-core-dev-workspace-3-a69c4dd8-jqzs", diff --git a/components/ws-manager/pkg/manager/testdata/status_stuckInCreating_CREATING00.golden b/components/ws-manager/pkg/manager/testdata/status_stuckInCreating_CREATING00.golden index 7dcf270b10df54..859389298398c4 100644 --- a/components/ws-manager/pkg/manager/testdata/status_stuckInCreating_CREATING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_stuckInCreating_CREATING00.golden @@ -17,7 +17,8 @@ }, "phase": 4, "conditions": { - "timeout": "workspace timed out after I've meddled with this test data set" + "timeout": "workspace timed out after I've meddled with this test data set", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-production--gitp-workspace-pool-2-a3afc0b4-tmz8", diff --git a/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_RUNNING00.golden b/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_RUNNING00.golden index 1e0eca48364508..421b2ab7789fc4 100644 --- a/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_RUNNING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_RUNNING00.golden @@ -30,7 +30,8 @@ }, "phase": 4, "conditions": { - "failed": "container workspace ran with an error: exit code 1" + "failed": "container workspace ran with an error: exit code 1", + "pvc_snapshot_volume": {} }, "runtime": { "node_name": "gke-gp-prod-ws-us14-us-workspace-pool-67d93ed3-l67s", diff --git a/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_STOPPING00.golden index 0555ab2f92d100..2776fa4abb8447 100644 --- a/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_STOPPING00.golden @@ -19,7 +19,9 @@ } }, "phase": 6, - "conditions": {}, + "conditions": { + "pvc_snapshot_volume": {} + }, "runtime": { "node_name": "gke-gp-prod-ws-us14-us-workspace-pool-67d93ed3-l67s", "pod_name": "ws-48f13cc4-6311-48c2-950a-4b7ddedc3037", diff --git a/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden b/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden index 763623e56e627c..9f736bd0f40828 100644 --- a/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden @@ -16,7 +16,8 @@ }, "phase": 3, "conditions": { - "failed": "container sync completed; containers of a workspace pod are not supposed to do that" + "failed": "container sync completed; containers of a workspace pod are not supposed to do that", + "pvc_snapshot_volume": {} }, "message": "workspace initializer is running", "runtime": { From 94c85e2c4be431f80c02bbf8d9b1ae3a9a1b19b5 Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Mon, 9 May 2022 18:56:34 +0000 Subject: [PATCH 2/8] remove daemon-api change as it is not needed --- components/ws-daemon-api/daemon.proto | 3 - components/ws-daemon-api/go/daemon.pb.go | 122 ++++++++---------- components/ws-daemon-api/go/daemon_grpc.pb.go | 2 +- .../ws-daemon-api/go/workspace_daemon.pb.go | 2 +- .../go/workspace_daemon_grpc.pb.go | 2 +- .../typescript/src/daemon_pb.d.ts | 3 - .../ws-daemon-api/typescript/src/daemon_pb.js | 40 +----- .../typescript/src/workspace_daemon_pb.d.ts | 30 ++--- .../typescript/src/workspace_daemon_pb.js | 8 +- components/ws-daemon/pkg/content/service.go | 2 +- components/ws-manager/pkg/manager/monitor.go | 7 +- 11 files changed, 80 insertions(+), 141 deletions(-) diff --git a/components/ws-daemon-api/daemon.proto b/components/ws-daemon-api/daemon.proto index 529589d45f188a..5e8ead2d3038c3 100644 --- a/components/ws-daemon-api/daemon.proto +++ b/components/ws-daemon-api/daemon.proto @@ -121,9 +121,6 @@ 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; } message DisposeWorkspaceResponse { diff --git a/components/ws-daemon-api/go/daemon.pb.go b/components/ws-daemon-api/go/daemon.pb.go index 0bd872594cf900..9ece9648f97e1e 100644 --- a/components/ws-daemon-api/go/daemon.pb.go +++ b/components/ws-daemon-api/go/daemon.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc v3.20.0 // source: daemon.proto package api @@ -502,8 +502,6 @@ type DisposeWorkspaceRequest struct { Backup bool `protobuf:"varint,2,opt,name=backup,proto3" json:"backup,omitempty"` // backup_logs triggers the upload of terminal logs BackupLogs bool `protobuf:"varint,3,opt,name=backup_logs,json=backupLogs,proto3" json:"backupLogs,omitempty"` - // persistent_volume_claim is enabled if workspace is using PVC - PersistentVolumeClaim bool `protobuf:"varint,4,opt,name=persistent_volume_claim,json=persistentVolumeClaim,proto3" json:"persistentVolumeClaim,omitempty"` } func (x *DisposeWorkspaceRequest) Reset() { @@ -559,13 +557,6 @@ func (x *DisposeWorkspaceRequest) GetBackupLogs() bool { return false } -func (x *DisposeWorkspaceRequest) GetPersistentVolumeClaim() bool { - if x != nil { - return x.PersistentVolumeClaim - } - return false -} - type DisposeWorkspaceResponse struct { state protoimpl.MessageState `json:"state,omitempty"` sizeCache protoimpl.SizeCache `json:"sizeCache,omitempty"` @@ -764,64 +755,61 @@ var file_daemon_proto_rawDesc = []byte{ 0x75, 0x72, 0x6e, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x22, 0x28, 0x0a, 0x14, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x9a, 0x01, 0x0a, 0x17, 0x44, 0x69, 0x73, - 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x1f, 0x0a, 0x0b, - 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x36, 0x0a, - 0x17, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, - 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x22, 0x54, 0x0a, 0x18, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x09, 0x67, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x28, 0x0a, 0x16, 0x42, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x17, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x6c, 0x2a, 0x51, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, - 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, - 0x5f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, - 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, - 0x5f, 0x55, 0x50, 0x10, 0x03, 0x32, 0xc3, 0x03, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, - 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, - 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, - 0x49, 0x6e, 0x69, 0x74, 0x12, 0x1c, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, - 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x57, 0x61, - 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, - 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, - 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, - 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x73, - 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x62, 0x0a, 0x17, 0x44, 0x69, 0x73, 0x70, + 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x62, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x54, 0x0a, 0x18, + 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x67, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x28, 0x0a, 0x16, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x17, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, - 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2b, 0x5a, 0x29, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, - 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x77, 0x73, 0x2d, 0x64, 0x61, - 0x65, 0x6d, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x2a, 0x51, 0x0a, 0x15, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, + 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, + 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x57, + 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x50, 0x10, 0x03, 0x32, 0xc3, 0x03, 0x0a, + 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x49, 0x6e, 0x69, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x77, 0x73, 0x64, 0x61, + 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x73, 0x64, 0x61, + 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, + 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x1c, 0x2e, 0x77, 0x73, + 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, + 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x73, 0x64, 0x61, + 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x69, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x54, 0x61, + 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x73, 0x64, + 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x73, 0x64, 0x61, + 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x10, 0x44, + 0x69, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x21, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6f, + 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x69, + 0x73, 0x70, 0x6f, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x77, 0x73, + 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x77, 0x73, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2f, 0x77, 0x73, 0x2d, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/components/ws-daemon-api/go/daemon_grpc.pb.go b/components/ws-daemon-api/go/daemon_grpc.pb.go index b2f81e6c1b3b16..4f59ebc6f29d58 100644 --- a/components/ws-daemon-api/go/daemon_grpc.pb.go +++ b/components/ws-daemon-api/go/daemon_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 +// - protoc v3.20.0 // source: daemon.proto package api diff --git a/components/ws-daemon-api/go/workspace_daemon.pb.go b/components/ws-daemon-api/go/workspace_daemon.pb.go index 768ad921a83b7a..5e67b5dd32394c 100644 --- a/components/ws-daemon-api/go/workspace_daemon.pb.go +++ b/components/ws-daemon-api/go/workspace_daemon.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc v3.20.0 // source: workspace_daemon.proto package api diff --git a/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go b/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go index 652c85d07626e9..5d075fc8c6fb00 100644 --- a/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go +++ b/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 +// - protoc v3.20.0 // source: workspace_daemon.proto package api diff --git a/components/ws-daemon-api/typescript/src/daemon_pb.d.ts b/components/ws-daemon-api/typescript/src/daemon_pb.d.ts index 65b348d6559ef0..194b5b792f2741 100644 --- a/components/ws-daemon-api/typescript/src/daemon_pb.d.ts +++ b/components/ws-daemon-api/typescript/src/daemon_pb.d.ts @@ -189,8 +189,6 @@ export class DisposeWorkspaceRequest extends jspb.Message { setBackup(value: boolean): DisposeWorkspaceRequest; getBackupLogs(): boolean; setBackupLogs(value: boolean): DisposeWorkspaceRequest; - getPersistentVolumeClaim(): boolean; - setPersistentVolumeClaim(value: boolean): DisposeWorkspaceRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DisposeWorkspaceRequest.AsObject; @@ -207,7 +205,6 @@ export namespace DisposeWorkspaceRequest { id: string, backup: boolean, backupLogs: boolean, - persistentVolumeClaim: boolean, } } diff --git a/components/ws-daemon-api/typescript/src/daemon_pb.js b/components/ws-daemon-api/typescript/src/daemon_pb.js index b4f4eeaca0e290..68521ba99a3d7a 100644 --- a/components/ws-daemon-api/typescript/src/daemon_pb.js +++ b/components/ws-daemon-api/typescript/src/daemon_pb.js @@ -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); var content$service$api_initializer_pb = require('@gitpod/content-service/lib'); goog.object.extend(proto, content$service$api_initializer_pb); @@ -1494,8 +1488,7 @@ 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), - persistentVolumeClaim: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + backupLogs: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -1544,10 +1537,6 @@ 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; @@ -1598,13 +1587,6 @@ proto.wsdaemon.DisposeWorkspaceRequest.serializeBinaryToWriter = function(messag f ); } - f = message.getPersistentVolumeClaim(); - if (f) { - writer.writeBool( - 4, - f - ); - } }; @@ -1662,24 +1644,6 @@ 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); -}; - - diff --git a/components/ws-daemon-api/typescript/src/workspace_daemon_pb.d.ts b/components/ws-daemon-api/typescript/src/workspace_daemon_pb.d.ts index ebc614ef65de23..b1208ce091f8f7 100644 --- a/components/ws-daemon-api/typescript/src/workspace_daemon_pb.d.ts +++ b/components/ws-daemon-api/typescript/src/workspace_daemon_pb.d.ts @@ -12,7 +12,7 @@ import * as jspb from "google-protobuf"; -export class PrepareForUserNSRequest extends jspb.Message { +export class PrepareForUserNSRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PrepareForUserNSRequest.AsObject; @@ -29,7 +29,7 @@ export namespace PrepareForUserNSRequest { } } -export class PrepareForUserNSResponse extends jspb.Message { +export class PrepareForUserNSResponse extends jspb.Message { getFsShift(): FSShiftMethod; setFsShift(value: FSShiftMethod): PrepareForUserNSResponse; getFullWorkspaceBackup(): boolean; @@ -55,7 +55,7 @@ export namespace PrepareForUserNSResponse { } } -export class WriteIDMappingResponse extends jspb.Message { +export class WriteIDMappingResponse extends jspb.Message { getMessage(): string; setMessage(value: string): WriteIDMappingResponse; getErrorCode(): number; @@ -78,7 +78,7 @@ export namespace WriteIDMappingResponse { } } -export class WriteIDMappingRequest extends jspb.Message { +export class WriteIDMappingRequest extends jspb.Message { getPid(): number; setPid(value: number): WriteIDMappingRequest; getGid(): boolean; @@ -106,7 +106,7 @@ export namespace WriteIDMappingRequest { } - export class Mapping extends jspb.Message { + export class Mapping extends jspb.Message { getContainerId(): number; setContainerId(value: number): Mapping; getHostId(): number; @@ -134,7 +134,7 @@ export namespace WriteIDMappingRequest { } -export class EvacuateCGroupRequest extends jspb.Message { +export class EvacuateCGroupRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): EvacuateCGroupRequest.AsObject; @@ -151,7 +151,7 @@ export namespace EvacuateCGroupRequest { } } -export class EvacuateCGroupResponse extends jspb.Message { +export class EvacuateCGroupResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): EvacuateCGroupResponse.AsObject; @@ -168,7 +168,7 @@ export namespace EvacuateCGroupResponse { } } -export class MountProcRequest extends jspb.Message { +export class MountProcRequest extends jspb.Message { getTarget(): string; setTarget(value: string): MountProcRequest; getPid(): number; @@ -191,7 +191,7 @@ export namespace MountProcRequest { } } -export class MountProcResponse extends jspb.Message { +export class MountProcResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MountProcResponse.AsObject; @@ -208,7 +208,7 @@ export namespace MountProcResponse { } } -export class UmountProcRequest extends jspb.Message { +export class UmountProcRequest extends jspb.Message { getTarget(): string; setTarget(value: string): UmountProcRequest; getPid(): number; @@ -231,7 +231,7 @@ export namespace UmountProcRequest { } } -export class UmountProcResponse extends jspb.Message { +export class UmountProcResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UmountProcResponse.AsObject; @@ -248,7 +248,7 @@ export namespace UmountProcResponse { } } -export class TeardownRequest extends jspb.Message { +export class TeardownRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TeardownRequest.AsObject; @@ -265,7 +265,7 @@ export namespace TeardownRequest { } } -export class TeardownResponse extends jspb.Message { +export class TeardownResponse extends jspb.Message { getSuccess(): boolean; setSuccess(value: boolean): TeardownResponse; @@ -285,7 +285,7 @@ export namespace TeardownResponse { } } -export class SetupPairVethsRequest extends jspb.Message { +export class SetupPairVethsRequest extends jspb.Message { getPid(): number; setPid(value: number): SetupPairVethsRequest; @@ -305,7 +305,7 @@ export namespace SetupPairVethsRequest { } } -export class SetupPairVethsResponse extends jspb.Message { +export class SetupPairVethsResponse extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SetupPairVethsResponse.AsObject; diff --git a/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js b/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js index b18b38bfdd94dc..3fbb7fea7caf98 100644 --- a/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js +++ b/components/ws-daemon-api/typescript/src/workspace_daemon_pb.js @@ -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.iws.EvacuateCGroupRequest', null, global); goog.exportSymbol('proto.iws.EvacuateCGroupResponse', null, global); diff --git a/components/ws-daemon/pkg/content/service.go b/components/ws-daemon/pkg/content/service.go index 9f86f11b2d4aed..5fe5039ea7233e 100644 --- a/components/ws-daemon/pkg/content/service.go +++ b/components/ws-daemon/pkg/content/service.go @@ -371,7 +371,7 @@ func (s *WorkspaceService) DisposeWorkspace(ctx context.Context, req *api.Dispos } // Update the git status prior to deleting the workspace - repo, err = sess.UpdateGitStatus(ctx, req.PersistentVolumeClaim) + repo, err = sess.UpdateGitStatus(ctx, sess.PersistentVolumeClaim) if err != nil { log.WithError(err).WithField("workspaceId", req.Id).Error("cannot get git status") span.LogKV("error", err.Error()) diff --git a/components/ws-manager/pkg/manager/monitor.go b/components/ws-manager/pkg/manager/monitor.go index 49586e40085258..b06ba749ae40d5 100644 --- a/components/ws-manager/pkg/manager/monitor.go +++ b/components/ws-manager/pkg/manager/monitor.go @@ -1062,10 +1062,9 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb // DiposeWorkspace will "degenerate" to a simple wait if the finalization/disposal process is already running. // This is unlike the initialization process where we wait for things to finish in a later phase. resp, err := snc.DisposeWorkspace(ctx, &wsdaemon.DisposeWorkspaceRequest{ - Id: workspaceID, - Backup: doBackup && !pvcFeatureEnabled, - BackupLogs: doBackupLogs, - PersistentVolumeClaim: pvcFeatureEnabled, + Id: workspaceID, + Backup: doBackup && !pvcFeatureEnabled, + BackupLogs: doBackupLogs, }) if resp != nil { gitStatus = resp.GitStatus From f5bb02aad14c716e55c53c72e6a6020e52b7d0b1 Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Tue, 10 May 2022 18:33:07 +0000 Subject: [PATCH 3/8] re-use initializer for snapshot volumes --- components/content-service-api/go/blobs.pb.go | 2 +- .../content-service-api/go/blobs_grpc.pb.go | 2 +- .../content-service-api/go/content.pb.go | 2 +- .../content-service-api/go/content_grpc.pb.go | 2 +- .../content-service-api/go/headless-log.pb.go | 2 +- .../go/headless-log_grpc.pb.go | 2 +- .../content-service-api/go/ideplugin.pb.go | 2 +- .../go/ideplugin_grpc.pb.go | 2 +- .../content-service-api/go/initializer.pb.go | 373 +++++++----------- .../content-service-api/go/workspace.pb.go | 2 +- .../go/workspace_grpc.pb.go | 2 +- .../content-service-api/initializer.proto | 7 +- .../typescript/src/blobs_pb.js | 8 +- .../typescript/src/content_pb.js | 8 +- .../typescript/src/headless-log_pb.js | 8 +- .../typescript/src/ideplugin_pb.js | 8 +- .../typescript/src/initializer_pb.d.ts | 30 +- .../typescript/src/initializer_pb.js | 230 ++--------- .../typescript/src/workspace_pb.js | 8 +- .../pkg/initializer/initializer.go | 28 +- .../content-service/pkg/layer/provider.go | 2 +- components/gitpod-protocol/src/wsready.ts | 2 +- .../server/src/workspace/workspace-starter.ts | 15 +- 23 files changed, 207 insertions(+), 540 deletions(-) diff --git a/components/content-service-api/go/blobs.pb.go b/components/content-service-api/go/blobs.pb.go index 0dca7d3cef60dc..05750091d59435 100644 --- a/components/content-service-api/go/blobs.pb.go +++ b/components/content-service-api/go/blobs.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc v3.20.0 // source: blobs.proto package api diff --git a/components/content-service-api/go/blobs_grpc.pb.go b/components/content-service-api/go/blobs_grpc.pb.go index 0b1e04cf0e20f9..5c3609a1a0e1a9 100644 --- a/components/content-service-api/go/blobs_grpc.pb.go +++ b/components/content-service-api/go/blobs_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 +// - protoc v3.20.0 // source: blobs.proto package api diff --git a/components/content-service-api/go/content.pb.go b/components/content-service-api/go/content.pb.go index 1ebe717754a092..2ce04ac2e672a7 100644 --- a/components/content-service-api/go/content.pb.go +++ b/components/content-service-api/go/content.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc v3.20.0 // source: content.proto package api diff --git a/components/content-service-api/go/content_grpc.pb.go b/components/content-service-api/go/content_grpc.pb.go index eadf6a97c7a217..98339a8c74f5b3 100644 --- a/components/content-service-api/go/content_grpc.pb.go +++ b/components/content-service-api/go/content_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 +// - protoc v3.20.0 // source: content.proto package api diff --git a/components/content-service-api/go/headless-log.pb.go b/components/content-service-api/go/headless-log.pb.go index 33487f7153a8e8..3a2f7e3819e3e8 100644 --- a/components/content-service-api/go/headless-log.pb.go +++ b/components/content-service-api/go/headless-log.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc v3.20.0 // source: headless-log.proto package api diff --git a/components/content-service-api/go/headless-log_grpc.pb.go b/components/content-service-api/go/headless-log_grpc.pb.go index d553c611f0c3c7..4fe51bed9a3b5b 100644 --- a/components/content-service-api/go/headless-log_grpc.pb.go +++ b/components/content-service-api/go/headless-log_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 +// - protoc v3.20.0 // source: headless-log.proto package api diff --git a/components/content-service-api/go/ideplugin.pb.go b/components/content-service-api/go/ideplugin.pb.go index de3d1baf011edc..82e3f5e2bd1c42 100644 --- a/components/content-service-api/go/ideplugin.pb.go +++ b/components/content-service-api/go/ideplugin.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc v3.20.0 // source: ideplugin.proto package api diff --git a/components/content-service-api/go/ideplugin_grpc.pb.go b/components/content-service-api/go/ideplugin_grpc.pb.go index 80796aa07f5b42..5469c449a20f64 100644 --- a/components/content-service-api/go/ideplugin_grpc.pb.go +++ b/components/content-service-api/go/ideplugin_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 +// - protoc v3.20.0 // source: ideplugin.proto package api diff --git a/components/content-service-api/go/initializer.pb.go b/components/content-service-api/go/initializer.pb.go index 6dc9946db1a1ba..735f0967f08084 100644 --- a/components/content-service-api/go/initializer.pb.go +++ b/components/content-service-api/go/initializer.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc v3.20.0 // source: initializer.proto package api @@ -149,7 +149,6 @@ type WorkspaceInitializer struct { // *WorkspaceInitializer_Composite // *WorkspaceInitializer_Download // *WorkspaceInitializer_Backup - // *WorkspaceInitializer_SnapshotVolume Spec isWorkspaceInitializer_Spec `protobuf_oneof:"spec"` } @@ -241,13 +240,6 @@ func (x *WorkspaceInitializer) GetBackup() *FromBackupInitializer { return nil } -func (x *WorkspaceInitializer) GetSnapshotVolume() *FromSnapshotVolumeInitializer { - if x, ok := x.GetSpec().(*WorkspaceInitializer_SnapshotVolume); ok { - return x.SnapshotVolume - } - return nil -} - type isWorkspaceInitializer_Spec interface { isWorkspaceInitializer_Spec() } @@ -280,10 +272,6 @@ type WorkspaceInitializer_Backup struct { Backup *FromBackupInitializer `protobuf:"bytes,7,opt,name=backup,proto3,oneof"` } -type WorkspaceInitializer_SnapshotVolume struct { - SnapshotVolume *FromSnapshotVolumeInitializer `protobuf:"bytes,8,opt,name=snapshot_volume,json=snapshotVolume,proto3,oneof"` -} - func (*WorkspaceInitializer_Empty) isWorkspaceInitializer_Spec() {} func (*WorkspaceInitializer_Git) isWorkspaceInitializer_Spec() {} @@ -298,8 +286,6 @@ func (*WorkspaceInitializer_Download) isWorkspaceInitializer_Spec() {} func (*WorkspaceInitializer_Backup) isWorkspaceInitializer_Spec() {} -func (*WorkspaceInitializer_SnapshotVolume) isWorkspaceInitializer_Spec() {} - // CompositeInitializer uses a collection of initializer to produce workspace content. // All initializer are executed in the order they're provided. type CompositeInitializer struct { @@ -732,7 +718,8 @@ type FromBackupInitializer struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CheckoutLocation string `protobuf:"bytes,1,opt,name=checkout_location,json=checkoutLocation,proto3" json:"checkout_location,omitempty"` + CheckoutLocation string `protobuf:"bytes,1,opt,name=checkout_location,json=checkoutLocation,proto3" json:"checkout_location,omitempty"` + FromSnapshotVolume bool `protobuf:"varint,2,opt,name=from_snapshot_volume,json=fromSnapshotVolume,proto3" json:"from_snapshot_volume,omitempty"` } func (x *FromBackupInitializer) Reset() { @@ -774,52 +761,11 @@ func (x *FromBackupInitializer) GetCheckoutLocation() string { return "" } -// FromSnapshotVolumeInitializer empty initializer when workspace is created from snapshot volume -type FromSnapshotVolumeInitializer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CheckoutLocation string `protobuf:"bytes,1,opt,name=checkout_location,json=checkoutLocation,proto3" json:"checkout_location,omitempty"` -} - -func (x *FromSnapshotVolumeInitializer) Reset() { - *x = FromSnapshotVolumeInitializer{} - if protoimpl.UnsafeEnabled { - mi := &file_initializer_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FromSnapshotVolumeInitializer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FromSnapshotVolumeInitializer) ProtoMessage() {} - -func (x *FromSnapshotVolumeInitializer) ProtoReflect() protoreflect.Message { - mi := &file_initializer_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FromSnapshotVolumeInitializer.ProtoReflect.Descriptor instead. -func (*FromSnapshotVolumeInitializer) Descriptor() ([]byte, []int) { - return file_initializer_proto_rawDescGZIP(), []int{9} -} - -func (x *FromSnapshotVolumeInitializer) GetCheckoutLocation() string { +func (x *FromBackupInitializer) GetFromSnapshotVolume() bool { if x != nil { - return x.CheckoutLocation + return x.FromSnapshotVolume } - return "" + return false } // GitStatus describes the current Git working copy status, akin to a combination of "git status" and "git branch" @@ -849,7 +795,7 @@ type GitStatus struct { func (x *GitStatus) Reset() { *x = GitStatus{} if protoimpl.UnsafeEnabled { - mi := &file_initializer_proto_msgTypes[10] + mi := &file_initializer_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -862,7 +808,7 @@ func (x *GitStatus) String() string { func (*GitStatus) ProtoMessage() {} func (x *GitStatus) ProtoReflect() protoreflect.Message { - mi := &file_initializer_proto_msgTypes[10] + mi := &file_initializer_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -875,7 +821,7 @@ func (x *GitStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use GitStatus.ProtoReflect.Descriptor instead. func (*GitStatus) Descriptor() ([]byte, []int) { - return file_initializer_proto_rawDescGZIP(), []int{10} + return file_initializer_proto_rawDescGZIP(), []int{9} } func (x *GitStatus) GetBranch() string { @@ -954,7 +900,7 @@ type FileDownloadInitializer_FileInfo struct { func (x *FileDownloadInitializer_FileInfo) Reset() { *x = FileDownloadInitializer_FileInfo{} if protoimpl.UnsafeEnabled { - mi := &file_initializer_proto_msgTypes[11] + mi := &file_initializer_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -967,7 +913,7 @@ func (x *FileDownloadInitializer_FileInfo) String() string { func (*FileDownloadInitializer_FileInfo) ProtoMessage() {} func (x *FileDownloadInitializer_FileInfo) ProtoReflect() protoreflect.Message { - mi := &file_initializer_proto_msgTypes[11] + mi := &file_initializer_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1009,7 +955,7 @@ var File_initializer_proto protoreflect.FileDescriptor var file_initializer_proto_rawDesc = []byte{ 0x0a, 0x11, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x22, 0xba, 0x04, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x69, 0x63, 0x65, 0x22, 0xe0, 0x03, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, @@ -1038,131 +984,123 @@ var file_initializer_proto_rawDesc = []byte{ 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x58, - 0x0a, 0x0f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, - 0x22, 0x5e, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x49, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, - 0x22, 0xdd, 0x01, 0x0a, 0x17, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, - 0x64, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x05, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x69, 0x6c, - 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x66, - 0x69, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x51, 0x0a, - 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x66, - 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, - 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, - 0x22, 0x12, 0x0a, 0x10, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x72, 0x22, 0xa2, 0x02, 0x0a, 0x0e, 0x47, 0x69, 0x74, 0x49, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x55, 0x72, 0x69, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x55, 0x72, 0x69, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6c, 0x6f, - 0x6e, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x6f, 0x6e, - 0x65, 0x5f, 0x74, 0x61, 0x67, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, - 0x6c, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x67, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc2, 0x02, 0x0a, 0x09, 0x47, 0x69, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0e, 0x61, 0x75, 0x74, - 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x12, 0x23, 0x0a, - 0x0d, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6f, 0x74, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4f, 0x74, 0x73, 0x1a, 0x3f, 0x0a, - 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x31, - 0x0a, 0x13, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x22, 0x88, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x70, 0x72, 0x65, - 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, - 0x52, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x30, 0x0a, 0x03, 0x67, 0x69, - 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x49, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x03, 0x67, 0x69, 0x74, 0x22, 0x44, 0x0a, 0x15, - 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, - 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x4c, 0x0a, 0x1d, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xe7, 0x02, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x75, - 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, - 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, - 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x70, - 0x75, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, - 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x70, 0x75, 0x73, - 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x2a, 0x5a, 0x0a, 0x0f, 0x43, 0x6c, - 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, - 0x0b, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x10, 0x00, 0x12, 0x11, - 0x0a, 0x0d, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, - 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x42, 0x52, 0x41, 0x4e, - 0x43, 0x48, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x42, 0x52, - 0x41, 0x4e, 0x43, 0x48, 0x10, 0x03, 0x2a, 0x40, 0x0a, 0x0d, 0x47, 0x69, 0x74, 0x41, 0x75, 0x74, - 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x41, 0x55, - 0x54, 0x48, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x41, 0x55, - 0x54, 0x48, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x41, 0x55, - 0x54, 0x48, 0x5f, 0x4f, 0x54, 0x53, 0x10, 0x02, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, - 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x69, 0x7a, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x06, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x5e, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x46, + 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x22, 0xdd, 0x01, 0x0a, 0x17, 0x46, 0x69, 0x6c, 0x65, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x72, 0x12, 0x46, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x49, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0x51, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, + 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x49, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x22, 0xa2, 0x02, 0x0a, 0x0e, 0x47, + 0x69, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x1d, 0x0a, + 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x55, 0x72, 0x69, 0x12, 0x2e, 0x0a, 0x13, + 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, + 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x55, 0x72, 0x69, 0x12, 0x40, 0x0a, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x6f, + 0x64, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x65, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x67, 0x65, 0x74, 0x12, + 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0xc2, 0x02, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, + 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x45, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, + 0x5f, 0x6f, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, + 0x4f, 0x74, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x31, 0x0a, 0x13, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, + 0x3f, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x12, 0x30, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, + 0x69, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x03, 0x67, + 0x69, 0x74, 0x22, 0x76, 0x0a, 0x15, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0xe7, 0x02, 0x0a, 0x09, 0x47, + 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x6b, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0e, 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, + 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, + 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, + 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x34, + 0x0a, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x73, 0x2a, 0x5a, 0x0a, 0x0f, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x4d, 0x4f, 0x54, + 0x45, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x4d, 0x4f, + 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x52, + 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x02, 0x12, 0x10, + 0x0a, 0x0c, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x03, + 0x2a, 0x40, 0x0a, 0x0d, 0x47, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x4f, 0x54, 0x53, + 0x10, 0x02, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1178,7 +1116,7 @@ func file_initializer_proto_rawDescGZIP() []byte { } var file_initializer_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_initializer_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_initializer_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_initializer_proto_goTypes = []interface{}{ (CloneTargetMode)(0), // 0: contentservice.CloneTargetMode (GitAuthMethod)(0), // 1: contentservice.GitAuthMethod @@ -1191,10 +1129,9 @@ var file_initializer_proto_goTypes = []interface{}{ (*SnapshotInitializer)(nil), // 8: contentservice.SnapshotInitializer (*PrebuildInitializer)(nil), // 9: contentservice.PrebuildInitializer (*FromBackupInitializer)(nil), // 10: contentservice.FromBackupInitializer - (*FromSnapshotVolumeInitializer)(nil), // 11: contentservice.FromSnapshotVolumeInitializer - (*GitStatus)(nil), // 12: contentservice.GitStatus - (*FileDownloadInitializer_FileInfo)(nil), // 13: contentservice.FileDownloadInitializer.FileInfo - nil, // 14: contentservice.GitConfig.CustomConfigEntry + (*GitStatus)(nil), // 11: contentservice.GitStatus + (*FileDownloadInitializer_FileInfo)(nil), // 12: contentservice.FileDownloadInitializer.FileInfo + nil, // 13: contentservice.GitConfig.CustomConfigEntry } var file_initializer_proto_depIdxs = []int32{ 5, // 0: contentservice.WorkspaceInitializer.empty:type_name -> contentservice.EmptyInitializer @@ -1204,20 +1141,19 @@ var file_initializer_proto_depIdxs = []int32{ 3, // 4: contentservice.WorkspaceInitializer.composite:type_name -> contentservice.CompositeInitializer 4, // 5: contentservice.WorkspaceInitializer.download:type_name -> contentservice.FileDownloadInitializer 10, // 6: contentservice.WorkspaceInitializer.backup:type_name -> contentservice.FromBackupInitializer - 11, // 7: contentservice.WorkspaceInitializer.snapshot_volume:type_name -> contentservice.FromSnapshotVolumeInitializer - 2, // 8: contentservice.CompositeInitializer.initializer:type_name -> contentservice.WorkspaceInitializer - 13, // 9: contentservice.FileDownloadInitializer.files:type_name -> contentservice.FileDownloadInitializer.FileInfo - 0, // 10: contentservice.GitInitializer.target_mode:type_name -> contentservice.CloneTargetMode - 7, // 11: contentservice.GitInitializer.config:type_name -> contentservice.GitConfig - 14, // 12: contentservice.GitConfig.custom_config:type_name -> contentservice.GitConfig.CustomConfigEntry - 1, // 13: contentservice.GitConfig.authentication:type_name -> contentservice.GitAuthMethod - 8, // 14: contentservice.PrebuildInitializer.prebuild:type_name -> contentservice.SnapshotInitializer - 6, // 15: contentservice.PrebuildInitializer.git:type_name -> contentservice.GitInitializer - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 2, // 7: contentservice.CompositeInitializer.initializer:type_name -> contentservice.WorkspaceInitializer + 12, // 8: contentservice.FileDownloadInitializer.files:type_name -> contentservice.FileDownloadInitializer.FileInfo + 0, // 9: contentservice.GitInitializer.target_mode:type_name -> contentservice.CloneTargetMode + 7, // 10: contentservice.GitInitializer.config:type_name -> contentservice.GitConfig + 13, // 11: contentservice.GitConfig.custom_config:type_name -> contentservice.GitConfig.CustomConfigEntry + 1, // 12: contentservice.GitConfig.authentication:type_name -> contentservice.GitAuthMethod + 8, // 13: contentservice.PrebuildInitializer.prebuild:type_name -> contentservice.SnapshotInitializer + 6, // 14: contentservice.PrebuildInitializer.git:type_name -> contentservice.GitInitializer + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_initializer_proto_init() } @@ -1335,18 +1271,6 @@ func file_initializer_proto_init() { } } file_initializer_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FromSnapshotVolumeInitializer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_initializer_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GitStatus); i { case 0: return &v.state @@ -1358,7 +1282,7 @@ func file_initializer_proto_init() { return nil } } - file_initializer_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_initializer_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileDownloadInitializer_FileInfo); i { case 0: return &v.state @@ -1379,7 +1303,6 @@ func file_initializer_proto_init() { (*WorkspaceInitializer_Composite)(nil), (*WorkspaceInitializer_Download)(nil), (*WorkspaceInitializer_Backup)(nil), - (*WorkspaceInitializer_SnapshotVolume)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1387,7 +1310,7 @@ func file_initializer_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_initializer_proto_rawDesc, NumEnums: 2, - NumMessages: 13, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/components/content-service-api/go/workspace.pb.go b/components/content-service-api/go/workspace.pb.go index 562d458cdbc2b7..ad1b02714b99e4 100644 --- a/components/content-service-api/go/workspace.pb.go +++ b/components/content-service-api/go/workspace.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc v3.20.0 // source: workspace.proto package api diff --git a/components/content-service-api/go/workspace_grpc.pb.go b/components/content-service-api/go/workspace_grpc.pb.go index 1e2e9a4ec4539c..3a10cead2e1314 100644 --- a/components/content-service-api/go/workspace_grpc.pb.go +++ b/components/content-service-api/go/workspace_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 +// - protoc v3.20.0 // source: workspace.proto package api diff --git a/components/content-service-api/initializer.proto b/components/content-service-api/initializer.proto index a68131570acd52..82b7b522c1e6f6 100644 --- a/components/content-service-api/initializer.proto +++ b/components/content-service-api/initializer.proto @@ -14,7 +14,6 @@ message WorkspaceInitializer { CompositeInitializer composite = 5; FileDownloadInitializer download = 6; FromBackupInitializer backup = 7; - FromSnapshotVolumeInitializer snapshot_volume = 8; } } @@ -125,11 +124,7 @@ message PrebuildInitializer { // FromBackupInitializer initializes content from a previously made backup message FromBackupInitializer { string checkout_location = 1; -} - -// FromSnapshotVolumeInitializer initializes content when workspace is created from snapshot volume -message FromSnapshotVolumeInitializer { - string checkout_location = 1; + bool from_snapshot_volume = 2; } // GitStatus describes the current Git working copy status, akin to a combination of "git status" and "git branch" diff --git a/components/content-service-api/typescript/src/blobs_pb.js b/components/content-service-api/typescript/src/blobs_pb.js index d048c19732521d..69afdc53bd1238 100644 --- a/components/content-service-api/typescript/src/blobs_pb.js +++ b/components/content-service-api/typescript/src/blobs_pb.js @@ -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); diff --git a/components/content-service-api/typescript/src/content_pb.js b/components/content-service-api/typescript/src/content_pb.js index 8c78bdb88690b5..241ac5306a7ba2 100644 --- a/components/content-service-api/typescript/src/content_pb.js +++ b/components/content-service-api/typescript/src/content_pb.js @@ -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); diff --git a/components/content-service-api/typescript/src/headless-log_pb.js b/components/content-service-api/typescript/src/headless-log_pb.js index ceb2c35b55675f..2117ede73334da 100644 --- a/components/content-service-api/typescript/src/headless-log_pb.js +++ b/components/content-service-api/typescript/src/headless-log_pb.js @@ -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); diff --git a/components/content-service-api/typescript/src/ideplugin_pb.js b/components/content-service-api/typescript/src/ideplugin_pb.js index a83597f702919d..da473d38b09c9e 100644 --- a/components/content-service-api/typescript/src/ideplugin_pb.js +++ b/components/content-service-api/typescript/src/ideplugin_pb.js @@ -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); diff --git a/components/content-service-api/typescript/src/initializer_pb.d.ts b/components/content-service-api/typescript/src/initializer_pb.d.ts index 7b41da7ece37a3..4505f5d7ba79e1 100644 --- a/components/content-service-api/typescript/src/initializer_pb.d.ts +++ b/components/content-service-api/typescript/src/initializer_pb.d.ts @@ -49,11 +49,6 @@ export class WorkspaceInitializer extends jspb.Message { getBackup(): FromBackupInitializer | undefined; setBackup(value?: FromBackupInitializer): WorkspaceInitializer; - hasSnapshotVolume(): boolean; - clearSnapshotVolume(): void; - getSnapshotVolume(): FromSnapshotVolumeInitializer | undefined; - setSnapshotVolume(value?: FromSnapshotVolumeInitializer): WorkspaceInitializer; - getSpecCase(): WorkspaceInitializer.SpecCase; serializeBinary(): Uint8Array; @@ -75,7 +70,6 @@ export namespace WorkspaceInitializer { composite?: CompositeInitializer.AsObject, download?: FileDownloadInitializer.AsObject, backup?: FromBackupInitializer.AsObject, - snapshotVolume?: FromSnapshotVolumeInitializer.AsObject, } export enum SpecCase { @@ -87,7 +81,6 @@ export namespace WorkspaceInitializer { COMPOSITE = 5, DOWNLOAD = 6, BACKUP = 7, - SNAPSHOT_VOLUME = 8, } } @@ -307,6 +300,8 @@ export namespace PrebuildInitializer { export class FromBackupInitializer extends jspb.Message { getCheckoutLocation(): string; setCheckoutLocation(value: string): FromBackupInitializer; + getFromSnapshotVolume(): boolean; + setFromSnapshotVolume(value: boolean): FromBackupInitializer; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): FromBackupInitializer.AsObject; @@ -321,26 +316,7 @@ export class FromBackupInitializer extends jspb.Message { export namespace FromBackupInitializer { export type AsObject = { checkoutLocation: string, - } -} - -export class FromSnapshotVolumeInitializer extends jspb.Message { - getCheckoutLocation(): string; - setCheckoutLocation(value: string): FromSnapshotVolumeInitializer; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FromSnapshotVolumeInitializer.AsObject; - static toObject(includeInstance: boolean, msg: FromSnapshotVolumeInitializer): FromSnapshotVolumeInitializer.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FromSnapshotVolumeInitializer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FromSnapshotVolumeInitializer; - static deserializeBinaryFromReader(message: FromSnapshotVolumeInitializer, reader: jspb.BinaryReader): FromSnapshotVolumeInitializer; -} - -export namespace FromSnapshotVolumeInitializer { - export type AsObject = { - checkoutLocation: string, + fromSnapshotVolume: boolean, } } diff --git a/components/content-service-api/typescript/src/initializer_pb.js b/components/content-service-api/typescript/src/initializer_pb.js index 7beb6b5fee8638..cedeb8918d229a 100644 --- a/components/content-service-api/typescript/src/initializer_pb.js +++ b/components/content-service-api/typescript/src/initializer_pb.js @@ -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); @@ -33,7 +27,6 @@ goog.exportSymbol('proto.contentservice.EmptyInitializer', null, global); goog.exportSymbol('proto.contentservice.FileDownloadInitializer', null, global); goog.exportSymbol('proto.contentservice.FileDownloadInitializer.FileInfo', null, global); goog.exportSymbol('proto.contentservice.FromBackupInitializer', null, global); -goog.exportSymbol('proto.contentservice.FromSnapshotVolumeInitializer', null, global); goog.exportSymbol('proto.contentservice.GitAuthMethod', null, global); goog.exportSymbol('proto.contentservice.GitConfig', null, global); goog.exportSymbol('proto.contentservice.GitInitializer', null, global); @@ -252,27 +245,6 @@ if (goog.DEBUG && !COMPILED) { */ proto.contentservice.FromBackupInitializer.displayName = 'proto.contentservice.FromBackupInitializer'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.contentservice.FromSnapshotVolumeInitializer = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.contentservice.FromSnapshotVolumeInitializer, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.contentservice.FromSnapshotVolumeInitializer.displayName = 'proto.contentservice.FromSnapshotVolumeInitializer'; -} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -303,7 +275,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array>} * @const */ -proto.contentservice.WorkspaceInitializer.oneofGroups_ = [[1,2,3,4,5,6,7,8]]; +proto.contentservice.WorkspaceInitializer.oneofGroups_ = [[1,2,3,4,5,6,7]]; /** * @enum {number} @@ -316,8 +288,7 @@ proto.contentservice.WorkspaceInitializer.SpecCase = { PREBUILD: 4, COMPOSITE: 5, DOWNLOAD: 6, - BACKUP: 7, - SNAPSHOT_VOLUME: 8 + BACKUP: 7 }; /** @@ -364,8 +335,7 @@ proto.contentservice.WorkspaceInitializer.toObject = function(includeInstance, m prebuild: (f = msg.getPrebuild()) && proto.contentservice.PrebuildInitializer.toObject(includeInstance, f), composite: (f = msg.getComposite()) && proto.contentservice.CompositeInitializer.toObject(includeInstance, f), download: (f = msg.getDownload()) && proto.contentservice.FileDownloadInitializer.toObject(includeInstance, f), - backup: (f = msg.getBackup()) && proto.contentservice.FromBackupInitializer.toObject(includeInstance, f), - snapshotVolume: (f = msg.getSnapshotVolume()) && proto.contentservice.FromSnapshotVolumeInitializer.toObject(includeInstance, f) + backup: (f = msg.getBackup()) && proto.contentservice.FromBackupInitializer.toObject(includeInstance, f) }; if (includeInstance) { @@ -437,11 +407,6 @@ proto.contentservice.WorkspaceInitializer.deserializeBinaryFromReader = function reader.readMessage(value,proto.contentservice.FromBackupInitializer.deserializeBinaryFromReader); msg.setBackup(value); break; - case 8: - var value = new proto.contentservice.FromSnapshotVolumeInitializer; - reader.readMessage(value,proto.contentservice.FromSnapshotVolumeInitializer.deserializeBinaryFromReader); - msg.setSnapshotVolume(value); - break; default: reader.skipField(); break; @@ -527,14 +492,6 @@ proto.contentservice.WorkspaceInitializer.serializeBinaryToWriter = function(mes proto.contentservice.FromBackupInitializer.serializeBinaryToWriter ); } - f = message.getSnapshotVolume(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.contentservice.FromSnapshotVolumeInitializer.serializeBinaryToWriter - ); - } }; @@ -797,43 +754,6 @@ proto.contentservice.WorkspaceInitializer.prototype.hasBackup = function() { }; -/** - * optional FromSnapshotVolumeInitializer snapshot_volume = 8; - * @return {?proto.contentservice.FromSnapshotVolumeInitializer} - */ -proto.contentservice.WorkspaceInitializer.prototype.getSnapshotVolume = function() { - return /** @type{?proto.contentservice.FromSnapshotVolumeInitializer} */ ( - jspb.Message.getWrapperField(this, proto.contentservice.FromSnapshotVolumeInitializer, 8)); -}; - - -/** - * @param {?proto.contentservice.FromSnapshotVolumeInitializer|undefined} value - * @return {!proto.contentservice.WorkspaceInitializer} returns this -*/ -proto.contentservice.WorkspaceInitializer.prototype.setSnapshotVolume = function(value) { - return jspb.Message.setOneofWrapperField(this, 8, proto.contentservice.WorkspaceInitializer.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.contentservice.WorkspaceInitializer} returns this - */ -proto.contentservice.WorkspaceInitializer.prototype.clearSnapshotVolume = function() { - return this.setSnapshotVolume(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.contentservice.WorkspaceInitializer.prototype.hasSnapshotVolume = function() { - return jspb.Message.getField(this, 8) != null; -}; - - /** * List of repeated fields within this message type. @@ -2402,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, ""), + fromSnapshotVolume: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -2443,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.setFromSnapshotVolume(value); + break; default: reader.skipField(); break; @@ -2479,6 +2404,13 @@ proto.contentservice.FromBackupInitializer.serializeBinaryToWriter = function(me f ); } + f = message.getFromSnapshotVolume(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; @@ -2500,133 +2432,21 @@ proto.contentservice.FromBackupInitializer.prototype.setCheckoutLocation = funct }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.contentservice.FromSnapshotVolumeInitializer.prototype.toObject = function(opt_includeInstance) { - return proto.contentservice.FromSnapshotVolumeInitializer.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.contentservice.FromSnapshotVolumeInitializer} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.contentservice.FromSnapshotVolumeInitializer.toObject = function(includeInstance, msg) { - var f, obj = { - checkoutLocation: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.contentservice.FromSnapshotVolumeInitializer} - */ -proto.contentservice.FromSnapshotVolumeInitializer.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.contentservice.FromSnapshotVolumeInitializer; - return proto.contentservice.FromSnapshotVolumeInitializer.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.contentservice.FromSnapshotVolumeInitializer} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.contentservice.FromSnapshotVolumeInitializer} - */ -proto.contentservice.FromSnapshotVolumeInitializer.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setCheckoutLocation(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.contentservice.FromSnapshotVolumeInitializer.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.contentservice.FromSnapshotVolumeInitializer.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.contentservice.FromSnapshotVolumeInitializer} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.contentservice.FromSnapshotVolumeInitializer.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} + * optional bool from_snapshot_volume = 2; + * @return {boolean} */ -proto.contentservice.FromSnapshotVolumeInitializer.prototype.getCheckoutLocation = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.contentservice.FromBackupInitializer.prototype.getFromSnapshotVolume = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {string} value - * @return {!proto.contentservice.FromSnapshotVolumeInitializer} returns this + * @param {boolean} value + * @return {!proto.contentservice.FromBackupInitializer} returns this */ -proto.contentservice.FromSnapshotVolumeInitializer.prototype.setCheckoutLocation = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.contentservice.FromBackupInitializer.prototype.setFromSnapshotVolume = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; diff --git a/components/content-service-api/typescript/src/workspace_pb.js b/components/content-service-api/typescript/src/workspace_pb.js index ffd071c31f754e..a95eae5a35ff7b 100644 --- a/components/content-service-api/typescript/src/workspace_pb.js +++ b/components/content-service-api/typescript/src/workspace_pb.js @@ -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.DeleteWorkspaceRequest', null, global); goog.exportSymbol('proto.contentservice.DeleteWorkspaceResponse', null, global); diff --git a/components/content-service/pkg/initializer/initializer.go b/components/content-service/pkg/initializer/initializer.go index d040df101b2811..720f9f272ab168 100644 --- a/components/content-service/pkg/initializer/initializer.go +++ b/components/content-service/pkg/initializer/initializer.go @@ -136,8 +136,6 @@ func NewFromRequest(ctx context.Context, loc string, rs storage.DirectDownloader initializer, err = newFileDownloadInitializer(loc, ir.Download) } else if ir, ok := spec.(*csapi.WorkspaceInitializer_Backup); ok { initializer, err = newFromBackupInitializer(loc, rs, ir.Backup) - } else if ir, ok := spec.(*csapi.WorkspaceInitializer_SnapshotVolume); ok { - initializer, err = newFromSnapshotVolumeInitializer(ir.SnapshotVolume) } else { initializer = &EmptyInitializer{} } @@ -173,17 +171,23 @@ func newFileDownloadInitializer(loc string, req *csapi.FileDownloadInitializer) // newFromBackupInitializer creates a backup restoration initializer for a request func newFromBackupInitializer(loc string, rs storage.DirectDownloader, req *csapi.FromBackupInitializer) (*fromBackupInitializer, error) { return &fromBackupInitializer{ - Location: loc, - RemoteStorage: rs, + Location: loc, + RemoteStorage: rs, + FromSnapshotVolume: req.FromSnapshotVolume, }, nil } type fromBackupInitializer struct { - Location string - RemoteStorage storage.DirectDownloader + Location string + RemoteStorage storage.DirectDownloader + FromSnapshotVolume bool } func (bi *fromBackupInitializer) Run(ctx context.Context, mappings []archive.IDMapping) (src csapi.WorkspaceInitSource, err error) { + if bi.FromSnapshotVolume { + return csapi.WorkspaceInitFromBackup, nil + } + hasBackup, err := bi.RemoteStorage.Download(ctx, bi.Location, storage.DefaultBackup, mappings) if !hasBackup { return src, xerrors.Errorf("no backup found") @@ -195,18 +199,6 @@ func (bi *fromBackupInitializer) Run(ctx context.Context, mappings []archive.IDM return csapi.WorkspaceInitFromBackup, nil } -// newFromSnapshotVolumeInitializer is a fake\empty initializer when workspace is created from snapshot volume -func newFromSnapshotVolumeInitializer(req *csapi.FromSnapshotVolumeInitializer) (*fromSnapshotVolumeInitializer, error) { - return &fromSnapshotVolumeInitializer{}, nil -} - -type fromSnapshotVolumeInitializer struct { -} - -func (bi *fromSnapshotVolumeInitializer) Run(ctx context.Context, mappings []archive.IDMapping) (src csapi.WorkspaceInitSource, err error) { - return csapi.WorkspaceInitFromBackup, nil -} - // newGitInitializer creates a Git initializer based on the request. // Returns gRPC errors. func newGitInitializer(ctx context.Context, loc string, req *csapi.GitInitializer, forceGitpodUser bool) (*GitInitializer, error) { diff --git a/components/content-service/pkg/layer/provider.go b/components/content-service/pkg/layer/provider.go index 366a78cf089584..73ae62b6aa45e0 100644 --- a/components/content-service/pkg/layer/provider.go +++ b/components/content-service/pkg/layer/provider.go @@ -269,7 +269,7 @@ func (s *Provider) GetContentLayerPVC(ctx context.Context, owner, workspaceID st return l, manifest, nil } - if svi := initializer.GetSnapshotVolume(); svi != nil { + if initializer.GetBackup() != nil && initializer.GetBackup().FromSnapshotVolume { layer, err = contentDescriptorToLayerPVC([]byte{}) if err != nil { return nil, nil, err diff --git a/components/gitpod-protocol/src/wsready.ts b/components/gitpod-protocol/src/wsready.ts index 97e92301e4746e..266e71caf3f802 100644 --- a/components/gitpod-protocol/src/wsready.ts +++ b/components/gitpod-protocol/src/wsready.ts @@ -4,7 +4,7 @@ * See License-AGPL.txt in the project root for license information. */ -// generated using github.com/32leaves/bel on 2022-03-29 17:08:06.113873917 +0000 UTC m=+0.010035965 +// generated using github.com/32leaves/bel on 2022-05-10 18:14:25.691876738 +0000 UTC m=+0.006851101 // DO NOT MODIFY export enum WorkspaceInitSource { diff --git a/components/server/src/workspace/workspace-starter.ts b/components/server/src/workspace/workspace-starter.ts index 0703d5a2e9a8f5..c2c7eeec5401c9 100644 --- a/components/server/src/workspace/workspace-starter.ts +++ b/components/server/src/workspace/workspace-starter.ts @@ -14,11 +14,7 @@ import { SnapshotInitializer, WorkspaceInitializer, } from "@gitpod/content-service/lib"; -import { - CompositeInitializer, - FromBackupInitializer, - FromSnapshotVolumeInitializer, -} from "@gitpod/content-service/lib/initializer_pb"; +import { CompositeInitializer, FromBackupInitializer } from "@gitpod/content-service/lib/initializer_pb"; import { DBUser, DBWithTracing, @@ -1436,17 +1432,12 @@ export class WorkspaceStarter { let result = new WorkspaceInitializer(); const disp = new DisposableCollection(); - if (hasVolumeSnapshot) { - const snapshotVolume = new FromSnapshotVolumeInitializer(); - if (CommitContext.is(context)) { - snapshotVolume.setCheckoutLocation(context.checkoutLocation || ""); - } - result.setSnapshotVolume(snapshotVolume); - } else if (mustHaveBackup) { + if (mustHaveBackup) { const backup = new FromBackupInitializer(); if (CommitContext.is(context)) { backup.setCheckoutLocation(context.checkoutLocation || ""); } + backup.setFromSnapshotVolume(hasVolumeSnapshot); result.setBackup(backup); } else if (SnapshotContext.is(context)) { const snapshot = new SnapshotInitializer(); From 45212235987a7c727baab2fc7f60236e6f998233 Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Tue, 10 May 2022 23:42:27 +0000 Subject: [PATCH 4/8] tie snapshot volumes to workspace instance id --- .../src/typeorm/entity/db-volume-snapshot.ts | 6 +-- .../1652221085595-VolumeSnapshot2.ts | 21 ++++++++++ .../src/typeorm/workspace-db-impl.ts | 5 --- components/gitpod-db/src/workspace-db.ts | 1 - components/gitpod-protocol/src/protocol.ts | 5 +-- .../server/src/workspace/workspace-starter.ts | 41 +++++++++++-------- components/ws-manager-bridge/src/bridge.ts | 8 +++- components/ws-manager/pkg/manager/monitor.go | 4 +- 8 files changed, 55 insertions(+), 36 deletions(-) create mode 100644 components/gitpod-db/src/typeorm/migration/1652221085595-VolumeSnapshot2.ts diff --git a/components/gitpod-db/src/typeorm/entity/db-volume-snapshot.ts b/components/gitpod-db/src/typeorm/entity/db-volume-snapshot.ts index d8f2f95ea17129..feb9cfb0551d5b 100644 --- a/components/gitpod-db/src/typeorm/entity/db-volume-snapshot.ts +++ b/components/gitpod-db/src/typeorm/entity/db-volume-snapshot.ts @@ -13,7 +13,7 @@ import { Transformer } from "../transformer"; @Entity() @Index("ind_dbsync", ["creationTime"]) // DBSync export class DBVolumeSnapshot implements VolumeSnapshot { - @PrimaryColumn(TypeORM.UUID_COLUMN_TYPE) + @PrimaryColumn(TypeORM.WORKSPACE_ID_COLUMN_TYPE) id: string; @Column({ @@ -24,10 +24,6 @@ export class DBVolumeSnapshot implements VolumeSnapshot { }) creationTime: string; - @Column(TypeORM.WORKSPACE_ID_COLUMN_TYPE) - @Index("ind_originalWorkspaceId") - originalWorkspaceId: string; - @Column("varchar") volumeHandle: string; } diff --git a/components/gitpod-db/src/typeorm/migration/1652221085595-VolumeSnapshot2.ts b/components/gitpod-db/src/typeorm/migration/1652221085595-VolumeSnapshot2.ts new file mode 100644 index 00000000000000..42170aac0aedd0 --- /dev/null +++ b/components/gitpod-db/src/typeorm/migration/1652221085595-VolumeSnapshot2.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2022 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License-AGPL.txt in the project root for license information. + */ + +import { MigrationInterface, QueryRunner } from "typeorm"; +import { tableExists } from "./helper/helper"; + +export class VolumeSnapshot21652221085595 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + if (await tableExists(queryRunner, "d_b_volume_snapshot")) { + await queryRunner.query("DROP TABLE `d_b_volume_snapshot`"); + } + await queryRunner.query( + `CREATE TABLE IF NOT EXISTS d_b_volume_snapshot ( id char(36) NOT NULL, creationTime timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), volumeHandle varchar(255) NOT NULL, PRIMARY KEY (id), KEY ind_dbsync (creationTime)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;`, + ); + } + + public async down(queryRunner: QueryRunner): Promise {} +} diff --git a/components/gitpod-db/src/typeorm/workspace-db-impl.ts b/components/gitpod-db/src/typeorm/workspace-db-impl.ts index d4d03096e9aa9b..b3313e9ecfc501 100644 --- a/components/gitpod-db/src/typeorm/workspace-db-impl.ts +++ b/components/gitpod-db/src/typeorm/workspace-db-impl.ts @@ -760,11 +760,6 @@ export abstract class AbstractTypeORMWorkspaceDBImpl implements WorkspaceDB { await volumeSnapshots.update(volumeSnapshot.id, volumeSnapshot); } - public async findVolumeSnapshotsByWorkspaceId(workspaceId: string): Promise { - const volumeSnapshots = await this.getVolumeSnapshotRepo(); - return volumeSnapshots.find({ where: { originalWorkspaceId: workspaceId } }); - } - public async storePrebuiltWorkspace(pws: PrebuiltWorkspace): Promise { const repo = await this.getPrebuiltWorkspaceRepo(); if (pws.error && pws.error.length > 255) { diff --git a/components/gitpod-db/src/workspace-db.ts b/components/gitpod-db/src/workspace-db.ts index d7838973b61158..7cecb30d06140a 100644 --- a/components/gitpod-db/src/workspace-db.ts +++ b/components/gitpod-db/src/workspace-db.ts @@ -162,7 +162,6 @@ export interface WorkspaceDB { updateSnapshot(snapshot: DeepPartial & Pick): Promise; findVolumeSnapshotById(volumeSnapshotId: string): Promise; - findVolumeSnapshotsByWorkspaceId(workspaceId: string): Promise; storeVolumeSnapshot(snapshot: VolumeSnapshot): Promise; deleteVolumeSnapshot(volumeSnapshotId: string): Promise; updateVolumeSnapshot(snapshot: DeepPartial & Pick): Promise; diff --git a/components/gitpod-protocol/src/protocol.ts b/components/gitpod-protocol/src/protocol.ts index da15fd59ee0cbe..46330aac848762 100644 --- a/components/gitpod-protocol/src/protocol.ts +++ b/components/gitpod-protocol/src/protocol.ts @@ -243,7 +243,7 @@ export namespace UserEnvVar { return "Name must not be empty."; } if (name.length > 255) { - return 'Name too long. Maximum name length is 255 characters.'; + return "Name too long. Maximum name length is 255 characters."; } if (!/^[a-zA-Z_]+[a-zA-Z0-9_]*$/.test(name)) { return "Name must match /^[a-zA-Z_]+[a-zA-Z0-9_]*$/."; @@ -252,7 +252,7 @@ export namespace UserEnvVar { return "Value must not be empty."; } if (variable.value.length > 32767) { - return 'Value too long. Maximum value length is 32767 characters.'; + return "Value too long. Maximum value length is 32767 characters."; } if (pattern.trim() === "") { return "Scope must not be empty."; @@ -491,7 +491,6 @@ export interface Snapshot { export interface VolumeSnapshot { id: string; creationTime: string; - originalWorkspaceId: string; volumeHandle: string; } diff --git a/components/server/src/workspace/workspace-starter.ts b/components/server/src/workspace/workspace-starter.ts index c2c7eeec5401c9..f397318ddbb328 100644 --- a/components/server/src/workspace/workspace-starter.ts +++ b/components/server/src/workspace/workspace-starter.ts @@ -259,9 +259,15 @@ export class WorkspaceStarter { // check if there has been an instance before, i.e. if this is a restart const pastInstances = await this.workspaceDb.trace({ span }).findInstances(workspace.id); - const mustHaveBackup = pastInstances.some( + const hasValidBackup = pastInstances.some( (i) => !!i.status && !!i.status.conditions && !i.status.conditions.failed, ); + let lastValidWorkspaceInstanceId = ""; + if (hasValidBackup) { + lastValidWorkspaceInstanceId = pastInstances.reduce((previousValue, currentValue) => + currentValue.creationTime > previousValue.creationTime ? currentValue : previousValue, + ).id; + } const ideConfig = await this.ideConfigService.config; @@ -305,7 +311,7 @@ export class WorkspaceStarter { instance, workspace, user, - mustHaveBackup, + lastValidWorkspaceInstanceId, ideConfig, userEnvVars, projectEnvVars, @@ -320,7 +326,7 @@ export class WorkspaceStarter { instance, workspace, user, - mustHaveBackup, + lastValidWorkspaceInstanceId, ideConfig, userEnvVars, projectEnvVars, @@ -357,7 +363,7 @@ export class WorkspaceStarter { instance: WorkspaceInstance, workspace: Workspace, user: User, - mustHaveBackup: boolean, + lastValidWorkspaceInstanceId: string, ideConfig: IDEConfig, userEnvVars: UserEnvVar[], projectEnvVars: ProjectEnvVar[], @@ -392,7 +398,7 @@ export class WorkspaceStarter { user, workspace, instance, - mustHaveBackup, + lastValidWorkspaceInstanceId, ideConfig, userEnvVars, projectEnvVars, @@ -856,7 +862,7 @@ export class WorkspaceStarter { workspace, workspace.context, user, - false, + "", false, ); source = initializer; @@ -1080,7 +1086,7 @@ export class WorkspaceStarter { user: User, workspace: Workspace, instance: WorkspaceInstance, - mustHaveBackup: boolean, + lastValidWorkspaceInstanceId: string, ideConfig: IDEConfig, userEnvVars: UserEnvVarValue[], projectEnvVars: ProjectEnvVar[], @@ -1261,13 +1267,12 @@ export class WorkspaceStarter { } let volumeSnapshotInfo = new PvcSnapshotVolumeInfo(); - const volumeSnapshots = await this.workspaceDb.trace(traceCtx).findVolumeSnapshotsByWorkspaceId(workspace.id); - if (volumeSnapshots.length > 0) { - const latestVolumeSnapshot = volumeSnapshots.reduce((previousValue, currentValue) => - currentValue.creationTime > previousValue.creationTime ? currentValue : previousValue, - ); - volumeSnapshotInfo.setSnapshotVolumeName(latestVolumeSnapshot.id); - volumeSnapshotInfo.setSnapshotVolumeHandle(latestVolumeSnapshot.volumeHandle); + const volumeSnapshots = await this.workspaceDb + .trace(traceCtx) + .findVolumeSnapshotById(lastValidWorkspaceInstanceId); + if (volumeSnapshots !== undefined) { + volumeSnapshotInfo.setSnapshotVolumeName(volumeSnapshots.id); + volumeSnapshotInfo.setSnapshotVolumeHandle(volumeSnapshots.volumeHandle); } const initializerPromise = this.createInitializer( @@ -1275,8 +1280,8 @@ export class WorkspaceStarter { workspace, workspace.context, user, - mustHaveBackup, - volumeSnapshotInfo.getSnapshotVolumeName() != "", + lastValidWorkspaceInstanceId, + volumeSnapshots !== undefined, ); const userTimeoutPromise = this.userService.getDefaultWorkspaceTimeout(user); @@ -1426,13 +1431,13 @@ export class WorkspaceStarter { workspace: Workspace, context: WorkspaceContext, user: User, - mustHaveBackup: boolean, + lastValidWorkspaceInstanceId: string, hasVolumeSnapshot: boolean, ): Promise<{ initializer: WorkspaceInitializer; disposable: Disposable }> { let result = new WorkspaceInitializer(); const disp = new DisposableCollection(); - if (mustHaveBackup) { + if (lastValidWorkspaceInstanceId != "") { const backup = new FromBackupInitializer(); if (CommitContext.is(context)) { backup.setCheckoutLocation(context.checkoutLocation || ""); diff --git a/components/ws-manager-bridge/src/bridge.ts b/components/ws-manager-bridge/src/bridge.ts index b4a920982963fe..2db23e75fb6d84 100644 --- a/components/ws-manager-bridge/src/bridge.ts +++ b/components/ws-manager-bridge/src/bridge.ts @@ -360,6 +360,13 @@ export class WorkspaceManagerBridge implements Disposable { status.conditions.pvcSnapshotVolume.snapshotVolumeName != "" && writeToDB ) { + if (status.conditions.pvcSnapshotVolume.snapshotVolumeName != instance.id) { + log.error( + "snapshot volume name doesn't match workspace instance id", + status.conditions.pvcSnapshotVolume.snapshotVolumeName, + instance.id, + ); + } let existingSnapshot = await this.workspaceDB .trace(ctx) .findVolumeSnapshotById(status.conditions.pvcSnapshotVolume.snapshotVolumeName); @@ -367,7 +374,6 @@ export class WorkspaceManagerBridge implements Disposable { await this.workspaceDB.trace(ctx).storeVolumeSnapshot({ id: status.conditions.pvcSnapshotVolume.snapshotVolumeName, creationTime: new Date().toISOString(), - originalWorkspaceId: workspaceId, volumeHandle: status.conditions.pvcSnapshotVolume.snapshotVolumeHandle, }); } diff --git a/components/ws-manager/pkg/manager/monitor.go b/components/ws-manager/pkg/manager/monitor.go index b06ba749ae40d5..47aba5446c787e 100644 --- a/components/ws-manager/pkg/manager/monitor.go +++ b/components/ws-manager/pkg/manager/monitor.go @@ -26,7 +26,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "sigs.k8s.io/controller-runtime/pkg/client" @@ -877,7 +876,7 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb ) if wso.Pod != nil { _, pvcFeatureEnabled = wso.Pod.Labels[pvcWorkspaceFeatureAnnotation] - pvcSnapshotVolumeName = string(uuid.NewUUID()) + pvcSnapshotVolumeName = workspaceID wsClassName := "" if _, ok := wso.Pod.Labels[workspaceClassLabel]; ok { wsClassName = wso.Pod.Labels[workspaceClassLabel] @@ -998,7 +997,6 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb snapshotHandle := *volumeSnapshotContent.Status.SnapshotHandle - log.Infof("snapshot name: %s, handle: %s", pvcSnapshotVolumeName, snapshotHandle) b, err := json.Marshal(workspaceSnapshotVolumeStatus{PvcSnapshotVolumeName: pvcSnapshotVolumeName, PvcSnapshotVolumeHandle: snapshotHandle}) if err != nil { return true, nil, err From 018af7c22d905d18c09ddce2e1241e97cd596555 Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Thu, 12 May 2022 18:50:59 +0000 Subject: [PATCH 5/8] [ws-manager] improve error handling around snapshot volume creation --- components/ws-manager/pkg/manager/monitor.go | 26 ++++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/components/ws-manager/pkg/manager/monitor.go b/components/ws-manager/pkg/manager/monitor.go index 47aba5446c787e..d76532db03eafc 100644 --- a/components/ws-manager/pkg/manager/monitor.go +++ b/components/ws-manager/pkg/manager/monitor.go @@ -974,18 +974,28 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb log.WithError(err).WithField("VolumeSnapshot.Name", pvcSnapshotVolumeName).Error("was unable to get volume snapshot") return false, err } - if volumeSnapshot.Status != nil && volumeSnapshot.Status.ReadyToUse != nil && *(volumeSnapshot.Status.ReadyToUse) { - pvcSnapshotContentName = *volumeSnapshot.Status.BoundVolumeSnapshotContentName - return true, nil + if volumeSnapshot.Status != nil { + if volumeSnapshot.Status.ReadyToUse != nil && *(volumeSnapshot.Status.ReadyToUse) { + pvcSnapshotContentName = *volumeSnapshot.Status.BoundVolumeSnapshotContentName + return true, nil + } + if volumeSnapshot.Status.Error != nil { + if volumeSnapshot.Status.Error.Message != nil { + err = xerrors.Errorf("error during volume snapshot creation: %s", *volumeSnapshot.Status.Error.Message) + log.WithError(err).WithField("VolumeSnapshot.Name", pvcSnapshotVolumeName).Error("unable to create volume snapshot") + return false, err + } + log.WithField("VolumeSnapshot.Name", pvcSnapshotVolumeName).Error("unknown error during volume snapshot creation") + return false, xerrors.Errorf("unknown error during volume snapshot creation") + } } return false, nil }) if err != nil { - log.WithError(err).Errorf("failed to get volume snapshot `%s`", pvcSnapshotVolumeName) + log.WithError(err).WithField("VolumeSnapshot.Name", pvcSnapshotVolumeName).Errorf("failed while waiting for volume snapshot to get ready") return true, nil, err } readySnapshotVolume = true - } if readySnapshotVolume && !markSnapshotVolumeAnnotation { var volumeSnapshotContent volumesnapshotv1.VolumeSnapshotContent @@ -995,6 +1005,12 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb return true, nil, err } + if volumeSnapshotContent.Status == nil { + return true, nil, xerrors.Errorf("volume snapshot content status is nil") + } + if volumeSnapshotContent.Status.SnapshotHandle == nil { + return true, nil, xerrors.Errorf("volume snapshot content's snapshot handle is nil") + } snapshotHandle := *volumeSnapshotContent.Status.SnapshotHandle b, err := json.Marshal(workspaceSnapshotVolumeStatus{PvcSnapshotVolumeName: pvcSnapshotVolumeName, PvcSnapshotVolumeHandle: snapshotHandle}) From 03d3d75307eaa7357c886bf6ab37538e944cddf1 Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Tue, 17 May 2022 18:35:54 +0000 Subject: [PATCH 6/8] fix bad merge --- components/content-service/pkg/initializer/initializer.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/content-service/pkg/initializer/initializer.go b/components/content-service/pkg/initializer/initializer.go index 720f9f272ab168..c54b2f878c4cb1 100644 --- a/components/content-service/pkg/initializer/initializer.go +++ b/components/content-service/pkg/initializer/initializer.go @@ -527,8 +527,6 @@ func GetCheckoutLocationsFromInitializer(init *csapi.WorkspaceInitializer) []str switch { case init.GetGit() != nil: return []string{init.GetGit().CheckoutLocation} - case init.GetSnapshotVolume() != nil: - return []string{init.GetSnapshotVolume().CheckoutLocation} case init.GetPrebuild() != nil && len(init.GetPrebuild().Git) > 0: var result = make([]string, len(init.GetPrebuild().Git)) for i, c := range init.GetPrebuild().Git { From 5fd41cba3fd9aa09495d175c1a9c7b6776b87ecc Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Wed, 18 May 2022 19:25:50 +0000 Subject: [PATCH 7/8] ensure volume snapshot naming consistency --- .../content-service-api/go/initializer.pb.go | 12 +- .../content-service-api/initializer.proto | 2 +- .../typescript/src/initializer_pb.d.ts | 6 +- .../typescript/src/initializer_pb.js | 12 +- .../pkg/initializer/initializer.go | 6 +- .../content-service/pkg/layer/provider.go | 2 +- components/gitpod-protocol/src/wsready.ts | 2 +- .../server/src/workspace/workspace-starter.ts | 10 +- components/ws-manager-api/core.proto | 20 +- components/ws-manager-api/go/core.pb.go | 295 +++++++++--------- components/ws-manager-api/go/core_grpc.pb.go | 2 +- .../typescript/src/core_pb.d.ts | 42 +-- .../ws-manager-api/typescript/src/core_pb.js | 124 ++++---- components/ws-manager-bridge/src/bridge.ts | 16 +- .../ws-manager/pkg/manager/annotations.go | 12 +- components/ws-manager/pkg/manager/create.go | 12 +- components/ws-manager/pkg/manager/manager.go | 2 +- components/ws-manager/pkg/manager/monitor.go | 56 ++-- components/ws-manager/pkg/manager/status.go | 14 +- .../status_brokenScheduler_UNKNOWN00.golden | 4 +- .../status_cannotPull_004_CREATING00.golden | 4 +- .../status_cannotPull_005_STOPPED00.golden | 4 +- .../status_containerd4214_STOPPING00.golden | 4 +- ...tus_contentInitFailed_005_STOPPED00.golden | 4 +- .../testdata/status_disposal_STOPPED01.golden | 4 +- .../testdata/status_disposal_STOPPED02.golden | 4 +- .../testdata/status_disposal_STOPPED03.golden | 4 +- .../status_disposal_STOPPING01.golden | 4 +- .../status_disposal_STOPPING02.golden | 4 +- .../manager/testdata/status_errimgpull.golden | 4 +- .../status_errimgpull_CREATING01.golden | 4 +- ...s_failedBeforeStopping_explicitFail.golden | 4 +- .../status_failedLogs_RUNNING00.golden | 4 +- ...tus_failedPending_evicted_UNKNOWN01.golden | 4 +- ...tus_failedPending_evicted_UNKNOWN02.golden | 4 +- ...atus_failedWorkspaceMount_PENDING00.golden | 4 +- .../status_firstUserActivity_RUNNING.golden | 4 +- ...tatus_headlessTaskFailed_STOPPING00.golden | 4 +- .../status_headless_STOPPING00.golden | 4 +- ...atus_ideFailedToStart_005_RUNNING00.golden | 4 +- .../status_imagespec_RUNNING00.golden | 4 +- .../testdata/status_interrupted.golden | 4 +- .../status_interrupted_CREATING00.golden | 4 +- ...rupted_networkNotReady_1_event_only.golden | 4 +- ...etworkNotReady_2_event_and_exitcode.golden | 4 +- ...orkNotReady_3_recovered_CONSTRUCTED.golden | 4 +- .../manager/testdata/status_metadata.golden | 4 +- .../manager/testdata/status_ownerToken.golden | 4 +- .../status_prebuildFail_STOPPED00.golden | 4 +- .../status_prebuildFail_STOPPING00.golden | 4 +- .../status_prebuildSuccess2_CREATING01.golden | 4 +- .../status_prebuildSuccess_STOPPED00.golden | 4 +- .../status_prebuildSuccess_STOPPING00.golden | 4 +- .../status_regularStart_Initializing00.golden | 4 +- ...atus_stoppedByRequest_000_RUNNING00.golden | 4 +- .../status_stuckInCreating_CREATING00.golden | 4 +- .../status_stuckInStopping_RUNNING00.golden | 4 +- .../status_stuckInStopping_STOPPING00.golden | 4 +- .../status_wsstartup_Creating00.golden | 4 +- install/installer/pkg/config/v1/config.go | 2 +- .../config/v1/experimental/experimental.go | 2 +- 61 files changed, 402 insertions(+), 409 deletions(-) diff --git a/components/content-service-api/go/initializer.pb.go b/components/content-service-api/go/initializer.pb.go index 735f0967f08084..60e26ad3554059 100644 --- a/components/content-service-api/go/initializer.pb.go +++ b/components/content-service-api/go/initializer.pb.go @@ -719,7 +719,7 @@ type FromBackupInitializer struct { unknownFields protoimpl.UnknownFields CheckoutLocation string `protobuf:"bytes,1,opt,name=checkout_location,json=checkoutLocation,proto3" json:"checkout_location,omitempty"` - FromSnapshotVolume bool `protobuf:"varint,2,opt,name=from_snapshot_volume,json=fromSnapshotVolume,proto3" json:"from_snapshot_volume,omitempty"` + FromVolumeSnapshot bool `protobuf:"varint,2,opt,name=from_volume_snapshot,json=fromVolumeSnapshot,proto3" json:"from_volume_snapshot,omitempty"` } func (x *FromBackupInitializer) Reset() { @@ -761,9 +761,9 @@ func (x *FromBackupInitializer) GetCheckoutLocation() string { return "" } -func (x *FromBackupInitializer) GetFromSnapshotVolume() bool { +func (x *FromBackupInitializer) GetFromVolumeSnapshot() bool { if x != nil { - return x.FromSnapshotVolume + return x.FromVolumeSnapshot } return false } @@ -1062,9 +1062,9 @@ var file_initializer_proto_rawDesc = []byte{ 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x72, 0x6f, 0x6d, - 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0xe7, 0x02, 0x0a, 0x09, 0x47, + 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x72, 0x6f, 0x6d, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0xe7, 0x02, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, diff --git a/components/content-service-api/initializer.proto b/components/content-service-api/initializer.proto index 82b7b522c1e6f6..1f49e496a934ce 100644 --- a/components/content-service-api/initializer.proto +++ b/components/content-service-api/initializer.proto @@ -124,7 +124,7 @@ message PrebuildInitializer { // FromBackupInitializer initializes content from a previously made backup message FromBackupInitializer { string checkout_location = 1; - bool from_snapshot_volume = 2; + bool from_volume_snapshot = 2; } // GitStatus describes the current Git working copy status, akin to a combination of "git status" and "git branch" diff --git a/components/content-service-api/typescript/src/initializer_pb.d.ts b/components/content-service-api/typescript/src/initializer_pb.d.ts index 4505f5d7ba79e1..934aab8ee15ab3 100644 --- a/components/content-service-api/typescript/src/initializer_pb.d.ts +++ b/components/content-service-api/typescript/src/initializer_pb.d.ts @@ -300,8 +300,8 @@ export namespace PrebuildInitializer { export class FromBackupInitializer extends jspb.Message { getCheckoutLocation(): string; setCheckoutLocation(value: string): FromBackupInitializer; - getFromSnapshotVolume(): boolean; - setFromSnapshotVolume(value: boolean): FromBackupInitializer; + getFromVolumeSnapshot(): boolean; + setFromVolumeSnapshot(value: boolean): FromBackupInitializer; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): FromBackupInitializer.AsObject; @@ -316,7 +316,7 @@ export class FromBackupInitializer extends jspb.Message { export namespace FromBackupInitializer { export type AsObject = { checkoutLocation: string, - fromSnapshotVolume: boolean, + fromVolumeSnapshot: boolean, } } diff --git a/components/content-service-api/typescript/src/initializer_pb.js b/components/content-service-api/typescript/src/initializer_pb.js index cedeb8918d229a..ead9c611851dc8 100644 --- a/components/content-service-api/typescript/src/initializer_pb.js +++ b/components/content-service-api/typescript/src/initializer_pb.js @@ -2323,7 +2323,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, ""), - fromSnapshotVolume: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + fromVolumeSnapshot: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -2366,7 +2366,7 @@ proto.contentservice.FromBackupInitializer.deserializeBinaryFromReader = functio break; case 2: var value = /** @type {boolean} */ (reader.readBool()); - msg.setFromSnapshotVolume(value); + msg.setFromVolumeSnapshot(value); break; default: reader.skipField(); @@ -2404,7 +2404,7 @@ proto.contentservice.FromBackupInitializer.serializeBinaryToWriter = function(me f ); } - f = message.getFromSnapshotVolume(); + f = message.getFromVolumeSnapshot(); if (f) { writer.writeBool( 2, @@ -2433,10 +2433,10 @@ proto.contentservice.FromBackupInitializer.prototype.setCheckoutLocation = funct /** - * optional bool from_snapshot_volume = 2; + * optional bool from_volume_snapshot = 2; * @return {boolean} */ -proto.contentservice.FromBackupInitializer.prototype.getFromSnapshotVolume = function() { +proto.contentservice.FromBackupInitializer.prototype.getFromVolumeSnapshot = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; @@ -2445,7 +2445,7 @@ proto.contentservice.FromBackupInitializer.prototype.getFromSnapshotVolume = fun * @param {boolean} value * @return {!proto.contentservice.FromBackupInitializer} returns this */ -proto.contentservice.FromBackupInitializer.prototype.setFromSnapshotVolume = function(value) { +proto.contentservice.FromBackupInitializer.prototype.setFromVolumeSnapshot = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; diff --git a/components/content-service/pkg/initializer/initializer.go b/components/content-service/pkg/initializer/initializer.go index c54b2f878c4cb1..da5ce411f6c1f0 100644 --- a/components/content-service/pkg/initializer/initializer.go +++ b/components/content-service/pkg/initializer/initializer.go @@ -173,18 +173,18 @@ func newFromBackupInitializer(loc string, rs storage.DirectDownloader, req *csap return &fromBackupInitializer{ Location: loc, RemoteStorage: rs, - FromSnapshotVolume: req.FromSnapshotVolume, + FromVolumeSnapshot: req.FromVolumeSnapshot, }, nil } type fromBackupInitializer struct { Location string RemoteStorage storage.DirectDownloader - FromSnapshotVolume bool + FromVolumeSnapshot bool } func (bi *fromBackupInitializer) Run(ctx context.Context, mappings []archive.IDMapping) (src csapi.WorkspaceInitSource, err error) { - if bi.FromSnapshotVolume { + if bi.FromVolumeSnapshot { return csapi.WorkspaceInitFromBackup, nil } diff --git a/components/content-service/pkg/layer/provider.go b/components/content-service/pkg/layer/provider.go index 73ae62b6aa45e0..4c6a991708c063 100644 --- a/components/content-service/pkg/layer/provider.go +++ b/components/content-service/pkg/layer/provider.go @@ -269,7 +269,7 @@ func (s *Provider) GetContentLayerPVC(ctx context.Context, owner, workspaceID st return l, manifest, nil } - if initializer.GetBackup() != nil && initializer.GetBackup().FromSnapshotVolume { + if initializer.GetBackup() != nil && initializer.GetBackup().FromVolumeSnapshot { layer, err = contentDescriptorToLayerPVC([]byte{}) if err != nil { return nil, nil, err diff --git a/components/gitpod-protocol/src/wsready.ts b/components/gitpod-protocol/src/wsready.ts index 266e71caf3f802..59c49b79a5026b 100644 --- a/components/gitpod-protocol/src/wsready.ts +++ b/components/gitpod-protocol/src/wsready.ts @@ -4,7 +4,7 @@ * See License-AGPL.txt in the project root for license information. */ -// generated using github.com/32leaves/bel on 2022-05-10 18:14:25.691876738 +0000 UTC m=+0.006851101 +// generated using github.com/32leaves/bel on 2022-05-18 18:19:49.011672619 +0000 UTC m=+0.006607361 // DO NOT MODIFY export enum WorkspaceInitSource { diff --git a/components/server/src/workspace/workspace-starter.ts b/components/server/src/workspace/workspace-starter.ts index f397318ddbb328..1943d4b1f0e696 100644 --- a/components/server/src/workspace/workspace-starter.ts +++ b/components/server/src/workspace/workspace-starter.ts @@ -86,7 +86,7 @@ import { StartWorkspaceRequest, WorkspaceMetadata, WorkspaceType, - PvcSnapshotVolumeInfo, + VolumeSnapshotInfo, } from "@gitpod/ws-manager/lib/core_pb"; import * as crypto from "crypto"; import { inject, injectable } from "inversify"; @@ -1266,13 +1266,13 @@ export class WorkspaceStarter { } } - let volumeSnapshotInfo = new PvcSnapshotVolumeInfo(); + let volumeSnapshotInfo = new VolumeSnapshotInfo(); const volumeSnapshots = await this.workspaceDb .trace(traceCtx) .findVolumeSnapshotById(lastValidWorkspaceInstanceId); if (volumeSnapshots !== undefined) { - volumeSnapshotInfo.setSnapshotVolumeName(volumeSnapshots.id); - volumeSnapshotInfo.setSnapshotVolumeHandle(volumeSnapshots.volumeHandle); + volumeSnapshotInfo.setVolumeSnapshotName(volumeSnapshots.id); + volumeSnapshotInfo.setVolumeSnapshotHandle(volumeSnapshots.volumeHandle); } const initializerPromise = this.createInitializer( @@ -1442,7 +1442,7 @@ export class WorkspaceStarter { if (CommitContext.is(context)) { backup.setCheckoutLocation(context.checkoutLocation || ""); } - backup.setFromSnapshotVolume(hasVolumeSnapshot); + backup.setFromVolumeSnapshot(hasVolumeSnapshot); result.setBackup(backup); } else if (SnapshotContext.is(context)) { const snapshot = new SnapshotInitializer(); diff --git a/components/ws-manager-api/core.proto b/components/ws-manager-api/core.proto index 757c44115c4c2a..1a4d8435ac5774 100644 --- a/components/ws-manager-api/core.proto +++ b/components/ws-manager-api/core.proto @@ -337,13 +337,13 @@ enum PortVisibility { PORT_VISIBILITY_PUBLIC = 1; } -// PvcSnapshotVolumeInfo defines snapshot volume information -message PvcSnapshotVolumeInfo { - // snapshot_volume_name is the name of snapshot volume - string snapshot_volume_name = 1; +// VolumeSnapshotInfo defines volume snapshot information +message VolumeSnapshotInfo { + // volume_snapshot_name is the name of volume snapshot + string volume_snapshot_name = 1; - // snapshot_volume_handle is a handle that is used to restore snapshot volume - string snapshot_volume_handle = 2; + // volume_snapshot_handle is a handle that is used to restore volume snapshot + string volume_snapshot_handle = 2; } // WorkspaceCondition gives more detailed information as to the state of the workspace. Which condition actually @@ -383,8 +383,8 @@ message WorkspaceConditions { // stopped_by_request is true if the workspace was stopped using a StopWorkspace call WorkspaceConditionBool stopped_by_request = 11; - // pvc_snapshot_volume contains info about snapshot volume that was used to save persistent volume - PvcSnapshotVolumeInfo pvc_snapshot_volume = 12; + // volume_snapshot contains info about volume snapshot that was used to save persistent volume + VolumeSnapshotInfo volume_snapshot = 12; } // WorkspaceConditionBool is a trinary bool: true/false/empty @@ -512,8 +512,8 @@ message StartWorkspaceSpec { // Class denotes the class of the workspace we ought to start string class = 13; - // volume_snapshot_id to use to restore PVC from, if set - PvcSnapshotVolumeInfo volume_snapshot = 14; + // volume_snapshot to use to restore PVC from, if set + VolumeSnapshotInfo volume_snapshot = 14; } // WorkspaceFeatureFlag enable non-standard behaviour in workspaces diff --git a/components/ws-manager-api/go/core.pb.go b/components/ws-manager-api/go/core.pb.go index 7c009f83c428ba..091ca58289bf9c 100644 --- a/components/ws-manager-api/go/core.pb.go +++ b/components/ws-manager-api/go/core.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc v3.20.0 // source: core.proto package api @@ -2036,20 +2036,20 @@ func (x *PortSpec) GetUrl() string { return "" } -// PvcSnapshotVolumeInfo defines snapshot volume information -type PvcSnapshotVolumeInfo struct { +// VolumeSnapshotInfo defines volume snapshot information +type VolumeSnapshotInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // snapshot_volume_name is the name of snapshot volume - SnapshotVolumeName string `protobuf:"bytes,1,opt,name=snapshot_volume_name,json=snapshotVolumeName,proto3" json:"snapshot_volume_name,omitempty"` - // snapshot_volume_handle is a handle that is used to restore snapshot volume - SnapshotVolumeHandle string `protobuf:"bytes,2,opt,name=snapshot_volume_handle,json=snapshotVolumeHandle,proto3" json:"snapshot_volume_handle,omitempty"` + // volume_snapshot_name is the name of volume snapshot + VolumeSnapshotName string `protobuf:"bytes,1,opt,name=volume_snapshot_name,json=volumeSnapshotName,proto3" json:"volume_snapshot_name,omitempty"` + // volume_snapshot_handle is a handle that is used to restore volume snapshot + VolumeSnapshotHandle string `protobuf:"bytes,2,opt,name=volume_snapshot_handle,json=volumeSnapshotHandle,proto3" json:"volume_snapshot_handle,omitempty"` } -func (x *PvcSnapshotVolumeInfo) Reset() { - *x = PvcSnapshotVolumeInfo{} +func (x *VolumeSnapshotInfo) Reset() { + *x = VolumeSnapshotInfo{} if protoimpl.UnsafeEnabled { mi := &file_core_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2057,13 +2057,13 @@ func (x *PvcSnapshotVolumeInfo) Reset() { } } -func (x *PvcSnapshotVolumeInfo) String() string { +func (x *VolumeSnapshotInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PvcSnapshotVolumeInfo) ProtoMessage() {} +func (*VolumeSnapshotInfo) ProtoMessage() {} -func (x *PvcSnapshotVolumeInfo) ProtoReflect() protoreflect.Message { +func (x *VolumeSnapshotInfo) ProtoReflect() protoreflect.Message { mi := &file_core_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2075,21 +2075,21 @@ func (x *PvcSnapshotVolumeInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PvcSnapshotVolumeInfo.ProtoReflect.Descriptor instead. -func (*PvcSnapshotVolumeInfo) Descriptor() ([]byte, []int) { +// Deprecated: Use VolumeSnapshotInfo.ProtoReflect.Descriptor instead. +func (*VolumeSnapshotInfo) Descriptor() ([]byte, []int) { return file_core_proto_rawDescGZIP(), []int{27} } -func (x *PvcSnapshotVolumeInfo) GetSnapshotVolumeName() string { +func (x *VolumeSnapshotInfo) GetVolumeSnapshotName() string { if x != nil { - return x.SnapshotVolumeName + return x.VolumeSnapshotName } return "" } -func (x *PvcSnapshotVolumeInfo) GetSnapshotVolumeHandle() string { +func (x *VolumeSnapshotInfo) GetVolumeSnapshotHandle() string { if x != nil { - return x.SnapshotVolumeHandle + return x.VolumeSnapshotHandle } return "" } @@ -2122,8 +2122,8 @@ type WorkspaceConditions struct { HeadlessTaskFailed string `protobuf:"bytes,10,opt,name=headless_task_failed,json=headlessTaskFailed,proto3" json:"headless_task_failed,omitempty"` // stopped_by_request is true if the workspace was stopped using a StopWorkspace call StoppedByRequest WorkspaceConditionBool `protobuf:"varint,11,opt,name=stopped_by_request,json=stoppedByRequest,proto3,enum=wsman.WorkspaceConditionBool" json:"stopped_by_request,omitempty"` - // pvc_snapshot_volume contains info about snapshot volume that was used to save persistent volume - PvcSnapshotVolume *PvcSnapshotVolumeInfo `protobuf:"bytes,12,opt,name=pvc_snapshot_volume,json=pvcSnapshotVolume,proto3" json:"pvc_snapshot_volume,omitempty"` + // volume_snapshot contains info about volume snapshot that was used to save persistent volume + VolumeSnapshot *VolumeSnapshotInfo `protobuf:"bytes,12,opt,name=volume_snapshot,json=volumeSnapshot,proto3" json:"volume_snapshot,omitempty"` } func (x *WorkspaceConditions) Reset() { @@ -2228,9 +2228,9 @@ func (x *WorkspaceConditions) GetStoppedByRequest() WorkspaceConditionBool { return WorkspaceConditionBool_FALSE } -func (x *WorkspaceConditions) GetPvcSnapshotVolume() *PvcSnapshotVolumeInfo { +func (x *WorkspaceConditions) GetVolumeSnapshot() *VolumeSnapshotInfo { if x != nil { - return x.PvcSnapshotVolume + return x.VolumeSnapshot } return nil } @@ -2471,8 +2471,8 @@ type StartWorkspaceSpec struct { IdeImage *IDEImage `protobuf:"bytes,12,opt,name=ide_image,json=ideImage,proto3" json:"ide_image,omitempty"` // Class denotes the class of the workspace we ought to start Class string `protobuf:"bytes,13,opt,name=class,proto3" json:"class,omitempty"` - // volume_snapshot_id to use to restore PVC from, if set - VolumeSnapshot *PvcSnapshotVolumeInfo `protobuf:"bytes,14,opt,name=volume_snapshot,json=volumeSnapshot,proto3" json:"volume_snapshot,omitempty"` + // volume_snapshot to use to restore PVC from, if set + VolumeSnapshot *VolumeSnapshotInfo `protobuf:"bytes,14,opt,name=volume_snapshot,json=volumeSnapshot,proto3" json:"volume_snapshot,omitempty"` } func (x *StartWorkspaceSpec) Reset() { @@ -2591,7 +2591,7 @@ func (x *StartWorkspaceSpec) GetClass() string { return "" } -func (x *StartWorkspaceSpec) GetVolumeSnapshot() *PvcSnapshotVolumeInfo { +func (x *StartWorkspaceSpec) GetVolumeSnapshot() *VolumeSnapshotInfo { if x != nil { return x.VolumeSnapshot } @@ -3013,127 +3013,126 @@ var file_core_proto_rawDesc = []byte{ 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x7f, - 0x0a, 0x15, 0x50, 0x76, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, - 0xa1, 0x05, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x0e, 0x70, 0x75, 0x6c, - 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x7c, + 0x0a, 0x12, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x14, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x97, 0x05, 0x0a, + 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x0e, 0x70, 0x75, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x0d, 0x70, + 0x75, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x51, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, + 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x08, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x12, 0x49, 0x0a, 0x11, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, - 0x52, 0x0d, 0x70, 0x75, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x51, 0x0a, 0x15, 0x66, - 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, - 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, - 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x39, - 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, - 0x08, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x12, 0x49, 0x0a, 0x11, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x6f, 0x6f, 0x6c, 0x52, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x6f, 0x74, 0x52, - 0x65, 0x61, 0x64, 0x79, 0x12, 0x4a, 0x0a, 0x13, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x66, - 0x69, 0x72, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x12, 0x30, 0x0a, 0x14, 0x68, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x68, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, - 0x65, 0x64, 0x12, 0x4b, 0x0a, 0x12, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x62, 0x79, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, - 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x10, 0x73, - 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x4c, 0x0a, 0x13, 0x70, 0x76, 0x63, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, - 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, - 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x76, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x70, 0x76, 0x63, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4a, 0x04, 0x08, - 0x04, 0x10, 0x05, 0x22, 0x8a, 0x02, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, - 0x17, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6d, 0x65, 0x74, 0x61, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x67, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x70, 0x22, 0x6f, 0x0a, 0x17, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, - 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x09, - 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x87, 0x05, 0x0a, 0x12, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, - 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x49, 0x64, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x0d, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, - 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x46, - 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x6f, - 0x72, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x34, 0x0a, - 0x07, 0x65, 0x6e, 0x76, 0x76, 0x61, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x76, - 0x61, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, - 0x03, 0x67, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x33, - 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x09, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x49, - 0x44, 0x45, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x08, 0x69, 0x64, 0x65, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x76, 0x63, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, + 0x52, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x64, + 0x79, 0x12, 0x4a, 0x0a, 0x13, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, + 0x14, 0x68, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x66, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x68, 0x65, 0x61, + 0x64, 0x6c, 0x65, 0x73, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, + 0x4b, 0x0a, 0x12, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x77, 0x73, + 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x10, 0x73, 0x74, 0x6f, 0x70, + 0x70, 0x65, 0x64, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0f, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x8a, 0x02, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x61, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x73, + 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x67, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x70, 0x22, 0x6f, 0x0a, 0x17, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, + 0x61, 0x6e, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x84, 0x05, + 0x0a, 0x12, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, + 0x14, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x5f, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x49, 0x64, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, + 0x40, 0x0a, 0x0d, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, + 0x6c, 0x61, 0x67, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, + 0x73, 0x12, 0x46, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, + 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, + 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x76, 0x76, 0x61, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x07, 0x65, + 0x6e, 0x76, 0x76, 0x61, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x69, 0x74, 0x53, 0x70, + 0x65, 0x63, 0x52, 0x03, 0x67, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x64, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x09, 0x61, 0x64, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x09, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, + 0x6e, 0x2e, 0x49, 0x44, 0x45, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x08, 0x69, 0x64, 0x65, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x42, 0x0a, 0x0f, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0x3b, 0x0a, 0x07, 0x47, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, @@ -3301,7 +3300,7 @@ var file_core_proto_goTypes = []interface{}{ (*IDEImage)(nil), // 31: wsman.IDEImage (*WorkspaceSpec)(nil), // 32: wsman.WorkspaceSpec (*PortSpec)(nil), // 33: wsman.PortSpec - (*PvcSnapshotVolumeInfo)(nil), // 34: wsman.PvcSnapshotVolumeInfo + (*VolumeSnapshotInfo)(nil), // 34: wsman.VolumeSnapshotInfo (*WorkspaceConditions)(nil), // 35: wsman.WorkspaceConditions (*WorkspaceMetadata)(nil), // 36: wsman.WorkspaceMetadata (*WorkspaceRuntimeInfo)(nil), // 37: wsman.WorkspaceRuntimeInfo @@ -3349,7 +3348,7 @@ var file_core_proto_depIdxs = []int32{ 3, // 27: wsman.WorkspaceConditions.network_not_ready:type_name -> wsman.WorkspaceConditionBool 48, // 28: wsman.WorkspaceConditions.first_user_activity:type_name -> google.protobuf.Timestamp 3, // 29: wsman.WorkspaceConditions.stopped_by_request:type_name -> wsman.WorkspaceConditionBool - 34, // 30: wsman.WorkspaceConditions.pvc_snapshot_volume:type_name -> wsman.PvcSnapshotVolumeInfo + 34, // 30: wsman.WorkspaceConditions.volume_snapshot:type_name -> wsman.VolumeSnapshotInfo 48, // 31: wsman.WorkspaceMetadata.started_at:type_name -> google.protobuf.Timestamp 45, // 32: wsman.WorkspaceMetadata.annotations:type_name -> wsman.WorkspaceMetadata.AnnotationsEntry 1, // 33: wsman.WorkspaceAuthentication.admission:type_name -> wsman.AdmissionLevel @@ -3360,7 +3359,7 @@ var file_core_proto_depIdxs = []int32{ 40, // 38: wsman.StartWorkspaceSpec.git:type_name -> wsman.GitSpec 1, // 39: wsman.StartWorkspaceSpec.admission:type_name -> wsman.AdmissionLevel 31, // 40: wsman.StartWorkspaceSpec.ide_image:type_name -> wsman.IDEImage - 34, // 41: wsman.StartWorkspaceSpec.volume_snapshot:type_name -> wsman.PvcSnapshotVolumeInfo + 34, // 41: wsman.StartWorkspaceSpec.volume_snapshot:type_name -> wsman.VolumeSnapshotInfo 46, // 42: wsman.EnvironmentVariable.secret:type_name -> wsman.EnvironmentVariable.SecretKeyRef 33, // 43: wsman.ExposedPorts.ports:type_name -> wsman.PortSpec 8, // 44: wsman.WorkspaceManager.GetWorkspaces:input_type -> wsman.GetWorkspacesRequest @@ -3723,7 +3722,7 @@ func file_core_proto_init() { } } file_core_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvcSnapshotVolumeInfo); i { + switch v := v.(*VolumeSnapshotInfo); i { case 0: return &v.state case 1: diff --git a/components/ws-manager-api/go/core_grpc.pb.go b/components/ws-manager-api/go/core_grpc.pb.go index 72b460b2dddb59..811c88e8f1bf5d 100644 --- a/components/ws-manager-api/go/core_grpc.pb.go +++ b/components/ws-manager-api/go/core_grpc.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.4 +// - protoc v3.20.0 // source: core.proto package api diff --git a/components/ws-manager-api/typescript/src/core_pb.d.ts b/components/ws-manager-api/typescript/src/core_pb.d.ts index 320815c19c5e1a..d87dca3c8d0626 100644 --- a/components/ws-manager-api/typescript/src/core_pb.d.ts +++ b/components/ws-manager-api/typescript/src/core_pb.d.ts @@ -700,26 +700,26 @@ export namespace PortSpec { } } -export class PvcSnapshotVolumeInfo extends jspb.Message { - getSnapshotVolumeName(): string; - setSnapshotVolumeName(value: string): PvcSnapshotVolumeInfo; - getSnapshotVolumeHandle(): string; - setSnapshotVolumeHandle(value: string): PvcSnapshotVolumeInfo; +export class VolumeSnapshotInfo extends jspb.Message { + getVolumeSnapshotName(): string; + setVolumeSnapshotName(value: string): VolumeSnapshotInfo; + getVolumeSnapshotHandle(): string; + setVolumeSnapshotHandle(value: string): VolumeSnapshotInfo; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PvcSnapshotVolumeInfo.AsObject; - static toObject(includeInstance: boolean, msg: PvcSnapshotVolumeInfo): PvcSnapshotVolumeInfo.AsObject; + toObject(includeInstance?: boolean): VolumeSnapshotInfo.AsObject; + static toObject(includeInstance: boolean, msg: VolumeSnapshotInfo): VolumeSnapshotInfo.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PvcSnapshotVolumeInfo, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PvcSnapshotVolumeInfo; - static deserializeBinaryFromReader(message: PvcSnapshotVolumeInfo, reader: jspb.BinaryReader): PvcSnapshotVolumeInfo; + static serializeBinaryToWriter(message: VolumeSnapshotInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VolumeSnapshotInfo; + static deserializeBinaryFromReader(message: VolumeSnapshotInfo, reader: jspb.BinaryReader): VolumeSnapshotInfo; } -export namespace PvcSnapshotVolumeInfo { +export namespace VolumeSnapshotInfo { export type AsObject = { - snapshotVolumeName: string, - snapshotVolumeHandle: string, + volumeSnapshotName: string, + volumeSnapshotHandle: string, } } @@ -748,10 +748,10 @@ export class WorkspaceConditions extends jspb.Message { getStoppedByRequest(): WorkspaceConditionBool; setStoppedByRequest(value: WorkspaceConditionBool): WorkspaceConditions; - hasPvcSnapshotVolume(): boolean; - clearPvcSnapshotVolume(): void; - getPvcSnapshotVolume(): PvcSnapshotVolumeInfo | undefined; - setPvcSnapshotVolume(value?: PvcSnapshotVolumeInfo): WorkspaceConditions; + hasVolumeSnapshot(): boolean; + clearVolumeSnapshot(): void; + getVolumeSnapshot(): VolumeSnapshotInfo | undefined; + setVolumeSnapshot(value?: VolumeSnapshotInfo): WorkspaceConditions; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WorkspaceConditions.AsObject; @@ -775,7 +775,7 @@ export namespace WorkspaceConditions { firstUserActivity?: google_protobuf_timestamp_pb.Timestamp.AsObject, headlessTaskFailed: string, stoppedByRequest: WorkspaceConditionBool, - pvcSnapshotVolume?: PvcSnapshotVolumeInfo.AsObject, + volumeSnapshot?: VolumeSnapshotInfo.AsObject, } } @@ -905,8 +905,8 @@ export class StartWorkspaceSpec extends jspb.Message { hasVolumeSnapshot(): boolean; clearVolumeSnapshot(): void; - getVolumeSnapshot(): PvcSnapshotVolumeInfo | undefined; - setVolumeSnapshot(value?: PvcSnapshotVolumeInfo): StartWorkspaceSpec; + getVolumeSnapshot(): VolumeSnapshotInfo | undefined; + setVolumeSnapshot(value?: VolumeSnapshotInfo): StartWorkspaceSpec; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): StartWorkspaceSpec.AsObject; @@ -932,7 +932,7 @@ export namespace StartWorkspaceSpec { admission: AdmissionLevel, ideImage?: IDEImage.AsObject, pb_class: string, - volumeSnapshot?: PvcSnapshotVolumeInfo.AsObject, + volumeSnapshot?: VolumeSnapshotInfo.AsObject, } } diff --git a/components/ws-manager-api/typescript/src/core_pb.js b/components/ws-manager-api/typescript/src/core_pb.js index c10097c45b32d3..e60844f0266754 100644 --- a/components/ws-manager-api/typescript/src/core_pb.js +++ b/components/ws-manager-api/typescript/src/core_pb.js @@ -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); var content$service$api_initializer_pb = require('@gitpod/content-service/lib'); goog.object.extend(proto, content$service$api_initializer_pb); @@ -52,7 +46,6 @@ goog.exportSymbol('proto.wsman.MarkActiveResponse', null, global); goog.exportSymbol('proto.wsman.MetadataFilter', null, global); goog.exportSymbol('proto.wsman.PortSpec', null, global); goog.exportSymbol('proto.wsman.PortVisibility', null, global); -goog.exportSymbol('proto.wsman.PvcSnapshotVolumeInfo', null, global); goog.exportSymbol('proto.wsman.SetTimeoutRequest', null, global); goog.exportSymbol('proto.wsman.SetTimeoutResponse', null, global); goog.exportSymbol('proto.wsman.StartWorkspaceRequest', null, global); @@ -65,6 +58,7 @@ goog.exportSymbol('proto.wsman.SubscribeRequest', null, global); goog.exportSymbol('proto.wsman.SubscribeResponse', null, global); goog.exportSymbol('proto.wsman.TakeSnapshotRequest', null, global); goog.exportSymbol('proto.wsman.TakeSnapshotResponse', null, global); +goog.exportSymbol('proto.wsman.VolumeSnapshotInfo', null, global); goog.exportSymbol('proto.wsman.WorkspaceAuthentication', null, global); goog.exportSymbol('proto.wsman.WorkspaceConditionBool', null, global); goog.exportSymbol('proto.wsman.WorkspaceConditions', null, global); @@ -652,16 +646,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.wsman.PvcSnapshotVolumeInfo = function(opt_data) { +proto.wsman.VolumeSnapshotInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.wsman.PvcSnapshotVolumeInfo, jspb.Message); +goog.inherits(proto.wsman.VolumeSnapshotInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.wsman.PvcSnapshotVolumeInfo.displayName = 'proto.wsman.PvcSnapshotVolumeInfo'; + proto.wsman.VolumeSnapshotInfo.displayName = 'proto.wsman.VolumeSnapshotInfo'; } /** * Generated by JsPbCodeGenerator. @@ -5703,8 +5697,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.wsman.PvcSnapshotVolumeInfo.prototype.toObject = function(opt_includeInstance) { - return proto.wsman.PvcSnapshotVolumeInfo.toObject(opt_includeInstance, this); +proto.wsman.VolumeSnapshotInfo.prototype.toObject = function(opt_includeInstance) { + return proto.wsman.VolumeSnapshotInfo.toObject(opt_includeInstance, this); }; @@ -5713,14 +5707,14 @@ proto.wsman.PvcSnapshotVolumeInfo.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.wsman.PvcSnapshotVolumeInfo} msg The msg instance to transform. + * @param {!proto.wsman.VolumeSnapshotInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsman.PvcSnapshotVolumeInfo.toObject = function(includeInstance, msg) { +proto.wsman.VolumeSnapshotInfo.toObject = function(includeInstance, msg) { var f, obj = { - snapshotVolumeName: jspb.Message.getFieldWithDefault(msg, 1, ""), - snapshotVolumeHandle: jspb.Message.getFieldWithDefault(msg, 2, "") + volumeSnapshotName: jspb.Message.getFieldWithDefault(msg, 1, ""), + volumeSnapshotHandle: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -5734,23 +5728,23 @@ proto.wsman.PvcSnapshotVolumeInfo.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.wsman.PvcSnapshotVolumeInfo} + * @return {!proto.wsman.VolumeSnapshotInfo} */ -proto.wsman.PvcSnapshotVolumeInfo.deserializeBinary = function(bytes) { +proto.wsman.VolumeSnapshotInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.wsman.PvcSnapshotVolumeInfo; - return proto.wsman.PvcSnapshotVolumeInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.wsman.VolumeSnapshotInfo; + return proto.wsman.VolumeSnapshotInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.wsman.PvcSnapshotVolumeInfo} msg The message object to deserialize into. + * @param {!proto.wsman.VolumeSnapshotInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.wsman.PvcSnapshotVolumeInfo} + * @return {!proto.wsman.VolumeSnapshotInfo} */ -proto.wsman.PvcSnapshotVolumeInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.wsman.VolumeSnapshotInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5759,11 +5753,11 @@ proto.wsman.PvcSnapshotVolumeInfo.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setSnapshotVolumeName(value); + msg.setVolumeSnapshotName(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setSnapshotVolumeHandle(value); + msg.setVolumeSnapshotHandle(value); break; default: reader.skipField(); @@ -5778,9 +5772,9 @@ proto.wsman.PvcSnapshotVolumeInfo.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.wsman.PvcSnapshotVolumeInfo.prototype.serializeBinary = function() { +proto.wsman.VolumeSnapshotInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.wsman.PvcSnapshotVolumeInfo.serializeBinaryToWriter(this, writer); + proto.wsman.VolumeSnapshotInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5788,20 +5782,20 @@ proto.wsman.PvcSnapshotVolumeInfo.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.wsman.PvcSnapshotVolumeInfo} message + * @param {!proto.wsman.VolumeSnapshotInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.wsman.PvcSnapshotVolumeInfo.serializeBinaryToWriter = function(message, writer) { +proto.wsman.VolumeSnapshotInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSnapshotVolumeName(); + f = message.getVolumeSnapshotName(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getSnapshotVolumeHandle(); + f = message.getVolumeSnapshotHandle(); if (f.length > 0) { writer.writeString( 2, @@ -5812,37 +5806,37 @@ proto.wsman.PvcSnapshotVolumeInfo.serializeBinaryToWriter = function(message, wr /** - * optional string snapshot_volume_name = 1; + * optional string volume_snapshot_name = 1; * @return {string} */ -proto.wsman.PvcSnapshotVolumeInfo.prototype.getSnapshotVolumeName = function() { +proto.wsman.VolumeSnapshotInfo.prototype.getVolumeSnapshotName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.wsman.PvcSnapshotVolumeInfo} returns this + * @return {!proto.wsman.VolumeSnapshotInfo} returns this */ -proto.wsman.PvcSnapshotVolumeInfo.prototype.setSnapshotVolumeName = function(value) { +proto.wsman.VolumeSnapshotInfo.prototype.setVolumeSnapshotName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string snapshot_volume_handle = 2; + * optional string volume_snapshot_handle = 2; * @return {string} */ -proto.wsman.PvcSnapshotVolumeInfo.prototype.getSnapshotVolumeHandle = function() { +proto.wsman.VolumeSnapshotInfo.prototype.getVolumeSnapshotHandle = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.wsman.PvcSnapshotVolumeInfo} returns this + * @return {!proto.wsman.VolumeSnapshotInfo} returns this */ -proto.wsman.PvcSnapshotVolumeInfo.prototype.setSnapshotVolumeHandle = function(value) { +proto.wsman.VolumeSnapshotInfo.prototype.setVolumeSnapshotHandle = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -5889,7 +5883,7 @@ proto.wsman.WorkspaceConditions.toObject = function(includeInstance, msg) { firstUserActivity: (f = msg.getFirstUserActivity()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), headlessTaskFailed: jspb.Message.getFieldWithDefault(msg, 10, ""), stoppedByRequest: jspb.Message.getFieldWithDefault(msg, 11, 0), - pvcSnapshotVolume: (f = msg.getPvcSnapshotVolume()) && proto.wsman.PvcSnapshotVolumeInfo.toObject(includeInstance, f) + volumeSnapshot: (f = msg.getVolumeSnapshot()) && proto.wsman.VolumeSnapshotInfo.toObject(includeInstance, f) }; if (includeInstance) { @@ -5968,9 +5962,9 @@ proto.wsman.WorkspaceConditions.deserializeBinaryFromReader = function(msg, read msg.setStoppedByRequest(value); break; case 12: - var value = new proto.wsman.PvcSnapshotVolumeInfo; - reader.readMessage(value,proto.wsman.PvcSnapshotVolumeInfo.deserializeBinaryFromReader); - msg.setPvcSnapshotVolume(value); + var value = new proto.wsman.VolumeSnapshotInfo; + reader.readMessage(value,proto.wsman.VolumeSnapshotInfo.deserializeBinaryFromReader); + msg.setVolumeSnapshot(value); break; default: reader.skipField(); @@ -6072,12 +6066,12 @@ proto.wsman.WorkspaceConditions.serializeBinaryToWriter = function(message, writ f ); } - f = message.getPvcSnapshotVolume(); + f = message.getVolumeSnapshot(); if (f != null) { writer.writeMessage( 12, f, - proto.wsman.PvcSnapshotVolumeInfo.serializeBinaryToWriter + proto.wsman.VolumeSnapshotInfo.serializeBinaryToWriter ); } }; @@ -6283,20 +6277,20 @@ proto.wsman.WorkspaceConditions.prototype.setStoppedByRequest = function(value) /** - * optional PvcSnapshotVolumeInfo pvc_snapshot_volume = 12; - * @return {?proto.wsman.PvcSnapshotVolumeInfo} + * optional VolumeSnapshotInfo volume_snapshot = 12; + * @return {?proto.wsman.VolumeSnapshotInfo} */ -proto.wsman.WorkspaceConditions.prototype.getPvcSnapshotVolume = function() { - return /** @type{?proto.wsman.PvcSnapshotVolumeInfo} */ ( - jspb.Message.getWrapperField(this, proto.wsman.PvcSnapshotVolumeInfo, 12)); +proto.wsman.WorkspaceConditions.prototype.getVolumeSnapshot = function() { + return /** @type{?proto.wsman.VolumeSnapshotInfo} */ ( + jspb.Message.getWrapperField(this, proto.wsman.VolumeSnapshotInfo, 12)); }; /** - * @param {?proto.wsman.PvcSnapshotVolumeInfo|undefined} value + * @param {?proto.wsman.VolumeSnapshotInfo|undefined} value * @return {!proto.wsman.WorkspaceConditions} returns this */ -proto.wsman.WorkspaceConditions.prototype.setPvcSnapshotVolume = function(value) { +proto.wsman.WorkspaceConditions.prototype.setVolumeSnapshot = function(value) { return jspb.Message.setWrapperField(this, 12, value); }; @@ -6305,8 +6299,8 @@ proto.wsman.WorkspaceConditions.prototype.setPvcSnapshotVolume = function(value) * Clears the message field making it undefined. * @return {!proto.wsman.WorkspaceConditions} returns this */ -proto.wsman.WorkspaceConditions.prototype.clearPvcSnapshotVolume = function() { - return this.setPvcSnapshotVolume(undefined); +proto.wsman.WorkspaceConditions.prototype.clearVolumeSnapshot = function() { + return this.setVolumeSnapshot(undefined); }; @@ -6314,7 +6308,7 @@ proto.wsman.WorkspaceConditions.prototype.clearPvcSnapshotVolume = function() { * Returns whether this field is set. * @return {boolean} */ -proto.wsman.WorkspaceConditions.prototype.hasPvcSnapshotVolume = function() { +proto.wsman.WorkspaceConditions.prototype.hasVolumeSnapshot = function() { return jspb.Message.getField(this, 12) != null; }; @@ -6966,7 +6960,7 @@ proto.wsman.StartWorkspaceSpec.toObject = function(includeInstance, msg) { admission: jspb.Message.getFieldWithDefault(msg, 11, 0), ideImage: (f = msg.getIdeImage()) && proto.wsman.IDEImage.toObject(includeInstance, f), pb_class: jspb.Message.getFieldWithDefault(msg, 13, ""), - volumeSnapshot: (f = msg.getVolumeSnapshot()) && proto.wsman.PvcSnapshotVolumeInfo.toObject(includeInstance, f) + volumeSnapshot: (f = msg.getVolumeSnapshot()) && proto.wsman.VolumeSnapshotInfo.toObject(includeInstance, f) }; if (includeInstance) { @@ -7059,8 +7053,8 @@ proto.wsman.StartWorkspaceSpec.deserializeBinaryFromReader = function(msg, reade msg.setClass(value); break; case 14: - var value = new proto.wsman.PvcSnapshotVolumeInfo; - reader.readMessage(value,proto.wsman.PvcSnapshotVolumeInfo.deserializeBinaryFromReader); + var value = new proto.wsman.VolumeSnapshotInfo; + reader.readMessage(value,proto.wsman.VolumeSnapshotInfo.deserializeBinaryFromReader); msg.setVolumeSnapshot(value); break; default: @@ -7186,7 +7180,7 @@ proto.wsman.StartWorkspaceSpec.serializeBinaryToWriter = function(message, write writer.writeMessage( 14, f, - proto.wsman.PvcSnapshotVolumeInfo.serializeBinaryToWriter + proto.wsman.VolumeSnapshotInfo.serializeBinaryToWriter ); } }; @@ -7525,17 +7519,17 @@ proto.wsman.StartWorkspaceSpec.prototype.setClass = function(value) { /** - * optional PvcSnapshotVolumeInfo volume_snapshot = 14; - * @return {?proto.wsman.PvcSnapshotVolumeInfo} + * optional VolumeSnapshotInfo volume_snapshot = 14; + * @return {?proto.wsman.VolumeSnapshotInfo} */ proto.wsman.StartWorkspaceSpec.prototype.getVolumeSnapshot = function() { - return /** @type{?proto.wsman.PvcSnapshotVolumeInfo} */ ( - jspb.Message.getWrapperField(this, proto.wsman.PvcSnapshotVolumeInfo, 14)); + return /** @type{?proto.wsman.VolumeSnapshotInfo} */ ( + jspb.Message.getWrapperField(this, proto.wsman.VolumeSnapshotInfo, 14)); }; /** - * @param {?proto.wsman.PvcSnapshotVolumeInfo|undefined} value + * @param {?proto.wsman.VolumeSnapshotInfo|undefined} value * @return {!proto.wsman.StartWorkspaceSpec} returns this */ proto.wsman.StartWorkspaceSpec.prototype.setVolumeSnapshot = function(value) { diff --git a/components/ws-manager-bridge/src/bridge.ts b/components/ws-manager-bridge/src/bridge.ts index 2db23e75fb6d84..9436cdc53be7e7 100644 --- a/components/ws-manager-bridge/src/bridge.ts +++ b/components/ws-manager-bridge/src/bridge.ts @@ -356,25 +356,25 @@ export class WorkspaceManagerBridge implements Disposable { // update volume snapshot information if ( - status.conditions.pvcSnapshotVolume && - status.conditions.pvcSnapshotVolume.snapshotVolumeName != "" && + status.conditions.volumeSnapshot && + status.conditions.volumeSnapshot.volumeSnapshotName != "" && writeToDB ) { - if (status.conditions.pvcSnapshotVolume.snapshotVolumeName != instance.id) { + if (status.conditions.volumeSnapshot.volumeSnapshotName != instance.id) { log.error( - "snapshot volume name doesn't match workspace instance id", - status.conditions.pvcSnapshotVolume.snapshotVolumeName, + "volume snapshot name doesn't match workspace instance id", + status.conditions.volumeSnapshot.volumeSnapshotName, instance.id, ); } let existingSnapshot = await this.workspaceDB .trace(ctx) - .findVolumeSnapshotById(status.conditions.pvcSnapshotVolume.snapshotVolumeName); + .findVolumeSnapshotById(status.conditions.volumeSnapshot.volumeSnapshotName); if (existingSnapshot === undefined) { await this.workspaceDB.trace(ctx).storeVolumeSnapshot({ - id: status.conditions.pvcSnapshotVolume.snapshotVolumeName, + id: status.conditions.volumeSnapshot.volumeSnapshotName, creationTime: new Date().toISOString(), - volumeHandle: status.conditions.pvcSnapshotVolume.snapshotVolumeHandle, + volumeHandle: status.conditions.volumeSnapshot.volumeSnapshotHandle, }); } } diff --git a/components/ws-manager/pkg/manager/annotations.go b/components/ws-manager/pkg/manager/annotations.go index 8ecaa28bec42d0..49e4bfc2789ec0 100644 --- a/components/ws-manager/pkg/manager/annotations.go +++ b/components/ws-manager/pkg/manager/annotations.go @@ -66,8 +66,8 @@ const ( // pvcWorkspaceFeatureAnnotation is set on workspaces which are using persistent_volume_claim feature pvcWorkspaceFeatureAnnotation = "gitpod.io/pvcFeature" - // pvcWorkspaceSnapshotVolumeAnnotation stores snapshot volume name when snapshot was created from pvc - pvcWorkspaceSnapshotVolumeAnnotation = "gitpod.io/snapshotVolumeName" + // pvcWorkspaceVolumeSnapshotAnnotation stores volume snapshot name when snapshot was created from pvc + pvcWorkspaceVolumeSnapshotAnnotation = "gitpod.io/volumeSnapshotName" // startedDisposalAnnotation sets to true when finalizeWorkspaceContent is called to prevent finalize from // being called more then once, which can happen due to race between disposalStatusAnnotation update and actOnPodEvent @@ -175,10 +175,10 @@ type workspaceDisposalStatus struct { GitStatus *csapi.GitStatus `json:"gitStatus,omitempty"` } -// workspaceSnapshotVolumeStatus stores the status of snapshot volume -type workspaceSnapshotVolumeStatus struct { - PvcSnapshotVolumeName string `json:"pvcSnapshotVolumeName,omitempty"` - PvcSnapshotVolumeHandle string `json:"pvcSnapshotVolumeHandle,omitempty"` +// workspaceVolumeSnapshotStatus stores the status of volume snapshot +type workspaceVolumeSnapshotStatus struct { + VolumeSnapshotName string `json:"volumeSnapshotName,omitempty"` + VolumeSnapshotHandle string `json:"volumeSnapshotHandle,omitempty"` } func (m *Manager) modifyFinalizer(ctx context.Context, workspaceID string, finalizer string, add bool) error { diff --git a/components/ws-manager/pkg/manager/create.go b/components/ws-manager/pkg/manager/create.go index d5e31f9e99be31..070dc498f52a7d 100644 --- a/components/ws-manager/pkg/manager/create.go +++ b/components/ws-manager/pkg/manager/create.go @@ -259,12 +259,12 @@ func (m *Manager) createPVCForWorkspacePod(startContext *startWorkspaceContext) PVC.Spec.StorageClassName = &PVCConfig.StorageClass } - if startContext.VolumeSnapshot.PvcSnapshotVolumeName != "" { + if startContext.VolumeSnapshot.VolumeSnapshotName != "" { snapshotApiGroup := "snapshot.storage.k8s.io" PVC.Spec.DataSource = &corev1.TypedLocalObjectReference{ APIGroup: &snapshotApiGroup, Kind: "VolumeSnapshot", - Name: startContext.VolumeSnapshot.PvcSnapshotVolumeName, + Name: startContext.VolumeSnapshot.VolumeSnapshotName, } } @@ -907,10 +907,10 @@ func (m *Manager) newStartWorkspaceContext(ctx context.Context, req *api.StartWo workspaceClassLabel: clsName, } - var snapshotVolume workspaceSnapshotVolumeStatus + var volumeSnapshot workspaceVolumeSnapshotStatus if req.Spec.VolumeSnapshot != nil { - snapshotVolume.PvcSnapshotVolumeName = req.Spec.VolumeSnapshot.SnapshotVolumeName - snapshotVolume.PvcSnapshotVolumeHandle = req.Spec.VolumeSnapshot.SnapshotVolumeHandle + volumeSnapshot.VolumeSnapshotName = req.Spec.VolumeSnapshot.VolumeSnapshotName + volumeSnapshot.VolumeSnapshotHandle = req.Spec.VolumeSnapshot.VolumeSnapshotHandle } return &startWorkspaceContext{ @@ -924,7 +924,7 @@ func (m *Manager) newStartWorkspaceContext(ctx context.Context, req *api.StartWo TraceID: traceID, Headless: headless, Class: class, - VolumeSnapshot: snapshotVolume, + VolumeSnapshot: volumeSnapshot, }, nil } diff --git a/components/ws-manager/pkg/manager/manager.go b/components/ws-manager/pkg/manager/manager.go index c029779c2698ce..15fc1f6d17173c 100644 --- a/components/ws-manager/pkg/manager/manager.go +++ b/components/ws-manager/pkg/manager/manager.go @@ -78,7 +78,7 @@ type startWorkspaceContext struct { TraceID string `json:"traceID"` Headless bool `json:"headless"` Class *config.WorkspaceClass `json:"class"` - VolumeSnapshot workspaceSnapshotVolumeStatus `json:"volumeSnapshot"` + VolumeSnapshot workspaceVolumeSnapshotStatus `json:"volumeSnapshot"` } func (swctx *startWorkspaceContext) ContainerConfiguration() config.ContainerConfiguration { diff --git a/components/ws-manager/pkg/manager/monitor.go b/components/ws-manager/pkg/manager/monitor.go index d76532db03eafc..253139fabed7ad 100644 --- a/components/ws-manager/pkg/manager/monitor.go +++ b/components/ws-manager/pkg/manager/monitor.go @@ -865,23 +865,23 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb } var ( - createdSnapshotVolume bool - readySnapshotVolume bool + createdVolumeSnapshot bool + readyVolumeSnapshot bool deletedPVC bool pvcFeatureEnabled bool - markSnapshotVolumeAnnotation bool - pvcSnapshotVolumeName string - pvcSnapshotContentName string - pvcSnapshotClassName string + markVolumeSnapshotAnnotation bool + pvcVolumeSnapshotName string + pvcVolumeSnapshotContentName string + pvcVolumeSnapshotClassName string ) if wso.Pod != nil { _, pvcFeatureEnabled = wso.Pod.Labels[pvcWorkspaceFeatureAnnotation] - pvcSnapshotVolumeName = workspaceID + pvcVolumeSnapshotName = workspaceID wsClassName := "" if _, ok := wso.Pod.Labels[workspaceClassLabel]; ok { wsClassName = wso.Pod.Labels[workspaceClassLabel] } - pvcSnapshotClassName = m.manager.Config.WorkspaceClasses[wsClassName].PVC.SnapshotClass + pvcVolumeSnapshotClassName = m.manager.Config.WorkspaceClasses[wsClassName].PVC.SnapshotClass } doBackup := wso.WasEverReady() && !wso.IsWorkspaceHeadless() @@ -930,11 +930,11 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb if pvcFeatureEnabled { pvcName := wso.Pod.Name - if !createdSnapshotVolume { + if !createdVolumeSnapshot { // create snapshot object out of PVC volumeSnapshot := &volumesnapshotv1.VolumeSnapshot{ ObjectMeta: metav1.ObjectMeta{ - Name: pvcSnapshotVolumeName, + Name: pvcVolumeSnapshotName, Namespace: m.manager.Config.Namespace, Labels: map[string]string{ "workspaceID": workspaceID, @@ -944,7 +944,7 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb Source: volumesnapshotv1.VolumeSnapshotSource{ PersistentVolumeClaimName: &pvcName, }, - VolumeSnapshotClassName: &pvcSnapshotClassName, + VolumeSnapshotClassName: &pvcVolumeSnapshotClassName, }, } @@ -953,9 +953,9 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb err = xerrors.Errorf("cannot create volumesnapshot: %v", err) return true, nil, err } - createdSnapshotVolume = true + createdVolumeSnapshot = true } - if createdSnapshotVolume { + if createdVolumeSnapshot { backoff := wait.Backoff{ Steps: 30, Duration: 100 * time.Millisecond, @@ -965,43 +965,43 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb } err = wait.ExponentialBackoff(backoff, func() (bool, error) { var volumeSnapshot volumesnapshotv1.VolumeSnapshot - err := m.manager.Clientset.Get(ctx, types.NamespacedName{Namespace: m.manager.Config.Namespace, Name: pvcSnapshotVolumeName}, &volumeSnapshot) + err := m.manager.Clientset.Get(ctx, types.NamespacedName{Namespace: m.manager.Config.Namespace, Name: pvcVolumeSnapshotName}, &volumeSnapshot) if err != nil { if k8serr.IsNotFound(err) { // volumesnapshot doesn't exist yet, retry again return false, nil } - log.WithError(err).WithField("VolumeSnapshot.Name", pvcSnapshotVolumeName).Error("was unable to get volume snapshot") + log.WithError(err).WithField("VolumeSnapshot.Name", pvcVolumeSnapshotName).Error("was unable to get volume snapshot") return false, err } if volumeSnapshot.Status != nil { if volumeSnapshot.Status.ReadyToUse != nil && *(volumeSnapshot.Status.ReadyToUse) { - pvcSnapshotContentName = *volumeSnapshot.Status.BoundVolumeSnapshotContentName + pvcVolumeSnapshotContentName = *volumeSnapshot.Status.BoundVolumeSnapshotContentName return true, nil } if volumeSnapshot.Status.Error != nil { if volumeSnapshot.Status.Error.Message != nil { err = xerrors.Errorf("error during volume snapshot creation: %s", *volumeSnapshot.Status.Error.Message) - log.WithError(err).WithField("VolumeSnapshot.Name", pvcSnapshotVolumeName).Error("unable to create volume snapshot") + log.WithError(err).WithField("VolumeSnapshot.Name", pvcVolumeSnapshotName).Error("unable to create volume snapshot") return false, err } - log.WithField("VolumeSnapshot.Name", pvcSnapshotVolumeName).Error("unknown error during volume snapshot creation") + log.WithField("VolumeSnapshot.Name", pvcVolumeSnapshotName).Error("unknown error during volume snapshot creation") return false, xerrors.Errorf("unknown error during volume snapshot creation") } } return false, nil }) if err != nil { - log.WithError(err).WithField("VolumeSnapshot.Name", pvcSnapshotVolumeName).Errorf("failed while waiting for volume snapshot to get ready") + log.WithError(err).WithField("VolumeSnapshot.Name", pvcVolumeSnapshotName).Errorf("failed while waiting for volume snapshot to get ready") return true, nil, err } - readySnapshotVolume = true + readyVolumeSnapshot = true } - if readySnapshotVolume && !markSnapshotVolumeAnnotation { + if readyVolumeSnapshot && !markVolumeSnapshotAnnotation { var volumeSnapshotContent volumesnapshotv1.VolumeSnapshotContent - err := m.manager.Clientset.Get(ctx, types.NamespacedName{Namespace: "", Name: pvcSnapshotContentName}, &volumeSnapshotContent) + err := m.manager.Clientset.Get(ctx, types.NamespacedName{Namespace: "", Name: pvcVolumeSnapshotContentName}, &volumeSnapshotContent) if err != nil { - log.WithError(err).WithField("VolumeSnapshotContent.Name", pvcSnapshotContentName).Error("was unable to get volume snapshot content") + log.WithError(err).WithField("VolumeSnapshotContent.Name", pvcVolumeSnapshotContentName).Error("was unable to get volume snapshot content") return true, nil, err } @@ -1013,22 +1013,22 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb } snapshotHandle := *volumeSnapshotContent.Status.SnapshotHandle - b, err := json.Marshal(workspaceSnapshotVolumeStatus{PvcSnapshotVolumeName: pvcSnapshotVolumeName, PvcSnapshotVolumeHandle: snapshotHandle}) + b, err := json.Marshal(workspaceVolumeSnapshotStatus{VolumeSnapshotName: pvcVolumeSnapshotName, VolumeSnapshotHandle: snapshotHandle}) if err != nil { return true, nil, err } - err = m.manager.markWorkspace(context.Background(), workspaceID, addMark(pvcWorkspaceSnapshotVolumeAnnotation, string(b))) + err = m.manager.markWorkspace(context.Background(), workspaceID, addMark(pvcWorkspaceVolumeSnapshotAnnotation, string(b))) if err != nil { - log.WithError(err).Error("cannot mark workspace with snapshot volume name - snapshot will be orphaned and backup lost") + log.WithError(err).Error("cannot mark workspace with volume snapshot name - snapshot will be orphaned and backup lost") return true, nil, err } - markSnapshotVolumeAnnotation = true + markVolumeSnapshotAnnotation = true } // backup is done and we are ready to kill the pod, mark PVC for deletion - if readySnapshotVolume && !deletedPVC { + if readyVolumeSnapshot && !deletedPVC { // todo: once we add snapshot objects, this will be changed to create snapshot object first pvcErr := m.manager.Clientset.Delete(ctx, &corev1.PersistentVolumeClaim{ diff --git a/components/ws-manager/pkg/manager/status.go b/components/ws-manager/pkg/manager/status.go index a6be6d39b3f671..0f1ae2e3b9088e 100644 --- a/components/ws-manager/pkg/manager/status.go +++ b/components/ws-manager/pkg/manager/status.go @@ -230,11 +230,11 @@ func (m *Manager) getWorkspaceStatus(wso workspaceObjects) (*api.WorkspaceStatus admission = api.AdmissionLevel(av) } - var snapshotVolumeStatus workspaceSnapshotVolumeStatus - if rawSnapshotVolumeStatus, ok := wso.Pod.Annotations[pvcWorkspaceSnapshotVolumeAnnotation]; ok { - err := json.Unmarshal([]byte(rawSnapshotVolumeStatus), &snapshotVolumeStatus) + var volumeSnapshotStatus workspaceVolumeSnapshotStatus + if rawVolumeSnapshotStatus, ok := wso.Pod.Annotations[pvcWorkspaceVolumeSnapshotAnnotation]; ok { + err := json.Unmarshal([]byte(rawVolumeSnapshotStatus), &volumeSnapshotStatus) if err != nil { - return nil, xerrors.Errorf("invalid snapshot volume status: %w", err) + return nil, xerrors.Errorf("invalid volume snapshot status: %w", err) } } @@ -258,9 +258,9 @@ func (m *Manager) getWorkspaceStatus(wso workspaceObjects) (*api.WorkspaceStatus }, Conditions: &api.WorkspaceConditions{ Snapshot: wso.Pod.Annotations[workspaceSnapshotAnnotation], - PvcSnapshotVolume: &api.PvcSnapshotVolumeInfo{ - SnapshotVolumeName: snapshotVolumeStatus.PvcSnapshotVolumeName, - SnapshotVolumeHandle: snapshotVolumeStatus.PvcSnapshotVolumeHandle, + VolumeSnapshot: &api.VolumeSnapshotInfo{ + VolumeSnapshotName: volumeSnapshotStatus.VolumeSnapshotName, + VolumeSnapshotHandle: volumeSnapshotStatus.VolumeSnapshotHandle, }, }, Runtime: &api.WorkspaceRuntimeInfo{ diff --git a/components/ws-manager/pkg/manager/testdata/status_brokenScheduler_UNKNOWN00.golden b/components/ws-manager/pkg/manager/testdata/status_brokenScheduler_UNKNOWN00.golden index 5c9b76a1d01163..661e6546e82676 100644 --- a/components/ws-manager/pkg/manager/testdata/status_brokenScheduler_UNKNOWN00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_brokenScheduler_UNKNOWN00.golden @@ -16,7 +16,7 @@ }, "conditions": { "failed": "MatchNodeSelector: Pod Predicate MatchNodeSelector failed", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gitpod-dev-default-pool-b25aa276-3tl2", @@ -24,4 +24,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_cannotPull_004_CREATING00.golden b/components/ws-manager/pkg/manager/testdata/status_cannotPull_004_CREATING00.golden index 09a28fcba94318..c262bd3ed28c26 100644 --- a/components/ws-manager/pkg/manager/testdata/status_cannotPull_004_CREATING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_cannotPull_004_CREATING00.golden @@ -27,7 +27,7 @@ "phase": 2, "conditions": { "failed": "cannot pull image: rpc error: code = FailedPrecondition desc = failed to pull and unpack image \"reg.gitpod.io:31001/remote/5031df46-db5e-43ae-91bd-1448305c001d:latest\": failed commit on ref \"layer-sha256:6633ce2524dfae110cac2159a4f8490d198612d12abc1420486c52fbcf30b8b1\": \"layer-sha256:6633ce2524dfae110cac2159a4f8490d198612d12abc1420486c52fbcf30b8b1\" failed size validation: 33554502 != 64598931: failed precondition", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gp-prod-ws-us14-us-workspace-pool-61eed5be-kq0k", @@ -38,4 +38,4 @@ "owner_token": "4BYvs6dfa-yXpTWZEPzeNsS2Ge.0QMdE" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_cannotPull_005_STOPPED00.golden b/components/ws-manager/pkg/manager/testdata/status_cannotPull_005_STOPPED00.golden index 50675a1282543b..5fdeb6f7c37af3 100644 --- a/components/ws-manager/pkg/manager/testdata/status_cannotPull_005_STOPPED00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_cannotPull_005_STOPPED00.golden @@ -27,7 +27,7 @@ "phase": 6, "conditions": { "failed": "cannot pull image: Back-off pulling image \"reg.gitpod.io:31001/remote/5031df46-db5e-43ae-91bd-1448305c001d\"", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gp-prod-ws-us14-us-workspace-pool-61eed5be-kq0k", @@ -38,4 +38,4 @@ "owner_token": "4BYvs6dfa-yXpTWZEPzeNsS2Ge.0QMdE" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.golden index 06ed05ffcfd574..96583cc445d3c2 100644 --- a/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.golden @@ -21,7 +21,7 @@ "phase": 6, "conditions": { "final_backup_complete": 1, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "repo": { "branch": "master", @@ -36,4 +36,4 @@ "owner_token": "{pKaZ75.$$hIiW2z2!-h#HcmldG#U?Dl" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_contentInitFailed_005_STOPPED00.golden b/components/ws-manager/pkg/manager/testdata/status_contentInitFailed_005_STOPPED00.golden index c52eecb7275188..dfc21f28e61d64 100644 --- a/components/ws-manager/pkg/manager/testdata/status_contentInitFailed_005_STOPPED00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_contentInitFailed_005_STOPPED00.golden @@ -22,7 +22,7 @@ "phase": 6, "conditions": { "failed": "cannot initialize workspace: cannot initialize workspace: content initializer failed", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gp-prod-ws-us15-us--headless-pool-64a87cf8-bw7v", @@ -33,4 +33,4 @@ "owner_token": "jRA_Te5snD4sq5C2Bfh-OeZ6BCh4YA4X" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.golden b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.golden index 836b3447d26449..aad17de163c639 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.golden +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.golden @@ -22,7 +22,7 @@ "conditions": { "failed": "last backup failed: testing the backup failure mode.", "final_backup_complete": 1, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-dev-workload-1-49d27f81-n6zr", @@ -33,4 +33,4 @@ "owner_token": "XB|7vczG;Z.A^#ea[1=YDXU_Y,Q%UlOl" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.golden b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.golden index d92ccd931f9a20..b2a88951e8d694 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.golden +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.golden @@ -21,7 +21,7 @@ "phase": 6, "conditions": { "final_backup_complete": 1, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "repo": { "branch": "master", @@ -40,4 +40,4 @@ "owner_token": "k#C;]\u003ek8GvN=[3X2_}hVY$Z\u0026E-VV)Dux" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.golden b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.golden index 77517f8b88d4ee..da60b49688f726 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.golden +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.golden @@ -33,7 +33,7 @@ "phase": 6, "conditions": { "final_backup_complete": 1, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "repo": { "branch": "master", @@ -52,4 +52,4 @@ "owner_token": "k#C;]\u003ek8GvN=[3X2_}hVY$Z\u0026E-VV)Dux" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.golden b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.golden index f4082d2162c75c..aa068de18b8083 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.golden +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.golden @@ -32,7 +32,7 @@ }, "phase": 5, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-dev-workload-1-49d27f81-n6zr", @@ -43,4 +43,4 @@ "owner_token": "XB|7vczG;Z.A^#ea[1=YDXU_Y,Q%UlOl" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.golden b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.golden index 244ccc39a92df4..d4c83c4131df60 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.golden +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.golden @@ -21,7 +21,7 @@ "phase": 6, "conditions": { "final_backup_complete": 1, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "repo": { "branch": "master", @@ -36,4 +36,4 @@ "owner_token": "XB|7vczG;Z.A^#ea[1=YDXU_Y,Q%UlOl" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_errimgpull.golden b/components/ws-manager/pkg/manager/testdata/status_errimgpull.golden index c584ddf91740fc..a921368ef2d69a 100644 --- a/components/ws-manager/pkg/manager/testdata/status_errimgpull.golden +++ b/components/ws-manager/pkg/manager/testdata/status_errimgpull.golden @@ -17,7 +17,7 @@ "phase": 2, "conditions": { "failed": "cannot pull image: rpc error: code = Unknown desc = Error response from daemon: Get https://registry.staging-cw-minio-core.svc.cluster.local/v1/_ping: dial tcp: lookup registry.staging-cw-minio-core.svc.cluster.local: no such host", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gitpod-dev-worker-pool-2-184c607e-wl2d", @@ -26,4 +26,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_errimgpull_CREATING01.golden b/components/ws-manager/pkg/manager/testdata/status_errimgpull_CREATING01.golden index 1c4c0e8babe9c1..d7aeda1baf9e34 100644 --- a/components/ws-manager/pkg/manager/testdata/status_errimgpull_CREATING01.golden +++ b/components/ws-manager/pkg/manager/testdata/status_errimgpull_CREATING01.golden @@ -21,7 +21,7 @@ "phase": 6, "conditions": { "failed": "cannot pull image: Back-off pulling image \"reg.gitpod.io:227/i/79be1e8b-a6de-4572-8627-99ef12303a88:latest\"", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gitpod-dev-worker-pool-1-f039fa9e-2jrb", @@ -30,4 +30,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_failedBeforeStopping_explicitFail.golden b/components/ws-manager/pkg/manager/testdata/status_failedBeforeStopping_explicitFail.golden index 7c7557164288a5..042d7e44a1f8b7 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedBeforeStopping_explicitFail.golden +++ b/components/ws-manager/pkg/manager/testdata/status_failedBeforeStopping_explicitFail.golden @@ -17,7 +17,7 @@ "phase": 6, "conditions": { "failed": "cannot init workspace content: rpc error: code = Internal desc = cannot initialize workspace", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gitpod-dev-worker-pool-2-184c607e-fltt", @@ -26,4 +26,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_failedLogs_RUNNING00.golden b/components/ws-manager/pkg/manager/testdata/status_failedLogs_RUNNING00.golden index 7a049186e341b2..994336dd010aa6 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedLogs_RUNNING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_failedLogs_RUNNING00.golden @@ -28,7 +28,7 @@ "phase": 4, "conditions": { "failed": "IDE failed to start: fork/exec /theia/node_modules/@gitpod/gitpod-ide/startup.sh: no such file or directory", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-dev-workload-7fd27879-kn1v", @@ -39,4 +39,4 @@ "owner_token": "l\u003cM3U,%$Fe3/Y/515B;/*D:1HhQAaq0c" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN01.golden b/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN01.golden index dfccfdda6856ee..7dd3d57d3fc560 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN01.golden +++ b/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN01.golden @@ -17,7 +17,7 @@ }, "conditions": { "failed": "Evicted: Pod The node was low on resource: [DiskPressure]. ", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-production--gitp-workspace-pool-2-a3afc0b4-nmbw", @@ -25,4 +25,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN02.golden b/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN02.golden index 1afaa6d7c45ae0..c92dd27b74155e 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN02.golden +++ b/components/ws-manager/pkg/manager/testdata/status_failedPending_evicted_UNKNOWN02.golden @@ -18,7 +18,7 @@ "phase": 6, "conditions": { "failed": "Evicted: Pod The node was low on resource: [DiskPressure]. ", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-production--gitp-workspace-pool-2-a3afc0b4-nmbw", @@ -26,4 +26,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_failedWorkspaceMount_PENDING00.golden b/components/ws-manager/pkg/manager/testdata/status_failedWorkspaceMount_PENDING00.golden index 3571bc91371a28..5e4a6756d4826b 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedWorkspaceMount_PENDING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_failedWorkspaceMount_PENDING00.golden @@ -17,7 +17,7 @@ "phase": 1, "conditions": { "failed": "cannot mount workspace", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "pod is pending", "runtime": { @@ -26,4 +26,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_firstUserActivity_RUNNING.golden b/components/ws-manager/pkg/manager/testdata/status_firstUserActivity_RUNNING.golden index 90ade6810fcacb..d6ece6c28bd9d5 100644 --- a/components/ws-manager/pkg/manager/testdata/status_firstUserActivity_RUNNING.golden +++ b/components/ws-manager/pkg/manager/testdata/status_firstUserActivity_RUNNING.golden @@ -68,7 +68,7 @@ "seconds": 1582886676, "nanos": 995133911 }, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-staging--gitpod--workspace-pool-2-331a2b32-mgbq", @@ -77,4 +77,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_headlessTaskFailed_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_headlessTaskFailed_STOPPING00.golden index b8fd71ccd025c1..5ad4c29872f554 100644 --- a/components/ws-manager/pkg/manager/testdata/status_headlessTaskFailed_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_headlessTaskFailed_STOPPING00.golden @@ -22,7 +22,7 @@ "phase": 5, "conditions": { "headless_task_failed": "headless task failed", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "headless workspace is stopping", "runtime": { @@ -34,4 +34,4 @@ "owner_token": "E8-X0p-tciJQOuPB4DLCyvAXN-6_PM3n" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_headless_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_headless_STOPPING00.golden index bfbc43d5626a31..d6343c13ba03ef 100644 --- a/components/ws-manager/pkg/manager/testdata/status_headless_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_headless_STOPPING00.golden @@ -26,7 +26,7 @@ }, "phase": 5, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "headless workspace is stopping", "runtime": { @@ -38,4 +38,4 @@ "owner_token": "osZStmqg3TI0NrkLe3edax9bYCknXWtr" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_ideFailedToStart_005_RUNNING00.golden b/components/ws-manager/pkg/manager/testdata/status_ideFailedToStart_005_RUNNING00.golden index 8f551684cea6cf..82b3f0f904ba47 100644 --- a/components/ws-manager/pkg/manager/testdata/status_ideFailedToStart_005_RUNNING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_ideFailedToStart_005_RUNNING00.golden @@ -21,7 +21,7 @@ "phase": 4, "conditions": { "failed": "IDE failed to start: exit status 127", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gp-prod-ws-eu14-eu-workspace-pool-b6e0759a-3lb1", @@ -32,4 +32,4 @@ "owner_token": "-Jlxl8PUpKylHGFNjZaYXSmhg8qlFbck" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_imagespec_RUNNING00.golden b/components/ws-manager/pkg/manager/testdata/status_imagespec_RUNNING00.golden index 294b87d43c44a6..457744f56be90f 100644 --- a/components/ws-manager/pkg/manager/testdata/status_imagespec_RUNNING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_imagespec_RUNNING00.golden @@ -30,7 +30,7 @@ "seconds": 1583767886, "nanos": 855961185 }, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gitpod-dev-worker-pool-1-3df476cf-qxwr", @@ -39,4 +39,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_interrupted.golden b/components/ws-manager/pkg/manager/testdata/status_interrupted.golden index 885d960c8505ba..eaff3ddf0a75aa 100644 --- a/components/ws-manager/pkg/manager/testdata/status_interrupted.golden +++ b/components/ws-manager/pkg/manager/testdata/status_interrupted.golden @@ -24,7 +24,7 @@ }, "phase": 7, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "container workspace was terminated unexpectedly - workspace should recover", "runtime": { @@ -34,4 +34,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_interrupted_CREATING00.golden b/components/ws-manager/pkg/manager/testdata/status_interrupted_CREATING00.golden index 3fd307eed3adc0..f2a533a4e2cd5f 100644 --- a/components/ws-manager/pkg/manager/testdata/status_interrupted_CREATING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_interrupted_CREATING00.golden @@ -16,7 +16,7 @@ }, "phase": 7, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "container workspace was terminated unexpectedly - workspace is recovering", "runtime": { @@ -26,4 +26,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_1_event_only.golden b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_1_event_only.golden index 8ab90647c8c497..56fc3d28caa50f 100644 --- a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_1_event_only.golden +++ b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_1_event_only.golden @@ -23,7 +23,7 @@ }, "phase": 4, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-production--gitp-workspace-pool-1-ee6c94af-h6lj", @@ -32,4 +32,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_2_event_and_exitcode.golden b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_2_event_and_exitcode.golden index 03d4e80a570cf7..aa51fba6b19d81 100644 --- a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_2_event_and_exitcode.golden +++ b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_2_event_and_exitcode.golden @@ -24,7 +24,7 @@ "phase": 7, "conditions": { "network_not_ready": 1, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "container network not ready - workspace should recover shortly", "runtime": { @@ -34,4 +34,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_3_recovered_CONSTRUCTED.golden b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_3_recovered_CONSTRUCTED.golden index de592b2ade1e32..7f0f5ff070447b 100644 --- a/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_3_recovered_CONSTRUCTED.golden +++ b/components/ws-manager/pkg/manager/testdata/status_interrupted_networkNotReady_3_recovered_CONSTRUCTED.golden @@ -23,7 +23,7 @@ }, "phase": 4, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-production--gitp-workspace-pool-1-c73d13c7-fzbk", @@ -32,4 +32,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_metadata.golden b/components/ws-manager/pkg/manager/testdata/status_metadata.golden index 761ecacdb3dfbf..046006eb6f0803 100644 --- a/components/ws-manager/pkg/manager/testdata/status_metadata.golden +++ b/components/ws-manager/pkg/manager/testdata/status_metadata.golden @@ -24,7 +24,7 @@ }, "phase": 4, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "minikube", @@ -33,4 +33,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_ownerToken.golden b/components/ws-manager/pkg/manager/testdata/status_ownerToken.golden index 603831a1f8fcba..264c11982e568c 100644 --- a/components/ws-manager/pkg/manager/testdata/status_ownerToken.golden +++ b/components/ws-manager/pkg/manager/testdata/status_ownerToken.golden @@ -67,7 +67,7 @@ "seconds": 1582886676, "nanos": 995133911 }, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-staging--gitpod--workspace-pool-2-331a2b32-mgbq", @@ -79,4 +79,4 @@ "owner_token": "hello world" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden index f41ec865ce5167..4423bc2b416c38 100644 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden @@ -84,7 +84,7 @@ "conditions": { "snapshot": "workspaces/gray-lemming-0wlyvzy5/snapshot-1622467387276004249.tar@gitpod-user-a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", "final_backup_complete": 1, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-dev-workload-1-49d27f81-3xfh", @@ -95,4 +95,4 @@ "owner_token": "y5-JYhqDzGGprABkr36-fTas8PCeA4sZ" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden index 6ccb228ceff240..03f4590c8862c1 100644 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden @@ -82,7 +82,7 @@ }, "phase": 5, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "headless workspace is stopping", "runtime": { @@ -94,4 +94,4 @@ "owner_token": "y5-JYhqDzGGprABkr36-fTas8PCeA4sZ" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden index 36911701e1f318..234e8fd535703a 100644 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden @@ -83,7 +83,7 @@ "phase": 2, "conditions": { "pulling_images": 1, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "containers are being created", "runtime": { @@ -95,4 +95,4 @@ "owner_token": "FZ2k9zbSCo9e85Y21yh.SHLJbya7pW2Y" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden index 48582e0790e650..3b4de13d4fb449 100644 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden @@ -84,7 +84,7 @@ "conditions": { "snapshot": "workspaces/green-wombat-62dzneud/snapshot-1622206186881521445.tar@gitpod-user-d98c5b92-2066-4fce-bea6-1e08b58642ab", "final_backup_complete": 1, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-dev-workload-1-49d27f81-pd35", @@ -95,4 +95,4 @@ "owner_token": "FZ2k9zbSCo9e85Y21yh.SHLJbya7pW2Y" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden index 5c2af394c7329b..7a4f19af9ef921 100644 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden @@ -82,7 +82,7 @@ }, "phase": 5, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "headless workspace is stopping", "runtime": { @@ -94,4 +94,4 @@ "owner_token": "FZ2k9zbSCo9e85Y21yh.SHLJbya7pW2Y" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_regularStart_Initializing00.golden b/components/ws-manager/pkg/manager/testdata/status_regularStart_Initializing00.golden index a17b5bafc359a1..0bcb5ae254237c 100644 --- a/components/ws-manager/pkg/manager/testdata/status_regularStart_Initializing00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_regularStart_Initializing00.golden @@ -16,7 +16,7 @@ }, "phase": 3, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "workspace initializer is running", "runtime": { @@ -26,4 +26,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_stoppedByRequest_000_RUNNING00.golden b/components/ws-manager/pkg/manager/testdata/status_stoppedByRequest_000_RUNNING00.golden index 863c9c9e60252e..a35c11db86704b 100644 --- a/components/ws-manager/pkg/manager/testdata/status_stoppedByRequest_000_RUNNING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_stoppedByRequest_000_RUNNING00.golden @@ -39,7 +39,7 @@ "nanos": 983492544 }, "stopped_by_request": 1, - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-core-dev-workspace-3-a69c4dd8-jqzs", @@ -50,4 +50,4 @@ "owner_token": "Tx5RtJ5f4LWUWvrGJ_-.AJmcTd5MB_8e" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_stuckInCreating_CREATING00.golden b/components/ws-manager/pkg/manager/testdata/status_stuckInCreating_CREATING00.golden index 859389298398c4..e476ec2d591232 100644 --- a/components/ws-manager/pkg/manager/testdata/status_stuckInCreating_CREATING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_stuckInCreating_CREATING00.golden @@ -18,7 +18,7 @@ "phase": 4, "conditions": { "timeout": "workspace timed out after I've meddled with this test data set", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-production--gitp-workspace-pool-2-a3afc0b4-tmz8", @@ -27,4 +27,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_RUNNING00.golden b/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_RUNNING00.golden index 421b2ab7789fc4..0d939f1f8a8227 100644 --- a/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_RUNNING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_RUNNING00.golden @@ -31,7 +31,7 @@ "phase": 4, "conditions": { "failed": "container workspace ran with an error: exit code 1", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gp-prod-ws-us14-us-workspace-pool-67d93ed3-l67s", @@ -42,4 +42,4 @@ "owner_token": "T.DhLiYyx1ZfeOgyf5zYE4MYLnCMBJ8p" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_STOPPING00.golden index 2776fa4abb8447..f7355b0385d092 100644 --- a/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_STOPPING00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_stuckInStopping_STOPPING00.golden @@ -20,7 +20,7 @@ }, "phase": 6, "conditions": { - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "runtime": { "node_name": "gke-gp-prod-ws-us14-us-workspace-pool-67d93ed3-l67s", @@ -31,4 +31,4 @@ "owner_token": "T.DhLiYyx1ZfeOgyf5zYE4MYLnCMBJ8p" } } -} \ No newline at end of file +} diff --git a/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden b/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden index 9f736bd0f40828..82bd8e2990845e 100644 --- a/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden @@ -17,7 +17,7 @@ "phase": 3, "conditions": { "failed": "container sync completed; containers of a workspace pod are not supposed to do that", - "pvc_snapshot_volume": {} + "volume_snapshot": {} }, "message": "workspace initializer is running", "runtime": { @@ -27,4 +27,4 @@ }, "auth": {} } -} \ No newline at end of file +} diff --git a/install/installer/pkg/config/v1/config.go b/install/installer/pkg/config/v1/config.go index 20c35b0850d8c9..719aec2c5ac5d9 100644 --- a/install/installer/pkg/config/v1/config.go +++ b/install/installer/pkg/config/v1/config.go @@ -254,7 +254,7 @@ type PersistentVolumeClaim struct { // StorageClass is a storage class of persistent volume claim to use StorageClass string `json:"storageClass"` - // SnapshotClass is a snapshot class name that is used to create snapshot volume + // SnapshotClass is a snapshot class name that is used to create volume snapshot SnapshotClass string `json:"snapshotClass"` } diff --git a/install/installer/pkg/config/v1/experimental/experimental.go b/install/installer/pkg/config/v1/experimental/experimental.go index 215bbb81a383f7..e22be57cee885a 100644 --- a/install/installer/pkg/config/v1/experimental/experimental.go +++ b/install/installer/pkg/config/v1/experimental/experimental.go @@ -74,7 +74,7 @@ type PersistentVolumeClaim struct { // StorageClass is a storage class of persistent volume claim to use StorageClass string `json:"storageClass"` - // SnapshotClass is a snapshot class name that is used to create snapshot volume + // SnapshotClass is a snapshot class name that is used to create volume snapshot SnapshotClass string `json:"snapshotClass"` } From 67407b0acb03a075cffcc2819069891e4b1b8198 Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Wed, 18 May 2022 22:17:50 +0000 Subject: [PATCH 8/8] address PR feedback --- .../pkg/internal/session/workspace.go | 4 +- components/ws-manager/cmd/run.go | 2 +- components/ws-manager/go.mod | 3 +- components/ws-manager/go.sum | 7 +- components/ws-manager/pkg/manager/create.go | 13 ++-- components/ws-manager/pkg/manager/manager.go | 22 +++---- components/ws-manager/pkg/manager/monitor.go | 66 +++++++++---------- 7 files changed, 58 insertions(+), 59 deletions(-) diff --git a/components/ws-daemon/pkg/internal/session/workspace.go b/components/ws-daemon/pkg/internal/session/workspace.go index 68ca0446b28eb2..21091178eda70b 100644 --- a/components/ws-daemon/pkg/internal/session/workspace.go +++ b/components/ws-daemon/pkg/internal/session/workspace.go @@ -280,9 +280,9 @@ func (s *Workspace) UpdateGitSafeDirectory(ctx context.Context) (err error) { } // UpdateGitStatus attempts to update the LastGitStatus from the workspace's local working copy. -func (s *Workspace) UpdateGitStatus(ctx context.Context, persistent_volume_claim bool) (res *csapi.GitStatus, err error) { +func (s *Workspace) UpdateGitStatus(ctx context.Context, persistentVolumeClaim bool) (res *csapi.GitStatus, err error) { var loc string - if persistent_volume_claim { + if persistentVolumeClaim { loc = filepath.Join(s.ServiceLocDaemon, "prestophookdata") stat, err := git.GitStatusFromFiles(ctx, loc) if err != nil { diff --git a/components/ws-manager/cmd/run.go b/components/ws-manager/cmd/run.go index 285a214b93e819..74ec208b730db2 100644 --- a/components/ws-manager/cmd/run.go +++ b/components/ws-manager/cmd/run.go @@ -32,7 +32,7 @@ import ( imgbldr "github.com/gitpod-io/gitpod/image-builder/api" "github.com/gitpod-io/gitpod/ws-manager/pkg/manager" "github.com/gitpod-io/gitpod/ws-manager/pkg/proxy" - volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1" + volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" ) // serveCmd represents the serve command diff --git a/components/ws-manager/go.mod b/components/ws-manager/go.mod index ac06a70b605f47..b3591692b68b94 100644 --- a/components/ws-manager/go.mod +++ b/components/ws-manager/go.mod @@ -20,6 +20,7 @@ require ( github.com/google/uuid v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/imdario/mergo v0.3.12 + github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 github.com/opentracing/opentracing-go v1.2.0 github.com/prometheus/client_golang v1.12.1 github.com/sirupsen/logrus v1.8.1 @@ -74,8 +75,6 @@ require ( github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid v1.3.1 // indirect - github.com/klauspost/pgzip v1.2.5 // indirect - github.com/kubernetes-csi/external-snapshotter/client/v6 v6.0.0-rc4 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/minio/md5-simd v1.1.0 // indirect github.com/minio/minio-go/v7 v7.0.11 // indirect diff --git a/components/ws-manager/go.sum b/components/ws-manager/go.sum index 51ba60df631e1f..0fd940019a81f1 100644 --- a/components/ws-manager/go.sum +++ b/components/ws-manager/go.sum @@ -408,10 +408,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= -github.com/kubernetes-csi/external-snapshotter/client/v6 v6.0.0-rc4 h1:uspy64y8fTrwchSk4dKx/CAndt0y2V70BFM2C9/jTIE= -github.com/kubernetes-csi/external-snapshotter/client/v6 v6.0.0-rc4/go.mod h1:tnHiLn3P10N95fjn7O40QH5ovN0EFGAxqdTpUMrX6bU= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 h1:nHHjmvjitIiyPlUHk/ofpgvBcNcawJLtf4PYHORLjAA= +github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0/go.mod h1:YBCo4DoEeDndqvAn6eeu0vWM7QdXmHEeI9cFWplmBys= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= @@ -858,6 +856,7 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220411224347-583f2d630306 h1:+gHMid33q6pen7kv9xvT+JRinntgeXO2AeZVd0AWD3w= diff --git a/components/ws-manager/pkg/manager/create.go b/components/ws-manager/pkg/manager/create.go index 070dc498f52a7d..a36f6dfce40cb5 100644 --- a/components/ws-manager/pkg/manager/create.go +++ b/components/ws-manager/pkg/manager/create.go @@ -33,6 +33,7 @@ import ( regapi "github.com/gitpod-io/gitpod/registry-facade/api" "github.com/gitpod-io/gitpod/ws-manager/api" config "github.com/gitpod-io/gitpod/ws-manager/api/config" + volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" ) // Protobuf structures often require pointer to boolean values (as that's Go's best means of expression optionallity). @@ -259,8 +260,8 @@ func (m *Manager) createPVCForWorkspacePod(startContext *startWorkspaceContext) PVC.Spec.StorageClassName = &PVCConfig.StorageClass } - if startContext.VolumeSnapshot.VolumeSnapshotName != "" { - snapshotApiGroup := "snapshot.storage.k8s.io" + if startContext.VolumeSnapshot != nil && startContext.VolumeSnapshot.VolumeSnapshotName != "" { + snapshotApiGroup := volumesnapshotv1.GroupName PVC.Spec.DataSource = &corev1.TypedLocalObjectReference{ APIGroup: &snapshotApiGroup, Kind: "VolumeSnapshot", @@ -907,10 +908,12 @@ func (m *Manager) newStartWorkspaceContext(ctx context.Context, req *api.StartWo workspaceClassLabel: clsName, } - var volumeSnapshot workspaceVolumeSnapshotStatus + var volumeSnapshot *workspaceVolumeSnapshotStatus if req.Spec.VolumeSnapshot != nil { - volumeSnapshot.VolumeSnapshotName = req.Spec.VolumeSnapshot.VolumeSnapshotName - volumeSnapshot.VolumeSnapshotHandle = req.Spec.VolumeSnapshot.VolumeSnapshotHandle + volumeSnapshot = &workspaceVolumeSnapshotStatus{ + VolumeSnapshotName: req.Spec.VolumeSnapshot.VolumeSnapshotName, + VolumeSnapshotHandle: req.Spec.VolumeSnapshot.VolumeSnapshotHandle, + } } return &startWorkspaceContext{ diff --git a/components/ws-manager/pkg/manager/manager.go b/components/ws-manager/pkg/manager/manager.go index 15fc1f6d17173c..d6b5ef70581896 100644 --- a/components/ws-manager/pkg/manager/manager.go +++ b/components/ws-manager/pkg/manager/manager.go @@ -68,17 +68,17 @@ type Manager struct { } type startWorkspaceContext struct { - Request *api.StartWorkspaceRequest `json:"request"` - Labels map[string]string `json:"labels"` - CLIAPIKey string `json:"cliApiKey"` - OwnerToken string `json:"ownerToken"` - IDEPort int32 `json:"idePort"` - SupervisorPort int32 `json:"supervisorPort"` - WorkspaceURL string `json:"workspaceURL"` - TraceID string `json:"traceID"` - Headless bool `json:"headless"` - Class *config.WorkspaceClass `json:"class"` - VolumeSnapshot workspaceVolumeSnapshotStatus `json:"volumeSnapshot"` + Request *api.StartWorkspaceRequest `json:"request"` + Labels map[string]string `json:"labels"` + CLIAPIKey string `json:"cliApiKey"` + OwnerToken string `json:"ownerToken"` + IDEPort int32 `json:"idePort"` + SupervisorPort int32 `json:"supervisorPort"` + WorkspaceURL string `json:"workspaceURL"` + TraceID string `json:"traceID"` + Headless bool `json:"headless"` + Class *config.WorkspaceClass `json:"class"` + VolumeSnapshot *workspaceVolumeSnapshotStatus `json:"volumeSnapshot"` } func (swctx *startWorkspaceContext) ContainerConfiguration() config.ContainerConfiguration { diff --git a/components/ws-manager/pkg/manager/monitor.go b/components/ws-manager/pkg/manager/monitor.go index 253139fabed7ad..054963508b8a51 100644 --- a/components/ws-manager/pkg/manager/monitor.go +++ b/components/ws-manager/pkg/manager/monitor.go @@ -39,7 +39,7 @@ import ( "github.com/gitpod-io/gitpod/ws-manager/api" "github.com/gitpod-io/gitpod/ws-manager/pkg/manager/internal/workpool" - volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1" + volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" ) const ( @@ -870,13 +870,13 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb deletedPVC bool pvcFeatureEnabled bool markVolumeSnapshotAnnotation bool - pvcVolumeSnapshotName string + // volume snapshot name is 1:1 mapped to workspace id + pvcVolumeSnapshotName string = workspaceID pvcVolumeSnapshotContentName string pvcVolumeSnapshotClassName string ) if wso.Pod != nil { _, pvcFeatureEnabled = wso.Pod.Labels[pvcWorkspaceFeatureAnnotation] - pvcVolumeSnapshotName = workspaceID wsClassName := "" if _, ok := wso.Pod.Labels[workspaceClassLabel]; ok { wsClassName = wso.Pod.Labels[workspaceClassLabel] @@ -929,6 +929,7 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb } if pvcFeatureEnabled { + // pvc was created with the name of the pod. see createDefiniteWorkspacePod() pvcName := wso.Pod.Name if !createdVolumeSnapshot { // create snapshot object out of PVC @@ -936,9 +937,6 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb ObjectMeta: metav1.ObjectMeta{ Name: pvcVolumeSnapshotName, Namespace: m.manager.Config.Namespace, - Labels: map[string]string{ - "workspaceID": workspaceID, - }, }, Spec: volumesnapshotv1.VolumeSnapshotSpec{ Source: volumesnapshotv1.VolumeSnapshotSource{ @@ -949,7 +947,7 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb } err = m.manager.Clientset.Create(ctx, volumeSnapshot) - if err != nil { + if err != nil && !k8serr.IsAlreadyExists(err) { err = xerrors.Errorf("cannot create volumesnapshot: %v", err) return true, nil, err } @@ -963,6 +961,7 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb Jitter: 0.1, Cap: 10 * time.Minute, } + log = log.WithField("VolumeSnapshot.Name", pvcVolumeSnapshotName) err = wait.ExponentialBackoff(backoff, func() (bool, error) { var volumeSnapshot volumesnapshotv1.VolumeSnapshot err := m.manager.Clientset.Get(ctx, types.NamespacedName{Namespace: m.manager.Config.Namespace, Name: pvcVolumeSnapshotName}, &volumeSnapshot) @@ -971,37 +970,38 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb // volumesnapshot doesn't exist yet, retry again return false, nil } - log.WithError(err).WithField("VolumeSnapshot.Name", pvcVolumeSnapshotName).Error("was unable to get volume snapshot") + log.WithError(err).Error("was unable to get volume snapshot") return false, err } if volumeSnapshot.Status != nil { - if volumeSnapshot.Status.ReadyToUse != nil && *(volumeSnapshot.Status.ReadyToUse) { + if volumeSnapshot.Status.ReadyToUse != nil && *(volumeSnapshot.Status.ReadyToUse) && volumeSnapshot.Status.BoundVolumeSnapshotContentName != nil { pvcVolumeSnapshotContentName = *volumeSnapshot.Status.BoundVolumeSnapshotContentName return true, nil } if volumeSnapshot.Status.Error != nil { if volumeSnapshot.Status.Error.Message != nil { err = xerrors.Errorf("error during volume snapshot creation: %s", *volumeSnapshot.Status.Error.Message) - log.WithError(err).WithField("VolumeSnapshot.Name", pvcVolumeSnapshotName).Error("unable to create volume snapshot") + log.WithError(err).Error("unable to create volume snapshot") return false, err } - log.WithField("VolumeSnapshot.Name", pvcVolumeSnapshotName).Error("unknown error during volume snapshot creation") + log.Error("unknown error during volume snapshot creation") return false, xerrors.Errorf("unknown error during volume snapshot creation") } } return false, nil }) if err != nil { - log.WithError(err).WithField("VolumeSnapshot.Name", pvcVolumeSnapshotName).Errorf("failed while waiting for volume snapshot to get ready") + log.WithError(err).Errorf("failed while waiting for volume snapshot to get ready") return true, nil, err } readyVolumeSnapshot = true } if readyVolumeSnapshot && !markVolumeSnapshotAnnotation { + log = log.WithField("VolumeSnapshotContent.Name", pvcVolumeSnapshotContentName) var volumeSnapshotContent volumesnapshotv1.VolumeSnapshotContent err := m.manager.Clientset.Get(ctx, types.NamespacedName{Namespace: "", Name: pvcVolumeSnapshotContentName}, &volumeSnapshotContent) if err != nil { - log.WithError(err).WithField("VolumeSnapshotContent.Name", pvcVolumeSnapshotContentName).Error("was unable to get volume snapshot content") + log.WithError(err).Error("was unable to get volume snapshot content") return true, nil, err } @@ -1038,38 +1038,36 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb }, }, ) - if pvcErr != nil { + if pvcErr != nil && !k8serr.IsNotFound(pvcErr) { log.WithError(pvcErr).Errorf("failed to delete pvc `%s`", pvcName) } deletedPVC = true } - } else { - if doSnapshot { - // if this is a prebuild take a snapshot and mark the workspace - var res *wsdaemon.TakeSnapshotResponse - res, err = snc.TakeSnapshot(ctx, &wsdaemon.TakeSnapshotRequest{Id: workspaceID}) + } else if doSnapshot { + // if this is a prebuild take a snapshot and mark the workspace + var res *wsdaemon.TakeSnapshotResponse + res, err = snc.TakeSnapshot(ctx, &wsdaemon.TakeSnapshotRequest{Id: workspaceID}) + if err != nil { + tracing.LogError(span, err) + log.WithError(err).Warn("cannot take snapshot") + err = xerrors.Errorf("cannot take snapshot: %v", err) + err = m.manager.markWorkspace(ctx, workspaceID, addMark(workspaceExplicitFailAnnotation, err.Error())) + if err != nil { + log.WithError(err).Warn("was unable to mark workspace as failed") + } + } + + if res != nil { + err = m.manager.markWorkspace(context.Background(), workspaceID, addMark(workspaceSnapshotAnnotation, res.Url)) if err != nil { tracing.LogError(span, err) - log.WithError(err).Warn("cannot take snapshot") - err = xerrors.Errorf("cannot take snapshot: %v", err) + log.WithError(err).Warn("cannot mark headless workspace with snapshot - that's one prebuild lost") + err = xerrors.Errorf("cannot remember snapshot: %v", err) err = m.manager.markWorkspace(ctx, workspaceID, addMark(workspaceExplicitFailAnnotation, err.Error())) if err != nil { log.WithError(err).Warn("was unable to mark workspace as failed") } } - - if res != nil { - err = m.manager.markWorkspace(context.Background(), workspaceID, addMark(workspaceSnapshotAnnotation, res.Url)) - if err != nil { - tracing.LogError(span, err) - log.WithError(err).Warn("cannot mark headless workspace with snapshot - that's one prebuild lost") - err = xerrors.Errorf("cannot remember snapshot: %v", err) - err = m.manager.markWorkspace(ctx, workspaceID, addMark(workspaceExplicitFailAnnotation, err.Error())) - if err != nil { - log.WithError(err).Warn("was unable to mark workspace as failed") - } - } - } } }