From bcdaf745ec354f0d153ddcc99bd2e9c1529f0f56 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 08:27:09 -0600 Subject: [PATCH 01/56] chore: refactor provisioner to handle more discrete terraform actions --- provisionerd/proto/provisionerd.pb.go | 1213 +++----- provisionerd/proto/provisionerd_drpc.pb.go | 2 +- provisionersdk/proto/provisioner.pb.go | 3054 +++++++------------ provisionersdk/proto/provisioner.proto | 7 + provisionersdk/proto/provisioner_drpc.pb.go | 2 +- provisionersdk/session.go | 83 +- 6 files changed, 1477 insertions(+), 2884 deletions(-) diff --git a/provisionerd/proto/provisionerd.pb.go b/provisionerd/proto/provisionerd.pb.go index e66e1a33de1f4..e7c0f7a4eaf8a 100644 --- a/provisionerd/proto/provisionerd.pb.go +++ b/provisionerd/proto/provisionerd.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 -// protoc v4.23.4 +// protoc-gen-go v1.36.9 +// protoc v6.32.0 // source: provisionerd/proto/provisionerd.proto package proto @@ -12,6 +12,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -70,18 +71,16 @@ func (LogSource) EnumDescriptor() ([]byte, []int) { // Empty indicates a successful request/response. type Empty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Empty) Reset() { *x = Empty{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Empty) String() string { @@ -92,7 +91,7 @@ func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,16 +108,13 @@ func (*Empty) Descriptor() ([]byte, []int) { // AcquiredJob is returned when a provisioner daemon has a job locked. type AcquiredJob struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Provisioner string `protobuf:"bytes,3,opt,name=provisioner,proto3" json:"provisioner,omitempty"` - UserName string `protobuf:"bytes,4,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` - TemplateSourceArchive []byte `protobuf:"bytes,5,opt,name=template_source_archive,json=templateSourceArchive,proto3" json:"template_source_archive,omitempty"` - // Types that are assignable to Type: + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Provisioner string `protobuf:"bytes,3,opt,name=provisioner,proto3" json:"provisioner,omitempty"` + UserName string `protobuf:"bytes,4,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` + TemplateSourceArchive []byte `protobuf:"bytes,5,opt,name=template_source_archive,json=templateSourceArchive,proto3" json:"template_source_archive,omitempty"` + // Types that are valid to be assigned to Type: // // *AcquiredJob_WorkspaceBuild_ // *AcquiredJob_TemplateImport_ @@ -126,16 +122,16 @@ type AcquiredJob struct { Type isAcquiredJob_Type `protobuf_oneof:"type"` // trace_metadata is currently used for tracing information only. It allows // jobs to be tied to the request that created them. - TraceMetadata map[string]string `protobuf:"bytes,9,rep,name=trace_metadata,json=traceMetadata,proto3" json:"trace_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TraceMetadata map[string]string `protobuf:"bytes,9,rep,name=trace_metadata,json=traceMetadata,proto3" json:"trace_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AcquiredJob) Reset() { *x = AcquiredJob{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcquiredJob) String() string { @@ -146,7 +142,7 @@ func (*AcquiredJob) ProtoMessage() {} func (x *AcquiredJob) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,30 +192,36 @@ func (x *AcquiredJob) GetTemplateSourceArchive() []byte { return nil } -func (m *AcquiredJob) GetType() isAcquiredJob_Type { - if m != nil { - return m.Type +func (x *AcquiredJob) GetType() isAcquiredJob_Type { + if x != nil { + return x.Type } return nil } func (x *AcquiredJob) GetWorkspaceBuild() *AcquiredJob_WorkspaceBuild { - if x, ok := x.GetType().(*AcquiredJob_WorkspaceBuild_); ok { - return x.WorkspaceBuild + if x != nil { + if x, ok := x.Type.(*AcquiredJob_WorkspaceBuild_); ok { + return x.WorkspaceBuild + } } return nil } func (x *AcquiredJob) GetTemplateImport() *AcquiredJob_TemplateImport { - if x, ok := x.GetType().(*AcquiredJob_TemplateImport_); ok { - return x.TemplateImport + if x != nil { + if x, ok := x.Type.(*AcquiredJob_TemplateImport_); ok { + return x.TemplateImport + } } return nil } func (x *AcquiredJob) GetTemplateDryRun() *AcquiredJob_TemplateDryRun { - if x, ok := x.GetType().(*AcquiredJob_TemplateDryRun_); ok { - return x.TemplateDryRun + if x != nil { + if x, ok := x.Type.(*AcquiredJob_TemplateDryRun_); ok { + return x.TemplateDryRun + } } return nil } @@ -254,28 +256,25 @@ func (*AcquiredJob_TemplateImport_) isAcquiredJob_Type() {} func (*AcquiredJob_TemplateDryRun_) isAcquiredJob_Type() {} type FailedJob struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - // Types that are assignable to Type: + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + // Types that are valid to be assigned to Type: // // *FailedJob_WorkspaceBuild_ // *FailedJob_TemplateImport_ // *FailedJob_TemplateDryRun_ - Type isFailedJob_Type `protobuf_oneof:"type"` - ErrorCode string `protobuf:"bytes,6,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` + Type isFailedJob_Type `protobuf_oneof:"type"` + ErrorCode string `protobuf:"bytes,6,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FailedJob) Reset() { *x = FailedJob{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailedJob) String() string { @@ -286,7 +285,7 @@ func (*FailedJob) ProtoMessage() {} func (x *FailedJob) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,30 +314,36 @@ func (x *FailedJob) GetError() string { return "" } -func (m *FailedJob) GetType() isFailedJob_Type { - if m != nil { - return m.Type +func (x *FailedJob) GetType() isFailedJob_Type { + if x != nil { + return x.Type } return nil } func (x *FailedJob) GetWorkspaceBuild() *FailedJob_WorkspaceBuild { - if x, ok := x.GetType().(*FailedJob_WorkspaceBuild_); ok { - return x.WorkspaceBuild + if x != nil { + if x, ok := x.Type.(*FailedJob_WorkspaceBuild_); ok { + return x.WorkspaceBuild + } } return nil } func (x *FailedJob) GetTemplateImport() *FailedJob_TemplateImport { - if x, ok := x.GetType().(*FailedJob_TemplateImport_); ok { - return x.TemplateImport + if x != nil { + if x, ok := x.Type.(*FailedJob_TemplateImport_); ok { + return x.TemplateImport + } } return nil } func (x *FailedJob) GetTemplateDryRun() *FailedJob_TemplateDryRun { - if x, ok := x.GetType().(*FailedJob_TemplateDryRun_); ok { - return x.TemplateDryRun + if x != nil { + if x, ok := x.Type.(*FailedJob_TemplateDryRun_); ok { + return x.TemplateDryRun + } } return nil } @@ -374,26 +379,23 @@ func (*FailedJob_TemplateDryRun_) isFailedJob_Type() {} // CompletedJob is sent when the provisioner daemon completes a job. type CompletedJob struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - // Types that are assignable to Type: + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // Types that are valid to be assigned to Type: // // *CompletedJob_WorkspaceBuild_ // *CompletedJob_TemplateImport_ // *CompletedJob_TemplateDryRun_ - Type isCompletedJob_Type `protobuf_oneof:"type"` + Type isCompletedJob_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CompletedJob) Reset() { *x = CompletedJob{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletedJob) String() string { @@ -404,7 +406,7 @@ func (*CompletedJob) ProtoMessage() {} func (x *CompletedJob) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -426,30 +428,36 @@ func (x *CompletedJob) GetJobId() string { return "" } -func (m *CompletedJob) GetType() isCompletedJob_Type { - if m != nil { - return m.Type +func (x *CompletedJob) GetType() isCompletedJob_Type { + if x != nil { + return x.Type } return nil } func (x *CompletedJob) GetWorkspaceBuild() *CompletedJob_WorkspaceBuild { - if x, ok := x.GetType().(*CompletedJob_WorkspaceBuild_); ok { - return x.WorkspaceBuild + if x != nil { + if x, ok := x.Type.(*CompletedJob_WorkspaceBuild_); ok { + return x.WorkspaceBuild + } } return nil } func (x *CompletedJob) GetTemplateImport() *CompletedJob_TemplateImport { - if x, ok := x.GetType().(*CompletedJob_TemplateImport_); ok { - return x.TemplateImport + if x != nil { + if x, ok := x.Type.(*CompletedJob_TemplateImport_); ok { + return x.TemplateImport + } } return nil } func (x *CompletedJob) GetTemplateDryRun() *CompletedJob_TemplateDryRun { - if x, ok := x.GetType().(*CompletedJob_TemplateDryRun_); ok { - return x.TemplateDryRun + if x != nil { + if x, ok := x.Type.(*CompletedJob_TemplateDryRun_); ok { + return x.TemplateDryRun + } } return nil } @@ -478,24 +486,21 @@ func (*CompletedJob_TemplateDryRun_) isCompletedJob_Type() {} // Log represents output from a job. type Log struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Source LogSource `protobuf:"varint,1,opt,name=source,proto3,enum=provisionerd.LogSource" json:"source,omitempty"` + Level proto.LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=provisioner.LogLevel" json:"level,omitempty"` + CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Stage string `protobuf:"bytes,4,opt,name=stage,proto3" json:"stage,omitempty"` + Output string `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"` unknownFields protoimpl.UnknownFields - - Source LogSource `protobuf:"varint,1,opt,name=source,proto3,enum=provisionerd.LogSource" json:"source,omitempty"` - Level proto.LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=provisioner.LogLevel" json:"level,omitempty"` - CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Stage string `protobuf:"bytes,4,opt,name=stage,proto3" json:"stage,omitempty"` - Output string `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Log) Reset() { *x = Log{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Log) String() string { @@ -506,7 +511,7 @@ func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,25 +563,22 @@ func (x *Log) GetOutput() string { // This message should be sent periodically as a heartbeat. type UpdateJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` TemplateVariables []*proto.TemplateVariable `protobuf:"bytes,4,rep,name=template_variables,json=templateVariables,proto3" json:"template_variables,omitempty"` UserVariableValues []*proto.VariableValue `protobuf:"bytes,5,rep,name=user_variable_values,json=userVariableValues,proto3" json:"user_variable_values,omitempty"` Readme []byte `protobuf:"bytes,6,opt,name=readme,proto3" json:"readme,omitempty"` - WorkspaceTags map[string]string `protobuf:"bytes,7,rep,name=workspace_tags,json=workspaceTags,proto3" json:"workspace_tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + WorkspaceTags map[string]string `protobuf:"bytes,7,rep,name=workspace_tags,json=workspaceTags,proto3" json:"workspace_tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateJobRequest) Reset() { *x = UpdateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateJobRequest) String() string { @@ -587,7 +589,7 @@ func (*UpdateJobRequest) ProtoMessage() {} func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,21 +647,18 @@ func (x *UpdateJobRequest) GetWorkspaceTags() map[string]string { } type UpdateJobResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Canceled bool `protobuf:"varint,1,opt,name=canceled,proto3" json:"canceled,omitempty"` VariableValues []*proto.VariableValue `protobuf:"bytes,3,rep,name=variable_values,json=variableValues,proto3" json:"variable_values,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateJobResponse) Reset() { *x = UpdateJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateJobResponse) String() string { @@ -670,7 +669,7 @@ func (*UpdateJobResponse) ProtoMessage() {} func (x *UpdateJobResponse) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -700,21 +699,18 @@ func (x *UpdateJobResponse) GetVariableValues() []*proto.VariableValue { } type CommitQuotaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + DailyCost int32 `protobuf:"varint,2,opt,name=daily_cost,json=dailyCost,proto3" json:"daily_cost,omitempty"` unknownFields protoimpl.UnknownFields - - JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - DailyCost int32 `protobuf:"varint,2,opt,name=daily_cost,json=dailyCost,proto3" json:"daily_cost,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CommitQuotaRequest) Reset() { *x = CommitQuotaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitQuotaRequest) String() string { @@ -725,7 +721,7 @@ func (*CommitQuotaRequest) ProtoMessage() {} func (x *CommitQuotaRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,22 +751,19 @@ func (x *CommitQuotaRequest) GetDailyCost() int32 { } type CommitQuotaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` - CreditsConsumed int32 `protobuf:"varint,2,opt,name=credits_consumed,json=creditsConsumed,proto3" json:"credits_consumed,omitempty"` - Budget int32 `protobuf:"varint,3,opt,name=budget,proto3" json:"budget,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` + CreditsConsumed int32 `protobuf:"varint,2,opt,name=credits_consumed,json=creditsConsumed,proto3" json:"credits_consumed,omitempty"` + Budget int32 `protobuf:"varint,3,opt,name=budget,proto3" json:"budget,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CommitQuotaResponse) Reset() { *x = CommitQuotaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitQuotaResponse) String() string { @@ -781,7 +774,7 @@ func (*CommitQuotaResponse) ProtoMessage() {} func (x *CommitQuotaResponse) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -818,18 +811,16 @@ func (x *CommitQuotaResponse) GetBudget() int32 { } type CancelAcquire struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CancelAcquire) Reset() { *x = CancelAcquire{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelAcquire) String() string { @@ -840,7 +831,7 @@ func (*CancelAcquire) ProtoMessage() {} func (x *CancelAcquire) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -856,24 +847,21 @@ func (*CancelAcquire) Descriptor() ([]byte, []int) { } type UploadFileRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Type: // // *UploadFileRequest_DataUpload // *UploadFileRequest_ChunkPiece - Type isUploadFileRequest_Type `protobuf_oneof:"type"` + Type isUploadFileRequest_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UploadFileRequest) Reset() { *x = UploadFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadFileRequest) String() string { @@ -884,7 +872,7 @@ func (*UploadFileRequest) ProtoMessage() {} func (x *UploadFileRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,23 +887,27 @@ func (*UploadFileRequest) Descriptor() ([]byte, []int) { return file_provisionerd_proto_provisionerd_proto_rawDescGZIP(), []int{10} } -func (m *UploadFileRequest) GetType() isUploadFileRequest_Type { - if m != nil { - return m.Type +func (x *UploadFileRequest) GetType() isUploadFileRequest_Type { + if x != nil { + return x.Type } return nil } func (x *UploadFileRequest) GetDataUpload() *proto.DataUpload { - if x, ok := x.GetType().(*UploadFileRequest_DataUpload); ok { - return x.DataUpload + if x != nil { + if x, ok := x.Type.(*UploadFileRequest_DataUpload); ok { + return x.DataUpload + } } return nil } func (x *UploadFileRequest) GetChunkPiece() *proto.ChunkPiece { - if x, ok := x.GetType().(*UploadFileRequest_ChunkPiece); ok { - return x.ChunkPiece + if x != nil { + if x, ok := x.Type.(*UploadFileRequest_ChunkPiece); ok { + return x.ChunkPiece + } } return nil } @@ -937,10 +929,7 @@ func (*UploadFileRequest_DataUpload) isUploadFileRequest_Type() {} func (*UploadFileRequest_ChunkPiece) isUploadFileRequest_Type() {} type AcquiredJob_WorkspaceBuild struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` WorkspaceBuildId string `protobuf:"bytes,1,opt,name=workspace_build_id,json=workspaceBuildId,proto3" json:"workspace_build_id,omitempty"` WorkspaceName string `protobuf:"bytes,2,opt,name=workspace_name,json=workspaceName,proto3" json:"workspace_name,omitempty"` RichParameterValues []*proto.RichParameterValue `protobuf:"bytes,4,rep,name=rich_parameter_values,json=richParameterValues,proto3" json:"rich_parameter_values,omitempty"` @@ -954,15 +943,15 @@ type AcquiredJob_WorkspaceBuild struct { // for the first time. PreviousParameterValues []*proto.RichParameterValue `protobuf:"bytes,10,rep,name=previous_parameter_values,json=previousParameterValues,proto3" json:"previous_parameter_values,omitempty"` ExpReuseTerraformWorkspace *bool `protobuf:"varint,11,opt,name=exp_reuse_terraform_workspace,json=expReuseTerraformWorkspace,proto3,oneof" json:"exp_reuse_terraform_workspace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AcquiredJob_WorkspaceBuild) Reset() { *x = AcquiredJob_WorkspaceBuild{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcquiredJob_WorkspaceBuild) String() string { @@ -973,7 +962,7 @@ func (*AcquiredJob_WorkspaceBuild) ProtoMessage() {} func (x *AcquiredJob_WorkspaceBuild) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,21 +1048,18 @@ func (x *AcquiredJob_WorkspaceBuild) GetExpReuseTerraformWorkspace() bool { } type AcquiredJob_TemplateImport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Metadata *proto.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` UserVariableValues []*proto.VariableValue `protobuf:"bytes,2,rep,name=user_variable_values,json=userVariableValues,proto3" json:"user_variable_values,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AcquiredJob_TemplateImport) Reset() { *x = AcquiredJob_TemplateImport{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcquiredJob_TemplateImport) String() string { @@ -1084,7 +1070,7 @@ func (*AcquiredJob_TemplateImport) ProtoMessage() {} func (x *AcquiredJob_TemplateImport) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1114,22 +1100,19 @@ func (x *AcquiredJob_TemplateImport) GetUserVariableValues() []*proto.VariableVa } type AcquiredJob_TemplateDryRun struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` RichParameterValues []*proto.RichParameterValue `protobuf:"bytes,2,rep,name=rich_parameter_values,json=richParameterValues,proto3" json:"rich_parameter_values,omitempty"` VariableValues []*proto.VariableValue `protobuf:"bytes,3,rep,name=variable_values,json=variableValues,proto3" json:"variable_values,omitempty"` Metadata *proto.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AcquiredJob_TemplateDryRun) Reset() { *x = AcquiredJob_TemplateDryRun{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcquiredJob_TemplateDryRun) String() string { @@ -1140,7 +1123,7 @@ func (*AcquiredJob_TemplateDryRun) ProtoMessage() {} func (x *AcquiredJob_TemplateDryRun) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1177,21 +1160,18 @@ func (x *AcquiredJob_TemplateDryRun) GetMetadata() *proto.Metadata { } type FailedJob_WorkspaceBuild struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + Timings []*proto.Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` unknownFields protoimpl.UnknownFields - - State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` - Timings []*proto.Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FailedJob_WorkspaceBuild) Reset() { *x = FailedJob_WorkspaceBuild{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailedJob_WorkspaceBuild) String() string { @@ -1202,7 +1182,7 @@ func (*FailedJob_WorkspaceBuild) ProtoMessage() {} func (x *FailedJob_WorkspaceBuild) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,18 +1212,16 @@ func (x *FailedJob_WorkspaceBuild) GetTimings() []*proto.Timing { } type FailedJob_TemplateImport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FailedJob_TemplateImport) Reset() { *x = FailedJob_TemplateImport{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailedJob_TemplateImport) String() string { @@ -1254,7 +1232,7 @@ func (*FailedJob_TemplateImport) ProtoMessage() {} func (x *FailedJob_TemplateImport) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1270,18 +1248,16 @@ func (*FailedJob_TemplateImport) Descriptor() ([]byte, []int) { } type FailedJob_TemplateDryRun struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FailedJob_TemplateDryRun) Reset() { *x = FailedJob_TemplateDryRun{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailedJob_TemplateDryRun) String() string { @@ -1292,7 +1268,7 @@ func (*FailedJob_TemplateDryRun) ProtoMessage() {} func (x *FailedJob_TemplateDryRun) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1308,25 +1284,22 @@ func (*FailedJob_TemplateDryRun) Descriptor() ([]byte, []int) { } type CompletedJob_WorkspaceBuild struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` Resources []*proto.Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` Timings []*proto.Timing `protobuf:"bytes,3,rep,name=timings,proto3" json:"timings,omitempty"` Modules []*proto.Module `protobuf:"bytes,4,rep,name=modules,proto3" json:"modules,omitempty"` ResourceReplacements []*proto.ResourceReplacement `protobuf:"bytes,5,rep,name=resource_replacements,json=resourceReplacements,proto3" json:"resource_replacements,omitempty"` AiTasks []*proto.AITask `protobuf:"bytes,6,rep,name=ai_tasks,json=aiTasks,proto3" json:"ai_tasks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CompletedJob_WorkspaceBuild) Reset() { *x = CompletedJob_WorkspaceBuild{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletedJob_WorkspaceBuild) String() string { @@ -1337,7 +1310,7 @@ func (*CompletedJob_WorkspaceBuild) ProtoMessage() {} func (x *CompletedJob_WorkspaceBuild) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1395,10 +1368,7 @@ func (x *CompletedJob_WorkspaceBuild) GetAiTasks() []*proto.AITask { } type CompletedJob_TemplateImport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` StartResources []*proto.Resource `protobuf:"bytes,1,rep,name=start_resources,json=startResources,proto3" json:"start_resources,omitempty"` StopResources []*proto.Resource `protobuf:"bytes,2,rep,name=stop_resources,json=stopResources,proto3" json:"stop_resources,omitempty"` RichParameters []*proto.RichParameter `protobuf:"bytes,3,rep,name=rich_parameters,json=richParameters,proto3" json:"rich_parameters,omitempty"` @@ -1412,15 +1382,15 @@ type CompletedJob_TemplateImport struct { ModuleFilesHash []byte `protobuf:"bytes,11,opt,name=module_files_hash,json=moduleFilesHash,proto3" json:"module_files_hash,omitempty"` HasAiTasks bool `protobuf:"varint,12,opt,name=has_ai_tasks,json=hasAiTasks,proto3" json:"has_ai_tasks,omitempty"` HasExternalAgents bool `protobuf:"varint,13,opt,name=has_external_agents,json=hasExternalAgents,proto3" json:"has_external_agents,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CompletedJob_TemplateImport) Reset() { *x = CompletedJob_TemplateImport{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletedJob_TemplateImport) String() string { @@ -1431,7 +1401,7 @@ func (*CompletedJob_TemplateImport) ProtoMessage() {} func (x *CompletedJob_TemplateImport) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,21 +1508,18 @@ func (x *CompletedJob_TemplateImport) GetHasExternalAgents() bool { } type CompletedJob_TemplateDryRun struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Resources []*proto.Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` + Modules []*proto.Module `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"` unknownFields protoimpl.UnknownFields - - Resources []*proto.Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` - Modules []*proto.Module `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CompletedJob_TemplateDryRun) Reset() { *x = CompletedJob_TemplateDryRun{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletedJob_TemplateDryRun) String() string { @@ -1563,7 +1530,7 @@ func (*CompletedJob_TemplateDryRun) ProtoMessage() {} func (x *CompletedJob_TemplateDryRun) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1594,362 +1561,155 @@ func (x *CompletedJob_TemplateDryRun) GetModules() []*proto.Module { var File_provisionerd_proto_provisionerd_proto protoreflect.FileDescriptor -var file_provisionerd_proto_provisionerd_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x72, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, - 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xe3, 0x0c, 0x0a, 0x0b, 0x41, 0x63, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x20, 0x0a, 0x0b, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x12, 0x1b, - 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x74, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, - 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x15, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x72, 0x63, 0x68, - 0x69, 0x76, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x0f, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, - 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x74, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x54, 0x0a, - 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4a, - 0x6f, 0x62, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, - 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, - 0x52, 0x75, 0x6e, 0x12, 0x53, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x8d, 0x05, 0x0a, 0x0e, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x53, 0x0a, 0x15, 0x72, 0x69, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, - 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x13, 0x72, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x76, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x17, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x15, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, - 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x5b, 0x0a, 0x19, 0x70, - 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, - 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x1d, 0x65, 0x78, 0x70, 0x5f, - 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x5f, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x00, 0x52, 0x1a, 0x65, 0x78, 0x70, 0x52, 0x65, 0x75, 0x73, 0x65, 0x54, 0x65, 0x72, 0x72, 0x61, - 0x66, 0x6f, 0x72, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x42, 0x20, 0x0a, 0x1e, 0x5f, 0x65, 0x78, 0x70, 0x5f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x74, - 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x1a, 0x91, 0x01, 0x0a, 0x0e, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4c, - 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x75, 0x73, 0x65, 0x72, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0xe3, 0x01, 0x0a, - 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, - 0x53, 0x0a, 0x15, 0x72, 0x69, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, - 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x13, 0x72, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x01, - 0x10, 0x02, 0x1a, 0x40, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 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, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xd4, 0x03, 0x0a, - 0x09, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, - 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, - 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, - 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x51, 0x0a, 0x0f, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, - 0x72, 0x64, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x74, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x52, 0x0a, - 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, - 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x48, - 0x00, 0x52, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, - 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, - 0x1a, 0x55, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x69, - 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x07, - 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x10, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x10, 0x0a, 0x0e, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x22, 0xbb, 0x0b, 0x0a, 0x0c, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x0f, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x48, - 0x00, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x12, 0x54, 0x0a, 0x0f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6d, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x55, 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x5f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x48, 0x00, 0x52, 0x0e, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x1a, 0xc0, - 0x02, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x07, - 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x69, - 0x6e, 0x67, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x15, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x61, 0x69, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, - 0x72, 0x2e, 0x41, 0x49, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x07, 0x61, 0x69, 0x54, 0x61, 0x73, 0x6b, - 0x73, 0x1a, 0xcf, 0x05, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3e, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0e, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x72, 0x69, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x72, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1a, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x17, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x38, 0x0a, - 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x70, 0x5f, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x2d, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, - 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x6c, - 0x61, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, - 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, 0x61, 0x69, 0x5f, 0x74, 0x61, 0x73, 0x6b, - 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x41, 0x69, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x68, 0x61, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x11, 0x68, 0x61, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x73, 0x1a, 0x74, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, - 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x22, 0xa6, 0x03, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, - 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, - 0x12, 0x25, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x4c, 0x6f, - 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x4c, 0x0a, 0x12, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, - 0x72, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x76, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, - 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x12, 0x75, 0x73, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0e, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, - 0x72, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x61, 0x67, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x54, 0x61, 0x67, 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, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x7a, 0x0a, - 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x43, - 0x0a, 0x0f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x4a, 0x0a, 0x12, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x5f, - 0x63, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x61, 0x69, 0x6c, - 0x79, 0x43, 0x6f, 0x73, 0x74, 0x22, 0x68, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, - 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x12, 0x29, 0x0a, 0x10, - 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x22, - 0x0f, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x22, 0x93, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x75, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x55, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x70, 0x69, 0x65, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x69, 0x65, 0x63, 0x65, - 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x69, 0x65, 0x63, 0x65, 0x42, 0x06, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x34, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, - 0x45, 0x52, 0x5f, 0x44, 0x41, 0x45, 0x4d, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, - 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x32, 0x8b, 0x04, 0x0a, - 0x11, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x44, 0x61, 0x65, 0x6d, - 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4a, 0x6f, 0x62, - 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, - 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x52, 0x0a, 0x14, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x4a, 0x6f, 0x62, 0x57, 0x69, 0x74, 0x68, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x1b, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x28, 0x01, 0x30, 0x01, 0x12, 0x52, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, 0x75, - 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, - 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x46, - 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x1a, - 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, - 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x1a, - 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, - 0x6c, 0x65, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, - 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, - 0x72, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x01, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x63, - 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} +const file_provisionerd_proto_provisionerd_proto_rawDesc = "" + + "\n" + + "%provisionerd/proto/provisionerd.proto\x12\fprovisionerd\x1a&provisionersdk/proto/provisioner.proto\"\a\n" + + "\x05Empty\"\xe3\f\n" + + "\vAcquiredJob\x12\x15\n" + + "\x06job_id\x18\x01 \x01(\tR\x05jobId\x12\x1d\n" + + "\n" + + "created_at\x18\x02 \x01(\x03R\tcreatedAt\x12 \n" + + "\vprovisioner\x18\x03 \x01(\tR\vprovisioner\x12\x1b\n" + + "\tuser_name\x18\x04 \x01(\tR\buserName\x126\n" + + "\x17template_source_archive\x18\x05 \x01(\fR\x15templateSourceArchive\x12S\n" + + "\x0fworkspace_build\x18\x06 \x01(\v2(.provisionerd.AcquiredJob.WorkspaceBuildH\x00R\x0eworkspaceBuild\x12S\n" + + "\x0ftemplate_import\x18\a \x01(\v2(.provisionerd.AcquiredJob.TemplateImportH\x00R\x0etemplateImport\x12T\n" + + "\x10template_dry_run\x18\b \x01(\v2(.provisionerd.AcquiredJob.TemplateDryRunH\x00R\x0etemplateDryRun\x12S\n" + + "\x0etrace_metadata\x18\t \x03(\v2,.provisionerd.AcquiredJob.TraceMetadataEntryR\rtraceMetadata\x1a\x8d\x05\n" + + "\x0eWorkspaceBuild\x12,\n" + + "\x12workspace_build_id\x18\x01 \x01(\tR\x10workspaceBuildId\x12%\n" + + "\x0eworkspace_name\x18\x02 \x01(\tR\rworkspaceName\x12S\n" + + "\x15rich_parameter_values\x18\x04 \x03(\v2\x1f.provisioner.RichParameterValueR\x13richParameterValues\x12C\n" + + "\x0fvariable_values\x18\x05 \x03(\v2\x1a.provisioner.VariableValueR\x0evariableValues\x12Y\n" + + "\x17external_auth_providers\x18\x06 \x03(\v2!.provisioner.ExternalAuthProviderR\x15externalAuthProviders\x121\n" + + "\bmetadata\x18\a \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12\x14\n" + + "\x05state\x18\b \x01(\fR\x05state\x12\x1b\n" + + "\tlog_level\x18\t \x01(\tR\blogLevel\x12[\n" + + "\x19previous_parameter_values\x18\n" + + " \x03(\v2\x1f.provisioner.RichParameterValueR\x17previousParameterValues\x12F\n" + + "\x1dexp_reuse_terraform_workspace\x18\v \x01(\bH\x00R\x1aexpReuseTerraformWorkspace\x88\x01\x01B \n" + + "\x1e_exp_reuse_terraform_workspaceJ\x04\b\x03\x10\x04\x1a\x91\x01\n" + + "\x0eTemplateImport\x121\n" + + "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12L\n" + + "\x14user_variable_values\x18\x02 \x03(\v2\x1a.provisioner.VariableValueR\x12userVariableValues\x1a\xe3\x01\n" + + "\x0eTemplateDryRun\x12S\n" + + "\x15rich_parameter_values\x18\x02 \x03(\v2\x1f.provisioner.RichParameterValueR\x13richParameterValues\x12C\n" + + "\x0fvariable_values\x18\x03 \x03(\v2\x1a.provisioner.VariableValueR\x0evariableValues\x121\n" + + "\bmetadata\x18\x04 \x01(\v2\x15.provisioner.MetadataR\bmetadataJ\x04\b\x01\x10\x02\x1a@\n" + + "\x12TraceMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x06\n" + + "\x04type\"\xd4\x03\n" + + "\tFailedJob\x12\x15\n" + + "\x06job_id\x18\x01 \x01(\tR\x05jobId\x12\x14\n" + + "\x05error\x18\x02 \x01(\tR\x05error\x12Q\n" + + "\x0fworkspace_build\x18\x03 \x01(\v2&.provisionerd.FailedJob.WorkspaceBuildH\x00R\x0eworkspaceBuild\x12Q\n" + + "\x0ftemplate_import\x18\x04 \x01(\v2&.provisionerd.FailedJob.TemplateImportH\x00R\x0etemplateImport\x12R\n" + + "\x10template_dry_run\x18\x05 \x01(\v2&.provisionerd.FailedJob.TemplateDryRunH\x00R\x0etemplateDryRun\x12\x1d\n" + + "\n" + + "error_code\x18\x06 \x01(\tR\terrorCode\x1aU\n" + + "\x0eWorkspaceBuild\x12\x14\n" + + "\x05state\x18\x01 \x01(\fR\x05state\x12-\n" + + "\atimings\x18\x02 \x03(\v2\x13.provisioner.TimingR\atimings\x1a\x10\n" + + "\x0eTemplateImport\x1a\x10\n" + + "\x0eTemplateDryRunB\x06\n" + + "\x04type\"\xbb\v\n" + + "\fCompletedJob\x12\x15\n" + + "\x06job_id\x18\x01 \x01(\tR\x05jobId\x12T\n" + + "\x0fworkspace_build\x18\x02 \x01(\v2).provisionerd.CompletedJob.WorkspaceBuildH\x00R\x0eworkspaceBuild\x12T\n" + + "\x0ftemplate_import\x18\x03 \x01(\v2).provisionerd.CompletedJob.TemplateImportH\x00R\x0etemplateImport\x12U\n" + + "\x10template_dry_run\x18\x04 \x01(\v2).provisionerd.CompletedJob.TemplateDryRunH\x00R\x0etemplateDryRun\x1a\xc0\x02\n" + + "\x0eWorkspaceBuild\x12\x14\n" + + "\x05state\x18\x01 \x01(\fR\x05state\x123\n" + + "\tresources\x18\x02 \x03(\v2\x15.provisioner.ResourceR\tresources\x12-\n" + + "\atimings\x18\x03 \x03(\v2\x13.provisioner.TimingR\atimings\x12-\n" + + "\amodules\x18\x04 \x03(\v2\x13.provisioner.ModuleR\amodules\x12U\n" + + "\x15resource_replacements\x18\x05 \x03(\v2 .provisioner.ResourceReplacementR\x14resourceReplacements\x12.\n" + + "\bai_tasks\x18\x06 \x03(\v2\x13.provisioner.AITaskR\aaiTasks\x1a\xcf\x05\n" + + "\x0eTemplateImport\x12>\n" + + "\x0fstart_resources\x18\x01 \x03(\v2\x15.provisioner.ResourceR\x0estartResources\x12<\n" + + "\x0estop_resources\x18\x02 \x03(\v2\x15.provisioner.ResourceR\rstopResources\x12C\n" + + "\x0frich_parameters\x18\x03 \x03(\v2\x1a.provisioner.RichParameterR\x0erichParameters\x12A\n" + + "\x1dexternal_auth_providers_names\x18\x04 \x03(\tR\x1aexternalAuthProvidersNames\x12a\n" + + "\x17external_auth_providers\x18\x05 \x03(\v2).provisioner.ExternalAuthProviderResourceR\x15externalAuthProviders\x128\n" + + "\rstart_modules\x18\x06 \x03(\v2\x13.provisioner.ModuleR\fstartModules\x126\n" + + "\fstop_modules\x18\a \x03(\v2\x13.provisioner.ModuleR\vstopModules\x12-\n" + + "\apresets\x18\b \x03(\v2\x13.provisioner.PresetR\apresets\x12\x12\n" + + "\x04plan\x18\t \x01(\fR\x04plan\x12!\n" + + "\fmodule_files\x18\n" + + " \x01(\fR\vmoduleFiles\x12*\n" + + "\x11module_files_hash\x18\v \x01(\fR\x0fmoduleFilesHash\x12 \n" + + "\fhas_ai_tasks\x18\f \x01(\bR\n" + + "hasAiTasks\x12.\n" + + "\x13has_external_agents\x18\r \x01(\bR\x11hasExternalAgents\x1at\n" + + "\x0eTemplateDryRun\x123\n" + + "\tresources\x18\x01 \x03(\v2\x15.provisioner.ResourceR\tresources\x12-\n" + + "\amodules\x18\x02 \x03(\v2\x13.provisioner.ModuleR\amodulesB\x06\n" + + "\x04type\"\xb0\x01\n" + + "\x03Log\x12/\n" + + "\x06source\x18\x01 \x01(\x0e2\x17.provisionerd.LogSourceR\x06source\x12+\n" + + "\x05level\x18\x02 \x01(\x0e2\x15.provisioner.LogLevelR\x05level\x12\x1d\n" + + "\n" + + "created_at\x18\x03 \x01(\x03R\tcreatedAt\x12\x14\n" + + "\x05stage\x18\x04 \x01(\tR\x05stage\x12\x16\n" + + "\x06output\x18\x05 \x01(\tR\x06output\"\xa6\x03\n" + + "\x10UpdateJobRequest\x12\x15\n" + + "\x06job_id\x18\x01 \x01(\tR\x05jobId\x12%\n" + + "\x04logs\x18\x02 \x03(\v2\x11.provisionerd.LogR\x04logs\x12L\n" + + "\x12template_variables\x18\x04 \x03(\v2\x1d.provisioner.TemplateVariableR\x11templateVariables\x12L\n" + + "\x14user_variable_values\x18\x05 \x03(\v2\x1a.provisioner.VariableValueR\x12userVariableValues\x12\x16\n" + + "\x06readme\x18\x06 \x01(\fR\x06readme\x12X\n" + + "\x0eworkspace_tags\x18\a \x03(\v21.provisionerd.UpdateJobRequest.WorkspaceTagsEntryR\rworkspaceTags\x1a@\n" + + "\x12WorkspaceTagsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01J\x04\b\x03\x10\x04\"z\n" + + "\x11UpdateJobResponse\x12\x1a\n" + + "\bcanceled\x18\x01 \x01(\bR\bcanceled\x12C\n" + + "\x0fvariable_values\x18\x03 \x03(\v2\x1a.provisioner.VariableValueR\x0evariableValuesJ\x04\b\x02\x10\x03\"J\n" + + "\x12CommitQuotaRequest\x12\x15\n" + + "\x06job_id\x18\x01 \x01(\tR\x05jobId\x12\x1d\n" + + "\n" + + "daily_cost\x18\x02 \x01(\x05R\tdailyCost\"h\n" + + "\x13CommitQuotaResponse\x12\x0e\n" + + "\x02ok\x18\x01 \x01(\bR\x02ok\x12)\n" + + "\x10credits_consumed\x18\x02 \x01(\x05R\x0fcreditsConsumed\x12\x16\n" + + "\x06budget\x18\x03 \x01(\x05R\x06budget\"\x0f\n" + + "\rCancelAcquire\"\x93\x01\n" + + "\x11UploadFileRequest\x12:\n" + + "\vdata_upload\x18\x01 \x01(\v2\x17.provisioner.DataUploadH\x00R\n" + + "dataUpload\x12:\n" + + "\vchunk_piece\x18\x02 \x01(\v2\x17.provisioner.ChunkPieceH\x00R\n" + + "chunkPieceB\x06\n" + + "\x04type*4\n" + + "\tLogSource\x12\x16\n" + + "\x12PROVISIONER_DAEMON\x10\x00\x12\x0f\n" + + "\vPROVISIONER\x10\x012\x8b\x04\n" + + "\x11ProvisionerDaemon\x12A\n" + + "\n" + + "AcquireJob\x12\x13.provisionerd.Empty\x1a\x19.provisionerd.AcquiredJob\"\x03\x88\x02\x01\x12R\n" + + "\x14AcquireJobWithCancel\x12\x1b.provisionerd.CancelAcquire\x1a\x19.provisionerd.AcquiredJob(\x010\x01\x12R\n" + + "\vCommitQuota\x12 .provisionerd.CommitQuotaRequest\x1a!.provisionerd.CommitQuotaResponse\x12L\n" + + "\tUpdateJob\x12\x1e.provisionerd.UpdateJobRequest\x1a\x1f.provisionerd.UpdateJobResponse\x127\n" + + "\aFailJob\x12\x17.provisionerd.FailedJob\x1a\x13.provisionerd.Empty\x12>\n" + + "\vCompleteJob\x12\x1a.provisionerd.CompletedJob\x1a\x13.provisionerd.Empty\x12D\n" + + "\n" + + "UploadFile\x12\x1f.provisionerd.UploadFileRequest\x1a\x13.provisionerd.Empty(\x01B.Z,github.com/coder/coder/v2/provisionerd/protob\x06proto3" var ( file_provisionerd_proto_provisionerd_proto_rawDescOnce sync.Once - file_provisionerd_proto_provisionerd_proto_rawDescData = file_provisionerd_proto_provisionerd_proto_rawDesc + file_provisionerd_proto_provisionerd_proto_rawDescData []byte ) func file_provisionerd_proto_provisionerd_proto_rawDescGZIP() []byte { file_provisionerd_proto_provisionerd_proto_rawDescOnce.Do(func() { - file_provisionerd_proto_provisionerd_proto_rawDescData = protoimpl.X.CompressGZIP(file_provisionerd_proto_provisionerd_proto_rawDescData) + file_provisionerd_proto_provisionerd_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_provisionerd_proto_provisionerd_proto_rawDesc), len(file_provisionerd_proto_provisionerd_proto_rawDesc))) }) return file_provisionerd_proto_provisionerd_proto_rawDescData } var file_provisionerd_proto_provisionerd_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_provisionerd_proto_provisionerd_proto_msgTypes = make([]protoimpl.MessageInfo, 22) -var file_provisionerd_proto_provisionerd_proto_goTypes = []interface{}{ +var file_provisionerd_proto_provisionerd_proto_goTypes = []any{ (LogSource)(0), // 0: provisionerd.LogSource (*Empty)(nil), // 1: provisionerd.Empty (*AcquiredJob)(nil), // 2: provisionerd.AcquiredJob @@ -2061,273 +1821,31 @@ func file_provisionerd_proto_provisionerd_proto_init() { if File_provisionerd_proto_provisionerd_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_provisionerd_proto_provisionerd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AcquiredJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailedJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompletedJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Log); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommitQuotaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommitQuotaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelAcquire); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AcquiredJob_WorkspaceBuild); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AcquiredJob_TemplateImport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AcquiredJob_TemplateDryRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailedJob_WorkspaceBuild); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailedJob_TemplateImport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FailedJob_TemplateDryRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompletedJob_WorkspaceBuild); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompletedJob_TemplateImport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompletedJob_TemplateDryRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_provisionerd_proto_provisionerd_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_provisionerd_proto_provisionerd_proto_msgTypes[1].OneofWrappers = []any{ (*AcquiredJob_WorkspaceBuild_)(nil), (*AcquiredJob_TemplateImport_)(nil), (*AcquiredJob_TemplateDryRun_)(nil), } - file_provisionerd_proto_provisionerd_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_provisionerd_proto_provisionerd_proto_msgTypes[2].OneofWrappers = []any{ (*FailedJob_WorkspaceBuild_)(nil), (*FailedJob_TemplateImport_)(nil), (*FailedJob_TemplateDryRun_)(nil), } - file_provisionerd_proto_provisionerd_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_provisionerd_proto_provisionerd_proto_msgTypes[3].OneofWrappers = []any{ (*CompletedJob_WorkspaceBuild_)(nil), (*CompletedJob_TemplateImport_)(nil), (*CompletedJob_TemplateDryRun_)(nil), } - file_provisionerd_proto_provisionerd_proto_msgTypes[10].OneofWrappers = []interface{}{ + file_provisionerd_proto_provisionerd_proto_msgTypes[10].OneofWrappers = []any{ (*UploadFileRequest_DataUpload)(nil), (*UploadFileRequest_ChunkPiece)(nil), } - file_provisionerd_proto_provisionerd_proto_msgTypes[11].OneofWrappers = []interface{}{} + file_provisionerd_proto_provisionerd_proto_msgTypes[11].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_provisionerd_proto_provisionerd_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_provisionerd_proto_provisionerd_proto_rawDesc), len(file_provisionerd_proto_provisionerd_proto_rawDesc)), NumEnums: 1, NumMessages: 22, NumExtensions: 0, @@ -2339,7 +1857,6 @@ func file_provisionerd_proto_provisionerd_proto_init() { MessageInfos: file_provisionerd_proto_provisionerd_proto_msgTypes, }.Build() File_provisionerd_proto_provisionerd_proto = out.File - file_provisionerd_proto_provisionerd_proto_rawDesc = nil file_provisionerd_proto_provisionerd_proto_goTypes = nil file_provisionerd_proto_provisionerd_proto_depIdxs = nil } diff --git a/provisionerd/proto/provisionerd_drpc.pb.go b/provisionerd/proto/provisionerd_drpc.pb.go index 72f131b5c5fd6..8b40a31a57488 100644 --- a/provisionerd/proto/provisionerd_drpc.pb.go +++ b/provisionerd/proto/provisionerd_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: provisionerd/proto/provisionerd.proto package proto diff --git a/provisionersdk/proto/provisioner.pb.go b/provisionersdk/proto/provisioner.pb.go index 72741a1036b41..e519f995cf2e8 100644 --- a/provisionersdk/proto/provisioner.pb.go +++ b/provisionersdk/proto/provisioner.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 -// protoc v4.23.4 +// protoc-gen-go v1.36.9 +// protoc v6.32.0 // source: provisionersdk/proto/provisioner.proto package proto @@ -12,6 +12,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -448,18 +449,16 @@ func (DataUploadType) EnumDescriptor() ([]byte, []int) { // Empty indicates a successful request/response. type Empty struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Empty) Reset() { *x = Empty{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Empty) String() string { @@ -470,7 +469,7 @@ func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,25 +486,22 @@ func (*Empty) Descriptor() ([]byte, []int) { // TemplateVariable represents a Terraform variable. type TemplateVariable struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"` + Sensitive bool `protobuf:"varint,6,opt,name=sensitive,proto3" json:"sensitive,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"` - Sensitive bool `protobuf:"varint,6,opt,name=sensitive,proto3" json:"sensitive,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TemplateVariable) Reset() { *x = TemplateVariable{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TemplateVariable) String() string { @@ -516,7 +512,7 @@ func (*TemplateVariable) ProtoMessage() {} func (x *TemplateVariable) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,23 +571,20 @@ func (x *TemplateVariable) GetSensitive() bool { // RichParameterOption represents a singular option that a parameter may expose. type RichParameterOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + Icon string `protobuf:"bytes,4,opt,name=icon,proto3" json:"icon,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - Icon string `protobuf:"bytes,4,opt,name=icon,proto3" json:"icon,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RichParameterOption) Reset() { *x = RichParameterOption{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RichParameterOption) String() string { @@ -602,7 +595,7 @@ func (*RichParameterOption) ProtoMessage() {} func (x *RichParameterOption) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,10 +640,7 @@ func (x *RichParameterOption) GetIcon() string { // RichParameter represents a variable that is exposed. type RichParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` @@ -665,19 +655,19 @@ type RichParameter struct { ValidationMonotonic string `protobuf:"bytes,12,opt,name=validation_monotonic,json=validationMonotonic,proto3" json:"validation_monotonic,omitempty"` Required bool `protobuf:"varint,13,opt,name=required,proto3" json:"required,omitempty"` // legacy_variable_name was removed (= 14) - DisplayName string `protobuf:"bytes,15,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Order int32 `protobuf:"varint,16,opt,name=order,proto3" json:"order,omitempty"` - Ephemeral bool `protobuf:"varint,17,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` - FormType ParameterFormType `protobuf:"varint,18,opt,name=form_type,json=formType,proto3,enum=provisioner.ParameterFormType" json:"form_type,omitempty"` + DisplayName string `protobuf:"bytes,15,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Order int32 `protobuf:"varint,16,opt,name=order,proto3" json:"order,omitempty"` + Ephemeral bool `protobuf:"varint,17,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` + FormType ParameterFormType `protobuf:"varint,18,opt,name=form_type,json=formType,proto3,enum=provisioner.ParameterFormType" json:"form_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RichParameter) Reset() { *x = RichParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RichParameter) String() string { @@ -688,7 +678,7 @@ func (*RichParameter) ProtoMessage() {} func (x *RichParameter) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,21 +814,18 @@ func (x *RichParameter) GetFormType() ParameterFormType { // RichParameterValue holds the key/value mapping of a parameter. type RichParameterValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RichParameterValue) Reset() { *x = RichParameterValue{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RichParameterValue) String() string { @@ -849,7 +836,7 @@ func (*RichParameterValue) ProtoMessage() {} func (x *RichParameterValue) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -882,20 +869,17 @@ func (x *RichParameterValue) GetValue() string { // If a prebuild remains unclaimed for longer than ttl seconds, it is deleted and // recreated to prevent staleness. type ExpirationPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Ttl int32 `protobuf:"varint,1,opt,name=ttl,proto3" json:"ttl,omitempty"` unknownFields protoimpl.UnknownFields - - Ttl int32 `protobuf:"varint,1,opt,name=ttl,proto3" json:"ttl,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ExpirationPolicy) Reset() { *x = ExpirationPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpirationPolicy) String() string { @@ -906,7 +890,7 @@ func (*ExpirationPolicy) ProtoMessage() {} func (x *ExpirationPolicy) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -929,21 +913,18 @@ func (x *ExpirationPolicy) GetTtl() int32 { } type Schedule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Cron string `protobuf:"bytes,1,opt,name=cron,proto3" json:"cron,omitempty"` + Instances int32 `protobuf:"varint,2,opt,name=instances,proto3" json:"instances,omitempty"` unknownFields protoimpl.UnknownFields - - Cron string `protobuf:"bytes,1,opt,name=cron,proto3" json:"cron,omitempty"` - Instances int32 `protobuf:"varint,2,opt,name=instances,proto3" json:"instances,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Schedule) Reset() { *x = Schedule{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schedule) String() string { @@ -954,7 +935,7 @@ func (*Schedule) ProtoMessage() {} func (x *Schedule) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,21 +965,18 @@ func (x *Schedule) GetInstances() int32 { } type Scheduling struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timezone string `protobuf:"bytes,1,opt,name=timezone,proto3" json:"timezone,omitempty"` + Schedule []*Schedule `protobuf:"bytes,2,rep,name=schedule,proto3" json:"schedule,omitempty"` unknownFields protoimpl.UnknownFields - - Timezone string `protobuf:"bytes,1,opt,name=timezone,proto3" json:"timezone,omitempty"` - Schedule []*Schedule `protobuf:"bytes,2,rep,name=schedule,proto3" json:"schedule,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Scheduling) Reset() { *x = Scheduling{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scheduling) String() string { @@ -1009,7 +987,7 @@ func (*Scheduling) ProtoMessage() {} func (x *Scheduling) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1039,22 +1017,19 @@ func (x *Scheduling) GetSchedule() []*Schedule { } type Prebuild struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Instances int32 `protobuf:"varint,1,opt,name=instances,proto3" json:"instances,omitempty"` - ExpirationPolicy *ExpirationPolicy `protobuf:"bytes,2,opt,name=expiration_policy,json=expirationPolicy,proto3" json:"expiration_policy,omitempty"` - Scheduling *Scheduling `protobuf:"bytes,3,opt,name=scheduling,proto3" json:"scheduling,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Instances int32 `protobuf:"varint,1,opt,name=instances,proto3" json:"instances,omitempty"` + ExpirationPolicy *ExpirationPolicy `protobuf:"bytes,2,opt,name=expiration_policy,json=expirationPolicy,proto3" json:"expiration_policy,omitempty"` + Scheduling *Scheduling `protobuf:"bytes,3,opt,name=scheduling,proto3" json:"scheduling,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Prebuild) Reset() { *x = Prebuild{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Prebuild) String() string { @@ -1065,7 +1040,7 @@ func (*Prebuild) ProtoMessage() {} func (x *Prebuild) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1103,25 +1078,22 @@ func (x *Prebuild) GetScheduling() *Scheduling { // Preset represents a set of preset parameters for a template version. type Preset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Parameters []*PresetParameter `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty"` + Prebuild *Prebuild `protobuf:"bytes,3,opt,name=prebuild,proto3" json:"prebuild,omitempty"` + Default bool `protobuf:"varint,4,opt,name=default,proto3" json:"default,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Parameters []*PresetParameter `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty"` - Prebuild *Prebuild `protobuf:"bytes,3,opt,name=prebuild,proto3" json:"prebuild,omitempty"` - Default bool `protobuf:"varint,4,opt,name=default,proto3" json:"default,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Preset) Reset() { *x = Preset{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Preset) String() string { @@ -1132,7 +1104,7 @@ func (*Preset) ProtoMessage() {} func (x *Preset) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1190,21 +1162,18 @@ func (x *Preset) GetIcon() string { } type PresetParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PresetParameter) Reset() { *x = PresetParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PresetParameter) String() string { @@ -1215,7 +1184,7 @@ func (*PresetParameter) ProtoMessage() {} func (x *PresetParameter) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1245,21 +1214,18 @@ func (x *PresetParameter) GetValue() string { } type ResourceReplacement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` unknownFields protoimpl.UnknownFields - - Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourceReplacement) Reset() { *x = ResourceReplacement{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceReplacement) String() string { @@ -1270,7 +1236,7 @@ func (*ResourceReplacement) ProtoMessage() {} func (x *ResourceReplacement) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1301,22 +1267,19 @@ func (x *ResourceReplacement) GetPaths() []string { // VariableValue holds the key/value mapping of a Terraform variable. type VariableValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Sensitive bool `protobuf:"varint,3,opt,name=sensitive,proto3" json:"sensitive,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Sensitive bool `protobuf:"varint,3,opt,name=sensitive,proto3" json:"sensitive,omitempty"` + sizeCache protoimpl.SizeCache } func (x *VariableValue) Reset() { *x = VariableValue{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VariableValue) String() string { @@ -1327,7 +1290,7 @@ func (*VariableValue) ProtoMessage() {} func (x *VariableValue) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1365,21 +1328,18 @@ func (x *VariableValue) GetSensitive() bool { // Log represents output from a request. type Log struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Level LogLevel `protobuf:"varint,1,opt,name=level,proto3,enum=provisioner.LogLevel" json:"level,omitempty"` + Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` unknownFields protoimpl.UnknownFields - - Level LogLevel `protobuf:"varint,1,opt,name=level,proto3,enum=provisioner.LogLevel" json:"level,omitempty"` - Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Log) Reset() { *x = Log{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Log) String() string { @@ -1390,7 +1350,7 @@ func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1420,20 +1380,17 @@ func (x *Log) GetOutput() string { } type InstanceIdentityAuth struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` unknownFields protoimpl.UnknownFields - - InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *InstanceIdentityAuth) Reset() { *x = InstanceIdentityAuth{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceIdentityAuth) String() string { @@ -1444,7 +1401,7 @@ func (*InstanceIdentityAuth) ProtoMessage() {} func (x *InstanceIdentityAuth) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1467,21 +1424,18 @@ func (x *InstanceIdentityAuth) GetInstanceId() string { } type ExternalAuthProviderResource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Optional bool `protobuf:"varint,2,opt,name=optional,proto3" json:"optional,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Optional bool `protobuf:"varint,2,opt,name=optional,proto3" json:"optional,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ExternalAuthProviderResource) Reset() { *x = ExternalAuthProviderResource{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalAuthProviderResource) String() string { @@ -1492,7 +1446,7 @@ func (*ExternalAuthProviderResource) ProtoMessage() {} func (x *ExternalAuthProviderResource) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1522,21 +1476,18 @@ func (x *ExternalAuthProviderResource) GetOptional() bool { } type ExternalAuthProvider struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ExternalAuthProvider) Reset() { *x = ExternalAuthProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalAuthProvider) String() string { @@ -1547,7 +1498,7 @@ func (*ExternalAuthProvider) ProtoMessage() {} func (x *ExternalAuthProvider) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,19 +1529,16 @@ func (x *ExternalAuthProvider) GetAccessToken() string { // Agent represents a running agent on the workspace. type Agent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Env map[string]string `protobuf:"bytes,3,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Env map[string]string `protobuf:"bytes,3,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Field 4 was startup_script, now removed. OperatingSystem string `protobuf:"bytes,5,opt,name=operating_system,json=operatingSystem,proto3" json:"operating_system,omitempty"` Architecture string `protobuf:"bytes,6,opt,name=architecture,proto3" json:"architecture,omitempty"` Directory string `protobuf:"bytes,7,opt,name=directory,proto3" json:"directory,omitempty"` Apps []*App `protobuf:"bytes,8,rep,name=apps,proto3" json:"apps,omitempty"` - // Types that are assignable to Auth: + // Types that are valid to be assigned to Auth: // // *Agent_Token // *Agent_InstanceId @@ -1609,15 +1557,15 @@ type Agent struct { ResourcesMonitoring *ResourcesMonitoring `protobuf:"bytes,24,opt,name=resources_monitoring,json=resourcesMonitoring,proto3" json:"resources_monitoring,omitempty"` Devcontainers []*Devcontainer `protobuf:"bytes,25,rep,name=devcontainers,proto3" json:"devcontainers,omitempty"` ApiKeyScope string `protobuf:"bytes,26,opt,name=api_key_scope,json=apiKeyScope,proto3" json:"api_key_scope,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Agent) Reset() { *x = Agent{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent) String() string { @@ -1628,7 +1576,7 @@ func (*Agent) ProtoMessage() {} func (x *Agent) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1692,23 +1640,27 @@ func (x *Agent) GetApps() []*App { return nil } -func (m *Agent) GetAuth() isAgent_Auth { - if m != nil { - return m.Auth +func (x *Agent) GetAuth() isAgent_Auth { + if x != nil { + return x.Auth } return nil } func (x *Agent) GetToken() string { - if x, ok := x.GetAuth().(*Agent_Token); ok { - return x.Token + if x != nil { + if x, ok := x.Auth.(*Agent_Token); ok { + return x.Token + } } return "" } func (x *Agent) GetInstanceId() string { - if x, ok := x.GetAuth().(*Agent_InstanceId); ok { - return x.InstanceId + if x != nil { + if x, ok := x.Auth.(*Agent_InstanceId); ok { + return x.InstanceId + } } return "" } @@ -1807,21 +1759,18 @@ func (*Agent_Token) isAgent_Auth() {} func (*Agent_InstanceId) isAgent_Auth() {} type ResourcesMonitoring struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Memory *MemoryResourceMonitor `protobuf:"bytes,1,opt,name=memory,proto3" json:"memory,omitempty"` + Volumes []*VolumeResourceMonitor `protobuf:"bytes,2,rep,name=volumes,proto3" json:"volumes,omitempty"` unknownFields protoimpl.UnknownFields - - Memory *MemoryResourceMonitor `protobuf:"bytes,1,opt,name=memory,proto3" json:"memory,omitempty"` - Volumes []*VolumeResourceMonitor `protobuf:"bytes,2,rep,name=volumes,proto3" json:"volumes,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResourcesMonitoring) Reset() { *x = ResourcesMonitoring{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcesMonitoring) String() string { @@ -1832,7 +1781,7 @@ func (*ResourcesMonitoring) ProtoMessage() {} func (x *ResourcesMonitoring) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1862,21 +1811,18 @@ func (x *ResourcesMonitoring) GetVolumes() []*VolumeResourceMonitor { } type MemoryResourceMonitor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + Threshold int32 `protobuf:"varint,2,opt,name=threshold,proto3" json:"threshold,omitempty"` unknownFields protoimpl.UnknownFields - - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - Threshold int32 `protobuf:"varint,2,opt,name=threshold,proto3" json:"threshold,omitempty"` + sizeCache protoimpl.SizeCache } func (x *MemoryResourceMonitor) Reset() { *x = MemoryResourceMonitor{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MemoryResourceMonitor) String() string { @@ -1887,7 +1833,7 @@ func (*MemoryResourceMonitor) ProtoMessage() {} func (x *MemoryResourceMonitor) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1917,22 +1863,19 @@ func (x *MemoryResourceMonitor) GetThreshold() int32 { } type VolumeResourceMonitor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` + Threshold int32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` - Threshold int32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` + sizeCache protoimpl.SizeCache } func (x *VolumeResourceMonitor) Reset() { *x = VolumeResourceMonitor{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VolumeResourceMonitor) String() string { @@ -1943,7 +1886,7 @@ func (*VolumeResourceMonitor) ProtoMessage() {} func (x *VolumeResourceMonitor) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1980,24 +1923,21 @@ func (x *VolumeResourceMonitor) GetThreshold() int32 { } type DisplayApps struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Vscode bool `protobuf:"varint,1,opt,name=vscode,proto3" json:"vscode,omitempty"` - VscodeInsiders bool `protobuf:"varint,2,opt,name=vscode_insiders,json=vscodeInsiders,proto3" json:"vscode_insiders,omitempty"` - WebTerminal bool `protobuf:"varint,3,opt,name=web_terminal,json=webTerminal,proto3" json:"web_terminal,omitempty"` - SshHelper bool `protobuf:"varint,4,opt,name=ssh_helper,json=sshHelper,proto3" json:"ssh_helper,omitempty"` - PortForwardingHelper bool `protobuf:"varint,5,opt,name=port_forwarding_helper,json=portForwardingHelper,proto3" json:"port_forwarding_helper,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Vscode bool `protobuf:"varint,1,opt,name=vscode,proto3" json:"vscode,omitempty"` + VscodeInsiders bool `protobuf:"varint,2,opt,name=vscode_insiders,json=vscodeInsiders,proto3" json:"vscode_insiders,omitempty"` + WebTerminal bool `protobuf:"varint,3,opt,name=web_terminal,json=webTerminal,proto3" json:"web_terminal,omitempty"` + SshHelper bool `protobuf:"varint,4,opt,name=ssh_helper,json=sshHelper,proto3" json:"ssh_helper,omitempty"` + PortForwardingHelper bool `protobuf:"varint,5,opt,name=port_forwarding_helper,json=portForwardingHelper,proto3" json:"port_forwarding_helper,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DisplayApps) Reset() { *x = DisplayApps{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisplayApps) String() string { @@ -2008,7 +1948,7 @@ func (*DisplayApps) ProtoMessage() {} func (x *DisplayApps) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2059,21 +1999,18 @@ func (x *DisplayApps) GetPortForwardingHelper() bool { } type Env struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Env) Reset() { *x = Env{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Env) String() string { @@ -2084,7 +2021,7 @@ func (*Env) ProtoMessage() {} func (x *Env) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2115,28 +2052,25 @@ func (x *Env) GetValue() string { // Script represents a script to be run on the workspace. type Script struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Icon string `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"` - Script string `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` - Cron string `protobuf:"bytes,4,opt,name=cron,proto3" json:"cron,omitempty"` - StartBlocksLogin bool `protobuf:"varint,5,opt,name=start_blocks_login,json=startBlocksLogin,proto3" json:"start_blocks_login,omitempty"` - RunOnStart bool `protobuf:"varint,6,opt,name=run_on_start,json=runOnStart,proto3" json:"run_on_start,omitempty"` - RunOnStop bool `protobuf:"varint,7,opt,name=run_on_stop,json=runOnStop,proto3" json:"run_on_stop,omitempty"` - TimeoutSeconds int32 `protobuf:"varint,8,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` - LogPath string `protobuf:"bytes,9,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Icon string `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"` + Script string `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` + Cron string `protobuf:"bytes,4,opt,name=cron,proto3" json:"cron,omitempty"` + StartBlocksLogin bool `protobuf:"varint,5,opt,name=start_blocks_login,json=startBlocksLogin,proto3" json:"start_blocks_login,omitempty"` + RunOnStart bool `protobuf:"varint,6,opt,name=run_on_start,json=runOnStart,proto3" json:"run_on_start,omitempty"` + RunOnStop bool `protobuf:"varint,7,opt,name=run_on_stop,json=runOnStop,proto3" json:"run_on_stop,omitempty"` + TimeoutSeconds int32 `protobuf:"varint,8,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` + LogPath string `protobuf:"bytes,9,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Script) Reset() { *x = Script{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Script) String() string { @@ -2147,7 +2081,7 @@ func (*Script) ProtoMessage() {} func (x *Script) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2226,22 +2160,19 @@ func (x *Script) GetLogPath() string { } type Devcontainer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkspaceFolder string `protobuf:"bytes,1,opt,name=workspace_folder,json=workspaceFolder,proto3" json:"workspace_folder,omitempty"` - ConfigPath string `protobuf:"bytes,2,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceFolder string `protobuf:"bytes,1,opt,name=workspace_folder,json=workspaceFolder,proto3" json:"workspace_folder,omitempty"` + ConfigPath string `protobuf:"bytes,2,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Devcontainer) Reset() { *x = Devcontainer{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Devcontainer) String() string { @@ -2252,7 +2183,7 @@ func (*Devcontainer) ProtoMessage() {} func (x *Devcontainer) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2290,36 +2221,33 @@ func (x *Devcontainer) GetName() string { // App represents a dev-accessible application on the workspace. type App struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // slug is the unique identifier for the app, usually the name from the // template. It must be URL-safe and hostname-safe. - Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"` - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Command string `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"` - Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` - Icon string `protobuf:"bytes,5,opt,name=icon,proto3" json:"icon,omitempty"` - Subdomain bool `protobuf:"varint,6,opt,name=subdomain,proto3" json:"subdomain,omitempty"` - Healthcheck *Healthcheck `protobuf:"bytes,7,opt,name=healthcheck,proto3" json:"healthcheck,omitempty"` - SharingLevel AppSharingLevel `protobuf:"varint,8,opt,name=sharing_level,json=sharingLevel,proto3,enum=provisioner.AppSharingLevel" json:"sharing_level,omitempty"` - External bool `protobuf:"varint,9,opt,name=external,proto3" json:"external,omitempty"` - Order int64 `protobuf:"varint,10,opt,name=order,proto3" json:"order,omitempty"` - Hidden bool `protobuf:"varint,11,opt,name=hidden,proto3" json:"hidden,omitempty"` - OpenIn AppOpenIn `protobuf:"varint,12,opt,name=open_in,json=openIn,proto3,enum=provisioner.AppOpenIn" json:"open_in,omitempty"` - Group string `protobuf:"bytes,13,opt,name=group,proto3" json:"group,omitempty"` - Id string `protobuf:"bytes,14,opt,name=id,proto3" json:"id,omitempty"` // If nil, new UUID will be generated. - Tooltip string `protobuf:"bytes,15,opt,name=tooltip,proto3" json:"tooltip,omitempty"` + Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Command string `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"` + Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` + Icon string `protobuf:"bytes,5,opt,name=icon,proto3" json:"icon,omitempty"` + Subdomain bool `protobuf:"varint,6,opt,name=subdomain,proto3" json:"subdomain,omitempty"` + Healthcheck *Healthcheck `protobuf:"bytes,7,opt,name=healthcheck,proto3" json:"healthcheck,omitempty"` + SharingLevel AppSharingLevel `protobuf:"varint,8,opt,name=sharing_level,json=sharingLevel,proto3,enum=provisioner.AppSharingLevel" json:"sharing_level,omitempty"` + External bool `protobuf:"varint,9,opt,name=external,proto3" json:"external,omitempty"` + Order int64 `protobuf:"varint,10,opt,name=order,proto3" json:"order,omitempty"` + Hidden bool `protobuf:"varint,11,opt,name=hidden,proto3" json:"hidden,omitempty"` + OpenIn AppOpenIn `protobuf:"varint,12,opt,name=open_in,json=openIn,proto3,enum=provisioner.AppOpenIn" json:"open_in,omitempty"` + Group string `protobuf:"bytes,13,opt,name=group,proto3" json:"group,omitempty"` + Id string `protobuf:"bytes,14,opt,name=id,proto3" json:"id,omitempty"` // If nil, new UUID will be generated. + Tooltip string `protobuf:"bytes,15,opt,name=tooltip,proto3" json:"tooltip,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *App) Reset() { *x = App{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *App) String() string { @@ -2330,7 +2258,7 @@ func (*App) ProtoMessage() {} func (x *App) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2452,22 +2380,19 @@ func (x *App) GetTooltip() string { // Healthcheck represents configuration for checking for app readiness. type Healthcheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Interval int32 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` + Threshold int32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - Interval int32 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` - Threshold int32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Healthcheck) Reset() { *x = Healthcheck{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Healthcheck) String() string { @@ -2478,7 +2403,7 @@ func (*Healthcheck) ProtoMessage() {} func (x *Healthcheck) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2516,28 +2441,25 @@ func (x *Healthcheck) GetThreshold() int32 { // Resource represents created infrastructure. type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Agents []*Agent `protobuf:"bytes,3,rep,name=agents,proto3" json:"agents,omitempty"` + Metadata []*Resource_Metadata `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty"` + Hide bool `protobuf:"varint,5,opt,name=hide,proto3" json:"hide,omitempty"` + Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` + InstanceType string `protobuf:"bytes,7,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` + DailyCost int32 `protobuf:"varint,8,opt,name=daily_cost,json=dailyCost,proto3" json:"daily_cost,omitempty"` + ModulePath string `protobuf:"bytes,9,opt,name=module_path,json=modulePath,proto3" json:"module_path,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Agents []*Agent `protobuf:"bytes,3,rep,name=agents,proto3" json:"agents,omitempty"` - Metadata []*Resource_Metadata `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty"` - Hide bool `protobuf:"varint,5,opt,name=hide,proto3" json:"hide,omitempty"` - Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` - InstanceType string `protobuf:"bytes,7,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` - DailyCost int32 `protobuf:"varint,8,opt,name=daily_cost,json=dailyCost,proto3" json:"daily_cost,omitempty"` - ModulePath string `protobuf:"bytes,9,opt,name=module_path,json=modulePath,proto3" json:"module_path,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Resource) Reset() { *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resource) String() string { @@ -2548,7 +2470,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2627,23 +2549,20 @@ func (x *Resource) GetModulePath() string { } type Module struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Dir string `protobuf:"bytes,4,opt,name=dir,proto3" json:"dir,omitempty"` unknownFields protoimpl.UnknownFields - - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Dir string `protobuf:"bytes,4,opt,name=dir,proto3" json:"dir,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Module) Reset() { *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Module) String() string { @@ -2654,7 +2573,7 @@ func (*Module) ProtoMessage() {} func (x *Module) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2698,21 +2617,18 @@ func (x *Module) GetDir() string { } type Role struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Role) Reset() { *x = Role{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Role) String() string { @@ -2723,7 +2639,7 @@ func (*Role) ProtoMessage() {} func (x *Role) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2753,21 +2669,18 @@ func (x *Role) GetOrgId() string { } type RunningAgentAuthToken struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` unknownFields protoimpl.UnknownFields - - AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RunningAgentAuthToken) Reset() { *x = RunningAgentAuthToken{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunningAgentAuthToken) String() string { @@ -2778,7 +2691,7 @@ func (*RunningAgentAuthToken) ProtoMessage() {} func (x *RunningAgentAuthToken) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2808,20 +2721,17 @@ func (x *RunningAgentAuthToken) GetToken() string { } type AITaskSidebarApp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AITaskSidebarApp) Reset() { *x = AITaskSidebarApp{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AITaskSidebarApp) String() string { @@ -2832,7 +2742,7 @@ func (*AITaskSidebarApp) ProtoMessage() {} func (x *AITaskSidebarApp) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2855,22 +2765,19 @@ func (x *AITaskSidebarApp) GetId() string { } type AITask struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SidebarApp *AITaskSidebarApp `protobuf:"bytes,2,opt,name=sidebar_app,json=sidebarApp,proto3,oneof" json:"sidebar_app,omitempty"` + AppId string `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - SidebarApp *AITaskSidebarApp `protobuf:"bytes,2,opt,name=sidebar_app,json=sidebarApp,proto3,oneof" json:"sidebar_app,omitempty"` - AppId string `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AITask) Reset() { *x = AITask{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AITask) String() string { @@ -2881,7 +2788,7 @@ func (*AITask) ProtoMessage() {} func (x *AITask) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2919,10 +2826,7 @@ func (x *AITask) GetAppId() string { // Metadata is information about a workspace used in the execution of a build type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` CoderUrl string `protobuf:"bytes,1,opt,name=coder_url,json=coderUrl,proto3" json:"coder_url,omitempty"` WorkspaceTransition WorkspaceTransition `protobuf:"varint,2,opt,name=workspace_transition,json=workspaceTransition,proto3,enum=provisioner.WorkspaceTransition" json:"workspace_transition,omitempty"` WorkspaceName string `protobuf:"bytes,3,opt,name=workspace_name,json=workspaceName,proto3" json:"workspace_name,omitempty"` @@ -2947,15 +2851,15 @@ type Metadata struct { TaskId string `protobuf:"bytes,22,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` TaskPrompt string `protobuf:"bytes,23,opt,name=task_prompt,json=taskPrompt,proto3" json:"task_prompt,omitempty"` TemplateVersionId string `protobuf:"bytes,24,opt,name=template_version_id,json=templateVersionId,proto3" json:"template_version_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Metadata) Reset() { *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Metadata) String() string { @@ -2966,7 +2870,7 @@ func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3151,10 +3055,7 @@ func (x *Metadata) GetTemplateVersionId() string { // Config represents execution configuration shared by all subsequent requests in the Session type Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // template_source_archive is a tar of the template source files TemplateSourceArchive []byte `protobuf:"bytes,1,opt,name=template_source_archive,json=templateSourceArchive,proto3" json:"template_source_archive,omitempty"` // state is the provisioner state (if any) @@ -3165,15 +3066,15 @@ type Config struct { // Dry runs omit version id TemplateVersionId *string `protobuf:"bytes,5,opt,name=template_version_id,json=templateVersionId,proto3,oneof" json:"template_version_id,omitempty"` ExpReuseTerraformWorkspace *bool `protobuf:"varint,6,opt,name=exp_reuse_terraform_workspace,json=expReuseTerraformWorkspace,proto3,oneof" json:"exp_reuse_terraform_workspace,omitempty"` // Whether to reuse existing terraform workspaces if they exist. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Config) Reset() { *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Config) String() string { @@ -3184,7 +3085,7 @@ func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3243,18 +3144,16 @@ func (x *Config) GetExpReuseTerraformWorkspace() bool { // ParseRequest consumes source-code to produce inputs. type ParseRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ParseRequest) Reset() { *x = ParseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParseRequest) String() string { @@ -3265,7 +3164,7 @@ func (*ParseRequest) ProtoMessage() {} func (x *ParseRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3282,23 +3181,20 @@ func (*ParseRequest) Descriptor() ([]byte, []int) { // ParseComplete indicates a request to parse completed. type ParseComplete struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - TemplateVariables []*TemplateVariable `protobuf:"bytes,2,rep,name=template_variables,json=templateVariables,proto3" json:"template_variables,omitempty"` - Readme []byte `protobuf:"bytes,3,opt,name=readme,proto3" json:"readme,omitempty"` - WorkspaceTags map[string]string `protobuf:"bytes,4,rep,name=workspace_tags,json=workspaceTags,proto3" json:"workspace_tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + state protoimpl.MessageState `protogen:"open.v1"` + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + TemplateVariables []*TemplateVariable `protobuf:"bytes,2,rep,name=template_variables,json=templateVariables,proto3" json:"template_variables,omitempty"` + Readme []byte `protobuf:"bytes,3,opt,name=readme,proto3" json:"readme,omitempty"` + WorkspaceTags map[string]string `protobuf:"bytes,4,rep,name=workspace_tags,json=workspaceTags,proto3" json:"workspace_tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ParseComplete) Reset() { *x = ParseComplete{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParseComplete) String() string { @@ -3309,7 +3205,7 @@ func (*ParseComplete) ProtoMessage() {} func (x *ParseComplete) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3352,12 +3248,89 @@ func (x *ParseComplete) GetWorkspaceTags() map[string]string { return nil } -// PlanRequest asks the provisioner to plan what resources & parameters it will create -type PlanRequest struct { - state protoimpl.MessageState +type InitRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache +} + +func (x *InitRequest) Reset() { + *x = InitRequest{} + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InitRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitRequest) ProtoMessage() {} + +func (x *InitRequest) ProtoReflect() protoreflect.Message { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitRequest.ProtoReflect.Descriptor instead. +func (*InitRequest) Descriptor() ([]byte, []int) { + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{37} +} + +type InitResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InitResponse) Reset() { + *x = InitResponse{} + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitResponse) ProtoMessage() {} + +func (x *InitResponse) ProtoReflect() protoreflect.Message { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitResponse.ProtoReflect.Descriptor instead. +func (*InitResponse) Descriptor() ([]byte, []int) { + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{38} +} +func (x *InitResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +// PlanRequest asks the provisioner to plan what resources & parameters it will create +type PlanRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` RichParameterValues []*RichParameterValue `protobuf:"bytes,2,rep,name=rich_parameter_values,json=richParameterValues,proto3" json:"rich_parameter_values,omitempty"` VariableValues []*VariableValue `protobuf:"bytes,3,rep,name=variable_values,json=variableValues,proto3" json:"variable_values,omitempty"` @@ -3369,15 +3342,15 @@ type PlanRequest struct { // backwards compatibility reasons, the zero value should be the previous // behavior of downloading the module files. OmitModuleFiles bool `protobuf:"varint,6,opt,name=omit_module_files,json=omitModuleFiles,proto3" json:"omit_module_files,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PlanRequest) Reset() { *x = PlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlanRequest) String() string { @@ -3387,8 +3360,8 @@ func (x *PlanRequest) String() string { func (*PlanRequest) ProtoMessage() {} func (x *PlanRequest) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[39] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3400,7 +3373,7 @@ func (x *PlanRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PlanRequest.ProtoReflect.Descriptor instead. func (*PlanRequest) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{37} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{39} } func (x *PlanRequest) GetMetadata() *Metadata { @@ -3447,10 +3420,7 @@ func (x *PlanRequest) GetOmitModuleFiles() bool { // PlanComplete indicates a request to plan completed. type PlanComplete struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Resources []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` Parameters []*RichParameter `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty"` @@ -3470,15 +3440,15 @@ type PlanComplete struct { HasAiTasks bool `protobuf:"varint,13,opt,name=has_ai_tasks,json=hasAiTasks,proto3" json:"has_ai_tasks,omitempty"` AiTasks []*AITask `protobuf:"bytes,14,rep,name=ai_tasks,json=aiTasks,proto3" json:"ai_tasks,omitempty"` HasExternalAgents bool `protobuf:"varint,15,opt,name=has_external_agents,json=hasExternalAgents,proto3" json:"has_external_agents,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PlanComplete) Reset() { *x = PlanComplete{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlanComplete) String() string { @@ -3488,8 +3458,8 @@ func (x *PlanComplete) String() string { func (*PlanComplete) ProtoMessage() {} func (x *PlanComplete) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[40] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3501,7 +3471,7 @@ func (x *PlanComplete) ProtoReflect() protoreflect.Message { // Deprecated: Use PlanComplete.ProtoReflect.Descriptor instead. func (*PlanComplete) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{38} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{40} } func (x *PlanComplete) GetError() string { @@ -3605,20 +3575,17 @@ func (x *PlanComplete) GetHasExternalAgents() bool { // ApplyRequest asks the provisioner to apply the changes. Apply MUST be preceded by a successful plan request/response // in the same Session. The plan data is not transmitted over the wire and is cached by the provisioner in the Session. type ApplyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` unknownFields protoimpl.UnknownFields - - Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ApplyRequest) Reset() { *x = ApplyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyRequest) String() string { @@ -3628,8 +3595,8 @@ func (x *ApplyRequest) String() string { func (*ApplyRequest) ProtoMessage() {} func (x *ApplyRequest) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[41] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3641,7 +3608,7 @@ func (x *ApplyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyRequest.ProtoReflect.Descriptor instead. func (*ApplyRequest) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{39} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{41} } func (x *ApplyRequest) GetMetadata() *Metadata { @@ -3653,10 +3620,7 @@ func (x *ApplyRequest) GetMetadata() *Metadata { // ApplyComplete indicates a request to apply completed. type ApplyComplete struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` Resources []*Resource `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources,omitempty"` @@ -3664,15 +3628,15 @@ type ApplyComplete struct { ExternalAuthProviders []*ExternalAuthProviderResource `protobuf:"bytes,5,rep,name=external_auth_providers,json=externalAuthProviders,proto3" json:"external_auth_providers,omitempty"` Timings []*Timing `protobuf:"bytes,6,rep,name=timings,proto3" json:"timings,omitempty"` AiTasks []*AITask `protobuf:"bytes,7,rep,name=ai_tasks,json=aiTasks,proto3" json:"ai_tasks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ApplyComplete) Reset() { *x = ApplyComplete{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyComplete) String() string { @@ -3682,8 +3646,8 @@ func (x *ApplyComplete) String() string { func (*ApplyComplete) ProtoMessage() {} func (x *ApplyComplete) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[42] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3695,7 +3659,7 @@ func (x *ApplyComplete) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyComplete.ProtoReflect.Descriptor instead. func (*ApplyComplete) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{40} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{42} } func (x *ApplyComplete) GetState() []byte { @@ -3748,26 +3712,23 @@ func (x *ApplyComplete) GetAiTasks() []*AITask { } type Timing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` + End *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` + Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` + Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` + Resource string `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"` + Stage string `protobuf:"bytes,6,opt,name=stage,proto3" json:"stage,omitempty"` + State TimingState `protobuf:"varint,7,opt,name=state,proto3,enum=provisioner.TimingState" json:"state,omitempty"` unknownFields protoimpl.UnknownFields - - Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` - End *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` - Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` - Resource string `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"` - Stage string `protobuf:"bytes,6,opt,name=stage,proto3" json:"stage,omitempty"` - State TimingState `protobuf:"varint,7,opt,name=state,proto3,enum=provisioner.TimingState" json:"state,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Timing) Reset() { *x = Timing{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Timing) String() string { @@ -3777,8 +3738,8 @@ func (x *Timing) String() string { func (*Timing) ProtoMessage() {} func (x *Timing) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3790,7 +3751,7 @@ func (x *Timing) ProtoReflect() protoreflect.Message { // Deprecated: Use Timing.ProtoReflect.Descriptor instead. func (*Timing) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{41} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{43} } func (x *Timing) GetStart() *timestamppb.Timestamp { @@ -3844,18 +3805,16 @@ func (x *Timing) GetState() TimingState { // CancelRequest requests that the previous request be canceled gracefully. type CancelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CancelRequest) Reset() { *x = CancelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelRequest) String() string { @@ -3865,8 +3824,8 @@ func (x *CancelRequest) String() string { func (*CancelRequest) ProtoMessage() {} func (x *CancelRequest) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3878,31 +3837,28 @@ func (x *CancelRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelRequest.ProtoReflect.Descriptor instead. func (*CancelRequest) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{42} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{44} } type Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Type: // // *Request_Config // *Request_Parse // *Request_Plan // *Request_Apply // *Request_Cancel - Type isRequest_Type `protobuf_oneof:"type"` + Type isRequest_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request) Reset() { *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Request) String() string { @@ -3912,8 +3868,8 @@ func (x *Request) String() string { func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3925,47 +3881,57 @@ func (x *Request) ProtoReflect() protoreflect.Message { // Deprecated: Use Request.ProtoReflect.Descriptor instead. func (*Request) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{43} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{45} } -func (m *Request) GetType() isRequest_Type { - if m != nil { - return m.Type +func (x *Request) GetType() isRequest_Type { + if x != nil { + return x.Type } return nil } func (x *Request) GetConfig() *Config { - if x, ok := x.GetType().(*Request_Config); ok { - return x.Config + if x != nil { + if x, ok := x.Type.(*Request_Config); ok { + return x.Config + } } return nil } func (x *Request) GetParse() *ParseRequest { - if x, ok := x.GetType().(*Request_Parse); ok { - return x.Parse + if x != nil { + if x, ok := x.Type.(*Request_Parse); ok { + return x.Parse + } } return nil } func (x *Request) GetPlan() *PlanRequest { - if x, ok := x.GetType().(*Request_Plan); ok { - return x.Plan + if x != nil { + if x, ok := x.Type.(*Request_Plan); ok { + return x.Plan + } } return nil } func (x *Request) GetApply() *ApplyRequest { - if x, ok := x.GetType().(*Request_Apply); ok { - return x.Apply + if x != nil { + if x, ok := x.Type.(*Request_Apply); ok { + return x.Apply + } } return nil } func (x *Request) GetCancel() *CancelRequest { - if x, ok := x.GetType().(*Request_Cancel); ok { - return x.Cancel + if x != nil { + if x, ok := x.Type.(*Request_Cancel); ok { + return x.Cancel + } } return nil } @@ -4005,11 +3971,8 @@ func (*Request_Apply) isRequest_Type() {} func (*Request_Cancel) isRequest_Type() {} type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Type: // // *Response_Log // *Response_Parse @@ -4017,16 +3980,16 @@ type Response struct { // *Response_Apply // *Response_DataUpload // *Response_ChunkPiece - Type isResponse_Type `protobuf_oneof:"type"` + Type isResponse_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Response) Reset() { *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Response) String() string { @@ -4036,8 +3999,8 @@ func (x *Response) String() string { func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4049,54 +4012,66 @@ func (x *Response) ProtoReflect() protoreflect.Message { // Deprecated: Use Response.ProtoReflect.Descriptor instead. func (*Response) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{44} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{46} } -func (m *Response) GetType() isResponse_Type { - if m != nil { - return m.Type +func (x *Response) GetType() isResponse_Type { + if x != nil { + return x.Type } return nil } func (x *Response) GetLog() *Log { - if x, ok := x.GetType().(*Response_Log); ok { - return x.Log + if x != nil { + if x, ok := x.Type.(*Response_Log); ok { + return x.Log + } } return nil } func (x *Response) GetParse() *ParseComplete { - if x, ok := x.GetType().(*Response_Parse); ok { - return x.Parse + if x != nil { + if x, ok := x.Type.(*Response_Parse); ok { + return x.Parse + } } return nil } func (x *Response) GetPlan() *PlanComplete { - if x, ok := x.GetType().(*Response_Plan); ok { - return x.Plan + if x != nil { + if x, ok := x.Type.(*Response_Plan); ok { + return x.Plan + } } return nil } func (x *Response) GetApply() *ApplyComplete { - if x, ok := x.GetType().(*Response_Apply); ok { - return x.Apply + if x != nil { + if x, ok := x.Type.(*Response_Apply); ok { + return x.Apply + } } return nil } func (x *Response) GetDataUpload() *DataUpload { - if x, ok := x.GetType().(*Response_DataUpload); ok { - return x.DataUpload + if x != nil { + if x, ok := x.Type.(*Response_DataUpload); ok { + return x.DataUpload + } } return nil } func (x *Response) GetChunkPiece() *ChunkPiece { - if x, ok := x.GetType().(*Response_ChunkPiece); ok { - return x.ChunkPiece + if x != nil { + if x, ok := x.Type.(*Response_ChunkPiece); ok { + return x.ChunkPiece + } } return nil } @@ -4142,27 +4117,24 @@ func (*Response_DataUpload) isResponse_Type() {} func (*Response_ChunkPiece) isResponse_Type() {} type DataUpload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UploadType DataUploadType `protobuf:"varint,1,opt,name=upload_type,json=uploadType,proto3,enum=provisioner.DataUploadType" json:"upload_type,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + UploadType DataUploadType `protobuf:"varint,1,opt,name=upload_type,json=uploadType,proto3,enum=provisioner.DataUploadType" json:"upload_type,omitempty"` // data_hash is the sha256 of the payload to be uploaded. // This is also used to uniquely identify the upload. DataHash []byte `protobuf:"bytes,2,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` // file_size is the total size of the data being uploaded. FileSize int64 `protobuf:"varint,3,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"` // Number of chunks to be uploaded. - Chunks int32 `protobuf:"varint,4,opt,name=chunks,proto3" json:"chunks,omitempty"` + Chunks int32 `protobuf:"varint,4,opt,name=chunks,proto3" json:"chunks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DataUpload) Reset() { *x = DataUpload{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataUpload) String() string { @@ -4172,8 +4144,8 @@ func (x *DataUpload) String() string { func (*DataUpload) ProtoMessage() {} func (x *DataUpload) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4185,7 +4157,7 @@ func (x *DataUpload) ProtoReflect() protoreflect.Message { // Deprecated: Use DataUpload.ProtoReflect.Descriptor instead. func (*DataUpload) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{45} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{47} } func (x *DataUpload) GetUploadType() DataUploadType { @@ -4218,24 +4190,21 @@ func (x *DataUpload) GetChunks() int32 { // ChunkPiece is used to stream over large files (over the 4mb limit). type ChunkPiece struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // full_data_hash should match the hash from the original // DataUpload message - FullDataHash []byte `protobuf:"bytes,2,opt,name=full_data_hash,json=fullDataHash,proto3" json:"full_data_hash,omitempty"` - PieceIndex int32 `protobuf:"varint,3,opt,name=piece_index,json=pieceIndex,proto3" json:"piece_index,omitempty"` + FullDataHash []byte `protobuf:"bytes,2,opt,name=full_data_hash,json=fullDataHash,proto3" json:"full_data_hash,omitempty"` + PieceIndex int32 `protobuf:"varint,3,opt,name=piece_index,json=pieceIndex,proto3" json:"piece_index,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ChunkPiece) Reset() { *x = ChunkPiece{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChunkPiece) String() string { @@ -4245,8 +4214,8 @@ func (x *ChunkPiece) String() string { func (*ChunkPiece) ProtoMessage() {} func (x *ChunkPiece) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[48] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4258,7 +4227,7 @@ func (x *ChunkPiece) ProtoReflect() protoreflect.Message { // Deprecated: Use ChunkPiece.ProtoReflect.Descriptor instead. func (*ChunkPiece) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{46} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{48} } func (x *ChunkPiece) GetData() []byte { @@ -4283,25 +4252,22 @@ func (x *ChunkPiece) GetPieceIndex() int32 { } type Agent_Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Script string `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` + Interval int64 `protobuf:"varint,4,opt,name=interval,proto3" json:"interval,omitempty"` + Timeout int64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"` + Order int64 `protobuf:"varint,6,opt,name=order,proto3" json:"order,omitempty"` unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Script string `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` - Interval int64 `protobuf:"varint,4,opt,name=interval,proto3" json:"interval,omitempty"` - Timeout int64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"` - Order int64 `protobuf:"varint,6,opt,name=order,proto3" json:"order,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Agent_Metadata) Reset() { *x = Agent_Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_Metadata) String() string { @@ -4311,8 +4277,8 @@ func (x *Agent_Metadata) String() string { func (*Agent_Metadata) ProtoMessage() {} func (x *Agent_Metadata) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4370,23 +4336,20 @@ func (x *Agent_Metadata) GetOrder() int64 { } type Resource_Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Sensitive bool `protobuf:"varint,3,opt,name=sensitive,proto3" json:"sensitive,omitempty"` + IsNull bool `protobuf:"varint,4,opt,name=is_null,json=isNull,proto3" json:"is_null,omitempty"` unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Sensitive bool `protobuf:"varint,3,opt,name=sensitive,proto3" json:"sensitive,omitempty"` - IsNull bool `protobuf:"varint,4,opt,name=is_null,json=isNull,proto3" json:"is_null,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Resource_Metadata) Reset() { *x = Resource_Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resource_Metadata) String() string { @@ -4396,8 +4359,8 @@ func (x *Resource_Metadata) String() string { func (*Resource_Metadata) ProtoMessage() {} func (x *Resource_Metadata) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[51] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4442,725 +4405,415 @@ func (x *Resource_Metadata) GetIsNull() bool { var File_provisionersdk_proto_provisioner_proto protoreflect.FileDescriptor -var file_provisionersdk_proto_provisioner_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x73, 0x64, 0x6b, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0xbb, 0x01, 0x0a, 0x10, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 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, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x75, 0x0a, - 0x13, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x69, 0x63, 0x6f, 0x6e, 0x22, 0xbb, 0x05, 0x0a, 0x0d, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, - 0x63, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x29, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, - 0x67, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, - 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x88, 0x01, - 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0d, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, - 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x6e, 0x6f, - 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, - 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, - 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, - 0x72, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x46, 0x6f, - 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x69, 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x78, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x52, 0x14, 0x6c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x12, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 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, 0x22, 0x24, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x22, 0x3c, 0x0a, 0x08, 0x53, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x5b, 0x0a, 0x0a, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, - 0x12, 0x31, 0x0a, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x4a, - 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x37, 0x0a, 0x0a, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x69, 0x6e, 0x67, 0x22, 0xdd, 0x01, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x31, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, - 0x2e, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, - 0x63, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 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, - 0x22, 0x47, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0x57, 0x0a, 0x0d, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 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, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x22, 0x4a, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x2b, 0x0a, 0x05, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, - 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x37, - 0x0a, 0x14, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x1c, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x22, 0x49, 0x0a, 0x14, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, - 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xda, - 0x08, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x03, - 0x65, 0x6e, 0x76, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x6e, - 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x10, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, - 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x72, - 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x61, 0x70, 0x70, 0x73, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x04, 0x61, 0x70, 0x70, 0x73, 0x12, 0x16, - 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, - 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x18, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x74, 0x72, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x73, 0x68, 0x6f, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x72, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x73, 0x68, 0x6f, - 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x6f, 0x74, 0x64, - 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x6f, 0x74, - 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, - 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x61, 0x70, 0x70, 0x73, 0x18, 0x14, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x41, 0x70, 0x70, 0x73, 0x52, 0x0b, - 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x41, 0x70, 0x70, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x52, 0x07, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x0a, 0x65, 0x78, - 0x74, 0x72, 0x61, 0x5f, 0x65, 0x6e, 0x76, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x76, - 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x12, 0x53, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x6d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0d, 0x64, 0x65, 0x76, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x76, 0x63, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x0d, 0x64, 0x65, 0x76, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x70, 0x69, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0xa3, 0x01, 0x0a, 0x08, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 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, 0x42, 0x06, 0x0a, 0x04, 0x61, 0x75, 0x74, - 0x68, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x52, 0x12, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x62, - 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x8f, 0x01, 0x0a, 0x13, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x6e, 0x67, 0x12, 0x3a, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, - 0x72, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, - 0x3c, 0x0a, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x6f, 0x6e, - 0x69, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x22, 0x4f, 0x0a, - 0x15, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, - 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x63, - 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x22, 0xc6, 0x01, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x41, - 0x70, 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x76, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x76, - 0x73, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x76, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x73, 0x69, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x65, 0x62, 0x5f, 0x74, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x65, 0x62, 0x54, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x73, 0x68, 0x5f, 0x68, - 0x65, 0x6c, 0x70, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x73, 0x68, - 0x48, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x66, - 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, - 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x03, - 0x45, 0x6e, 0x76, 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, 0x22, 0x9f, 0x02, - 0x0a, 0x06, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, - 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, - 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x69, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x73, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x75, 0x6e, - 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x72, 0x75, 0x6e, 0x4f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x72, - 0x75, 0x6e, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x72, 0x75, 0x6e, 0x4f, 0x6e, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x22, - 0x6e, 0x0a, 0x0c, 0x44, 0x65, 0x76, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, - 0x29, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x66, 0x6f, 0x6c, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0xd4, 0x03, 0x0a, 0x03, 0x41, 0x70, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x64, - 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x75, 0x62, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x73, 0x75, 0x62, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x0b, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x0b, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x41, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, - 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x70, - 0x70, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0c, 0x73, - 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x65, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, - 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x52, 0x06, - 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, - 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x22, 0x59, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x22, 0x92, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, - 0x0a, 0x04, 0x68, 0x69, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x68, 0x69, - 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, - 0x61, 0x69, 0x6c, 0x79, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x09, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x69, 0x0a, 0x08, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 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, 0x12, - 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x17, 0x0a, - 0x07, 0x69, 0x73, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x69, 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x22, 0x5e, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x64, 0x69, 0x72, 0x22, 0x31, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x15, 0x52, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x22, 0x22, 0x0a, 0x10, 0x41, 0x49, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x69, 0x64, - 0x65, 0x62, 0x61, 0x72, 0x41, 0x70, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x84, 0x01, 0x0a, 0x06, 0x41, 0x49, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x73, 0x69, 0x64, 0x65, 0x62, 0x61, 0x72, 0x5f, 0x61, 0x70, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x49, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x69, 0x64, 0x65, - 0x62, 0x61, 0x72, 0x41, 0x70, 0x70, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x69, 0x64, 0x65, 0x62, 0x61, - 0x72, 0x41, 0x70, 0x70, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x42, 0x0e, - 0x0a, 0x0c, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x62, 0x61, 0x72, 0x5f, 0x61, 0x70, 0x70, 0x22, 0xb4, - 0x0a, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x63, - 0x6f, 0x64, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x63, 0x6f, 0x64, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x53, 0x0a, 0x14, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, - 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x21, 0x0a, - 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, - 0x12, 0x2c, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x77, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x32, - 0x0a, 0x15, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x21, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6f, 0x69, 0x64, 0x63, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x4f, 0x69, 0x64, - 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x41, 0x0a, 0x1d, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, - 0x6e, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, - 0x12, 0x30, 0x0a, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0e, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x42, 0x0a, 0x1e, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x73, 0x73, 0x68, 0x5f, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, - 0x53, 0x73, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x44, 0x0a, 0x1f, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, - 0x73, 0x73, 0x68, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x53, 0x73, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, - 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, - 0x12, 0x3b, 0x0a, 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, - 0x77, 0x6e, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4e, 0x0a, - 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x5f, 0x72, 0x62, 0x61, 0x63, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, - 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, - 0x77, 0x6e, 0x65, 0x72, 0x52, 0x62, 0x61, 0x63, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x6d, 0x0a, - 0x1e, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, - 0x14, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, - 0x1b, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x5d, 0x0a, 0x19, - 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x75, - 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x16, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x74, - 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, - 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x72, 0x6f, - 0x6d, 0x70, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x50, - 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x18, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xf7, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x36, 0x0a, 0x17, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x15, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x32, - 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x5f, 0x6c, 0x6f, - 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, - 0x1d, 0x65, 0x78, 0x70, 0x5f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x65, 0x72, 0x72, 0x61, - 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x1a, 0x65, 0x78, 0x70, 0x52, 0x65, 0x75, 0x73, 0x65, - 0x54, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x20, 0x0a, - 0x1e, 0x5f, 0x65, 0x78, 0x70, 0x5f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x65, 0x72, 0x72, - 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, - 0x0e, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0xa3, 0x02, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x12, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, - 0x72, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x12, 0x54, 0x0a, - 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, - 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x61, 0x67, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, - 0x61, 0x67, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x54, 0x61, 0x67, 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, 0xbe, 0x03, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x53, 0x0a, 0x15, 0x72, 0x69, 0x63, 0x68, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x72, 0x69, 0x63, 0x68, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, - 0x0f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x59, 0x0a, 0x17, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, - 0x75, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, - 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5b, 0x0a, - 0x19, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, - 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x6d, - 0x69, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6f, 0x6d, 0x69, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x22, 0xc1, 0x05, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x6e, 0x43, - 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x33, 0x0a, - 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x61, - 0x0a, 0x17, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x15, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, - 0x2e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x2d, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, - 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x6c, - 0x61, 0x6e, 0x12, 0x55, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, - 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, - 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, - 0x61, 0x69, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x68, 0x61, 0x73, 0x41, 0x69, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x61, 0x69, - 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x49, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x07, 0x61, 0x69, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x68, 0x61, - 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x68, 0x61, 0x73, 0x45, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x41, 0x0a, 0x0c, 0x41, 0x70, - 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xee, 0x02, - 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x09, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x3a, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x61, 0x0a, 0x17, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x2d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x54, - 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2e, - 0x0a, 0x08, 0x61, 0x69, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, - 0x49, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x07, 0x61, 0x69, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x22, 0xfa, - 0x01, 0x0a, 0x06, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x01, 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, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, - 0x6e, 0x64, 0x18, 0x02, 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, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8c, 0x02, 0x0a, - 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x31, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x70, 0x6c, - 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x12, 0x31, 0x0a, 0x05, 0x61, 0x70, - 0x70, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x34, 0x0a, - 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x06, 0x63, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc9, 0x02, 0x0a, 0x08, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x32, - 0x0a, 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x73, - 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x70, 0x61, 0x72, - 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, - 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x04, 0x70, - 0x6c, 0x61, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, - 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, - 0x52, 0x05, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x3a, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, - 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x70, 0x69, 0x65, - 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x69, 0x65, 0x63, - 0x65, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x69, 0x65, 0x63, 0x65, 0x42, - 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, - 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x55, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x22, 0x67, 0x0a, 0x0a, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x50, - 0x69, 0x65, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x75, 0x6c, 0x6c, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0c, 0x66, 0x75, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2a, - 0xa8, 0x01, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, - 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, - 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x41, 0x44, 0x49, 0x4f, 0x10, 0x02, 0x12, 0x0c, 0x0a, - 0x08, 0x44, 0x52, 0x4f, 0x50, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x49, - 0x4e, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x45, 0x58, 0x54, 0x41, 0x52, - 0x45, 0x41, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x4c, 0x49, 0x44, 0x45, 0x52, 0x10, 0x06, - 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x42, 0x4f, 0x58, 0x10, 0x07, 0x12, 0x0a, - 0x0a, 0x06, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x41, - 0x47, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x55, 0x4c, - 0x54, 0x49, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x10, 0x0a, 0x2a, 0x3f, 0x0a, 0x08, 0x4c, 0x6f, - 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, - 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, - 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x2a, 0x3b, 0x0a, 0x0f, 0x41, - 0x70, 0x70, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, - 0x0a, 0x05, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x55, 0x54, - 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x02, 0x2a, 0x35, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x12, 0x0e, 0x0a, 0x06, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x10, - 0x00, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x4c, 0x49, 0x4d, 0x5f, 0x57, 0x49, - 0x4e, 0x44, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x42, 0x10, 0x02, 0x2a, - 0x37, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, - 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x54, 0x4f, 0x50, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, - 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x10, 0x02, 0x2a, 0x3e, 0x0a, 0x1b, 0x50, 0x72, 0x65, 0x62, - 0x75, 0x69, 0x6c, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, - 0x05, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x10, 0x02, 0x2a, 0x35, 0x0a, 0x0b, 0x54, 0x69, 0x6d, 0x69, - 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x41, 0x52, 0x54, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, - 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x2a, - 0x47, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x55, 0x50, - 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, - 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x32, 0x49, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, - 0x01, 0x30, 0x01, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, - 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x73, 0x64, 0x6b, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + + "\n" + + "&provisionersdk/proto/provisioner.proto\x12\vprovisioner\x1a\x1fgoogle/protobuf/timestamp.proto\"\a\n" + + "\x05Empty\"\xbb\x01\n" + + "\x10TemplateVariable\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x12\n" + + "\x04type\x18\x03 \x01(\tR\x04type\x12#\n" + + "\rdefault_value\x18\x04 \x01(\tR\fdefaultValue\x12\x1a\n" + + "\brequired\x18\x05 \x01(\bR\brequired\x12\x1c\n" + + "\tsensitive\x18\x06 \x01(\bR\tsensitive\"u\n" + + "\x13RichParameterOption\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x14\n" + + "\x05value\x18\x03 \x01(\tR\x05value\x12\x12\n" + + "\x04icon\x18\x04 \x01(\tR\x04icon\"\xbb\x05\n" + + "\rRichParameter\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x12\n" + + "\x04type\x18\x03 \x01(\tR\x04type\x12\x18\n" + + "\amutable\x18\x04 \x01(\bR\amutable\x12#\n" + + "\rdefault_value\x18\x05 \x01(\tR\fdefaultValue\x12\x12\n" + + "\x04icon\x18\x06 \x01(\tR\x04icon\x12:\n" + + "\aoptions\x18\a \x03(\v2 .provisioner.RichParameterOptionR\aoptions\x12)\n" + + "\x10validation_regex\x18\b \x01(\tR\x0fvalidationRegex\x12)\n" + + "\x10validation_error\x18\t \x01(\tR\x0fvalidationError\x12*\n" + + "\x0evalidation_min\x18\n" + + " \x01(\x05H\x00R\rvalidationMin\x88\x01\x01\x12*\n" + + "\x0evalidation_max\x18\v \x01(\x05H\x01R\rvalidationMax\x88\x01\x01\x121\n" + + "\x14validation_monotonic\x18\f \x01(\tR\x13validationMonotonic\x12\x1a\n" + + "\brequired\x18\r \x01(\bR\brequired\x12!\n" + + "\fdisplay_name\x18\x0f \x01(\tR\vdisplayName\x12\x14\n" + + "\x05order\x18\x10 \x01(\x05R\x05order\x12\x1c\n" + + "\tephemeral\x18\x11 \x01(\bR\tephemeral\x12;\n" + + "\tform_type\x18\x12 \x01(\x0e2\x1e.provisioner.ParameterFormTypeR\bformTypeB\x11\n" + + "\x0f_validation_minB\x11\n" + + "\x0f_validation_maxJ\x04\b\x0e\x10\x0fR\x14legacy_variable_name\">\n" + + "\x12RichParameterValue\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\"$\n" + + "\x10ExpirationPolicy\x12\x10\n" + + "\x03ttl\x18\x01 \x01(\x05R\x03ttl\"<\n" + + "\bSchedule\x12\x12\n" + + "\x04cron\x18\x01 \x01(\tR\x04cron\x12\x1c\n" + + "\tinstances\x18\x02 \x01(\x05R\tinstances\"[\n" + + "\n" + + "Scheduling\x12\x1a\n" + + "\btimezone\x18\x01 \x01(\tR\btimezone\x121\n" + + "\bschedule\x18\x02 \x03(\v2\x15.provisioner.ScheduleR\bschedule\"\xad\x01\n" + + "\bPrebuild\x12\x1c\n" + + "\tinstances\x18\x01 \x01(\x05R\tinstances\x12J\n" + + "\x11expiration_policy\x18\x02 \x01(\v2\x1d.provisioner.ExpirationPolicyR\x10expirationPolicy\x127\n" + + "\n" + + "scheduling\x18\x03 \x01(\v2\x17.provisioner.SchedulingR\n" + + "scheduling\"\xdd\x01\n" + + "\x06Preset\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12<\n" + + "\n" + + "parameters\x18\x02 \x03(\v2\x1c.provisioner.PresetParameterR\n" + + "parameters\x121\n" + + "\bprebuild\x18\x03 \x01(\v2\x15.provisioner.PrebuildR\bprebuild\x12\x18\n" + + "\adefault\x18\x04 \x01(\bR\adefault\x12 \n" + + "\vdescription\x18\x05 \x01(\tR\vdescription\x12\x12\n" + + "\x04icon\x18\x06 \x01(\tR\x04icon\";\n" + + "\x0fPresetParameter\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\"G\n" + + "\x13ResourceReplacement\x12\x1a\n" + + "\bresource\x18\x01 \x01(\tR\bresource\x12\x14\n" + + "\x05paths\x18\x02 \x03(\tR\x05paths\"W\n" + + "\rVariableValue\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\x12\x1c\n" + + "\tsensitive\x18\x03 \x01(\bR\tsensitive\"J\n" + + "\x03Log\x12+\n" + + "\x05level\x18\x01 \x01(\x0e2\x15.provisioner.LogLevelR\x05level\x12\x16\n" + + "\x06output\x18\x02 \x01(\tR\x06output\"7\n" + + "\x14InstanceIdentityAuth\x12\x1f\n" + + "\vinstance_id\x18\x01 \x01(\tR\n" + + "instanceId\"J\n" + + "\x1cExternalAuthProviderResource\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + + "\boptional\x18\x02 \x01(\bR\boptional\"I\n" + + "\x14ExternalAuthProvider\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12!\n" + + "\faccess_token\x18\x02 \x01(\tR\vaccessToken\"\xda\b\n" + + "\x05Agent\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12-\n" + + "\x03env\x18\x03 \x03(\v2\x1b.provisioner.Agent.EnvEntryR\x03env\x12)\n" + + "\x10operating_system\x18\x05 \x01(\tR\x0foperatingSystem\x12\"\n" + + "\farchitecture\x18\x06 \x01(\tR\farchitecture\x12\x1c\n" + + "\tdirectory\x18\a \x01(\tR\tdirectory\x12$\n" + + "\x04apps\x18\b \x03(\v2\x10.provisioner.AppR\x04apps\x12\x16\n" + + "\x05token\x18\t \x01(\tH\x00R\x05token\x12!\n" + + "\vinstance_id\x18\n" + + " \x01(\tH\x00R\n" + + "instanceId\x12<\n" + + "\x1aconnection_timeout_seconds\x18\v \x01(\x05R\x18connectionTimeoutSeconds\x12/\n" + + "\x13troubleshooting_url\x18\f \x01(\tR\x12troubleshootingUrl\x12\x1b\n" + + "\tmotd_file\x18\r \x01(\tR\bmotdFile\x127\n" + + "\bmetadata\x18\x12 \x03(\v2\x1b.provisioner.Agent.MetadataR\bmetadata\x12;\n" + + "\fdisplay_apps\x18\x14 \x01(\v2\x18.provisioner.DisplayAppsR\vdisplayApps\x12-\n" + + "\ascripts\x18\x15 \x03(\v2\x13.provisioner.ScriptR\ascripts\x12/\n" + + "\n" + + "extra_envs\x18\x16 \x03(\v2\x10.provisioner.EnvR\textraEnvs\x12\x14\n" + + "\x05order\x18\x17 \x01(\x03R\x05order\x12S\n" + + "\x14resources_monitoring\x18\x18 \x01(\v2 .provisioner.ResourcesMonitoringR\x13resourcesMonitoring\x12?\n" + + "\rdevcontainers\x18\x19 \x03(\v2\x19.provisioner.DevcontainerR\rdevcontainers\x12\"\n" + + "\rapi_key_scope\x18\x1a \x01(\tR\vapiKeyScope\x1a\xa3\x01\n" + + "\bMetadata\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12!\n" + + "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x12\x16\n" + + "\x06script\x18\x03 \x01(\tR\x06script\x12\x1a\n" + + "\binterval\x18\x04 \x01(\x03R\binterval\x12\x18\n" + + "\atimeout\x18\x05 \x01(\x03R\atimeout\x12\x14\n" + + "\x05order\x18\x06 \x01(\x03R\x05order\x1a6\n" + + "\bEnvEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x06\n" + + "\x04authJ\x04\b\x0e\x10\x0fR\x12login_before_ready\"\x8f\x01\n" + + "\x13ResourcesMonitoring\x12:\n" + + "\x06memory\x18\x01 \x01(\v2\".provisioner.MemoryResourceMonitorR\x06memory\x12<\n" + + "\avolumes\x18\x02 \x03(\v2\".provisioner.VolumeResourceMonitorR\avolumes\"O\n" + + "\x15MemoryResourceMonitor\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x1c\n" + + "\tthreshold\x18\x02 \x01(\x05R\tthreshold\"c\n" + + "\x15VolumeResourceMonitor\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x18\n" + + "\aenabled\x18\x02 \x01(\bR\aenabled\x12\x1c\n" + + "\tthreshold\x18\x03 \x01(\x05R\tthreshold\"\xc6\x01\n" + + "\vDisplayApps\x12\x16\n" + + "\x06vscode\x18\x01 \x01(\bR\x06vscode\x12'\n" + + "\x0fvscode_insiders\x18\x02 \x01(\bR\x0evscodeInsiders\x12!\n" + + "\fweb_terminal\x18\x03 \x01(\bR\vwebTerminal\x12\x1d\n" + + "\n" + + "ssh_helper\x18\x04 \x01(\bR\tsshHelper\x124\n" + + "\x16port_forwarding_helper\x18\x05 \x01(\bR\x14portForwardingHelper\"/\n" + + "\x03Env\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\"\x9f\x02\n" + + "\x06Script\x12!\n" + + "\fdisplay_name\x18\x01 \x01(\tR\vdisplayName\x12\x12\n" + + "\x04icon\x18\x02 \x01(\tR\x04icon\x12\x16\n" + + "\x06script\x18\x03 \x01(\tR\x06script\x12\x12\n" + + "\x04cron\x18\x04 \x01(\tR\x04cron\x12,\n" + + "\x12start_blocks_login\x18\x05 \x01(\bR\x10startBlocksLogin\x12 \n" + + "\frun_on_start\x18\x06 \x01(\bR\n" + + "runOnStart\x12\x1e\n" + + "\vrun_on_stop\x18\a \x01(\bR\trunOnStop\x12'\n" + + "\x0ftimeout_seconds\x18\b \x01(\x05R\x0etimeoutSeconds\x12\x19\n" + + "\blog_path\x18\t \x01(\tR\alogPath\"n\n" + + "\fDevcontainer\x12)\n" + + "\x10workspace_folder\x18\x01 \x01(\tR\x0fworkspaceFolder\x12\x1f\n" + + "\vconfig_path\x18\x02 \x01(\tR\n" + + "configPath\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\"\xd4\x03\n" + + "\x03App\x12\x12\n" + + "\x04slug\x18\x01 \x01(\tR\x04slug\x12!\n" + + "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x12\x18\n" + + "\acommand\x18\x03 \x01(\tR\acommand\x12\x10\n" + + "\x03url\x18\x04 \x01(\tR\x03url\x12\x12\n" + + "\x04icon\x18\x05 \x01(\tR\x04icon\x12\x1c\n" + + "\tsubdomain\x18\x06 \x01(\bR\tsubdomain\x12:\n" + + "\vhealthcheck\x18\a \x01(\v2\x18.provisioner.HealthcheckR\vhealthcheck\x12A\n" + + "\rsharing_level\x18\b \x01(\x0e2\x1c.provisioner.AppSharingLevelR\fsharingLevel\x12\x1a\n" + + "\bexternal\x18\t \x01(\bR\bexternal\x12\x14\n" + + "\x05order\x18\n" + + " \x01(\x03R\x05order\x12\x16\n" + + "\x06hidden\x18\v \x01(\bR\x06hidden\x12/\n" + + "\aopen_in\x18\f \x01(\x0e2\x16.provisioner.AppOpenInR\x06openIn\x12\x14\n" + + "\x05group\x18\r \x01(\tR\x05group\x12\x0e\n" + + "\x02id\x18\x0e \x01(\tR\x02id\x12\x18\n" + + "\atooltip\x18\x0f \x01(\tR\atooltip\"Y\n" + + "\vHealthcheck\x12\x10\n" + + "\x03url\x18\x01 \x01(\tR\x03url\x12\x1a\n" + + "\binterval\x18\x02 \x01(\x05R\binterval\x12\x1c\n" + + "\tthreshold\x18\x03 \x01(\x05R\tthreshold\"\x92\x03\n" + + "\bResource\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + + "\x04type\x18\x02 \x01(\tR\x04type\x12*\n" + + "\x06agents\x18\x03 \x03(\v2\x12.provisioner.AgentR\x06agents\x12:\n" + + "\bmetadata\x18\x04 \x03(\v2\x1e.provisioner.Resource.MetadataR\bmetadata\x12\x12\n" + + "\x04hide\x18\x05 \x01(\bR\x04hide\x12\x12\n" + + "\x04icon\x18\x06 \x01(\tR\x04icon\x12#\n" + + "\rinstance_type\x18\a \x01(\tR\finstanceType\x12\x1d\n" + + "\n" + + "daily_cost\x18\b \x01(\x05R\tdailyCost\x12\x1f\n" + + "\vmodule_path\x18\t \x01(\tR\n" + + "modulePath\x1ai\n" + + "\bMetadata\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\x12\x1c\n" + + "\tsensitive\x18\x03 \x01(\bR\tsensitive\x12\x17\n" + + "\ais_null\x18\x04 \x01(\bR\x06isNull\"^\n" + + "\x06Module\x12\x16\n" + + "\x06source\x18\x01 \x01(\tR\x06source\x12\x18\n" + + "\aversion\x18\x02 \x01(\tR\aversion\x12\x10\n" + + "\x03key\x18\x03 \x01(\tR\x03key\x12\x10\n" + + "\x03dir\x18\x04 \x01(\tR\x03dir\"1\n" + + "\x04Role\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x15\n" + + "\x06org_id\x18\x02 \x01(\tR\x05orgId\"H\n" + + "\x15RunningAgentAuthToken\x12\x19\n" + + "\bagent_id\x18\x01 \x01(\tR\aagentId\x12\x14\n" + + "\x05token\x18\x02 \x01(\tR\x05token\"\"\n" + + "\x10AITaskSidebarApp\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x84\x01\n" + + "\x06AITask\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12C\n" + + "\vsidebar_app\x18\x02 \x01(\v2\x1d.provisioner.AITaskSidebarAppH\x00R\n" + + "sidebarApp\x88\x01\x01\x12\x15\n" + + "\x06app_id\x18\x03 \x01(\tR\x05appIdB\x0e\n" + + "\f_sidebar_app\"\xb4\n" + + "\n" + + "\bMetadata\x12\x1b\n" + + "\tcoder_url\x18\x01 \x01(\tR\bcoderUrl\x12S\n" + + "\x14workspace_transition\x18\x02 \x01(\x0e2 .provisioner.WorkspaceTransitionR\x13workspaceTransition\x12%\n" + + "\x0eworkspace_name\x18\x03 \x01(\tR\rworkspaceName\x12'\n" + + "\x0fworkspace_owner\x18\x04 \x01(\tR\x0eworkspaceOwner\x12!\n" + + "\fworkspace_id\x18\x05 \x01(\tR\vworkspaceId\x12,\n" + + "\x12workspace_owner_id\x18\x06 \x01(\tR\x10workspaceOwnerId\x122\n" + + "\x15workspace_owner_email\x18\a \x01(\tR\x13workspaceOwnerEmail\x12#\n" + + "\rtemplate_name\x18\b \x01(\tR\ftemplateName\x12)\n" + + "\x10template_version\x18\t \x01(\tR\x0ftemplateVersion\x12H\n" + + "!workspace_owner_oidc_access_token\x18\n" + + " \x01(\tR\x1dworkspaceOwnerOidcAccessToken\x12A\n" + + "\x1dworkspace_owner_session_token\x18\v \x01(\tR\x1aworkspaceOwnerSessionToken\x12\x1f\n" + + "\vtemplate_id\x18\f \x01(\tR\n" + + "templateId\x120\n" + + "\x14workspace_owner_name\x18\r \x01(\tR\x12workspaceOwnerName\x124\n" + + "\x16workspace_owner_groups\x18\x0e \x03(\tR\x14workspaceOwnerGroups\x12B\n" + + "\x1eworkspace_owner_ssh_public_key\x18\x0f \x01(\tR\x1aworkspaceOwnerSshPublicKey\x12D\n" + + "\x1fworkspace_owner_ssh_private_key\x18\x10 \x01(\tR\x1bworkspaceOwnerSshPrivateKey\x12,\n" + + "\x12workspace_build_id\x18\x11 \x01(\tR\x10workspaceBuildId\x12;\n" + + "\x1aworkspace_owner_login_type\x18\x12 \x01(\tR\x17workspaceOwnerLoginType\x12N\n" + + "\x1aworkspace_owner_rbac_roles\x18\x13 \x03(\v2\x11.provisioner.RoleR\x17workspaceOwnerRbacRoles\x12m\n" + + "\x1eprebuilt_workspace_build_stage\x18\x14 \x01(\x0e2(.provisioner.PrebuiltWorkspaceBuildStageR\x1bprebuiltWorkspaceBuildStage\x12]\n" + + "\x19running_agent_auth_tokens\x18\x15 \x03(\v2\".provisioner.RunningAgentAuthTokenR\x16runningAgentAuthTokens\x12\x17\n" + + "\atask_id\x18\x16 \x01(\tR\x06taskId\x12\x1f\n" + + "\vtask_prompt\x18\x17 \x01(\tR\n" + + "taskPrompt\x12.\n" + + "\x13template_version_id\x18\x18 \x01(\tR\x11templateVersionId\"\xf7\x02\n" + + "\x06Config\x126\n" + + "\x17template_source_archive\x18\x01 \x01(\fR\x15templateSourceArchive\x12\x14\n" + + "\x05state\x18\x02 \x01(\fR\x05state\x122\n" + + "\x15provisioner_log_level\x18\x03 \x01(\tR\x13provisionerLogLevel\x12$\n" + + "\vtemplate_id\x18\x04 \x01(\tH\x00R\n" + + "templateId\x88\x01\x01\x123\n" + + "\x13template_version_id\x18\x05 \x01(\tH\x01R\x11templateVersionId\x88\x01\x01\x12F\n" + + "\x1dexp_reuse_terraform_workspace\x18\x06 \x01(\bH\x02R\x1aexpReuseTerraformWorkspace\x88\x01\x01B\x0e\n" + + "\f_template_idB\x16\n" + + "\x14_template_version_idB \n" + + "\x1e_exp_reuse_terraform_workspace\"\x0e\n" + + "\fParseRequest\"\xa3\x02\n" + + "\rParseComplete\x12\x14\n" + + "\x05error\x18\x01 \x01(\tR\x05error\x12L\n" + + "\x12template_variables\x18\x02 \x03(\v2\x1d.provisioner.TemplateVariableR\x11templateVariables\x12\x16\n" + + "\x06readme\x18\x03 \x01(\fR\x06readme\x12T\n" + + "\x0eworkspace_tags\x18\x04 \x03(\v2-.provisioner.ParseComplete.WorkspaceTagsEntryR\rworkspaceTags\x1a@\n" + + "\x12WorkspaceTagsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\r\n" + + "\vInitRequest\"$\n" + + "\fInitResponse\x12\x14\n" + + "\x05error\x18\x01 \x01(\tR\x05error\"\xbe\x03\n" + + "\vPlanRequest\x121\n" + + "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12S\n" + + "\x15rich_parameter_values\x18\x02 \x03(\v2\x1f.provisioner.RichParameterValueR\x13richParameterValues\x12C\n" + + "\x0fvariable_values\x18\x03 \x03(\v2\x1a.provisioner.VariableValueR\x0evariableValues\x12Y\n" + + "\x17external_auth_providers\x18\x04 \x03(\v2!.provisioner.ExternalAuthProviderR\x15externalAuthProviders\x12[\n" + + "\x19previous_parameter_values\x18\x05 \x03(\v2\x1f.provisioner.RichParameterValueR\x17previousParameterValues\x12*\n" + + "\x11omit_module_files\x18\x06 \x01(\bR\x0fomitModuleFiles\"\xc1\x05\n" + + "\fPlanComplete\x12\x14\n" + + "\x05error\x18\x01 \x01(\tR\x05error\x123\n" + + "\tresources\x18\x02 \x03(\v2\x15.provisioner.ResourceR\tresources\x12:\n" + + "\n" + + "parameters\x18\x03 \x03(\v2\x1a.provisioner.RichParameterR\n" + + "parameters\x12a\n" + + "\x17external_auth_providers\x18\x04 \x03(\v2).provisioner.ExternalAuthProviderResourceR\x15externalAuthProviders\x12-\n" + + "\atimings\x18\x06 \x03(\v2\x13.provisioner.TimingR\atimings\x12-\n" + + "\amodules\x18\a \x03(\v2\x13.provisioner.ModuleR\amodules\x12-\n" + + "\apresets\x18\b \x03(\v2\x13.provisioner.PresetR\apresets\x12\x12\n" + + "\x04plan\x18\t \x01(\fR\x04plan\x12U\n" + + "\x15resource_replacements\x18\n" + + " \x03(\v2 .provisioner.ResourceReplacementR\x14resourceReplacements\x12!\n" + + "\fmodule_files\x18\v \x01(\fR\vmoduleFiles\x12*\n" + + "\x11module_files_hash\x18\f \x01(\fR\x0fmoduleFilesHash\x12 \n" + + "\fhas_ai_tasks\x18\r \x01(\bR\n" + + "hasAiTasks\x12.\n" + + "\bai_tasks\x18\x0e \x03(\v2\x13.provisioner.AITaskR\aaiTasks\x12.\n" + + "\x13has_external_agents\x18\x0f \x01(\bR\x11hasExternalAgents\"A\n" + + "\fApplyRequest\x121\n" + + "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\"\xee\x02\n" + + "\rApplyComplete\x12\x14\n" + + "\x05state\x18\x01 \x01(\fR\x05state\x12\x14\n" + + "\x05error\x18\x02 \x01(\tR\x05error\x123\n" + + "\tresources\x18\x03 \x03(\v2\x15.provisioner.ResourceR\tresources\x12:\n" + + "\n" + + "parameters\x18\x04 \x03(\v2\x1a.provisioner.RichParameterR\n" + + "parameters\x12a\n" + + "\x17external_auth_providers\x18\x05 \x03(\v2).provisioner.ExternalAuthProviderResourceR\x15externalAuthProviders\x12-\n" + + "\atimings\x18\x06 \x03(\v2\x13.provisioner.TimingR\atimings\x12.\n" + + "\bai_tasks\x18\a \x03(\v2\x13.provisioner.AITaskR\aaiTasks\"\xfa\x01\n" + + "\x06Timing\x120\n" + + "\x05start\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x05start\x12,\n" + + "\x03end\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x03end\x12\x16\n" + + "\x06action\x18\x03 \x01(\tR\x06action\x12\x16\n" + + "\x06source\x18\x04 \x01(\tR\x06source\x12\x1a\n" + + "\bresource\x18\x05 \x01(\tR\bresource\x12\x14\n" + + "\x05stage\x18\x06 \x01(\tR\x05stage\x12.\n" + + "\x05state\x18\a \x01(\x0e2\x18.provisioner.TimingStateR\x05state\"\x0f\n" + + "\rCancelRequest\"\x8c\x02\n" + + "\aRequest\x12-\n" + + "\x06config\x18\x01 \x01(\v2\x13.provisioner.ConfigH\x00R\x06config\x121\n" + + "\x05parse\x18\x02 \x01(\v2\x19.provisioner.ParseRequestH\x00R\x05parse\x12.\n" + + "\x04plan\x18\x03 \x01(\v2\x18.provisioner.PlanRequestH\x00R\x04plan\x121\n" + + "\x05apply\x18\x04 \x01(\v2\x19.provisioner.ApplyRequestH\x00R\x05apply\x124\n" + + "\x06cancel\x18\x05 \x01(\v2\x1a.provisioner.CancelRequestH\x00R\x06cancelB\x06\n" + + "\x04type\"\xc9\x02\n" + + "\bResponse\x12$\n" + + "\x03log\x18\x01 \x01(\v2\x10.provisioner.LogH\x00R\x03log\x122\n" + + "\x05parse\x18\x02 \x01(\v2\x1a.provisioner.ParseCompleteH\x00R\x05parse\x12/\n" + + "\x04plan\x18\x03 \x01(\v2\x19.provisioner.PlanCompleteH\x00R\x04plan\x122\n" + + "\x05apply\x18\x04 \x01(\v2\x1a.provisioner.ApplyCompleteH\x00R\x05apply\x12:\n" + + "\vdata_upload\x18\x05 \x01(\v2\x17.provisioner.DataUploadH\x00R\n" + + "dataUpload\x12:\n" + + "\vchunk_piece\x18\x06 \x01(\v2\x17.provisioner.ChunkPieceH\x00R\n" + + "chunkPieceB\x06\n" + + "\x04type\"\x9c\x01\n" + + "\n" + + "DataUpload\x12<\n" + + "\vupload_type\x18\x01 \x01(\x0e2\x1b.provisioner.DataUploadTypeR\n" + + "uploadType\x12\x1b\n" + + "\tdata_hash\x18\x02 \x01(\fR\bdataHash\x12\x1b\n" + + "\tfile_size\x18\x03 \x01(\x03R\bfileSize\x12\x16\n" + + "\x06chunks\x18\x04 \x01(\x05R\x06chunks\"g\n" + + "\n" + + "ChunkPiece\x12\x12\n" + + "\x04data\x18\x01 \x01(\fR\x04data\x12$\n" + + "\x0efull_data_hash\x18\x02 \x01(\fR\ffullDataHash\x12\x1f\n" + + "\vpiece_index\x18\x03 \x01(\x05R\n" + + "pieceIndex*\xa8\x01\n" + + "\x11ParameterFormType\x12\v\n" + + "\aDEFAULT\x10\x00\x12\x0e\n" + + "\n" + + "FORM_ERROR\x10\x01\x12\t\n" + + "\x05RADIO\x10\x02\x12\f\n" + + "\bDROPDOWN\x10\x03\x12\t\n" + + "\x05INPUT\x10\x04\x12\f\n" + + "\bTEXTAREA\x10\x05\x12\n" + + "\n" + + "\x06SLIDER\x10\x06\x12\f\n" + + "\bCHECKBOX\x10\a\x12\n" + + "\n" + + "\x06SWITCH\x10\b\x12\r\n" + + "\tTAGSELECT\x10\t\x12\x0f\n" + + "\vMULTISELECT\x10\n" + + "*?\n" + + "\bLogLevel\x12\t\n" + + "\x05TRACE\x10\x00\x12\t\n" + + "\x05DEBUG\x10\x01\x12\b\n" + + "\x04INFO\x10\x02\x12\b\n" + + "\x04WARN\x10\x03\x12\t\n" + + "\x05ERROR\x10\x04*;\n" + + "\x0fAppSharingLevel\x12\t\n" + + "\x05OWNER\x10\x00\x12\x11\n" + + "\rAUTHENTICATED\x10\x01\x12\n" + + "\n" + + "\x06PUBLIC\x10\x02*5\n" + + "\tAppOpenIn\x12\x0e\n" + + "\x06WINDOW\x10\x00\x1a\x02\b\x01\x12\x0f\n" + + "\vSLIM_WINDOW\x10\x01\x12\a\n" + + "\x03TAB\x10\x02*7\n" + + "\x13WorkspaceTransition\x12\t\n" + + "\x05START\x10\x00\x12\b\n" + + "\x04STOP\x10\x01\x12\v\n" + + "\aDESTROY\x10\x02*>\n" + + "\x1bPrebuiltWorkspaceBuildStage\x12\b\n" + + "\x04NONE\x10\x00\x12\n" + + "\n" + + "\x06CREATE\x10\x01\x12\t\n" + + "\x05CLAIM\x10\x02*5\n" + + "\vTimingState\x12\v\n" + + "\aSTARTED\x10\x00\x12\r\n" + + "\tCOMPLETED\x10\x01\x12\n" + + "\n" + + "\x06FAILED\x10\x02*G\n" + + "\x0eDataUploadType\x12\x17\n" + + "\x13UPLOAD_TYPE_UNKNOWN\x10\x00\x12\x1c\n" + + "\x18UPLOAD_TYPE_MODULE_FILES\x10\x012I\n" + + "\vProvisioner\x12:\n" + + "\aSession\x12\x14.provisioner.Request\x1a\x15.provisioner.Response(\x010\x01B0Z.github.com/coder/coder/v2/provisionersdk/protob\x06proto3" var ( file_provisionersdk_proto_provisioner_proto_rawDescOnce sync.Once - file_provisionersdk_proto_provisioner_proto_rawDescData = file_provisionersdk_proto_provisioner_proto_rawDesc + file_provisionersdk_proto_provisioner_proto_rawDescData []byte ) func file_provisionersdk_proto_provisioner_proto_rawDescGZIP() []byte { file_provisionersdk_proto_provisioner_proto_rawDescOnce.Do(func() { - file_provisionersdk_proto_provisioner_proto_rawDescData = protoimpl.X.CompressGZIP(file_provisionersdk_proto_provisioner_proto_rawDescData) + file_provisionersdk_proto_provisioner_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_provisionersdk_proto_provisioner_proto_rawDesc), len(file_provisionersdk_proto_provisioner_proto_rawDesc))) }) return file_provisionersdk_proto_provisioner_proto_rawDescData } var file_provisionersdk_proto_provisioner_proto_enumTypes = make([]protoimpl.EnumInfo, 8) -var file_provisionersdk_proto_provisioner_proto_msgTypes = make([]protoimpl.MessageInfo, 51) -var file_provisionersdk_proto_provisioner_proto_goTypes = []interface{}{ +var file_provisionersdk_proto_provisioner_proto_msgTypes = make([]protoimpl.MessageInfo, 53) +var file_provisionersdk_proto_provisioner_proto_goTypes = []any{ (ParameterFormType)(0), // 0: provisioner.ParameterFormType (LogLevel)(0), // 1: provisioner.LogLevel (AppSharingLevel)(0), // 2: provisioner.AppSharingLevel @@ -5206,21 +4859,23 @@ var file_provisionersdk_proto_provisioner_proto_goTypes = []interface{}{ (*Config)(nil), // 42: provisioner.Config (*ParseRequest)(nil), // 43: provisioner.ParseRequest (*ParseComplete)(nil), // 44: provisioner.ParseComplete - (*PlanRequest)(nil), // 45: provisioner.PlanRequest - (*PlanComplete)(nil), // 46: provisioner.PlanComplete - (*ApplyRequest)(nil), // 47: provisioner.ApplyRequest - (*ApplyComplete)(nil), // 48: provisioner.ApplyComplete - (*Timing)(nil), // 49: provisioner.Timing - (*CancelRequest)(nil), // 50: provisioner.CancelRequest - (*Request)(nil), // 51: provisioner.Request - (*Response)(nil), // 52: provisioner.Response - (*DataUpload)(nil), // 53: provisioner.DataUpload - (*ChunkPiece)(nil), // 54: provisioner.ChunkPiece - (*Agent_Metadata)(nil), // 55: provisioner.Agent.Metadata - nil, // 56: provisioner.Agent.EnvEntry - (*Resource_Metadata)(nil), // 57: provisioner.Resource.Metadata - nil, // 58: provisioner.ParseComplete.WorkspaceTagsEntry - (*timestamppb.Timestamp)(nil), // 59: google.protobuf.Timestamp + (*InitRequest)(nil), // 45: provisioner.InitRequest + (*InitResponse)(nil), // 46: provisioner.InitResponse + (*PlanRequest)(nil), // 47: provisioner.PlanRequest + (*PlanComplete)(nil), // 48: provisioner.PlanComplete + (*ApplyRequest)(nil), // 49: provisioner.ApplyRequest + (*ApplyComplete)(nil), // 50: provisioner.ApplyComplete + (*Timing)(nil), // 51: provisioner.Timing + (*CancelRequest)(nil), // 52: provisioner.CancelRequest + (*Request)(nil), // 53: provisioner.Request + (*Response)(nil), // 54: provisioner.Response + (*DataUpload)(nil), // 55: provisioner.DataUpload + (*ChunkPiece)(nil), // 56: provisioner.ChunkPiece + (*Agent_Metadata)(nil), // 57: provisioner.Agent.Metadata + nil, // 58: provisioner.Agent.EnvEntry + (*Resource_Metadata)(nil), // 59: provisioner.Resource.Metadata + nil, // 60: provisioner.ParseComplete.WorkspaceTagsEntry + (*timestamppb.Timestamp)(nil), // 61: google.protobuf.Timestamp } var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ 10, // 0: provisioner.RichParameter.options:type_name -> provisioner.RichParameterOption @@ -5231,9 +4886,9 @@ var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ 18, // 5: provisioner.Preset.parameters:type_name -> provisioner.PresetParameter 16, // 6: provisioner.Preset.prebuild:type_name -> provisioner.Prebuild 1, // 7: provisioner.Log.level:type_name -> provisioner.LogLevel - 56, // 8: provisioner.Agent.env:type_name -> provisioner.Agent.EnvEntry + 58, // 8: provisioner.Agent.env:type_name -> provisioner.Agent.EnvEntry 33, // 9: provisioner.Agent.apps:type_name -> provisioner.App - 55, // 10: provisioner.Agent.metadata:type_name -> provisioner.Agent.Metadata + 57, // 10: provisioner.Agent.metadata:type_name -> provisioner.Agent.Metadata 29, // 11: provisioner.Agent.display_apps:type_name -> provisioner.DisplayApps 31, // 12: provisioner.Agent.scripts:type_name -> provisioner.Script 30, // 13: provisioner.Agent.extra_envs:type_name -> provisioner.Env @@ -5245,14 +4900,14 @@ var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ 2, // 19: provisioner.App.sharing_level:type_name -> provisioner.AppSharingLevel 3, // 20: provisioner.App.open_in:type_name -> provisioner.AppOpenIn 25, // 21: provisioner.Resource.agents:type_name -> provisioner.Agent - 57, // 22: provisioner.Resource.metadata:type_name -> provisioner.Resource.Metadata + 59, // 22: provisioner.Resource.metadata:type_name -> provisioner.Resource.Metadata 39, // 23: provisioner.AITask.sidebar_app:type_name -> provisioner.AITaskSidebarApp 4, // 24: provisioner.Metadata.workspace_transition:type_name -> provisioner.WorkspaceTransition 37, // 25: provisioner.Metadata.workspace_owner_rbac_roles:type_name -> provisioner.Role 5, // 26: provisioner.Metadata.prebuilt_workspace_build_stage:type_name -> provisioner.PrebuiltWorkspaceBuildStage 38, // 27: provisioner.Metadata.running_agent_auth_tokens:type_name -> provisioner.RunningAgentAuthToken 9, // 28: provisioner.ParseComplete.template_variables:type_name -> provisioner.TemplateVariable - 58, // 29: provisioner.ParseComplete.workspace_tags:type_name -> provisioner.ParseComplete.WorkspaceTagsEntry + 60, // 29: provisioner.ParseComplete.workspace_tags:type_name -> provisioner.ParseComplete.WorkspaceTagsEntry 41, // 30: provisioner.PlanRequest.metadata:type_name -> provisioner.Metadata 12, // 31: provisioner.PlanRequest.rich_parameter_values:type_name -> provisioner.RichParameterValue 20, // 32: provisioner.PlanRequest.variable_values:type_name -> provisioner.VariableValue @@ -5261,7 +4916,7 @@ var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ 35, // 35: provisioner.PlanComplete.resources:type_name -> provisioner.Resource 11, // 36: provisioner.PlanComplete.parameters:type_name -> provisioner.RichParameter 23, // 37: provisioner.PlanComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource - 49, // 38: provisioner.PlanComplete.timings:type_name -> provisioner.Timing + 51, // 38: provisioner.PlanComplete.timings:type_name -> provisioner.Timing 36, // 39: provisioner.PlanComplete.modules:type_name -> provisioner.Module 17, // 40: provisioner.PlanComplete.presets:type_name -> provisioner.Preset 19, // 41: provisioner.PlanComplete.resource_replacements:type_name -> provisioner.ResourceReplacement @@ -5270,25 +4925,25 @@ var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ 35, // 44: provisioner.ApplyComplete.resources:type_name -> provisioner.Resource 11, // 45: provisioner.ApplyComplete.parameters:type_name -> provisioner.RichParameter 23, // 46: provisioner.ApplyComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource - 49, // 47: provisioner.ApplyComplete.timings:type_name -> provisioner.Timing + 51, // 47: provisioner.ApplyComplete.timings:type_name -> provisioner.Timing 40, // 48: provisioner.ApplyComplete.ai_tasks:type_name -> provisioner.AITask - 59, // 49: provisioner.Timing.start:type_name -> google.protobuf.Timestamp - 59, // 50: provisioner.Timing.end:type_name -> google.protobuf.Timestamp + 61, // 49: provisioner.Timing.start:type_name -> google.protobuf.Timestamp + 61, // 50: provisioner.Timing.end:type_name -> google.protobuf.Timestamp 6, // 51: provisioner.Timing.state:type_name -> provisioner.TimingState 42, // 52: provisioner.Request.config:type_name -> provisioner.Config 43, // 53: provisioner.Request.parse:type_name -> provisioner.ParseRequest - 45, // 54: provisioner.Request.plan:type_name -> provisioner.PlanRequest - 47, // 55: provisioner.Request.apply:type_name -> provisioner.ApplyRequest - 50, // 56: provisioner.Request.cancel:type_name -> provisioner.CancelRequest + 47, // 54: provisioner.Request.plan:type_name -> provisioner.PlanRequest + 49, // 55: provisioner.Request.apply:type_name -> provisioner.ApplyRequest + 52, // 56: provisioner.Request.cancel:type_name -> provisioner.CancelRequest 21, // 57: provisioner.Response.log:type_name -> provisioner.Log 44, // 58: provisioner.Response.parse:type_name -> provisioner.ParseComplete - 46, // 59: provisioner.Response.plan:type_name -> provisioner.PlanComplete - 48, // 60: provisioner.Response.apply:type_name -> provisioner.ApplyComplete - 53, // 61: provisioner.Response.data_upload:type_name -> provisioner.DataUpload - 54, // 62: provisioner.Response.chunk_piece:type_name -> provisioner.ChunkPiece + 48, // 59: provisioner.Response.plan:type_name -> provisioner.PlanComplete + 50, // 60: provisioner.Response.apply:type_name -> provisioner.ApplyComplete + 55, // 61: provisioner.Response.data_upload:type_name -> provisioner.DataUpload + 56, // 62: provisioner.Response.chunk_piece:type_name -> provisioner.ChunkPiece 7, // 63: provisioner.DataUpload.upload_type:type_name -> provisioner.DataUploadType - 51, // 64: provisioner.Provisioner.Session:input_type -> provisioner.Request - 52, // 65: provisioner.Provisioner.Session:output_type -> provisioner.Response + 53, // 64: provisioner.Provisioner.Session:input_type -> provisioner.Request + 54, // 65: provisioner.Provisioner.Session:output_type -> provisioner.Response 65, // [65:66] is the sub-list for method output_type 64, // [64:65] is the sub-list for method input_type 64, // [64:64] is the sub-list for extension type_name @@ -5301,611 +4956,21 @@ func file_provisionersdk_proto_provisioner_proto_init() { if File_provisionersdk_proto_provisioner_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_provisionersdk_proto_provisioner_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TemplateVariable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RichParameterOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RichParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RichParameterValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExpirationPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Schedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Scheduling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Prebuild); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Preset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PresetParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceReplacement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VariableValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Log); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InstanceIdentityAuth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExternalAuthProviderResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExternalAuthProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Agent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourcesMonitoring); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemoryResourceMonitor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VolumeResourceMonitor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisplayApps); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Env); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Script); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Devcontainer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*App); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Healthcheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Role); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunningAgentAuthToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AITaskSidebarApp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AITask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParseComplete); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlanComplete); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyComplete); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Timing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataUpload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChunkPiece); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Agent_Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource_Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_provisionersdk_proto_provisioner_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_provisionersdk_proto_provisioner_proto_msgTypes[17].OneofWrappers = []interface{}{ + file_provisionersdk_proto_provisioner_proto_msgTypes[3].OneofWrappers = []any{} + file_provisionersdk_proto_provisioner_proto_msgTypes[17].OneofWrappers = []any{ (*Agent_Token)(nil), (*Agent_InstanceId)(nil), } - file_provisionersdk_proto_provisioner_proto_msgTypes[32].OneofWrappers = []interface{}{} - file_provisionersdk_proto_provisioner_proto_msgTypes[34].OneofWrappers = []interface{}{} - file_provisionersdk_proto_provisioner_proto_msgTypes[43].OneofWrappers = []interface{}{ + file_provisionersdk_proto_provisioner_proto_msgTypes[32].OneofWrappers = []any{} + file_provisionersdk_proto_provisioner_proto_msgTypes[34].OneofWrappers = []any{} + file_provisionersdk_proto_provisioner_proto_msgTypes[45].OneofWrappers = []any{ (*Request_Config)(nil), (*Request_Parse)(nil), (*Request_Plan)(nil), (*Request_Apply)(nil), (*Request_Cancel)(nil), } - file_provisionersdk_proto_provisioner_proto_msgTypes[44].OneofWrappers = []interface{}{ + file_provisionersdk_proto_provisioner_proto_msgTypes[46].OneofWrappers = []any{ (*Response_Log)(nil), (*Response_Parse)(nil), (*Response_Plan)(nil), @@ -5917,9 +4982,9 @@ func file_provisionersdk_proto_provisioner_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_provisionersdk_proto_provisioner_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_provisionersdk_proto_provisioner_proto_rawDesc), len(file_provisionersdk_proto_provisioner_proto_rawDesc)), NumEnums: 8, - NumMessages: 51, + NumMessages: 53, NumExtensions: 0, NumServices: 1, }, @@ -5929,7 +4994,6 @@ func file_provisionersdk_proto_provisioner_proto_init() { MessageInfos: file_provisionersdk_proto_provisioner_proto_msgTypes, }.Build() File_provisionersdk_proto_provisioner_proto = out.File - file_provisionersdk_proto_provisioner_proto_rawDesc = nil file_provisionersdk_proto_provisioner_proto_goTypes = nil file_provisionersdk_proto_provisioner_proto_depIdxs = nil } diff --git a/provisionersdk/proto/provisioner.proto b/provisionersdk/proto/provisioner.proto index 89a69ce7022ca..b8060c3270348 100644 --- a/provisionersdk/proto/provisioner.proto +++ b/provisionersdk/proto/provisioner.proto @@ -393,6 +393,13 @@ message ParseComplete { map workspace_tags = 4; } +message InitRequest { +} + +message InitResponse { + string error = 1; +} + // PlanRequest asks the provisioner to plan what resources & parameters it will create message PlanRequest { Metadata metadata = 1; diff --git a/provisionersdk/proto/provisioner_drpc.pb.go b/provisionersdk/proto/provisioner_drpc.pb.go index e9c75e16404a2..c9c54002439c2 100644 --- a/provisionersdk/proto/provisioner_drpc.pb.go +++ b/provisionersdk/proto/provisioner_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.34 +// protoc-gen-go-drpc version: (devel) // source: provisionersdk/proto/provisioner.proto package proto diff --git a/provisionersdk/session.go b/provisionersdk/session.go index 59034a761e09d..d715488e5e794 100644 --- a/provisionersdk/session.go +++ b/provisionersdk/session.go @@ -130,47 +130,11 @@ func (s *Session) handleRequests() error { resp.Type = &proto.Response_Parse{Parse: complete} } if plan := req.GetPlan(); plan != nil { - r := &request[*proto.PlanRequest, *proto.PlanComplete]{ - req: plan, - session: s, - serverFn: s.server.Plan, - cancels: requests, - } - complete, err := r.do() - if err != nil { - return err - } - resp.Type = &proto.Response_Plan{Plan: complete} - - if protobuf.Size(resp) > drpcsdk.MaxMessageSize { - // It is likely the modules that is pushing the message size over the limit. - // Send the modules over a stream of messages instead. - s.Logger.Info(s.Context(), "plan response too large, sending modules as stream", - slog.F("size_bytes", len(complete.ModuleFiles)), - ) - dataUp, chunks := proto.BytesToDataUpload(proto.DataUploadType_UPLOAD_TYPE_MODULE_FILES, complete.ModuleFiles) - - complete.ModuleFiles = nil // sent over the stream - complete.ModuleFilesHash = dataUp.DataHash - resp.Type = &proto.Response_Plan{Plan: complete} - - err := s.stream.Send(&proto.Response{Type: &proto.Response_DataUpload{DataUpload: dataUp}}) - if err != nil { - complete.Error = fmt.Sprintf("send data upload: %s", err.Error()) - } else { - for i, chunk := range chunks { - err := s.stream.Send(&proto.Response{Type: &proto.Response_ChunkPiece{ChunkPiece: chunk}}) - if err != nil { - complete.Error = fmt.Sprintf("send data piece upload %d/%d: %s", i, dataUp.Chunks, err.Error()) - break - } - } - } - } - - if complete.Error == "" { + planResp := s.handlePlanRequest(plan, requests) + if planResp.Error == "" { planned = true } + resp.Type = &proto.Response_Plan{Plan: planResp} } if apply := req.GetApply(); apply != nil { if !planned { @@ -196,6 +160,47 @@ func (s *Session) handleRequests() error { return nil } +func (s *Session) handlePlanRequest(plan *proto.PlanRequest, requests <-chan *proto.Request) *proto.PlanComplete { + r := &request[*proto.PlanRequest, *proto.PlanComplete]{ + req: plan, + session: s, + serverFn: s.server.Plan, + cancels: requests, + } + complete, err := r.do() + if err != nil { + return complete + } + + // If the size of the complete message is too large, we need to stream the module files separately. + if protobuf.Size(&proto.Response{Type: &proto.Response_Plan{Plan: complete}}) > drpcsdk.MaxMessageSize { + // It is likely the modules that is pushing the message size over the limit. + // Send the modules over a stream of messages instead. + s.Logger.Info(s.Context(), "plan response too large, sending modules as stream", + slog.F("size_bytes", len(complete.ModuleFiles)), + ) + dataUp, chunks := proto.BytesToDataUpload(proto.DataUploadType_UPLOAD_TYPE_MODULE_FILES, complete.ModuleFiles) + + complete.ModuleFiles = nil // sent over the stream + complete.ModuleFilesHash = dataUp.DataHash + + err := s.stream.Send(&proto.Response{Type: &proto.Response_DataUpload{DataUpload: dataUp}}) + if err != nil { + complete.Error = fmt.Sprintf("send data upload: %s", err.Error()) + } else { + for i, chunk := range chunks { + err := s.stream.Send(&proto.Response{Type: &proto.Response_ChunkPiece{ChunkPiece: chunk}}) + if err != nil { + complete.Error = fmt.Sprintf("send data piece upload %d/%d: %s", i, dataUp.Chunks, err.Error()) + break + } + } + } + } + + return complete +} + type Session struct { Logger slog.Logger Files tfpath.Layouter From a14899605476e42ee4300cd7c5c73f23a40e28dd Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 09:22:23 -0600 Subject: [PATCH 02/56] chore: initial init work, does not work for template import yet --- provisioner/echo/serve.go | 5 + provisioner/terraform/executor.go | 13 - provisioner/terraform/provision.go | 103 +++-- provisionerd/runner/init.go | 55 +++ provisionerd/runner/runner.go | 33 +- provisionersdk/errors.go | 4 + provisionersdk/proto/provisioner.pb.go | 513 ++++++++++++++++++------- provisionersdk/proto/provisioner.proto | 52 ++- provisionersdk/serve.go | 1 + provisionersdk/session.go | 37 +- provisionersdk/tfpath/tfpath.go | 13 +- 11 files changed, 594 insertions(+), 235 deletions(-) create mode 100644 provisionerd/runner/init.go diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index 26d1fcbe3ad06..1960bb0b49021 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -174,6 +174,11 @@ func (*echo) Parse(sess *provisionersdk.Session, _ *proto.ParseRequest, _ <-chan return provisionersdk.ParseErrorf("complete response missing") } +func (e *echo) Init(s *provisionersdk.Session, r *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete { + //TODO implement me + panic("implement me") +} + // Plan reads requests from the provided directory to stream responses. func (*echo) Plan(sess *provisionersdk.Session, req *proto.PlanRequest, canceledOrComplete <-chan struct{}) *proto.PlanComplete { responses, err := readResponses( diff --git a/provisioner/terraform/executor.go b/provisioner/terraform/executor.go index 3d9270a6ddbab..afe327d9297c6 100644 --- a/provisioner/terraform/executor.go +++ b/provisioner/terraform/executor.go @@ -348,18 +348,6 @@ func (e *executor) plan(ctx, killCtx context.Context, env, vars []string, logr l graphTimings.ingest(createGraphTimingsEvent(timingGraphComplete)) - var moduleFiles []byte - // Skipping modules archiving is useful if the caller does not need it, eg during - // a workspace build. This removes some added costs of sending the modules - // payload back to coderd if coderd is just going to ignore it. - if !req.OmitModuleFiles { - moduleFiles, err = GetModulesArchive(os.DirFS(e.files.WorkDirectory())) - if err != nil { - // TODO: we probably want to persist this error or make it louder eventually - e.logger.Warn(ctx, "failed to archive terraform modules", slog.Error(err)) - } - } - // When a prebuild claim attempt is made, log a warning if a resource is due to be replaced, since this will obviate // the point of prebuilding if the expensive resource is replaced once claimed! var ( @@ -394,7 +382,6 @@ func (e *executor) plan(ctx, killCtx context.Context, env, vars []string, logr l Presets: state.Presets, Plan: planJSON, ResourceReplacements: resReps, - ModuleFiles: moduleFiles, HasAiTasks: state.HasAITasks, AiTasks: state.AITasks, HasExternalAgents: state.HasExternalAgents, diff --git a/provisioner/terraform/provision.go b/provisioner/terraform/provision.go index c99ee55ad8cc6..ec129514299de 100644 --- a/provisioner/terraform/provision.go +++ b/provisioner/terraform/provision.go @@ -67,51 +67,34 @@ func (s *server) setupContexts(parent context.Context, canceledOrComplete <-chan return ctx, cancel, killCtx, kill } -func (s *server) Plan( - sess *provisionersdk.Session, request *proto.PlanRequest, canceledOrComplete <-chan struct{}, -) *proto.PlanComplete { +func (s *server) Init( + sess *provisionersdk.Session, request *proto.InitRequest, canceledOrComplete <-chan struct{}, +) *proto.InitComplete { ctx, span := s.startTrace(sess.Context(), tracing.FuncName()) defer span.End() ctx, cancel, killCtx, kill := s.setupContexts(ctx, canceledOrComplete) defer cancel() defer kill() - e := s.executor(sess.Files, database.ProvisionerJobTimingStagePlan) + e := s.executor(sess.Files, database.ProvisionerJobTimingStageInit) if err := e.checkMinVersion(ctx); err != nil { - return provisionersdk.PlanErrorf("%s", err.Error()) + return provisionersdk.InitErrorf("%s", err.Error()) } logTerraformEnvVars(sess) - // If we're destroying, exit early if there's no state. This is necessary to - // avoid any cases where a workspace is "locked out" of terraform due to - // e.g. bad template param values and cannot be deleted. This is just for - // contingency, in the future we will try harder to prevent workspaces being - // broken this hard. - if request.Metadata.GetWorkspaceTransition() == proto.WorkspaceTransition_DESTROY && len(sess.Config.State) == 0 { - sess.ProvisionLog(proto.LogLevel_INFO, "The terraform state does not exist, there is nothing to do") - return &proto.PlanComplete{} - } - - statefilePath := sess.Files.StateFilePath() - if len(sess.Config.State) > 0 { - err := os.WriteFile(statefilePath, sess.Config.State, 0o600) - if err != nil { - return provisionersdk.PlanErrorf("write statefile %q: %s", statefilePath, err) - } + // TODO: These logs should probably be streamed back to the provisioner runner. + err := sess.Files.ExtractArchive(ctx, s.logger, afero.NewOsFs(), request.GetTemplateSourceArchive()) + if err != nil { + return provisionersdk.InitErrorf("extract template archive: %s", err) } - err := CleanStaleTerraformPlugins(sess.Context(), s.cachePath, afero.NewOsFs(), time.Now(), s.logger) + err = CleanStaleTerraformPlugins(sess.Context(), s.cachePath, afero.NewOsFs(), time.Now(), s.logger) if err != nil { - return provisionersdk.PlanErrorf("unable to clean stale Terraform plugins: %s", err) + return provisionersdk.InitErrorf("unable to clean stale Terraform plugins: %s", err) } - s.logger.Debug(ctx, "running initialization") - - // The JSON output of `terraform init` doesn't include discrete fields for capturing timings of each plugin, - // so we capture the whole init process. - initTimings := newTimingAggregator(database.ProvisionerJobTimingStageInit) - endStage := initTimings.startStage(database.ProvisionerJobTimingStageInit) - + s.logger.Debug(ctx, "running terraform initialization") + endStage := e.timings.startStage(database.ProvisionerJobTimingStageInit) err = e.init(ctx, killCtx, sess) endStage(err) if err != nil { @@ -137,7 +120,7 @@ func (s *server) Plan( slog.F("provider_coder_stacktrace", stacktrace), ) } - return provisionersdk.PlanErrorf("initialize terraform: %s", err) + return provisionersdk.InitErrorf("initialize terraform: %s", err) } modules, err := getModules(sess.Files) @@ -147,8 +130,60 @@ func (s *server) Plan( s.logger.Error(ctx, "failed to get modules from disk", slog.Error(err)) } + var moduleFiles []byte + // Skipping modules archiving is useful if the caller does not need it, eg during + // a workspace build. This removes some added costs of sending the modules + // payload back to coderd if coderd is just going to ignore it. + if !request.OmitModuleFiles { + moduleFiles, err = GetModulesArchive(os.DirFS(e.files.WorkDirectory())) + if err != nil { + // TODO: we probably want to persist this error or make it louder eventually + e.logger.Warn(ctx, "failed to archive terraform modules", slog.Error(err)) + } + } + s.logger.Debug(ctx, "ran initialization") + return &proto.InitComplete{ + Modules: modules, + ModuleFiles: moduleFiles, + ModuleFilesHash: nil, + } +} + +func (s *server) Plan( + sess *provisionersdk.Session, request *proto.PlanRequest, canceledOrComplete <-chan struct{}, +) *proto.PlanComplete { + ctx, span := s.startTrace(sess.Context(), tracing.FuncName()) + defer span.End() + ctx, cancel, killCtx, kill := s.setupContexts(ctx, canceledOrComplete) + defer cancel() + defer kill() + + e := s.executor(sess.Files, database.ProvisionerJobTimingStagePlan) + if err := e.checkMinVersion(ctx); err != nil { + return provisionersdk.PlanErrorf("%s", err.Error()) + } + logTerraformEnvVars(sess) + + // If we're destroying, exit early if there's no state. This is necessary to + // avoid any cases where a workspace is "locked out" of terraform due to + // e.g. bad template param values and cannot be deleted. This is just for + // contingency, in the future we will try harder to prevent workspaces being + // broken this hard. + if request.Metadata.GetWorkspaceTransition() == proto.WorkspaceTransition_DESTROY && len(request.GetState()) == 0 { + sess.ProvisionLog(proto.LogLevel_INFO, "The terraform state does not exist, there is nothing to do") + return &proto.PlanComplete{} + } + + statefilePath := sess.Files.StateFilePath() + if len(request.GetState()) > 0 { + err := os.WriteFile(statefilePath, request.GetState(), 0o600) + if err != nil { + return provisionersdk.PlanErrorf("write statefile %q: %s", statefilePath, err) + } + } + env, err := provisionEnv(sess.Config, request.Metadata, request.PreviousParameterValues, request.RichParameterValues, request.ExternalAuthProviders) if err != nil { return provisionersdk.PlanErrorf("setup env: %s", err) @@ -165,10 +200,6 @@ func (s *server) Plan( return provisionersdk.PlanErrorf("%s", err.Error()) } - // Prepend init timings since they occur prior to plan timings. - // Order is irrelevant; this is merely indicative. - resp.Timings = append(initTimings.aggregate(), resp.Timings...) // mergeInitTimings(initTimings.aggregate(), resp.Timings) - resp.Modules = modules return resp } @@ -192,7 +223,7 @@ func (s *server) Apply( // e.g. bad template param values and cannot be deleted. This is just for // contingency, in the future we will try harder to prevent workspaces being // broken this hard. - if request.Metadata.GetWorkspaceTransition() == proto.WorkspaceTransition_DESTROY && len(sess.Config.State) == 0 { + if request.Metadata.GetWorkspaceTransition() == proto.WorkspaceTransition_DESTROY && len(request.GetState()) == 0 { sess.ProvisionLog(proto.LogLevel_INFO, "The terraform plan does not exist, there is nothing to do") return &proto.ApplyComplete{} } diff --git a/provisionerd/runner/init.go b/provisionerd/runner/init.go new file mode 100644 index 0000000000000..ba755f5a42c0c --- /dev/null +++ b/provisionerd/runner/init.go @@ -0,0 +1,55 @@ +package runner + +import ( + "context" + "time" + + "cdr.dev/slog" + "github.com/coder/coder/v2/coderd/tracing" + "github.com/coder/coder/v2/provisionerd/proto" + sdkproto "github.com/coder/coder/v2/provisionersdk/proto" +) + +func (r *Runner) init(ctx context.Context, omitModules bool, templateArchive []byte) (*sdkproto.InitComplete, *proto.FailedJob) { + ctx, span := r.startTrace(ctx, tracing.FuncName()) + defer span.End() + + err := r.session.Send(&sdkproto.Request{Type: &sdkproto.Request_Init{Init: &sdkproto.InitRequest{ + TemplateSourceArchive: templateArchive, + OmitModuleFiles: omitModules, + }}}) + if err != nil { + return nil, r.failedJobf("send init request: %v", err) + } + + for { + msg, err := r.session.Recv() + if err != nil { + return nil, r.failedJobf("receive init response: %v", err) + } + switch msgType := msg.Type.(type) { + case *sdkproto.Response_Log: + r.logProvisionerJobLog(context.Background(), msgType.Log.Level, "workspace provisioner job logged", + slog.F("level", msgType.Log.Level), + slog.F("output", msgType.Log.Output), + slog.F("workspace_build_id", r.job.GetWorkspaceBuild().WorkspaceBuildId), + ) + + r.queueLog(ctx, &proto.Log{ + Source: proto.LogSource_PROVISIONER, + Level: msgType.Log.Level, + CreatedAt: time.Now().UnixMilli(), + Output: msgType.Log.Output, + Stage: "Initializing Terraform Directory", + }) + case *sdkproto.Response_DataUpload: + continue // Only for template imports + case *sdkproto.Response_ChunkPiece: + continue // Only for template imports + case *sdkproto.Response_Init: + return msgType.Init, nil + default: + return nil, r.failedJobf("unexpected init response type %T", msg.Type) + } + } +} diff --git a/provisionerd/runner/runner.go b/provisionerd/runner/runner.go index 22b6403fe729d..75016a8827b36 100644 --- a/provisionerd/runner/runner.go +++ b/provisionerd/runner/runner.go @@ -515,7 +515,7 @@ func (r *Runner) runTemplateImport(ctx context.Context) (*proto.CompletedJob, *p defer span.End() failedJob := r.configure(&sdkproto.Config{ - TemplateSourceArchive: r.job.GetTemplateSourceArchive(), + //TemplateSourceArchive: r.job.GetTemplateSourceArchive(), TemplateId: strings2.EmptyToNil(r.job.GetTemplateImport().Metadata.TemplateId), TemplateVersionId: strings2.EmptyToNil(r.job.GetTemplateImport().Metadata.TemplateVersionId), ExpReuseTerraformWorkspace: ptr.Ref(false), @@ -708,7 +708,7 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( // Template import has no previous values PreviousParameterValues: make([]*sdkproto.RichParameterValue, 0), VariableValues: variableValues, - OmitModuleFiles: omitModules, + //OmitModuleFiles: omitModules, }}}) if err != nil { return nil, xerrors.Errorf("start provision: %w", err) @@ -855,7 +855,7 @@ func (r *Runner) runTemplateDryRun(ctx context.Context) (*proto.CompletedJob, *p } failedJob := r.configure(&sdkproto.Config{ - TemplateSourceArchive: r.job.GetTemplateSourceArchive(), + //TemplateSourceArchive: r.job.GetTemplateSourceArchive(), }) if failedJob != nil { return nil, failedJob @@ -1014,8 +1014,8 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p } failedJob := r.configure(&sdkproto.Config{ - TemplateSourceArchive: r.job.GetTemplateSourceArchive(), - State: r.job.GetWorkspaceBuild().State, + //TemplateSourceArchive: r.job.GetTemplateSourceArchive(), + //State: r.job.GetWorkspaceBuild().State, ProvisionerLogLevel: r.job.GetWorkspaceBuild().LogLevel, TemplateId: strings2.EmptyToNil(r.job.GetWorkspaceBuild().Metadata.TemplateId), TemplateVersionId: strings2.EmptyToNil(r.job.GetWorkspaceBuild().Metadata.TemplateVersionId), @@ -1025,10 +1025,31 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p return nil, failedJob } + initComplete, failedJob := r.init(ctx, true, r.job.GetTemplateSourceArchive()) + if failedJob != nil { + return nil, failedJob + } + if initComplete == nil { + return nil, r.failedWorkspaceBuildf("invalid message type received from provisioner during init") + } + if initComplete.Error != "" { + r.logger.Warn(context.Background(), "plan request failed", + slog.F("error", initComplete.Error), + ) + + return nil, &proto.FailedJob{ + JobId: r.job.JobId, + Error: initComplete.Error, + Type: &proto.FailedJob_WorkspaceBuild_{ + WorkspaceBuild: &proto.FailedJob_WorkspaceBuild{}, + }, + } + } + resp, failed := r.buildWorkspace(ctx, "Planning infrastructure", &sdkproto.Request{ Type: &sdkproto.Request_Plan{ Plan: &sdkproto.PlanRequest{ - OmitModuleFiles: true, // Only useful for template imports + //OmitModuleFiles: true, // Only useful for template imports Metadata: r.job.GetWorkspaceBuild().Metadata, RichParameterValues: r.job.GetWorkspaceBuild().RichParameterValues, PreviousParameterValues: r.job.GetWorkspaceBuild().PreviousParameterValues, diff --git a/provisionersdk/errors.go b/provisionersdk/errors.go index 0dc66e6e6b301..ea0c5fc984d73 100644 --- a/provisionersdk/errors.go +++ b/provisionersdk/errors.go @@ -10,6 +10,10 @@ func ParseErrorf(format string, args ...any) *proto.ParseComplete { return &proto.ParseComplete{Error: fmt.Sprintf(format, args...)} } +func InitErrorf(format string, args ...any) *proto.InitComplete { + return &proto.InitComplete{Error: fmt.Sprintf(format, args...)} +} + func PlanErrorf(format string, args ...any) *proto.PlanComplete { return &proto.PlanComplete{Error: fmt.Sprintf(format, args...)} } diff --git a/provisionersdk/proto/provisioner.pb.go b/provisionersdk/proto/provisioner.pb.go index e519f995cf2e8..a4fb18311b43a 100644 --- a/provisionersdk/proto/provisioner.pb.go +++ b/provisionersdk/proto/provisioner.pb.go @@ -3057,9 +3057,9 @@ func (x *Metadata) GetTemplateVersionId() string { type Config struct { state protoimpl.MessageState `protogen:"open.v1"` // template_source_archive is a tar of the template source files - TemplateSourceArchive []byte `protobuf:"bytes,1,opt,name=template_source_archive,json=templateSourceArchive,proto3" json:"template_source_archive,omitempty"` + NoUseTemplateSourceArchive []byte `protobuf:"bytes,1,opt,name=no_use_template_source_archive,json=noUseTemplateSourceArchive,proto3" json:"no_use_template_source_archive,omitempty"` // state is the provisioner state (if any) - State []byte `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` + NoUseState []byte `protobuf:"bytes,2,opt,name=no_use_state,json=noUseState,proto3" json:"no_use_state,omitempty"` ProvisionerLogLevel string `protobuf:"bytes,3,opt,name=provisioner_log_level,json=provisionerLogLevel,proto3" json:"provisioner_log_level,omitempty"` // Template imports can omit template id TemplateId *string `protobuf:"bytes,4,opt,name=template_id,json=templateId,proto3,oneof" json:"template_id,omitempty"` @@ -3100,16 +3100,16 @@ func (*Config) Descriptor() ([]byte, []int) { return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{34} } -func (x *Config) GetTemplateSourceArchive() []byte { +func (x *Config) GetNoUseTemplateSourceArchive() []byte { if x != nil { - return x.TemplateSourceArchive + return x.NoUseTemplateSourceArchive } return nil } -func (x *Config) GetState() []byte { +func (x *Config) GetNoUseState() []byte { if x != nil { - return x.State + return x.NoUseState } return nil } @@ -3249,9 +3249,16 @@ func (x *ParseComplete) GetWorkspaceTags() map[string]string { } type InitRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + // template_source_archive is a tar of the template source files + TemplateSourceArchive []byte `protobuf:"bytes,1,opt,name=template_source_archive,json=templateSourceArchive,proto3" json:"template_source_archive,omitempty"` + // If true, the provisioner can safely assume the caller does not need the + // module files downloaded by the `terraform init` command. + // Ideally this boolean would be flipped in its truthy value, however since + // this is costly, the zero value omitting the module files is preferred. + OmitModuleFiles bool `protobuf:"varint,3,opt,name=omit_module_files,json=omitModuleFiles,proto3" json:"omit_module_files,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *InitRequest) Reset() { @@ -3284,27 +3291,44 @@ func (*InitRequest) Descriptor() ([]byte, []int) { return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{37} } -type InitResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *InitRequest) GetTemplateSourceArchive() []byte { + if x != nil { + return x.TemplateSourceArchive + } + return nil +} + +func (x *InitRequest) GetOmitModuleFiles() bool { + if x != nil { + return x.OmitModuleFiles + } + return false } -func (x *InitResponse) Reset() { - *x = InitResponse{} +type InitComplete struct { + state protoimpl.MessageState `protogen:"open.v1"` + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Modules []*Module `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"` + ModuleFiles []byte `protobuf:"bytes,3,opt,name=module_files,json=moduleFiles,proto3" json:"module_files,omitempty"` + ModuleFilesHash []byte `protobuf:"bytes,4,opt,name=module_files_hash,json=moduleFilesHash,proto3" json:"module_files_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InitComplete) Reset() { + *x = InitComplete{} mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *InitResponse) String() string { +func (x *InitComplete) String() string { return protoimpl.X.MessageStringOf(x) } -func (*InitResponse) ProtoMessage() {} +func (*InitComplete) ProtoMessage() {} -func (x *InitResponse) ProtoReflect() protoreflect.Message { +func (x *InitComplete) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3316,18 +3340,39 @@ func (x *InitResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use InitResponse.ProtoReflect.Descriptor instead. -func (*InitResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use InitComplete.ProtoReflect.Descriptor instead. +func (*InitComplete) Descriptor() ([]byte, []int) { return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{38} } -func (x *InitResponse) GetError() string { +func (x *InitComplete) GetError() string { if x != nil { return x.Error } return "" } +func (x *InitComplete) GetModules() []*Module { + if x != nil { + return x.Modules + } + return nil +} + +func (x *InitComplete) GetModuleFiles() []byte { + if x != nil { + return x.ModuleFiles + } + return nil +} + +func (x *InitComplete) GetModuleFilesHash() []byte { + if x != nil { + return x.ModuleFilesHash + } + return nil +} + // PlanRequest asks the provisioner to plan what resources & parameters it will create type PlanRequest struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -3336,14 +3381,10 @@ type PlanRequest struct { VariableValues []*VariableValue `protobuf:"bytes,3,rep,name=variable_values,json=variableValues,proto3" json:"variable_values,omitempty"` ExternalAuthProviders []*ExternalAuthProvider `protobuf:"bytes,4,rep,name=external_auth_providers,json=externalAuthProviders,proto3" json:"external_auth_providers,omitempty"` PreviousParameterValues []*RichParameterValue `protobuf:"bytes,5,rep,name=previous_parameter_values,json=previousParameterValues,proto3" json:"previous_parameter_values,omitempty"` - // If true, the provisioner can safely assume the caller does not need the - // module files downloaded by the `terraform init` command. - // Ideally this boolean would be flipped in its truthy value, however for - // backwards compatibility reasons, the zero value should be the previous - // behavior of downloading the module files. - OmitModuleFiles bool `protobuf:"varint,6,opt,name=omit_module_files,json=omitModuleFiles,proto3" json:"omit_module_files,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // state is the provisioner state (if any) + State []byte `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PlanRequest) Reset() { @@ -3411,11 +3452,11 @@ func (x *PlanRequest) GetPreviousParameterValues() []*RichParameterValue { return nil } -func (x *PlanRequest) GetOmitModuleFiles() bool { +func (x *PlanRequest) GetState() []byte { if x != nil { - return x.OmitModuleFiles + return x.State } - return false + return nil } // PlanComplete indicates a request to plan completed. @@ -3575,8 +3616,10 @@ func (x *PlanComplete) GetHasExternalAgents() bool { // ApplyRequest asks the provisioner to apply the changes. Apply MUST be preceded by a successful plan request/response // in the same Session. The plan data is not transmitted over the wire and is cached by the provisioner in the Session. type ApplyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // state is the provisioner state (if any) + State []byte `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3618,6 +3661,13 @@ func (x *ApplyRequest) GetMetadata() *Metadata { return nil } +func (x *ApplyRequest) GetState() []byte { + if x != nil { + return x.State + } + return nil +} + // ApplyComplete indicates a request to apply completed. type ApplyComplete struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -3711,6 +3761,86 @@ func (x *ApplyComplete) GetAiTasks() []*AITask { return nil } +type GraphRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphRequest) Reset() { + *x = GraphRequest{} + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphRequest) ProtoMessage() {} + +func (x *GraphRequest) ProtoReflect() protoreflect.Message { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphRequest.ProtoReflect.Descriptor instead. +func (*GraphRequest) Descriptor() ([]byte, []int) { + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{43} +} + +type GraphComplete struct { + state protoimpl.MessageState `protogen:"open.v1"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GraphComplete) Reset() { + *x = GraphComplete{} + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GraphComplete) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphComplete) ProtoMessage() {} + +func (x *GraphComplete) ProtoReflect() protoreflect.Message { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphComplete.ProtoReflect.Descriptor instead. +func (*GraphComplete) Descriptor() ([]byte, []int) { + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{44} +} + +func (x *GraphComplete) GetError() string { + if x != nil { + return x.Error + } + return "" +} + type Timing struct { state protoimpl.MessageState `protogen:"open.v1"` Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` @@ -3726,7 +3856,7 @@ type Timing struct { func (x *Timing) Reset() { *x = Timing{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3738,7 +3868,7 @@ func (x *Timing) String() string { func (*Timing) ProtoMessage() {} func (x *Timing) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3751,7 +3881,7 @@ func (x *Timing) ProtoReflect() protoreflect.Message { // Deprecated: Use Timing.ProtoReflect.Descriptor instead. func (*Timing) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{43} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{45} } func (x *Timing) GetStart() *timestamppb.Timestamp { @@ -3812,7 +3942,7 @@ type CancelRequest struct { func (x *CancelRequest) Reset() { *x = CancelRequest{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3824,7 +3954,7 @@ func (x *CancelRequest) String() string { func (*CancelRequest) ProtoMessage() {} func (x *CancelRequest) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3837,7 +3967,7 @@ func (x *CancelRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelRequest.ProtoReflect.Descriptor instead. func (*CancelRequest) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{44} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{46} } type Request struct { @@ -3846,8 +3976,10 @@ type Request struct { // // *Request_Config // *Request_Parse + // *Request_Init // *Request_Plan // *Request_Apply + // *Request_Graph // *Request_Cancel Type isRequest_Type `protobuf_oneof:"type"` unknownFields protoimpl.UnknownFields @@ -3856,7 +3988,7 @@ type Request struct { func (x *Request) Reset() { *x = Request{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3868,7 +4000,7 @@ func (x *Request) String() string { func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3881,7 +4013,7 @@ func (x *Request) ProtoReflect() protoreflect.Message { // Deprecated: Use Request.ProtoReflect.Descriptor instead. func (*Request) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{45} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{47} } func (x *Request) GetType() isRequest_Type { @@ -3909,6 +4041,15 @@ func (x *Request) GetParse() *ParseRequest { return nil } +func (x *Request) GetInit() *InitRequest { + if x != nil { + if x, ok := x.Type.(*Request_Init); ok { + return x.Init + } + } + return nil +} + func (x *Request) GetPlan() *PlanRequest { if x != nil { if x, ok := x.Type.(*Request_Plan); ok { @@ -3927,6 +4068,15 @@ func (x *Request) GetApply() *ApplyRequest { return nil } +func (x *Request) GetGraph() *GraphRequest { + if x != nil { + if x, ok := x.Type.(*Request_Graph); ok { + return x.Graph + } + } + return nil +} + func (x *Request) GetCancel() *CancelRequest { if x != nil { if x, ok := x.Type.(*Request_Cancel); ok { @@ -3948,26 +4098,38 @@ type Request_Parse struct { Parse *ParseRequest `protobuf:"bytes,2,opt,name=parse,proto3,oneof"` } +type Request_Init struct { + Init *InitRequest `protobuf:"bytes,3,opt,name=init,proto3,oneof"` +} + type Request_Plan struct { - Plan *PlanRequest `protobuf:"bytes,3,opt,name=plan,proto3,oneof"` + Plan *PlanRequest `protobuf:"bytes,4,opt,name=plan,proto3,oneof"` } type Request_Apply struct { - Apply *ApplyRequest `protobuf:"bytes,4,opt,name=apply,proto3,oneof"` + Apply *ApplyRequest `protobuf:"bytes,5,opt,name=apply,proto3,oneof"` +} + +type Request_Graph struct { + Graph *GraphRequest `protobuf:"bytes,6,opt,name=graph,proto3,oneof"` } type Request_Cancel struct { - Cancel *CancelRequest `protobuf:"bytes,5,opt,name=cancel,proto3,oneof"` + Cancel *CancelRequest `protobuf:"bytes,7,opt,name=cancel,proto3,oneof"` } func (*Request_Config) isRequest_Type() {} func (*Request_Parse) isRequest_Type() {} +func (*Request_Init) isRequest_Type() {} + func (*Request_Plan) isRequest_Type() {} func (*Request_Apply) isRequest_Type() {} +func (*Request_Graph) isRequest_Type() {} + func (*Request_Cancel) isRequest_Type() {} type Response struct { @@ -3976,8 +4138,10 @@ type Response struct { // // *Response_Log // *Response_Parse + // *Response_Init // *Response_Plan // *Response_Apply + // *Response_Graph // *Response_DataUpload // *Response_ChunkPiece Type isResponse_Type `protobuf_oneof:"type"` @@ -3987,7 +4151,7 @@ type Response struct { func (x *Response) Reset() { *x = Response{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3999,7 +4163,7 @@ func (x *Response) String() string { func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4012,7 +4176,7 @@ func (x *Response) ProtoReflect() protoreflect.Message { // Deprecated: Use Response.ProtoReflect.Descriptor instead. func (*Response) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{46} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{48} } func (x *Response) GetType() isResponse_Type { @@ -4040,6 +4204,15 @@ func (x *Response) GetParse() *ParseComplete { return nil } +func (x *Response) GetInit() *InitComplete { + if x != nil { + if x, ok := x.Type.(*Response_Init); ok { + return x.Init + } + } + return nil +} + func (x *Response) GetPlan() *PlanComplete { if x != nil { if x, ok := x.Type.(*Response_Plan); ok { @@ -4058,6 +4231,15 @@ func (x *Response) GetApply() *ApplyComplete { return nil } +func (x *Response) GetGraph() *GraphComplete { + if x != nil { + if x, ok := x.Type.(*Response_Graph); ok { + return x.Graph + } + } + return nil +} + func (x *Response) GetDataUpload() *DataUpload { if x != nil { if x, ok := x.Type.(*Response_DataUpload); ok { @@ -4088,30 +4270,42 @@ type Response_Parse struct { Parse *ParseComplete `protobuf:"bytes,2,opt,name=parse,proto3,oneof"` } +type Response_Init struct { + Init *InitComplete `protobuf:"bytes,3,opt,name=init,proto3,oneof"` +} + type Response_Plan struct { - Plan *PlanComplete `protobuf:"bytes,3,opt,name=plan,proto3,oneof"` + Plan *PlanComplete `protobuf:"bytes,4,opt,name=plan,proto3,oneof"` } type Response_Apply struct { - Apply *ApplyComplete `protobuf:"bytes,4,opt,name=apply,proto3,oneof"` + Apply *ApplyComplete `protobuf:"bytes,5,opt,name=apply,proto3,oneof"` +} + +type Response_Graph struct { + Graph *GraphComplete `protobuf:"bytes,6,opt,name=graph,proto3,oneof"` } type Response_DataUpload struct { - DataUpload *DataUpload `protobuf:"bytes,5,opt,name=data_upload,json=dataUpload,proto3,oneof"` + DataUpload *DataUpload `protobuf:"bytes,7,opt,name=data_upload,json=dataUpload,proto3,oneof"` } type Response_ChunkPiece struct { - ChunkPiece *ChunkPiece `protobuf:"bytes,6,opt,name=chunk_piece,json=chunkPiece,proto3,oneof"` + ChunkPiece *ChunkPiece `protobuf:"bytes,8,opt,name=chunk_piece,json=chunkPiece,proto3,oneof"` } func (*Response_Log) isResponse_Type() {} func (*Response_Parse) isResponse_Type() {} +func (*Response_Init) isResponse_Type() {} + func (*Response_Plan) isResponse_Type() {} func (*Response_Apply) isResponse_Type() {} +func (*Response_Graph) isResponse_Type() {} + func (*Response_DataUpload) isResponse_Type() {} func (*Response_ChunkPiece) isResponse_Type() {} @@ -4132,7 +4326,7 @@ type DataUpload struct { func (x *DataUpload) Reset() { *x = DataUpload{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4144,7 +4338,7 @@ func (x *DataUpload) String() string { func (*DataUpload) ProtoMessage() {} func (x *DataUpload) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4157,7 +4351,7 @@ func (x *DataUpload) ProtoReflect() protoreflect.Message { // Deprecated: Use DataUpload.ProtoReflect.Descriptor instead. func (*DataUpload) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{47} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{49} } func (x *DataUpload) GetUploadType() DataUploadType { @@ -4202,7 +4396,7 @@ type ChunkPiece struct { func (x *ChunkPiece) Reset() { *x = ChunkPiece{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[48] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4214,7 +4408,7 @@ func (x *ChunkPiece) String() string { func (*ChunkPiece) ProtoMessage() {} func (x *ChunkPiece) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[48] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4227,7 +4421,7 @@ func (x *ChunkPiece) ProtoReflect() protoreflect.Message { // Deprecated: Use ChunkPiece.ProtoReflect.Descriptor instead. func (*ChunkPiece) Descriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{48} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{50} } func (x *ChunkPiece) GetData() []byte { @@ -4265,7 +4459,7 @@ type Agent_Metadata struct { func (x *Agent_Metadata) Reset() { *x = Agent_Metadata{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4277,7 +4471,7 @@ func (x *Agent_Metadata) String() string { func (*Agent_Metadata) ProtoMessage() {} func (x *Agent_Metadata) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4347,7 +4541,7 @@ type Resource_Metadata struct { func (x *Resource_Metadata) Reset() { *x = Resource_Metadata{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[51] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4359,7 +4553,7 @@ func (x *Resource_Metadata) String() string { func (*Resource_Metadata) ProtoMessage() {} func (x *Resource_Metadata) ProtoReflect() protoreflect.Message { - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[51] + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4647,10 +4841,11 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "\atask_id\x18\x16 \x01(\tR\x06taskId\x12\x1f\n" + "\vtask_prompt\x18\x17 \x01(\tR\n" + "taskPrompt\x12.\n" + - "\x13template_version_id\x18\x18 \x01(\tR\x11templateVersionId\"\xf7\x02\n" + - "\x06Config\x126\n" + - "\x17template_source_archive\x18\x01 \x01(\fR\x15templateSourceArchive\x12\x14\n" + - "\x05state\x18\x02 \x01(\fR\x05state\x122\n" + + "\x13template_version_id\x18\x18 \x01(\tR\x11templateVersionId\"\x8f\x03\n" + + "\x06Config\x12B\n" + + "\x1eno_use_template_source_archive\x18\x01 \x01(\fR\x1anoUseTemplateSourceArchive\x12 \n" + + "\fno_use_state\x18\x02 \x01(\fR\n" + + "noUseState\x122\n" + "\x15provisioner_log_level\x18\x03 \x01(\tR\x13provisionerLogLevel\x12$\n" + "\vtemplate_id\x18\x04 \x01(\tH\x00R\n" + "templateId\x88\x01\x01\x123\n" + @@ -4667,17 +4862,22 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "\x0eworkspace_tags\x18\x04 \x03(\v2-.provisioner.ParseComplete.WorkspaceTagsEntryR\rworkspaceTags\x1a@\n" + "\x12WorkspaceTagsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\r\n" + - "\vInitRequest\"$\n" + - "\fInitResponse\x12\x14\n" + - "\x05error\x18\x01 \x01(\tR\x05error\"\xbe\x03\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"q\n" + + "\vInitRequest\x126\n" + + "\x17template_source_archive\x18\x01 \x01(\fR\x15templateSourceArchive\x12*\n" + + "\x11omit_module_files\x18\x03 \x01(\bR\x0fomitModuleFiles\"\xa2\x01\n" + + "\fInitComplete\x12\x14\n" + + "\x05error\x18\x01 \x01(\tR\x05error\x12-\n" + + "\amodules\x18\x02 \x03(\v2\x13.provisioner.ModuleR\amodules\x12!\n" + + "\fmodule_files\x18\x03 \x01(\fR\vmoduleFiles\x12*\n" + + "\x11module_files_hash\x18\x04 \x01(\fR\x0fmoduleFilesHash\"\xa8\x03\n" + "\vPlanRequest\x121\n" + "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12S\n" + "\x15rich_parameter_values\x18\x02 \x03(\v2\x1f.provisioner.RichParameterValueR\x13richParameterValues\x12C\n" + "\x0fvariable_values\x18\x03 \x03(\v2\x1a.provisioner.VariableValueR\x0evariableValues\x12Y\n" + "\x17external_auth_providers\x18\x04 \x03(\v2!.provisioner.ExternalAuthProviderR\x15externalAuthProviders\x12[\n" + - "\x19previous_parameter_values\x18\x05 \x03(\v2\x1f.provisioner.RichParameterValueR\x17previousParameterValues\x12*\n" + - "\x11omit_module_files\x18\x06 \x01(\bR\x0fomitModuleFiles\"\xc1\x05\n" + + "\x19previous_parameter_values\x18\x05 \x03(\v2\x1f.provisioner.RichParameterValueR\x17previousParameterValues\x12\x14\n" + + "\x05state\x18\x06 \x01(\fR\x05state\"\xc1\x05\n" + "\fPlanComplete\x12\x14\n" + "\x05error\x18\x01 \x01(\tR\x05error\x123\n" + "\tresources\x18\x02 \x03(\v2\x15.provisioner.ResourceR\tresources\x12:\n" + @@ -4696,9 +4896,10 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "\fhas_ai_tasks\x18\r \x01(\bR\n" + "hasAiTasks\x12.\n" + "\bai_tasks\x18\x0e \x03(\v2\x13.provisioner.AITaskR\aaiTasks\x12.\n" + - "\x13has_external_agents\x18\x0f \x01(\bR\x11hasExternalAgents\"A\n" + + "\x13has_external_agents\x18\x0f \x01(\bR\x11hasExternalAgents\"W\n" + "\fApplyRequest\x121\n" + - "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\"\xee\x02\n" + + "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12\x14\n" + + "\x05state\x18\x06 \x01(\fR\x05state\"\xee\x02\n" + "\rApplyComplete\x12\x14\n" + "\x05state\x18\x01 \x01(\fR\x05state\x12\x14\n" + "\x05error\x18\x02 \x01(\tR\x05error\x123\n" + @@ -4708,7 +4909,10 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "parameters\x12a\n" + "\x17external_auth_providers\x18\x05 \x03(\v2).provisioner.ExternalAuthProviderResourceR\x15externalAuthProviders\x12-\n" + "\atimings\x18\x06 \x03(\v2\x13.provisioner.TimingR\atimings\x12.\n" + - "\bai_tasks\x18\a \x03(\v2\x13.provisioner.AITaskR\aaiTasks\"\xfa\x01\n" + + "\bai_tasks\x18\a \x03(\v2\x13.provisioner.AITaskR\aaiTasks\"\x0e\n" + + "\fGraphRequest\"%\n" + + "\rGraphComplete\x12\x14\n" + + "\x05error\x18\x02 \x01(\tR\x05error\"\xfa\x01\n" + "\x06Timing\x120\n" + "\x05start\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x05start\x12,\n" + "\x03end\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x03end\x12\x16\n" + @@ -4717,22 +4921,26 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "\bresource\x18\x05 \x01(\tR\bresource\x12\x14\n" + "\x05stage\x18\x06 \x01(\tR\x05stage\x12.\n" + "\x05state\x18\a \x01(\x0e2\x18.provisioner.TimingStateR\x05state\"\x0f\n" + - "\rCancelRequest\"\x8c\x02\n" + + "\rCancelRequest\"\xef\x02\n" + "\aRequest\x12-\n" + "\x06config\x18\x01 \x01(\v2\x13.provisioner.ConfigH\x00R\x06config\x121\n" + "\x05parse\x18\x02 \x01(\v2\x19.provisioner.ParseRequestH\x00R\x05parse\x12.\n" + - "\x04plan\x18\x03 \x01(\v2\x18.provisioner.PlanRequestH\x00R\x04plan\x121\n" + - "\x05apply\x18\x04 \x01(\v2\x19.provisioner.ApplyRequestH\x00R\x05apply\x124\n" + - "\x06cancel\x18\x05 \x01(\v2\x1a.provisioner.CancelRequestH\x00R\x06cancelB\x06\n" + - "\x04type\"\xc9\x02\n" + + "\x04init\x18\x03 \x01(\v2\x18.provisioner.InitRequestH\x00R\x04init\x12.\n" + + "\x04plan\x18\x04 \x01(\v2\x18.provisioner.PlanRequestH\x00R\x04plan\x121\n" + + "\x05apply\x18\x05 \x01(\v2\x19.provisioner.ApplyRequestH\x00R\x05apply\x121\n" + + "\x05graph\x18\x06 \x01(\v2\x19.provisioner.GraphRequestH\x00R\x05graph\x124\n" + + "\x06cancel\x18\a \x01(\v2\x1a.provisioner.CancelRequestH\x00R\x06cancelB\x06\n" + + "\x04type\"\xae\x03\n" + "\bResponse\x12$\n" + "\x03log\x18\x01 \x01(\v2\x10.provisioner.LogH\x00R\x03log\x122\n" + "\x05parse\x18\x02 \x01(\v2\x1a.provisioner.ParseCompleteH\x00R\x05parse\x12/\n" + - "\x04plan\x18\x03 \x01(\v2\x19.provisioner.PlanCompleteH\x00R\x04plan\x122\n" + - "\x05apply\x18\x04 \x01(\v2\x1a.provisioner.ApplyCompleteH\x00R\x05apply\x12:\n" + - "\vdata_upload\x18\x05 \x01(\v2\x17.provisioner.DataUploadH\x00R\n" + + "\x04init\x18\x03 \x01(\v2\x19.provisioner.InitCompleteH\x00R\x04init\x12/\n" + + "\x04plan\x18\x04 \x01(\v2\x19.provisioner.PlanCompleteH\x00R\x04plan\x122\n" + + "\x05apply\x18\x05 \x01(\v2\x1a.provisioner.ApplyCompleteH\x00R\x05apply\x122\n" + + "\x05graph\x18\x06 \x01(\v2\x1a.provisioner.GraphCompleteH\x00R\x05graph\x12:\n" + + "\vdata_upload\x18\a \x01(\v2\x17.provisioner.DataUploadH\x00R\n" + "dataUpload\x12:\n" + - "\vchunk_piece\x18\x06 \x01(\v2\x17.provisioner.ChunkPieceH\x00R\n" + + "\vchunk_piece\x18\b \x01(\v2\x17.provisioner.ChunkPieceH\x00R\n" + "chunkPieceB\x06\n" + "\x04type\"\x9c\x01\n" + "\n" + @@ -4812,7 +5020,7 @@ func file_provisionersdk_proto_provisioner_proto_rawDescGZIP() []byte { } var file_provisionersdk_proto_provisioner_proto_enumTypes = make([]protoimpl.EnumInfo, 8) -var file_provisionersdk_proto_provisioner_proto_msgTypes = make([]protoimpl.MessageInfo, 53) +var file_provisionersdk_proto_provisioner_proto_msgTypes = make([]protoimpl.MessageInfo, 55) var file_provisionersdk_proto_provisioner_proto_goTypes = []any{ (ParameterFormType)(0), // 0: provisioner.ParameterFormType (LogLevel)(0), // 1: provisioner.LogLevel @@ -4860,22 +5068,24 @@ var file_provisionersdk_proto_provisioner_proto_goTypes = []any{ (*ParseRequest)(nil), // 43: provisioner.ParseRequest (*ParseComplete)(nil), // 44: provisioner.ParseComplete (*InitRequest)(nil), // 45: provisioner.InitRequest - (*InitResponse)(nil), // 46: provisioner.InitResponse + (*InitComplete)(nil), // 46: provisioner.InitComplete (*PlanRequest)(nil), // 47: provisioner.PlanRequest (*PlanComplete)(nil), // 48: provisioner.PlanComplete (*ApplyRequest)(nil), // 49: provisioner.ApplyRequest (*ApplyComplete)(nil), // 50: provisioner.ApplyComplete - (*Timing)(nil), // 51: provisioner.Timing - (*CancelRequest)(nil), // 52: provisioner.CancelRequest - (*Request)(nil), // 53: provisioner.Request - (*Response)(nil), // 54: provisioner.Response - (*DataUpload)(nil), // 55: provisioner.DataUpload - (*ChunkPiece)(nil), // 56: provisioner.ChunkPiece - (*Agent_Metadata)(nil), // 57: provisioner.Agent.Metadata - nil, // 58: provisioner.Agent.EnvEntry - (*Resource_Metadata)(nil), // 59: provisioner.Resource.Metadata - nil, // 60: provisioner.ParseComplete.WorkspaceTagsEntry - (*timestamppb.Timestamp)(nil), // 61: google.protobuf.Timestamp + (*GraphRequest)(nil), // 51: provisioner.GraphRequest + (*GraphComplete)(nil), // 52: provisioner.GraphComplete + (*Timing)(nil), // 53: provisioner.Timing + (*CancelRequest)(nil), // 54: provisioner.CancelRequest + (*Request)(nil), // 55: provisioner.Request + (*Response)(nil), // 56: provisioner.Response + (*DataUpload)(nil), // 57: provisioner.DataUpload + (*ChunkPiece)(nil), // 58: provisioner.ChunkPiece + (*Agent_Metadata)(nil), // 59: provisioner.Agent.Metadata + nil, // 60: provisioner.Agent.EnvEntry + (*Resource_Metadata)(nil), // 61: provisioner.Resource.Metadata + nil, // 62: provisioner.ParseComplete.WorkspaceTagsEntry + (*timestamppb.Timestamp)(nil), // 63: google.protobuf.Timestamp } var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ 10, // 0: provisioner.RichParameter.options:type_name -> provisioner.RichParameterOption @@ -4886,9 +5096,9 @@ var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ 18, // 5: provisioner.Preset.parameters:type_name -> provisioner.PresetParameter 16, // 6: provisioner.Preset.prebuild:type_name -> provisioner.Prebuild 1, // 7: provisioner.Log.level:type_name -> provisioner.LogLevel - 58, // 8: provisioner.Agent.env:type_name -> provisioner.Agent.EnvEntry + 60, // 8: provisioner.Agent.env:type_name -> provisioner.Agent.EnvEntry 33, // 9: provisioner.Agent.apps:type_name -> provisioner.App - 57, // 10: provisioner.Agent.metadata:type_name -> provisioner.Agent.Metadata + 59, // 10: provisioner.Agent.metadata:type_name -> provisioner.Agent.Metadata 29, // 11: provisioner.Agent.display_apps:type_name -> provisioner.DisplayApps 31, // 12: provisioner.Agent.scripts:type_name -> provisioner.Script 30, // 13: provisioner.Agent.extra_envs:type_name -> provisioner.Env @@ -4900,55 +5110,60 @@ var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ 2, // 19: provisioner.App.sharing_level:type_name -> provisioner.AppSharingLevel 3, // 20: provisioner.App.open_in:type_name -> provisioner.AppOpenIn 25, // 21: provisioner.Resource.agents:type_name -> provisioner.Agent - 59, // 22: provisioner.Resource.metadata:type_name -> provisioner.Resource.Metadata + 61, // 22: provisioner.Resource.metadata:type_name -> provisioner.Resource.Metadata 39, // 23: provisioner.AITask.sidebar_app:type_name -> provisioner.AITaskSidebarApp 4, // 24: provisioner.Metadata.workspace_transition:type_name -> provisioner.WorkspaceTransition 37, // 25: provisioner.Metadata.workspace_owner_rbac_roles:type_name -> provisioner.Role 5, // 26: provisioner.Metadata.prebuilt_workspace_build_stage:type_name -> provisioner.PrebuiltWorkspaceBuildStage 38, // 27: provisioner.Metadata.running_agent_auth_tokens:type_name -> provisioner.RunningAgentAuthToken 9, // 28: provisioner.ParseComplete.template_variables:type_name -> provisioner.TemplateVariable - 60, // 29: provisioner.ParseComplete.workspace_tags:type_name -> provisioner.ParseComplete.WorkspaceTagsEntry - 41, // 30: provisioner.PlanRequest.metadata:type_name -> provisioner.Metadata - 12, // 31: provisioner.PlanRequest.rich_parameter_values:type_name -> provisioner.RichParameterValue - 20, // 32: provisioner.PlanRequest.variable_values:type_name -> provisioner.VariableValue - 24, // 33: provisioner.PlanRequest.external_auth_providers:type_name -> provisioner.ExternalAuthProvider - 12, // 34: provisioner.PlanRequest.previous_parameter_values:type_name -> provisioner.RichParameterValue - 35, // 35: provisioner.PlanComplete.resources:type_name -> provisioner.Resource - 11, // 36: provisioner.PlanComplete.parameters:type_name -> provisioner.RichParameter - 23, // 37: provisioner.PlanComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource - 51, // 38: provisioner.PlanComplete.timings:type_name -> provisioner.Timing - 36, // 39: provisioner.PlanComplete.modules:type_name -> provisioner.Module - 17, // 40: provisioner.PlanComplete.presets:type_name -> provisioner.Preset - 19, // 41: provisioner.PlanComplete.resource_replacements:type_name -> provisioner.ResourceReplacement - 40, // 42: provisioner.PlanComplete.ai_tasks:type_name -> provisioner.AITask - 41, // 43: provisioner.ApplyRequest.metadata:type_name -> provisioner.Metadata - 35, // 44: provisioner.ApplyComplete.resources:type_name -> provisioner.Resource - 11, // 45: provisioner.ApplyComplete.parameters:type_name -> provisioner.RichParameter - 23, // 46: provisioner.ApplyComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource - 51, // 47: provisioner.ApplyComplete.timings:type_name -> provisioner.Timing - 40, // 48: provisioner.ApplyComplete.ai_tasks:type_name -> provisioner.AITask - 61, // 49: provisioner.Timing.start:type_name -> google.protobuf.Timestamp - 61, // 50: provisioner.Timing.end:type_name -> google.protobuf.Timestamp - 6, // 51: provisioner.Timing.state:type_name -> provisioner.TimingState - 42, // 52: provisioner.Request.config:type_name -> provisioner.Config - 43, // 53: provisioner.Request.parse:type_name -> provisioner.ParseRequest - 47, // 54: provisioner.Request.plan:type_name -> provisioner.PlanRequest - 49, // 55: provisioner.Request.apply:type_name -> provisioner.ApplyRequest - 52, // 56: provisioner.Request.cancel:type_name -> provisioner.CancelRequest - 21, // 57: provisioner.Response.log:type_name -> provisioner.Log - 44, // 58: provisioner.Response.parse:type_name -> provisioner.ParseComplete - 48, // 59: provisioner.Response.plan:type_name -> provisioner.PlanComplete - 50, // 60: provisioner.Response.apply:type_name -> provisioner.ApplyComplete - 55, // 61: provisioner.Response.data_upload:type_name -> provisioner.DataUpload - 56, // 62: provisioner.Response.chunk_piece:type_name -> provisioner.ChunkPiece - 7, // 63: provisioner.DataUpload.upload_type:type_name -> provisioner.DataUploadType - 53, // 64: provisioner.Provisioner.Session:input_type -> provisioner.Request - 54, // 65: provisioner.Provisioner.Session:output_type -> provisioner.Response - 65, // [65:66] is the sub-list for method output_type - 64, // [64:65] is the sub-list for method input_type - 64, // [64:64] is the sub-list for extension type_name - 64, // [64:64] is the sub-list for extension extendee - 0, // [0:64] is the sub-list for field type_name + 62, // 29: provisioner.ParseComplete.workspace_tags:type_name -> provisioner.ParseComplete.WorkspaceTagsEntry + 36, // 30: provisioner.InitComplete.modules:type_name -> provisioner.Module + 41, // 31: provisioner.PlanRequest.metadata:type_name -> provisioner.Metadata + 12, // 32: provisioner.PlanRequest.rich_parameter_values:type_name -> provisioner.RichParameterValue + 20, // 33: provisioner.PlanRequest.variable_values:type_name -> provisioner.VariableValue + 24, // 34: provisioner.PlanRequest.external_auth_providers:type_name -> provisioner.ExternalAuthProvider + 12, // 35: provisioner.PlanRequest.previous_parameter_values:type_name -> provisioner.RichParameterValue + 35, // 36: provisioner.PlanComplete.resources:type_name -> provisioner.Resource + 11, // 37: provisioner.PlanComplete.parameters:type_name -> provisioner.RichParameter + 23, // 38: provisioner.PlanComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource + 53, // 39: provisioner.PlanComplete.timings:type_name -> provisioner.Timing + 36, // 40: provisioner.PlanComplete.modules:type_name -> provisioner.Module + 17, // 41: provisioner.PlanComplete.presets:type_name -> provisioner.Preset + 19, // 42: provisioner.PlanComplete.resource_replacements:type_name -> provisioner.ResourceReplacement + 40, // 43: provisioner.PlanComplete.ai_tasks:type_name -> provisioner.AITask + 41, // 44: provisioner.ApplyRequest.metadata:type_name -> provisioner.Metadata + 35, // 45: provisioner.ApplyComplete.resources:type_name -> provisioner.Resource + 11, // 46: provisioner.ApplyComplete.parameters:type_name -> provisioner.RichParameter + 23, // 47: provisioner.ApplyComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource + 53, // 48: provisioner.ApplyComplete.timings:type_name -> provisioner.Timing + 40, // 49: provisioner.ApplyComplete.ai_tasks:type_name -> provisioner.AITask + 63, // 50: provisioner.Timing.start:type_name -> google.protobuf.Timestamp + 63, // 51: provisioner.Timing.end:type_name -> google.protobuf.Timestamp + 6, // 52: provisioner.Timing.state:type_name -> provisioner.TimingState + 42, // 53: provisioner.Request.config:type_name -> provisioner.Config + 43, // 54: provisioner.Request.parse:type_name -> provisioner.ParseRequest + 45, // 55: provisioner.Request.init:type_name -> provisioner.InitRequest + 47, // 56: provisioner.Request.plan:type_name -> provisioner.PlanRequest + 49, // 57: provisioner.Request.apply:type_name -> provisioner.ApplyRequest + 51, // 58: provisioner.Request.graph:type_name -> provisioner.GraphRequest + 54, // 59: provisioner.Request.cancel:type_name -> provisioner.CancelRequest + 21, // 60: provisioner.Response.log:type_name -> provisioner.Log + 44, // 61: provisioner.Response.parse:type_name -> provisioner.ParseComplete + 46, // 62: provisioner.Response.init:type_name -> provisioner.InitComplete + 48, // 63: provisioner.Response.plan:type_name -> provisioner.PlanComplete + 50, // 64: provisioner.Response.apply:type_name -> provisioner.ApplyComplete + 52, // 65: provisioner.Response.graph:type_name -> provisioner.GraphComplete + 57, // 66: provisioner.Response.data_upload:type_name -> provisioner.DataUpload + 58, // 67: provisioner.Response.chunk_piece:type_name -> provisioner.ChunkPiece + 7, // 68: provisioner.DataUpload.upload_type:type_name -> provisioner.DataUploadType + 55, // 69: provisioner.Provisioner.Session:input_type -> provisioner.Request + 56, // 70: provisioner.Provisioner.Session:output_type -> provisioner.Response + 70, // [70:71] is the sub-list for method output_type + 69, // [69:70] is the sub-list for method input_type + 69, // [69:69] is the sub-list for extension type_name + 69, // [69:69] is the sub-list for extension extendee + 0, // [0:69] is the sub-list for field type_name } func init() { file_provisionersdk_proto_provisioner_proto_init() } @@ -4963,18 +5178,22 @@ func file_provisionersdk_proto_provisioner_proto_init() { } file_provisionersdk_proto_provisioner_proto_msgTypes[32].OneofWrappers = []any{} file_provisionersdk_proto_provisioner_proto_msgTypes[34].OneofWrappers = []any{} - file_provisionersdk_proto_provisioner_proto_msgTypes[45].OneofWrappers = []any{ + file_provisionersdk_proto_provisioner_proto_msgTypes[47].OneofWrappers = []any{ (*Request_Config)(nil), (*Request_Parse)(nil), + (*Request_Init)(nil), (*Request_Plan)(nil), (*Request_Apply)(nil), + (*Request_Graph)(nil), (*Request_Cancel)(nil), } - file_provisionersdk_proto_provisioner_proto_msgTypes[46].OneofWrappers = []any{ + file_provisionersdk_proto_provisioner_proto_msgTypes[48].OneofWrappers = []any{ (*Response_Log)(nil), (*Response_Parse)(nil), + (*Response_Init)(nil), (*Response_Plan)(nil), (*Response_Apply)(nil), + (*Response_Graph)(nil), (*Response_DataUpload)(nil), (*Response_ChunkPiece)(nil), } @@ -4984,7 +5203,7 @@ func file_provisionersdk_proto_provisioner_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_provisionersdk_proto_provisioner_proto_rawDesc), len(file_provisionersdk_proto_provisioner_proto_rawDesc)), NumEnums: 8, - NumMessages: 53, + NumMessages: 55, NumExtensions: 0, NumServices: 1, }, diff --git a/provisionersdk/proto/provisioner.proto b/provisionersdk/proto/provisioner.proto index b8060c3270348..867a1f305057f 100644 --- a/provisionersdk/proto/provisioner.proto +++ b/provisionersdk/proto/provisioner.proto @@ -370,9 +370,9 @@ message Metadata { // Config represents execution configuration shared by all subsequent requests in the Session message Config { // template_source_archive is a tar of the template source files - bytes template_source_archive = 1; + bytes no_use_template_source_archive = 1; // state is the provisioner state (if any) - bytes state = 2; + bytes no_use_state = 2; string provisioner_log_level = 3; // Template imports can omit template id optional string template_id = 4; @@ -394,10 +394,21 @@ message ParseComplete { } message InitRequest { + // template_source_archive is a tar of the template source files + bytes template_source_archive = 1; + + // If true, the provisioner can safely assume the caller does not need the + // module files downloaded by the `terraform init` command. + // Ideally this boolean would be flipped in its truthy value, however since + // this is costly, the zero value omitting the module files is preferred. + bool omit_module_files = 3; } -message InitResponse { +message InitComplete { string error = 1; + repeated Module modules = 2; + bytes module_files = 3; + bytes module_files_hash = 4; } // PlanRequest asks the provisioner to plan what resources & parameters it will create @@ -408,12 +419,8 @@ message PlanRequest { repeated ExternalAuthProvider external_auth_providers = 4; repeated RichParameterValue previous_parameter_values = 5; - // If true, the provisioner can safely assume the caller does not need the - // module files downloaded by the `terraform init` command. - // Ideally this boolean would be flipped in its truthy value, however for - // backwards compatibility reasons, the zero value should be the previous - // behavior of downloading the module files. - bool omit_module_files = 6; + // state is the provisioner state (if any) + bytes state = 6; } // PlanComplete indicates a request to plan completed. @@ -443,6 +450,8 @@ message PlanComplete { // in the same Session. The plan data is not transmitted over the wire and is cached by the provisioner in the Session. message ApplyRequest { Metadata metadata = 1; + // state is the provisioner state (if any) + bytes state = 6; } // ApplyComplete indicates a request to apply completed. @@ -456,6 +465,13 @@ message ApplyComplete { repeated provisioner.AITask ai_tasks = 7; } +message GraphRequest { +} + +message GraphComplete { + string error = 2; +} + message Timing { google.protobuf.Timestamp start = 1; google.protobuf.Timestamp end = 2; @@ -479,9 +495,11 @@ message Request { oneof type { Config config = 1; ParseRequest parse = 2; - PlanRequest plan = 3; - ApplyRequest apply = 4; - CancelRequest cancel = 5; + InitRequest init = 3; + PlanRequest plan = 4; + ApplyRequest apply = 5; + GraphRequest graph = 6; + CancelRequest cancel = 7; } } @@ -489,10 +507,12 @@ message Response { oneof type { Log log = 1; ParseComplete parse = 2; - PlanComplete plan = 3; - ApplyComplete apply = 4; - DataUpload data_upload = 5; - ChunkPiece chunk_piece = 6; + InitComplete init = 3; + PlanComplete plan = 4; + ApplyComplete apply = 5; + GraphComplete graph = 6; + DataUpload data_upload = 7; + ChunkPiece chunk_piece = 8; } } diff --git a/provisionersdk/serve.go b/provisionersdk/serve.go index 3bac226e58379..35d09b30aceb3 100644 --- a/provisionersdk/serve.go +++ b/provisionersdk/serve.go @@ -35,6 +35,7 @@ type ServeOptions struct { } type Server interface { + Init(s *Session, r *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete Parse(s *Session, r *proto.ParseRequest, canceledOrComplete <-chan struct{}) *proto.ParseComplete Plan(s *Session, r *proto.PlanRequest, canceledOrComplete <-chan struct{}) *proto.PlanComplete Apply(s *Session, r *proto.ApplyRequest, canceledOrComplete <-chan struct{}) *proto.ApplyComplete diff --git a/provisionersdk/session.go b/provisionersdk/session.go index d715488e5e794..69996e1d508b5 100644 --- a/provisionersdk/session.go +++ b/provisionersdk/session.go @@ -16,7 +16,6 @@ import ( "github.com/coder/coder/v2/codersdk" "github.com/coder/coder/v2/codersdk/drpcsdk" "github.com/coder/coder/v2/provisionersdk/tfpath" - "github.com/coder/coder/v2/provisionersdk/tfpath/x" protobuf "google.golang.org/protobuf/proto" @@ -57,7 +56,7 @@ func (p *protoServer) Session(stream proto.DRPCProvisioner_SessionStream) error } if p.opts.Experiments.Enabled(codersdk.ExperimentTerraformWorkspace) { - s.Files = x.SessionDir(p.opts.WorkDirectory, sessID, config) + //s.Files = x.SessionDir(p.opts.WorkDirectory, sessID, config) } // Cleanup any previously left stale sessions. @@ -66,10 +65,6 @@ func (p *protoServer) Session(stream proto.DRPCProvisioner_SessionStream) error return xerrors.Errorf("unable to clean stale sessions %q: %w", s.Files, err) } - err = s.Files.ExtractArchive(s.Context(), s.Logger, afero.NewOsFs(), s.Config) - if err != nil { - return xerrors.Errorf("extract archive: %w", err) - } return s.handleRequests() } @@ -129,7 +124,26 @@ func (s *Session) handleRequests() error { } resp.Type = &proto.Response_Parse{Parse: complete} } + if init := req.GetInit(); init != nil { + r := &request[*proto.InitRequest, *proto.InitComplete]{ + req: init, + session: s, + serverFn: s.server.Init, + cancels: requests, + } + complete, err := r.do() + if err != nil { + return err + } + resp.Type = &proto.Response_Init{Init: complete} + if complete.Error == "" { + s.initialized = &initialized{} + } + } if plan := req.GetPlan(); plan != nil { + if s.initialized == nil { + return xerrors.New("cannot plan before successful init") + } planResp := s.handlePlanRequest(plan, requests) if planResp.Error == "" { planned = true @@ -206,11 +220,18 @@ type Session struct { Files tfpath.Layouter Config *proto.Config + // initialized indicates if an init was run. + // Required for plan/apply. + initialized *initialized + server Server stream proto.DRPCProvisioner_SessionStream logLevel int32 } +type initialized struct { +} + func (s *Session) Context() context.Context { return s.stream.Context() } @@ -231,11 +252,11 @@ func (s *Session) ProvisionLog(level proto.LogLevel, output string) { } type pRequest interface { - *proto.ParseRequest | *proto.PlanRequest | *proto.ApplyRequest + *proto.ParseRequest | *proto.InitRequest | *proto.PlanRequest | *proto.ApplyRequest | *proto.GraphRequest } type pComplete interface { - *proto.ParseComplete | *proto.PlanComplete | *proto.ApplyComplete + *proto.ParseComplete | *proto.InitComplete | *proto.PlanComplete | *proto.ApplyComplete | *proto.GraphComplete } // request processes a single request call to the Server and returns its complete result, while also processing cancel diff --git a/provisionersdk/tfpath/tfpath.go b/provisionersdk/tfpath/tfpath.go index 019552e48d0de..c9db7ee9a4256 100644 --- a/provisionersdk/tfpath/tfpath.go +++ b/provisionersdk/tfpath/tfpath.go @@ -16,7 +16,6 @@ import ( "golang.org/x/xerrors" "cdr.dev/slog" - "github.com/coder/coder/v2/provisionersdk/proto" ) type Layouter interface { @@ -28,7 +27,7 @@ type Layouter interface { TerraformMetadataDir() string ModulesDirectory() string ModulesFilePath() string - ExtractArchive(ctx context.Context, logger slog.Logger, fs afero.Fs, cfg *proto.Config) error + ExtractArchive(ctx context.Context, logger slog.Logger, fs afero.Fs, templateSourceArchive []byte) error Cleanup(ctx context.Context, logger slog.Logger, fs afero.Fs) CleanStaleSessions(ctx context.Context, logger slog.Logger, fs afero.Fs, now time.Time) error } @@ -93,9 +92,9 @@ func (l Layout) ModulesFilePath() string { return filepath.Join(l.ModulesDirectory(), "modules.json") } -func (l Layout) ExtractArchive(ctx context.Context, logger slog.Logger, fs afero.Fs, cfg *proto.Config) error { +func (l Layout) ExtractArchive(ctx context.Context, logger slog.Logger, fs afero.Fs, templateSourceArchive []byte) error { logger.Info(ctx, "unpacking template source archive", - slog.F("size_bytes", len(cfg.TemplateSourceArchive)), + slog.F("size_bytes", len(templateSourceArchive)), ) err := fs.MkdirAll(l.WorkDirectory(), 0o700) @@ -103,11 +102,7 @@ func (l Layout) ExtractArchive(ctx context.Context, logger slog.Logger, fs afero return xerrors.Errorf("create work directory %q: %w", l.WorkDirectory(), err) } - // TODO: Pass in cfg.TemplateSourceArchive, not the full config. - // niling out the config field is a bit hacky. - reader := tar.NewReader(bytes.NewBuffer(cfg.TemplateSourceArchive)) - // for safety, nil out the reference on Config, since the reader now owns it. - cfg.TemplateSourceArchive = nil + reader := tar.NewReader(bytes.NewBuffer(templateSourceArchive)) for { header, err := reader.Next() if err != nil { From f9fb825bfae25ca79a780ec3a1caad5c28d7bc1e Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 09:44:50 -0600 Subject: [PATCH 03/56] init step broken out --- provisionerd/runner/init.go | 49 +++++++++++++++++-- provisionerd/runner/runner.go | 81 +++++++++++-------------------- provisionersdk/session.go | 3 +- provisionersdk/tfpath/x/tfpath.go | 8 ++- 4 files changed, 78 insertions(+), 63 deletions(-) diff --git a/provisionerd/runner/init.go b/provisionerd/runner/init.go index ba755f5a42c0c..c40d7464c079b 100644 --- a/provisionerd/runner/init.go +++ b/provisionerd/runner/init.go @@ -1,6 +1,7 @@ package runner import ( + "bytes" "context" "time" @@ -22,6 +23,7 @@ func (r *Runner) init(ctx context.Context, omitModules bool, templateArchive []b return nil, r.failedJobf("send init request: %v", err) } + var moduleFilesUpload *sdkproto.DataBuilder for { msg, err := r.session.Recv() if err != nil { @@ -29,10 +31,10 @@ func (r *Runner) init(ctx context.Context, omitModules bool, templateArchive []b } switch msgType := msg.Type.(type) { case *sdkproto.Response_Log: - r.logProvisionerJobLog(context.Background(), msgType.Log.Level, "workspace provisioner job logged", + r.logProvisionerJobLog(context.Background(), msgType.Log.Level, "terraform initialization", slog.F("level", msgType.Log.Level), slog.F("output", msgType.Log.Output), - slog.F("workspace_build_id", r.job.GetWorkspaceBuild().WorkspaceBuildId), + //slog.F("workspace_build_id", r.job.GetWorkspaceBuild().WorkspaceBuildId), ) r.queueLog(ctx, &proto.Log{ @@ -43,10 +45,49 @@ func (r *Runner) init(ctx context.Context, omitModules bool, templateArchive []b Stage: "Initializing Terraform Directory", }) case *sdkproto.Response_DataUpload: - continue // Only for template imports + if omitModules { + return nil, r.failedJobf("received unexpected module files data upload when omitModules is true") + } + c := msgType.DataUpload + if c.UploadType != sdkproto.DataUploadType_UPLOAD_TYPE_MODULE_FILES { + return nil, r.failedJobf("invalid data upload type: %q", c.UploadType) + } + + if moduleFilesUpload != nil { + return nil, r.failedJobf("multiple module data uploads received, only expect 1") + } + + moduleFilesUpload, err = sdkproto.NewDataBuilder(c) + if err != nil { + return nil, r.failedJobf("create data builder: %w", err) + } case *sdkproto.Response_ChunkPiece: - continue // Only for template imports + if omitModules { + return nil, r.failedJobf("received unexpected module files data upload when omitModules is true") + } + c := msgType.ChunkPiece + if moduleFilesUpload == nil { + return nil, r.failedJobf("received chunk piece before module files data upload") + } + + _, err := moduleFilesUpload.Add(c) + if err != nil { + return nil, r.failedJobf("module files, add chunk piece: %w", err) + } case *sdkproto.Response_Init: + if moduleFilesUpload != nil { + // If files were uploaded in multiple chunks, put them back together. + moduleFilesData, err := moduleFilesUpload.Complete() + if err != nil { + return nil, r.failedJobf("complete module files data upload: %w", err) + } + + if !bytes.Equal(msgType.Init.ModuleFilesHash, moduleFilesUpload.Hash) { + return nil, r.failedJobf("module files hash mismatch, uploaded: %x, expected: %x", moduleFilesUpload.Hash, msgType.Init.ModuleFilesHash) + } + msgType.Init.ModuleFiles = moduleFilesData + } + return msgType.Init, nil default: return nil, r.failedJobf("unexpected init response type %T", msg.Type) diff --git a/provisionerd/runner/runner.go b/provisionerd/runner/runner.go index 75016a8827b36..909efa7b86af9 100644 --- a/provisionerd/runner/runner.go +++ b/provisionerd/runner/runner.go @@ -1,7 +1,6 @@ package runner import ( - "bytes" "context" "encoding/json" "errors" @@ -524,6 +523,18 @@ func (r *Runner) runTemplateImport(ctx context.Context) (*proto.CompletedJob, *p return nil, failedJob } + // Initialize the Terraform working directory + initResp, failedInit := r.init(ctx, false, r.job.GetTemplateSourceArchive()) + if failedInit != nil { + return nil, failedInit + } + if initResp == nil { + return nil, r.failedJobf("template import init returned nil response") + } + if initResp.Error != "" { + return nil, r.failedJobf("template import init error: %s", initResp.Error) + } + // Parse parameters and update the job with the parameter specs r.queueLog(ctx, &proto.Log{ Source: proto.LogSource_PROVISIONER_DAEMON, @@ -560,7 +571,7 @@ func (r *Runner) runTemplateImport(ctx context.Context) (*proto.CompletedJob, *p CoderUrl: r.job.GetTemplateImport().Metadata.CoderUrl, WorkspaceOwnerGroups: r.job.GetTemplateImport().Metadata.WorkspaceOwnerGroups, WorkspaceTransition: sdkproto.WorkspaceTransition_START, - }, false) + }) if err != nil { return nil, r.failedJobf("template import provision for start: %s", err) } @@ -576,8 +587,7 @@ func (r *Runner) runTemplateImport(ctx context.Context) (*proto.CompletedJob, *p CoderUrl: r.job.GetTemplateImport().Metadata.CoderUrl, WorkspaceOwnerGroups: r.job.GetTemplateImport().Metadata.WorkspaceOwnerGroups, WorkspaceTransition: sdkproto.WorkspaceTransition_STOP, - }, true, // Modules downloaded on the start provision - ) + }) if err != nil { return nil, r.failedJobf("template import provision for stop: %s", err) } @@ -601,8 +611,7 @@ func (r *Runner) runTemplateImport(ctx context.Context) (*proto.CompletedJob, *p StopModules: stopProvision.Modules, Presets: startProvision.Presets, Plan: startProvision.Plan, - // ModuleFiles are not on the stopProvision. So grab from the startProvision. - ModuleFiles: startProvision.ModuleFiles, + ModuleFiles: initResp.ModuleFiles, // ModuleFileHash will be populated if the file is uploaded async ModuleFilesHash: []byte{}, HasAiTasks: startProvision.HasAITasks, @@ -669,7 +678,6 @@ type templateImportProvision struct { Modules []*sdkproto.Module Presets []*sdkproto.Preset Plan json.RawMessage - ModuleFiles []byte HasAITasks bool HasExternalAgents bool } @@ -677,8 +685,8 @@ type templateImportProvision struct { // Performs a dry-run provision when importing a template. // This is used to detect resources that would be provisioned for a workspace in various states. // It doesn't define values for rich parameters as they're unknown during template import. -func (r *Runner) runTemplateImportProvision(ctx context.Context, variableValues []*sdkproto.VariableValue, metadata *sdkproto.Metadata, omitModules bool) (*templateImportProvision, error) { - return r.runTemplateImportProvisionWithRichParameters(ctx, variableValues, nil, metadata, omitModules) +func (r *Runner) runTemplateImportProvision(ctx context.Context, variableValues []*sdkproto.VariableValue, metadata *sdkproto.Metadata) (*templateImportProvision, error) { + return r.runTemplateImportProvisionWithRichParameters(ctx, variableValues, nil, metadata) } // Performs a dry-run provision with provided rich parameters. @@ -688,7 +696,6 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( variableValues []*sdkproto.VariableValue, richParameterValues []*sdkproto.RichParameterValue, metadata *sdkproto.Metadata, - omitModules bool, ) (*templateImportProvision, error) { ctx, span := r.startTrace(ctx, tracing.FuncName()) defer span.End() @@ -708,7 +715,6 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( // Template import has no previous values PreviousParameterValues: make([]*sdkproto.RichParameterValue, 0), VariableValues: variableValues, - //OmitModuleFiles: omitModules, }}}) if err != nil { return nil, xerrors.Errorf("start provision: %w", err) @@ -730,7 +736,6 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( } }() - var moduleFilesUpload *sdkproto.DataBuilder for { msg, err := r.session.Recv() if err != nil { @@ -750,30 +755,6 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( Output: msgType.Log.Output, Stage: stage, }) - case *sdkproto.Response_DataUpload: - c := msgType.DataUpload - if c.UploadType != sdkproto.DataUploadType_UPLOAD_TYPE_MODULE_FILES { - return nil, xerrors.Errorf("invalid data upload type: %q", c.UploadType) - } - - if moduleFilesUpload != nil { - return nil, xerrors.New("multiple module data uploads received, only expect 1") - } - - moduleFilesUpload, err = sdkproto.NewDataBuilder(c) - if err != nil { - return nil, xerrors.Errorf("create data builder: %w", err) - } - case *sdkproto.Response_ChunkPiece: - c := msgType.ChunkPiece - if moduleFilesUpload == nil { - return nil, xerrors.New("received chunk piece before module files data upload") - } - - _, err := moduleFilesUpload.Add(c) - if err != nil { - return nil, xerrors.Errorf("module files, add chunk piece: %w", err) - } case *sdkproto.Response_Plan: c := msgType.Plan if c.Error != "" { @@ -784,26 +765,11 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( return nil, xerrors.New(c.Error) } - if moduleFilesUpload != nil && len(c.ModuleFiles) > 0 { - return nil, xerrors.New("module files were uploaded and module files were returned in the plan response. Only one of these should be set") - } - r.logger.Info(context.Background(), "parse dry-run provision successful", slog.F("resource_count", len(c.Resources)), slog.F("resources", resourceNames(c.Resources)), ) - moduleFilesData := c.ModuleFiles - if moduleFilesUpload != nil { - uploadData, err := moduleFilesUpload.Complete() - if err != nil { - return nil, xerrors.Errorf("module files, complete upload: %w", err) - } - moduleFilesData = uploadData - if !bytes.Equal(c.ModuleFilesHash, moduleFilesUpload.Hash) { - return nil, xerrors.Errorf("module files hash mismatch, uploaded: %x, expected: %x", moduleFilesUpload.Hash, c.ModuleFilesHash) - } - } return &templateImportProvision{ Resources: c.Resources, Parameters: c.Parameters, @@ -811,7 +777,6 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( Modules: c.Modules, Presets: c.Presets, Plan: c.Plan, - ModuleFiles: moduleFilesData, HasAITasks: c.HasAiTasks, HasExternalAgents: c.HasExternalAgents, }, nil @@ -861,12 +826,22 @@ func (r *Runner) runTemplateDryRun(ctx context.Context) (*proto.CompletedJob, *p return nil, failedJob } + initResp, failedJob := r.init(ctx, false, r.job.GetTemplateSourceArchive()) + if failedJob != nil { + return nil, failedJob + } + if initResp == nil { + return nil, r.failedJobf("template dry-run init returned nil response") + } + if initResp.Error != "" { + return nil, r.failedJobf("template dry-run init error: %s", initResp.Error) + } + // Run the template import provision task since it's already a dry run. provision, err := r.runTemplateImportProvisionWithRichParameters(ctx, r.job.GetTemplateDryRun().GetVariableValues(), r.job.GetTemplateDryRun().GetRichParameterValues(), metadata, - false, ) if err != nil { return nil, r.failedJobf("run dry-run provision job: %s", err) diff --git a/provisionersdk/session.go b/provisionersdk/session.go index 69996e1d508b5..c3e1c1e82fc6b 100644 --- a/provisionersdk/session.go +++ b/provisionersdk/session.go @@ -16,6 +16,7 @@ import ( "github.com/coder/coder/v2/codersdk" "github.com/coder/coder/v2/codersdk/drpcsdk" "github.com/coder/coder/v2/provisionersdk/tfpath" + "github.com/coder/coder/v2/provisionersdk/tfpath/x" protobuf "google.golang.org/protobuf/proto" @@ -56,7 +57,7 @@ func (p *protoServer) Session(stream proto.DRPCProvisioner_SessionStream) error } if p.opts.Experiments.Enabled(codersdk.ExperimentTerraformWorkspace) { - //s.Files = x.SessionDir(p.opts.WorkDirectory, sessID, config) + s.Files = x.SessionDir(p.opts.WorkDirectory, sessID, config) } // Cleanup any previously left stale sessions. diff --git a/provisionersdk/tfpath/x/tfpath.go b/provisionersdk/tfpath/x/tfpath.go index c6b9f5d669e94..50af1bbfe149c 100644 --- a/provisionersdk/tfpath/x/tfpath.go +++ b/provisionersdk/tfpath/x/tfpath.go @@ -140,9 +140,9 @@ func (td Layout) Cleanup(ctx context.Context, logger slog.Logger, fs afero.Fs) { slog.F("path", path), slog.Error(err)) } -func (td Layout) ExtractArchive(ctx context.Context, logger slog.Logger, fs afero.Fs, cfg *proto.Config) error { +func (td Layout) ExtractArchive(ctx context.Context, logger slog.Logger, fs afero.Fs, archive []byte) error { logger.Info(ctx, "unpacking template source archive", - slog.F("size_bytes", len(cfg.TemplateSourceArchive)), + slog.F("size_bytes", len(archive)), ) err := fs.MkdirAll(td.WorkDirectory(), 0o700) @@ -163,9 +163,7 @@ func (td Layout) ExtractArchive(ctx context.Context, logger slog.Logger, fs afer return xerrors.Errorf("select terraform workspace: %w", err) } - reader := tar.NewReader(bytes.NewBuffer(cfg.TemplateSourceArchive)) - // for safety, nil out the reference on Config, since the reader now owns it. - cfg.TemplateSourceArchive = nil + reader := tar.NewReader(bytes.NewBuffer(archive)) for { header, err := reader.Next() if err != nil { From 8176ece6f8199278422c748060f6857162231b92 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 13:10:24 -0600 Subject: [PATCH 04/56] chore: echo provisioner, graph, and init --- provisioner/echo/serve.go | 106 ++++- provisioner/terraform/executor.go | 70 +-- provisioner/terraform/planresources.go | 84 ++++ provisioner/terraform/provision.go | 58 +++ provisionerd/runner/graph.go | 48 ++ provisionerd/runner/plan.go | 47 ++ provisionerd/runner/runner.go | 202 +++++---- provisionersdk/errors.go | 4 + provisionersdk/proto/provisioner.pb.go | 585 ++++++++++++++----------- provisionersdk/proto/provisioner.proto | 52 ++- provisionersdk/session.go | 55 ++- 11 files changed, 839 insertions(+), 472 deletions(-) create mode 100644 provisioner/terraform/planresources.go create mode 100644 provisionerd/runner/graph.go create mode 100644 provisionerd/runner/plan.go diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index 1960bb0b49021..440c6483e4c70 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -73,12 +73,19 @@ var ( Parse: &proto.ParseComplete{}, }, }} + // InitComplete is a helper to indicate an empty init completion. + InitComplete = []*proto.Response{{ + Type: &proto.Response_Init{ + Init: &proto.InitComplete{ + ModuleFiles: []byte{}, + }, + }, + }} // PlanComplete is a helper to indicate an empty provision completion. PlanComplete = []*proto.Response{{ Type: &proto.Response_Plan{ Plan: &proto.PlanComplete{ - Plan: []byte("{}"), - ModuleFiles: []byte{}, + Plan: []byte("{}"), }, }, }} @@ -88,7 +95,19 @@ var ( Apply: &proto.ApplyComplete{}, }, }} + GraphComplete = []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{}, + }, + }} + InitFailed = []*proto.Response{{ + Type: &proto.Response_Init{ + Init: &proto.InitComplete{ + Error: "failed!", + }, + }, + }} // PlanFailed is a helper to convey a failed plan operation PlanFailed = []*proto.Response{{ Type: &proto.Response_Plan{ @@ -105,6 +124,13 @@ var ( }, }, }} + GraphFailed = []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ + Error: "failed!", + }, + }, + }} ) // Serve starts the echo provisioner. @@ -233,15 +259,17 @@ func (*echo) Shutdown(_ context.Context, _ *proto.Empty) (*proto.Empty, error) { type Responses struct { Parse []*proto.Response - // ProvisionApply and ProvisionPlan are used to mock ALL responses of - // Apply and Plan, regardless of transition. - ProvisionApply []*proto.Response + // Used to mock ALL responses regardless of transition. + ProvisionInit []*proto.Response ProvisionPlan []*proto.Response + ProvisionApply []*proto.Response + ProvisionGraph []*proto.Response - // ProvisionApplyMap and ProvisionPlanMap are used to mock specific - // transition responses. They are prioritized over the generic responses. - ProvisionApplyMap map[proto.WorkspaceTransition][]*proto.Response + // Used to mock specific transition responses. They are prioritized over the generic responses. + ProvisionInitMap map[proto.WorkspaceTransition][]*proto.Response ProvisionPlanMap map[proto.WorkspaceTransition][]*proto.Response + ProvisionApplyMap map[proto.WorkspaceTransition][]*proto.Response + ProvisionGraphMap map[proto.WorkspaceTransition][]*proto.Response ExtraFiles map[string][]byte } @@ -260,27 +288,65 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response if responses == nil { responses = &Responses{ Parse: ParseComplete, - ProvisionApply: ApplyComplete, + ProvisionInit: InitComplete, ProvisionPlan: PlanComplete, + ProvisionApply: ApplyComplete, + ProvisionGraph: GraphComplete, ProvisionApplyMap: nil, ProvisionPlanMap: nil, ExtraFiles: nil, } } - if responses.ProvisionPlan == nil { + if responses.ProvisionInit == nil { for _, resp := range responses.ProvisionApply { if resp.GetLog() != nil { - responses.ProvisionPlan = append(responses.ProvisionPlan, resp) + responses.ProvisionInit = append(responses.ProvisionInit, resp) continue } - responses.ProvisionPlan = append(responses.ProvisionPlan, &proto.Response{ - Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + responses.ProvisionInit = append(responses.ProvisionInit, &proto.Response{ + Type: &proto.Response_Init{Init: &proto.InitComplete{ + Error: resp.GetApply().GetError(), + Timings: nil, + Modules: nil, + ModuleFiles: nil, + ModuleFilesHash: nil, + }, + }, + }, + ) + } + } + if responses.ProvisionGraph == nil { + for _, resp := range responses.ProvisionApply { + if resp.GetLog() != nil { + responses.ProvisionGraph = append(responses.ProvisionGraph, resp) + continue + } + responses.ProvisionGraph = append(responses.ProvisionGraph, &proto.Response{ + Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ Error: resp.GetApply().GetError(), + Timings: nil, Resources: resp.GetApply().GetResources(), Parameters: resp.GetApply().GetParameters(), ExternalAuthProviders: resp.GetApply().GetExternalAuthProviders(), - Plan: []byte("{}"), - ModuleFiles: []byte{}, + HasAiTasks: len(resp.GetApply().GetAiTasks()) > 0, + AiTasks: resp.GetApply().GetAiTasks(), + HasExternalAgents: false, + }}, + }) + } + } + if responses.ProvisionPlan == nil { + for _, resp := range responses.ProvisionApply { + if resp.GetLog() != nil { + responses.ProvisionPlan = append(responses.ProvisionPlan, resp) + continue + } + responses.ProvisionPlan = append(responses.ProvisionPlan, &proto.Response{ + Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + Error: resp.GetApply().GetError(), + Plan: []byte("{}"), + AiTaskCount: int32(len(resp.GetApply().GetAiTasks())), }}, }) } @@ -406,8 +472,8 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response // that matches the parameters defined in the responses. Dynamic parameters // parsed these, even in the echo provisioner. var mainTF bytes.Buffer - for _, respPlan := range responses.ProvisionPlan { - plan := respPlan.GetPlan() + for _, respPlan := range responses.ProvisionGraph { + plan := respPlan.GetGraph() if plan == nil { continue } @@ -517,9 +583,11 @@ func WithResources(resources []*proto.Resource) *Responses { ProvisionApply: []*proto.Response{{Type: &proto.Response_Apply{Apply: &proto.ApplyComplete{ Resources: resources, }}}}, - ProvisionPlan: []*proto.Response{{Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{{Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ Resources: resources, - Plan: []byte("{}"), + }}}}, + ProvisionPlan: []*proto.Response{{Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + Plan: []byte("{}"), }}}}, } } diff --git a/provisioner/terraform/executor.go b/provisioner/terraform/executor.go index afe327d9297c6..d8c7c9f546003 100644 --- a/provisioner/terraform/executor.go +++ b/provisioner/terraform/executor.go @@ -332,22 +332,16 @@ func (e *executor) plan(ctx, killCtx context.Context, env, vars []string, logr l return nil, xerrors.Errorf("terraform plan: %w", err) } - // Capture the duration of the call to `terraform graph`. - graphTimings := newTimingAggregator(database.ProvisionerJobTimingStageGraph) - graphTimings.ingest(createGraphTimingsEvent(timingGraphStart)) - - state, plan, err := e.planResources(ctx, killCtx, planfilePath) + plan, err := e.parsePlan(ctx, killCtx, planfilePath) if err != nil { - graphTimings.ingest(createGraphTimingsEvent(timingGraphErrored)) - return nil, xerrors.Errorf("plan resources: %w", err) + return nil, xerrors.Errorf("show terraform plan file: %w", err) } + planJSON, err := json.Marshal(plan) if err != nil { return nil, xerrors.Errorf("marshal plan: %w", err) } - graphTimings.ingest(createGraphTimingsEvent(timingGraphComplete)) - // When a prebuild claim attempt is made, log a warning if a resource is due to be replaced, since this will obviate // the point of prebuilding if the expensive resource is replaced once claimed! var ( @@ -374,17 +368,17 @@ func (e *executor) plan(ctx, killCtx context.Context, env, vars []string, logr l } } + state, err := ConvertPlanState(ctx, e.server.logger, plan) + if err != nil { + return nil, xerrors.Errorf("convert plan state: %w", err) + } + msg := &proto.PlanComplete{ - Parameters: state.Parameters, - Resources: state.Resources, - ExternalAuthProviders: state.ExternalAuthProviders, - Timings: append(e.timings.aggregate(), graphTimings.aggregate()...), - Presets: state.Presets, - Plan: planJSON, - ResourceReplacements: resReps, - HasAiTasks: state.HasAITasks, - AiTasks: state.AITasks, - HasExternalAgents: state.HasExternalAgents, + Timings: e.timings.aggregate(), + Plan: planJSON, + DailyCost: state.DailyCost, + ResourceReplacements: resReps, + AiTaskCount: state.AITaskCount, } return msg, nil @@ -407,42 +401,6 @@ func onlyDataResources(sm tfjson.StateModule) tfjson.StateModule { return filtered } -// planResources must only be called while the lock is held. -func (e *executor) planResources(ctx, killCtx context.Context, planfilePath string) (*State, *tfjson.Plan, error) { - ctx, span := e.server.startTrace(ctx, tracing.FuncName()) - defer span.End() - - plan, err := e.parsePlan(ctx, killCtx, planfilePath) - if err != nil { - return nil, nil, xerrors.Errorf("show terraform plan file: %w", err) - } - - rawGraph, err := e.graph(ctx, killCtx) - if err != nil { - return nil, nil, xerrors.Errorf("graph: %w", err) - } - modules := []*tfjson.StateModule{} - if plan.PriorState != nil { - // We need the data resources for rich parameters. For some reason, they - // only show up in the PriorState. - // - // We don't want all prior resources, because Quotas (and - // future features) would never know which resources are getting - // deleted by a stop. - - filtered := onlyDataResources(*plan.PriorState.Values.RootModule) - modules = append(modules, &filtered) - } - modules = append(modules, plan.PlannedValues.RootModule) - - state, err := ConvertState(ctx, modules, rawGraph, e.server.logger) - if err != nil { - return nil, nil, err - } - - return state, plan, nil -} - // parsePlan must only be called while the lock is held. func (e *executor) parsePlan(ctx, killCtx context.Context, planfilePath string) (*tfjson.Plan, error) { ctx, span := e.server.startTrace(ctx, tracing.FuncName()) @@ -530,9 +488,11 @@ func (e *executor) graph(ctx, killCtx context.Context) (string, error) { // TODO: When the plan is present, we should probably use it? // "-plan=" + e.files.PlanFilePath(), } + if ver.GreaterThanOrEqual(version170) { args = append(args, "-type=plan") } + var out strings.Builder cmd := exec.CommandContext(killCtx, e.binaryPath, args...) // #nosec cmd.Stdout = &out diff --git a/provisioner/terraform/planresources.go b/provisioner/terraform/planresources.go new file mode 100644 index 0000000000000..cae557b3ba4e8 --- /dev/null +++ b/provisioner/terraform/planresources.go @@ -0,0 +1,84 @@ +package terraform + +import ( + "context" + + tfjson "github.com/hashicorp/terraform-json" + "github.com/mitchellh/mapstructure" + "golang.org/x/xerrors" + + "cdr.dev/slog" +) + +type PlanState struct { + DailyCost int32 + AITaskCount int32 +} + +func planModules(plan *tfjson.Plan) []*tfjson.StateModule { + modules := []*tfjson.StateModule{} + if plan.PriorState != nil { + // We need the data resources for rich parameters. For some reason, they + // only show up in the PriorState. + // + // We don't want all prior resources, because Quotas (and + // future features) would never know which resources are getting + // deleted by a stop. + + filtered := onlyDataResources(*plan.PriorState.Values.RootModule) + modules = append(modules, &filtered) + } + modules = append(modules, plan.PlannedValues.RootModule) + return modules +} + +// ConvertPlanState consumes a terraform plan json output and produces a thinner +// version of `State` to be used before `terraform apply`. `ConvertState` +// requires `terraform graph`, this does not. +func ConvertPlanState(ctx context.Context, logger slog.Logger, plan *tfjson.Plan) (*PlanState, error) { + modules := planModules(plan) + + var dailyCost int32 + var aiTaskCount int32 + for _, mod := range modules { + err := forEachResource(mod, func(res *tfjson.StateResource) error { + switch res.Type { + case "coder_metadata": + var attrs resourceMetadataAttributes + err := mapstructure.Decode(res.AttributeValues, &attrs) + if err != nil { + return xerrors.Errorf("decode metadata attributes: %w", err) + } + dailyCost += attrs.DailyCost + case "coder_ai_task": + aiTaskCount++ + } + return nil + }) + if err != nil { + return nil, xerrors.Errorf("parse plan: %w", err) + } + } + + return &PlanState{ + DailyCost: dailyCost, + AITaskCount: aiTaskCount, + }, nil +} + +func forEachResource(input *tfjson.StateModule, do func(res *tfjson.StateResource) error) error { + for _, res := range input.Resources { + err := do(res) + if err != nil { + return xerrors.Errorf("in module %s: %w", input.Address, err) + } + } + + for _, mod := range input.ChildModules { + err := forEachResource(mod, do) + if err != nil { + return xerrors.Errorf("in module %s: %w", mod.Address, err) + } + } + return nil +} diff --git a/provisioner/terraform/provision.go b/provisioner/terraform/provision.go index ec129514299de..85c91d0b69d08 100644 --- a/provisioner/terraform/provision.go +++ b/provisioner/terraform/provision.go @@ -12,6 +12,7 @@ import ( "strings" "time" + tfjson "github.com/hashicorp/terraform-json" "github.com/spf13/afero" "golang.org/x/xerrors" @@ -203,6 +204,63 @@ func (s *server) Plan( return resp } +func (s *server) Graph( + sess *provisionersdk.Session, request *proto.GraphRequest, canceledOrComplete <-chan struct{}, +) *proto.GraphComplete { + ctx, span := s.startTrace(sess.Context(), tracing.FuncName()) + defer span.End() + ctx, cancel, killCtx, kill := s.setupContexts(ctx, canceledOrComplete) + defer cancel() + defer kill() + + e := s.executor(sess.Files, database.ProvisionerJobTimingStageGraph) + if err := e.checkMinVersion(ctx); err != nil { + return provisionersdk.GraphError("%s", err.Error()) + } + logTerraformEnvVars(sess) + + modules := []*tfjson.StateModule{} + switch request.Source { + case proto.GraphSource_SOURCE_PLAN: + plan, err := e.parsePlan(ctx, killCtx, e.files.PlanFilePath()) + if err != nil { + return provisionersdk.GraphError("parse plan for graph: %s", err) + } + + modules = planModules(plan) + case proto.GraphSource_SOURCE_STATE: + tfState, err := e.state(ctx, killCtx) + if err != nil { + return provisionersdk.GraphError("load tfstate for graph: %s", err) + } + if tfState.Values != nil { + modules = []*tfjson.StateModule{tfState.Values.RootModule} + } + default: + return provisionersdk.GraphError("unknown graph source: %q", request.Source.String()) + } + + rawGraph, err := e.graph(ctx, killCtx) + if err != nil { + return provisionersdk.GraphError("generate graph: %s", err) + } + + state, err := ConvertState(ctx, modules, rawGraph, e.server.logger) + if err != nil { + return provisionersdk.GraphError("convert state for graph: %s", err) + } + + return &proto.GraphComplete{ + Error: "", + Timings: e.timings.aggregate(), + Resources: state.Resources, + Parameters: state.Parameters, + ExternalAuthProviders: state.ExternalAuthProviders, + Presets: state.Presets, + AiTasks: state.AITasks, + } +} + func (s *server) Apply( sess *provisionersdk.Session, request *proto.ApplyRequest, canceledOrComplete <-chan struct{}, ) *proto.ApplyComplete { diff --git a/provisionerd/runner/graph.go b/provisionerd/runner/graph.go new file mode 100644 index 0000000000000..0ba325e9667c9 --- /dev/null +++ b/provisionerd/runner/graph.go @@ -0,0 +1,48 @@ +package runner + +import ( + "context" + "time" + + "cdr.dev/slog" + "github.com/coder/coder/v2/coderd/tracing" + "github.com/coder/coder/v2/provisionerd/proto" + sdkproto "github.com/coder/coder/v2/provisionersdk/proto" +) + +func (r *Runner) graph(ctx context.Context, req *sdkproto.GraphRequest) (*sdkproto.GraphComplete, *proto.FailedJob) { + ctx, span := r.startTrace(ctx, tracing.FuncName()) + defer span.End() + + err := r.session.Send(&sdkproto.Request{Type: &sdkproto.Request_Graph{Graph: req}}) + if err != nil { + return nil, r.failedJobf("send init request: %v", err) + } + + for { + msg, err := r.session.Recv() + if err != nil { + return nil, r.failedJobf("receive init response: %v", err) + } + switch msgType := msg.Type.(type) { + case *sdkproto.Response_Log: + r.logProvisionerJobLog(context.Background(), msgType.Log.Level, "terraform graphing", + slog.F("level", msgType.Log.Level), + slog.F("output", msgType.Log.Output), + //slog.F("workspace_build_id", r.job.GetWorkspaceBuild().WorkspaceBuildId), + ) + + r.queueLog(ctx, &proto.Log{ + Source: proto.LogSource_PROVISIONER, + Level: msgType.Log.Level, + CreatedAt: time.Now().UnixMilli(), + Output: msgType.Log.Output, + Stage: "Graphing Infrastructure", + }) + case *sdkproto.Response_Graph: + return msgType.Graph, nil + default: + return nil, r.failedJobf("unexpected init response type %T", msg.Type) + } + } +} diff --git a/provisionerd/runner/plan.go b/provisionerd/runner/plan.go new file mode 100644 index 0000000000000..a212ce30c67ec --- /dev/null +++ b/provisionerd/runner/plan.go @@ -0,0 +1,47 @@ +package runner + +import ( + "context" + "time" + + "cdr.dev/slog" + "github.com/coder/coder/v2/coderd/tracing" + "github.com/coder/coder/v2/provisionerd/proto" + sdkproto "github.com/coder/coder/v2/provisionersdk/proto" +) + +func (r *Runner) plan(ctx context.Context, stage string, req *sdkproto.PlanRequest) (*sdkproto.PlanComplete, *proto.FailedJob) { + ctx, span := r.startTrace(ctx, tracing.FuncName()) + defer span.End() + + err := r.session.Send(&sdkproto.Request{Type: &sdkproto.Request_Plan{Plan: req}}) + if err != nil { + return nil, r.failedJobf("send init request: %v", err) + } + + for { + msg, err := r.session.Recv() + if err != nil { + return nil, r.failedJobf("receive init response: %v", err) + } + switch msgType := msg.Type.(type) { + case *sdkproto.Response_Log: + r.logProvisionerJobLog(context.Background(), msgType.Log.Level, "terraform planning", + slog.F("level", msgType.Log.Level), + slog.F("output", msgType.Log.Output), + ) + + r.queueLog(ctx, &proto.Log{ + Source: proto.LogSource_PROVISIONER, + Level: msgType.Log.Level, + CreatedAt: time.Now().UnixMilli(), + Output: msgType.Log.Output, + Stage: stage, + }) + case *sdkproto.Response_Plan: + return msgType.Plan, nil + default: + return nil, r.failedJobf("unexpected init response type %T", msg.Type) + } + } +} diff --git a/provisionerd/runner/runner.go b/provisionerd/runner/runner.go index 909efa7b86af9..7818f345a3c68 100644 --- a/provisionerd/runner/runner.go +++ b/provisionerd/runner/runner.go @@ -607,11 +607,13 @@ func (r *Runner) runTemplateImport(ctx context.Context) (*proto.CompletedJob, *p RichParameters: startProvision.Parameters, ExternalAuthProvidersNames: externalAuthProviderNames, ExternalAuthProviders: startProvision.ExternalAuthProviders, - StartModules: startProvision.Modules, - StopModules: stopProvision.Modules, - Presets: startProvision.Presets, - Plan: startProvision.Plan, - ModuleFiles: initResp.ModuleFiles, + // TODO: These are defined as different, but can they be? + // Terraform downloads modules regardless of `count`, so this should be the same + StartModules: initResp.Modules, + StopModules: initResp.Modules, + Presets: startProvision.Presets, + Plan: startProvision.Plan, + ModuleFiles: initResp.ModuleFiles, // ModuleFileHash will be populated if the file is uploaded async ModuleFilesHash: []byte{}, HasAiTasks: startProvision.HasAITasks, @@ -675,9 +677,9 @@ type templateImportProvision struct { Resources []*sdkproto.Resource Parameters []*sdkproto.RichParameter ExternalAuthProviders []*sdkproto.ExternalAuthProviderResource - Modules []*sdkproto.Module Presets []*sdkproto.Preset Plan json.RawMessage + DailyCost int32 HasAITasks bool HasExternalAgents bool } @@ -707,18 +709,9 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( case sdkproto.WorkspaceTransition_STOP: stage = "Detecting ephemeral resources" } + // use the notStopped so that if we attempt to gracefully cancel, the stream will still be available for us // to send the cancel to the provisioner - err := r.session.Send(&sdkproto.Request{Type: &sdkproto.Request_Plan{Plan: &sdkproto.PlanRequest{ - Metadata: metadata, - RichParameterValues: richParameterValues, - // Template import has no previous values - PreviousParameterValues: make([]*sdkproto.RichParameterValue, 0), - VariableValues: variableValues, - }}}) - if err != nil { - return nil, xerrors.Errorf("start provision: %w", err) - } nevermind := make(chan struct{}) defer close(nevermind) go func() { @@ -736,55 +729,45 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( } }() - for { - msg, err := r.session.Recv() - if err != nil { - return nil, xerrors.Errorf("recv import provision: %w", err) - } - - switch msgType := msg.Type.(type) { - case *sdkproto.Response_Log: - r.logProvisionerJobLog(context.Background(), msgType.Log.Level, "template import provision job logged", - slog.F("level", msgType.Log.Level), - slog.F("output", msgType.Log.Output), - ) - r.queueLog(ctx, &proto.Log{ - Source: proto.LogSource_PROVISIONER, - Level: msgType.Log.Level, - CreatedAt: time.Now().UnixMilli(), - Output: msgType.Log.Output, - Stage: stage, - }) - case *sdkproto.Response_Plan: - c := msgType.Plan - if c.Error != "" { - r.logger.Info(context.Background(), "dry-run provision failure", - slog.F("error", c.Error), - ) - - return nil, xerrors.New(c.Error) - } - - r.logger.Info(context.Background(), "parse dry-run provision successful", - slog.F("resource_count", len(c.Resources)), - slog.F("resources", resourceNames(c.Resources)), - ) + planComplete, failed := r.plan(ctx, stage, &sdkproto.PlanRequest{ + Metadata: metadata, + RichParameterValues: richParameterValues, + VariableValues: variableValues, + ExternalAuthProviders: nil, + PreviousParameterValues: nil, + State: nil, + }) + if failed != nil { + return nil, xerrors.Errorf("plan during template import provision: %w", failed) + } + if planComplete == nil { + return nil, xerrors.New("plan during template import provision returned nil response") + } + if planComplete.Error != "" { + return nil, xerrors.Errorf("plan during template import provision error: %s", planComplete.Error) + } - return &templateImportProvision{ - Resources: c.Resources, - Parameters: c.Parameters, - ExternalAuthProviders: c.ExternalAuthProviders, - Modules: c.Modules, - Presets: c.Presets, - Plan: c.Plan, - HasAITasks: c.HasAiTasks, - HasExternalAgents: c.HasExternalAgents, - }, nil - default: - return nil, xerrors.Errorf("invalid message type %q received from provisioner", - reflect.TypeOf(msg.Type).String()) - } + graphComplete, failed := r.graph(ctx, &sdkproto.GraphRequest{}) + if failed != nil { + return nil, xerrors.Errorf("graph during template import provision: %w", failed) + } + if graphComplete == nil { + return nil, xerrors.New("graph during template import provision returned nil response") + } + if graphComplete.Error != "" { + return nil, xerrors.Errorf("graph during template import provision error: %s", graphComplete.Error) } + + return &templateImportProvision{ + Resources: graphComplete.Resources, + Parameters: graphComplete.Parameters, + ExternalAuthProviders: graphComplete.ExternalAuthProviders, + Presets: graphComplete.Presets, + Plan: planComplete.Plan, + DailyCost: planComplete.DailyCost, + HasAITasks: graphComplete.HasAiTasks, + HasExternalAgents: graphComplete.GetHasAiTasks(), + }, nil } func (r *Runner) runTemplateDryRun(ctx context.Context) (*proto.CompletedJob, *proto.FailedJob) { @@ -819,13 +802,12 @@ func (r *Runner) runTemplateDryRun(ctx context.Context) (*proto.CompletedJob, *p metadata.WorkspaceOwnerId = id.String() } - failedJob := r.configure(&sdkproto.Config{ - //TemplateSourceArchive: r.job.GetTemplateSourceArchive(), - }) + failedJob := r.configure(&sdkproto.Config{}) if failedJob != nil { return nil, failedJob } + // Initialize the Terraform working directory initResp, failedJob := r.init(ctx, false, r.job.GetTemplateSourceArchive()) if failedJob != nil { return nil, failedJob @@ -852,7 +834,7 @@ func (r *Runner) runTemplateDryRun(ctx context.Context) (*proto.CompletedJob, *p Type: &proto.CompletedJob_TemplateDryRun_{ TemplateDryRun: &proto.CompletedJob_TemplateDryRun{ Resources: provision.Resources, - Modules: provision.Modules, + Modules: initResp.Modules, }, }, }, nil @@ -915,10 +897,8 @@ func (r *Runner) buildWorkspace(ctx context.Context, stage string, req *sdkproto } } -func (r *Runner) commitQuota(ctx context.Context, resources []*sdkproto.Resource) *proto.FailedJob { - cost := sumDailyCost(resources) +func (r *Runner) commitQuota(ctx context.Context, cost int32) *proto.FailedJob { r.logger.Debug(ctx, "committing quota", - slog.F("resources", resourceNames(resources)), slog.F("cost", cost), ) if cost == 0 { @@ -989,8 +969,6 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p } failedJob := r.configure(&sdkproto.Config{ - //TemplateSourceArchive: r.job.GetTemplateSourceArchive(), - //State: r.job.GetWorkspaceBuild().State, ProvisionerLogLevel: r.job.GetWorkspaceBuild().LogLevel, TemplateId: strings2.EmptyToNil(r.job.GetWorkspaceBuild().Metadata.TemplateId), TemplateVersionId: strings2.EmptyToNil(r.job.GetWorkspaceBuild().Metadata.TemplateVersionId), @@ -1000,6 +978,7 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p return nil, failedJob } + // Initialize the Terraform working directory initComplete, failedJob := r.init(ctx, true, r.job.GetTemplateSourceArchive()) if failedJob != nil { return nil, failedJob @@ -1021,24 +1000,20 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p } } - resp, failed := r.buildWorkspace(ctx, "Planning infrastructure", &sdkproto.Request{ - Type: &sdkproto.Request_Plan{ - Plan: &sdkproto.PlanRequest{ - //OmitModuleFiles: true, // Only useful for template imports - Metadata: r.job.GetWorkspaceBuild().Metadata, - RichParameterValues: r.job.GetWorkspaceBuild().RichParameterValues, - PreviousParameterValues: r.job.GetWorkspaceBuild().PreviousParameterValues, - VariableValues: r.job.GetWorkspaceBuild().VariableValues, - ExternalAuthProviders: r.job.GetWorkspaceBuild().ExternalAuthProviders, - }, - }, + // Run `terraform plan` + planComplete, failed := r.plan(ctx, "Planning Infrastructure", &sdkproto.PlanRequest{ + Metadata: r.job.GetWorkspaceBuild().Metadata, + RichParameterValues: r.job.GetWorkspaceBuild().RichParameterValues, + VariableValues: r.job.GetWorkspaceBuild().VariableValues, + ExternalAuthProviders: r.job.GetWorkspaceBuild().ExternalAuthProviders, + PreviousParameterValues: r.job.GetWorkspaceBuild().PreviousParameterValues, + State: r.job.GetWorkspaceBuild().State, }) if failed != nil { return nil, failed } - planComplete := resp.GetPlan() if planComplete == nil { - return nil, r.failedWorkspaceBuildf("invalid message type %T received from provisioner", resp.Type) + return nil, r.failedWorkspaceBuildf("invalid message type received from provisioner during plan") } if planComplete.Error != "" { r.logger.Warn(context.Background(), "plan request failed", @@ -1053,23 +1028,22 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p }, } } - if len(planComplete.AiTasks) > 1 { - return nil, r.failedWorkspaceBuildf("only one 'coder_ai_task' resource can be provisioned per template") + + if planComplete.AiTaskCount > 1 { + return nil, r.failedWorkspaceBuildf("only one 'coder_ai_task' resource can be provisioned per template, found %d", planComplete.AiTaskCount) } - r.logger.Info(context.Background(), "plan request successful", - slog.F("resource_count", len(planComplete.Resources)), - slog.F("resources", resourceNames(planComplete.Resources)), - ) + r.logger.Info(context.Background(), "plan request successful") r.flushQueuedLogs(ctx) if commitQuota { - failed = r.commitQuota(ctx, planComplete.Resources) + failed = r.commitQuota(ctx, planComplete.GetDailyCost()) r.flushQueuedLogs(ctx) if failed != nil { return nil, failed } } + // Run Terraform Apply r.queueLog(ctx, &proto.Log{ Source: proto.LogSource_PROVISIONER_DAEMON, Level: sdkproto.LogLevel_INFO, @@ -1077,7 +1051,7 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p CreatedAt: time.Now().UnixMilli(), }) - resp, failed = r.buildWorkspace(ctx, applyStage, &sdkproto.Request{ + resp, failed := r.buildWorkspace(ctx, applyStage, &sdkproto.Request{ Type: &sdkproto.Request_Apply{ Apply: &sdkproto.ApplyRequest{ Metadata: r.job.GetWorkspaceBuild().Metadata, @@ -1092,8 +1066,35 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p return nil, r.failedWorkspaceBuildf("invalid message type %T received from provisioner", resp.Type) } + // Run Terraform Graph + graphComplete, failed := r.graph(ctx, &sdkproto.GraphRequest{}) + if failed != nil { + return nil, failed + } + if graphComplete == nil { + return nil, r.failedWorkspaceBuildf("invalid message type %T received from provisioner", resp.Type) + } + if graphComplete.Error != "" { + r.logger.Warn(context.Background(), "graph request failed", + slog.F("error", planComplete.Error), + ) + + return nil, &proto.FailedJob{ + JobId: r.job.JobId, + Error: graphComplete.Error, + Type: &proto.FailedJob_WorkspaceBuild_{ + WorkspaceBuild: &proto.FailedJob_WorkspaceBuild{}, + }, + } + } + // Prepend the plan timings (since they occurred first). - applyComplete.Timings = append(planComplete.Timings, applyComplete.Timings...) + // Build up the full timing list in chronological order. + timings := make([]*sdkproto.Timing, 0, len(initComplete.Timings)+len(planComplete.Timings)+len(applyComplete.Timings)+len(graphComplete.Timings)) + timings = append(timings, initComplete.Timings...) + timings = append(timings, planComplete.Timings...) + timings = append(timings, applyComplete.Timings...) + timings = append(timings, graphComplete.Timings...) if applyComplete.Error != "" { r.logger.Warn(context.Background(), "apply failed; updating state", @@ -1107,7 +1108,7 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p Type: &proto.FailedJob_WorkspaceBuild_{ WorkspaceBuild: &proto.FailedJob_WorkspaceBuild{ State: applyComplete.State, - Timings: applyComplete.Timings, + Timings: timings, }, }, } @@ -1125,15 +1126,12 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p Type: &proto.CompletedJob_WorkspaceBuild_{ WorkspaceBuild: &proto.CompletedJob_WorkspaceBuild{ State: applyComplete.State, - Resources: applyComplete.Resources, - Timings: applyComplete.Timings, - // Modules are created on disk by `terraform init`, and that is only - // called by `plan`. `apply` does not modify them, so we can use the - // modules from the plan response. - Modules: planComplete.Modules, + Resources: graphComplete.Resources, + Timings: timings, + Modules: initComplete.Modules, // Resource replacements are discovered at plan time, only. ResourceReplacements: planComplete.ResourceReplacements, - AiTasks: applyComplete.AiTasks, + AiTasks: graphComplete.AiTasks, }, }, }, nil diff --git a/provisionersdk/errors.go b/provisionersdk/errors.go index ea0c5fc984d73..f7820592d1dd3 100644 --- a/provisionersdk/errors.go +++ b/provisionersdk/errors.go @@ -21,3 +21,7 @@ func PlanErrorf(format string, args ...any) *proto.PlanComplete { func ApplyErrorf(format string, args ...any) *proto.ApplyComplete { return &proto.ApplyComplete{Error: fmt.Sprintf(format, args...)} } + +func GraphError(format string, args ...any) *proto.GraphComplete { + return &proto.GraphComplete{Error: fmt.Sprintf(format, args...)} +} diff --git a/provisionersdk/proto/provisioner.pb.go b/provisionersdk/proto/provisioner.pb.go index a4fb18311b43a..63f09ecbaa429 100644 --- a/provisionersdk/proto/provisioner.pb.go +++ b/provisionersdk/proto/provisioner.pb.go @@ -349,6 +349,55 @@ func (PrebuiltWorkspaceBuildStage) EnumDescriptor() ([]byte, []int) { return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{5} } +type GraphSource int32 + +const ( + GraphSource_SOURCE_UNKNOWN GraphSource = 0 + GraphSource_SOURCE_PLAN GraphSource = 1 + GraphSource_SOURCE_STATE GraphSource = 2 +) + +// Enum value maps for GraphSource. +var ( + GraphSource_name = map[int32]string{ + 0: "SOURCE_UNKNOWN", + 1: "SOURCE_PLAN", + 2: "SOURCE_STATE", + } + GraphSource_value = map[string]int32{ + "SOURCE_UNKNOWN": 0, + "SOURCE_PLAN": 1, + "SOURCE_STATE": 2, + } +) + +func (x GraphSource) Enum() *GraphSource { + p := new(GraphSource) + *p = x + return p +} + +func (x GraphSource) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GraphSource) Descriptor() protoreflect.EnumDescriptor { + return file_provisionersdk_proto_provisioner_proto_enumTypes[6].Descriptor() +} + +func (GraphSource) Type() protoreflect.EnumType { + return &file_provisionersdk_proto_provisioner_proto_enumTypes[6] +} + +func (x GraphSource) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GraphSource.Descriptor instead. +func (GraphSource) EnumDescriptor() ([]byte, []int) { + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{6} +} + type TimingState int32 const ( @@ -382,11 +431,11 @@ func (x TimingState) String() string { } func (TimingState) Descriptor() protoreflect.EnumDescriptor { - return file_provisionersdk_proto_provisioner_proto_enumTypes[6].Descriptor() + return file_provisionersdk_proto_provisioner_proto_enumTypes[7].Descriptor() } func (TimingState) Type() protoreflect.EnumType { - return &file_provisionersdk_proto_provisioner_proto_enumTypes[6] + return &file_provisionersdk_proto_provisioner_proto_enumTypes[7] } func (x TimingState) Number() protoreflect.EnumNumber { @@ -395,7 +444,7 @@ func (x TimingState) Number() protoreflect.EnumNumber { // Deprecated: Use TimingState.Descriptor instead. func (TimingState) EnumDescriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{6} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{7} } type DataUploadType int32 @@ -431,11 +480,11 @@ func (x DataUploadType) String() string { } func (DataUploadType) Descriptor() protoreflect.EnumDescriptor { - return file_provisionersdk_proto_provisioner_proto_enumTypes[7].Descriptor() + return file_provisionersdk_proto_provisioner_proto_enumTypes[8].Descriptor() } func (DataUploadType) Type() protoreflect.EnumType { - return &file_provisionersdk_proto_provisioner_proto_enumTypes[7] + return &file_provisionersdk_proto_provisioner_proto_enumTypes[8] } func (x DataUploadType) Number() protoreflect.EnumNumber { @@ -444,7 +493,7 @@ func (x DataUploadType) Number() protoreflect.EnumNumber { // Deprecated: Use DataUploadType.Descriptor instead. func (DataUploadType) EnumDescriptor() ([]byte, []int) { - return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{7} + return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{8} } // Empty indicates a successful request/response. @@ -3308,9 +3357,10 @@ func (x *InitRequest) GetOmitModuleFiles() bool { type InitComplete struct { state protoimpl.MessageState `protogen:"open.v1"` Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Modules []*Module `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"` - ModuleFiles []byte `protobuf:"bytes,3,opt,name=module_files,json=moduleFiles,proto3" json:"module_files,omitempty"` - ModuleFilesHash []byte `protobuf:"bytes,4,opt,name=module_files_hash,json=moduleFilesHash,proto3" json:"module_files_hash,omitempty"` + Timings []*Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` + Modules []*Module `protobuf:"bytes,3,rep,name=modules,proto3" json:"modules,omitempty"` + ModuleFiles []byte `protobuf:"bytes,4,opt,name=module_files,json=moduleFiles,proto3" json:"module_files,omitempty"` + ModuleFilesHash []byte `protobuf:"bytes,5,opt,name=module_files_hash,json=moduleFilesHash,proto3" json:"module_files_hash,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3352,6 +3402,13 @@ func (x *InitComplete) GetError() string { return "" } +func (x *InitComplete) GetTimings() []*Timing { + if x != nil { + return x.Timings + } + return nil +} + func (x *InitComplete) GetModules() []*Module { if x != nil { return x.Modules @@ -3461,28 +3518,15 @@ func (x *PlanRequest) GetState() []byte { // PlanComplete indicates a request to plan completed. type PlanComplete struct { - state protoimpl.MessageState `protogen:"open.v1"` - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Resources []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` - Parameters []*RichParameter `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty"` - ExternalAuthProviders []*ExternalAuthProviderResource `protobuf:"bytes,4,rep,name=external_auth_providers,json=externalAuthProviders,proto3" json:"external_auth_providers,omitempty"` - Timings []*Timing `protobuf:"bytes,6,rep,name=timings,proto3" json:"timings,omitempty"` - Modules []*Module `protobuf:"bytes,7,rep,name=modules,proto3" json:"modules,omitempty"` - Presets []*Preset `protobuf:"bytes,8,rep,name=presets,proto3" json:"presets,omitempty"` - Plan []byte `protobuf:"bytes,9,opt,name=plan,proto3" json:"plan,omitempty"` - ResourceReplacements []*ResourceReplacement `protobuf:"bytes,10,rep,name=resource_replacements,json=resourceReplacements,proto3" json:"resource_replacements,omitempty"` - ModuleFiles []byte `protobuf:"bytes,11,opt,name=module_files,json=moduleFiles,proto3" json:"module_files,omitempty"` - ModuleFilesHash []byte `protobuf:"bytes,12,opt,name=module_files_hash,json=moduleFilesHash,proto3" json:"module_files_hash,omitempty"` - // Whether a template has any `coder_ai_task` resources defined, even if not planned for creation. - // During a template import, a plan is run which may not yield in any `coder_ai_task` resources, but nonetheless we - // still need to know that such resources are defined. - // - // See `hasAITaskResources` in provisioner/terraform/resources.go for more details. - HasAiTasks bool `protobuf:"varint,13,opt,name=has_ai_tasks,json=hasAiTasks,proto3" json:"has_ai_tasks,omitempty"` - AiTasks []*AITask `protobuf:"bytes,14,rep,name=ai_tasks,json=aiTasks,proto3" json:"ai_tasks,omitempty"` - HasExternalAgents bool `protobuf:"varint,15,opt,name=has_external_agents,json=hasExternalAgents,proto3" json:"has_external_agents,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Timings []*Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` + Plan []byte `protobuf:"bytes,3,opt,name=plan,proto3" json:"plan,omitempty"` + DailyCost int32 `protobuf:"varint,4,opt,name=dailyCost,proto3" json:"dailyCost,omitempty"` + ResourceReplacements []*ResourceReplacement `protobuf:"bytes,5,rep,name=resource_replacements,json=resourceReplacements,proto3" json:"resource_replacements,omitempty"` + AiTaskCount int32 `protobuf:"varint,6,opt,name=ai_task_count,json=aiTaskCount,proto3" json:"ai_task_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PlanComplete) Reset() { @@ -3522,27 +3566,6 @@ func (x *PlanComplete) GetError() string { return "" } -func (x *PlanComplete) GetResources() []*Resource { - if x != nil { - return x.Resources - } - return nil -} - -func (x *PlanComplete) GetParameters() []*RichParameter { - if x != nil { - return x.Parameters - } - return nil -} - -func (x *PlanComplete) GetExternalAuthProviders() []*ExternalAuthProviderResource { - if x != nil { - return x.ExternalAuthProviders - } - return nil -} - func (x *PlanComplete) GetTimings() []*Timing { if x != nil { return x.Timings @@ -3550,20 +3573,6 @@ func (x *PlanComplete) GetTimings() []*Timing { return nil } -func (x *PlanComplete) GetModules() []*Module { - if x != nil { - return x.Modules - } - return nil -} - -func (x *PlanComplete) GetPresets() []*Preset { - if x != nil { - return x.Presets - } - return nil -} - func (x *PlanComplete) GetPlan() []byte { if x != nil { return x.Plan @@ -3571,46 +3580,25 @@ func (x *PlanComplete) GetPlan() []byte { return nil } -func (x *PlanComplete) GetResourceReplacements() []*ResourceReplacement { - if x != nil { - return x.ResourceReplacements - } - return nil -} - -func (x *PlanComplete) GetModuleFiles() []byte { +func (x *PlanComplete) GetDailyCost() int32 { if x != nil { - return x.ModuleFiles - } - return nil -} - -func (x *PlanComplete) GetModuleFilesHash() []byte { - if x != nil { - return x.ModuleFilesHash - } - return nil -} - -func (x *PlanComplete) GetHasAiTasks() bool { - if x != nil { - return x.HasAiTasks + return x.DailyCost } - return false + return 0 } -func (x *PlanComplete) GetAiTasks() []*AITask { +func (x *PlanComplete) GetResourceReplacements() []*ResourceReplacement { if x != nil { - return x.AiTasks + return x.ResourceReplacements } return nil } -func (x *PlanComplete) GetHasExternalAgents() bool { +func (x *PlanComplete) GetAiTaskCount() int32 { if x != nil { - return x.HasExternalAgents + return x.AiTaskCount } - return false + return 0 } // ApplyRequest asks the provisioner to apply the changes. Apply MUST be preceded by a successful plan request/response @@ -3763,6 +3751,7 @@ func (x *ApplyComplete) GetAiTasks() []*AITask { type GraphRequest struct { state protoimpl.MessageState `protogen:"open.v1"` + Source GraphSource `protobuf:"varint,1,opt,name=source,proto3,enum=provisioner.GraphSource" json:"source,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3797,11 +3786,31 @@ func (*GraphRequest) Descriptor() ([]byte, []int) { return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{43} } +func (x *GraphRequest) GetSource() GraphSource { + if x != nil { + return x.Source + } + return GraphSource_SOURCE_UNKNOWN +} + type GraphComplete struct { - state protoimpl.MessageState `protogen:"open.v1"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Timings []*Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` + Resources []*Resource `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources,omitempty"` + Parameters []*RichParameter `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"` + ExternalAuthProviders []*ExternalAuthProviderResource `protobuf:"bytes,5,rep,name=external_auth_providers,json=externalAuthProviders,proto3" json:"external_auth_providers,omitempty"` + Presets []*Preset `protobuf:"bytes,6,rep,name=presets,proto3" json:"presets,omitempty"` + // Whether a template has any `coder_ai_task` resources defined, even if not planned for creation. + // During a template import, a plan is run which may not yield in any `coder_ai_task` resources, but nonetheless we + // still need to know that such resources are defined. + // + // See `hasAITaskResources` in provisioner/terraform/resources.go for more details. + HasAiTasks bool `protobuf:"varint,7,opt,name=has_ai_tasks,json=hasAiTasks,proto3" json:"has_ai_tasks,omitempty"` + AiTasks []*AITask `protobuf:"bytes,8,rep,name=ai_tasks,json=aiTasks,proto3" json:"ai_tasks,omitempty"` + HasExternalAgents bool `protobuf:"varint,9,opt,name=has_external_agents,json=hasExternalAgents,proto3" json:"has_external_agents,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GraphComplete) Reset() { @@ -3841,6 +3850,62 @@ func (x *GraphComplete) GetError() string { return "" } +func (x *GraphComplete) GetTimings() []*Timing { + if x != nil { + return x.Timings + } + return nil +} + +func (x *GraphComplete) GetResources() []*Resource { + if x != nil { + return x.Resources + } + return nil +} + +func (x *GraphComplete) GetParameters() []*RichParameter { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *GraphComplete) GetExternalAuthProviders() []*ExternalAuthProviderResource { + if x != nil { + return x.ExternalAuthProviders + } + return nil +} + +func (x *GraphComplete) GetPresets() []*Preset { + if x != nil { + return x.Presets + } + return nil +} + +func (x *GraphComplete) GetHasAiTasks() bool { + if x != nil { + return x.HasAiTasks + } + return false +} + +func (x *GraphComplete) GetAiTasks() []*AITask { + if x != nil { + return x.AiTasks + } + return nil +} + +func (x *GraphComplete) GetHasExternalAgents() bool { + if x != nil { + return x.HasExternalAgents + } + return false +} + type Timing struct { state protoimpl.MessageState `protogen:"open.v1"` Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` @@ -4865,38 +4930,27 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"q\n" + "\vInitRequest\x126\n" + "\x17template_source_archive\x18\x01 \x01(\fR\x15templateSourceArchive\x12*\n" + - "\x11omit_module_files\x18\x03 \x01(\bR\x0fomitModuleFiles\"\xa2\x01\n" + + "\x11omit_module_files\x18\x03 \x01(\bR\x0fomitModuleFiles\"\xd1\x01\n" + "\fInitComplete\x12\x14\n" + "\x05error\x18\x01 \x01(\tR\x05error\x12-\n" + - "\amodules\x18\x02 \x03(\v2\x13.provisioner.ModuleR\amodules\x12!\n" + - "\fmodule_files\x18\x03 \x01(\fR\vmoduleFiles\x12*\n" + - "\x11module_files_hash\x18\x04 \x01(\fR\x0fmoduleFilesHash\"\xa8\x03\n" + + "\atimings\x18\x02 \x03(\v2\x13.provisioner.TimingR\atimings\x12-\n" + + "\amodules\x18\x03 \x03(\v2\x13.provisioner.ModuleR\amodules\x12!\n" + + "\fmodule_files\x18\x04 \x01(\fR\vmoduleFiles\x12*\n" + + "\x11module_files_hash\x18\x05 \x01(\fR\x0fmoduleFilesHash\"\xa8\x03\n" + "\vPlanRequest\x121\n" + "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12S\n" + "\x15rich_parameter_values\x18\x02 \x03(\v2\x1f.provisioner.RichParameterValueR\x13richParameterValues\x12C\n" + "\x0fvariable_values\x18\x03 \x03(\v2\x1a.provisioner.VariableValueR\x0evariableValues\x12Y\n" + "\x17external_auth_providers\x18\x04 \x03(\v2!.provisioner.ExternalAuthProviderR\x15externalAuthProviders\x12[\n" + "\x19previous_parameter_values\x18\x05 \x03(\v2\x1f.provisioner.RichParameterValueR\x17previousParameterValues\x12\x14\n" + - "\x05state\x18\x06 \x01(\fR\x05state\"\xc1\x05\n" + + "\x05state\x18\x06 \x01(\fR\x05state\"\x80\x02\n" + "\fPlanComplete\x12\x14\n" + - "\x05error\x18\x01 \x01(\tR\x05error\x123\n" + - "\tresources\x18\x02 \x03(\v2\x15.provisioner.ResourceR\tresources\x12:\n" + - "\n" + - "parameters\x18\x03 \x03(\v2\x1a.provisioner.RichParameterR\n" + - "parameters\x12a\n" + - "\x17external_auth_providers\x18\x04 \x03(\v2).provisioner.ExternalAuthProviderResourceR\x15externalAuthProviders\x12-\n" + - "\atimings\x18\x06 \x03(\v2\x13.provisioner.TimingR\atimings\x12-\n" + - "\amodules\x18\a \x03(\v2\x13.provisioner.ModuleR\amodules\x12-\n" + - "\apresets\x18\b \x03(\v2\x13.provisioner.PresetR\apresets\x12\x12\n" + - "\x04plan\x18\t \x01(\fR\x04plan\x12U\n" + - "\x15resource_replacements\x18\n" + - " \x03(\v2 .provisioner.ResourceReplacementR\x14resourceReplacements\x12!\n" + - "\fmodule_files\x18\v \x01(\fR\vmoduleFiles\x12*\n" + - "\x11module_files_hash\x18\f \x01(\fR\x0fmoduleFilesHash\x12 \n" + - "\fhas_ai_tasks\x18\r \x01(\bR\n" + - "hasAiTasks\x12.\n" + - "\bai_tasks\x18\x0e \x03(\v2\x13.provisioner.AITaskR\aaiTasks\x12.\n" + - "\x13has_external_agents\x18\x0f \x01(\bR\x11hasExternalAgents\"W\n" + + "\x05error\x18\x01 \x01(\tR\x05error\x12-\n" + + "\atimings\x18\x02 \x03(\v2\x13.provisioner.TimingR\atimings\x12\x12\n" + + "\x04plan\x18\x03 \x01(\fR\x04plan\x12\x1c\n" + + "\tdailyCost\x18\x04 \x01(\x05R\tdailyCost\x12U\n" + + "\x15resource_replacements\x18\x05 \x03(\v2 .provisioner.ResourceReplacementR\x14resourceReplacements\x12\"\n" + + "\rai_task_count\x18\x06 \x01(\x05R\vaiTaskCount\"W\n" + "\fApplyRequest\x121\n" + "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12\x14\n" + "\x05state\x18\x06 \x01(\fR\x05state\"\xee\x02\n" + @@ -4909,10 +4963,22 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "parameters\x12a\n" + "\x17external_auth_providers\x18\x05 \x03(\v2).provisioner.ExternalAuthProviderResourceR\x15externalAuthProviders\x12-\n" + "\atimings\x18\x06 \x03(\v2\x13.provisioner.TimingR\atimings\x12.\n" + - "\bai_tasks\x18\a \x03(\v2\x13.provisioner.AITaskR\aaiTasks\"\x0e\n" + - "\fGraphRequest\"%\n" + + "\bai_tasks\x18\a \x03(\v2\x13.provisioner.AITaskR\aaiTasks\"@\n" + + "\fGraphRequest\x120\n" + + "\x06source\x18\x01 \x01(\x0e2\x18.provisioner.GraphSourceR\x06source\"\xd9\x03\n" + "\rGraphComplete\x12\x14\n" + - "\x05error\x18\x02 \x01(\tR\x05error\"\xfa\x01\n" + + "\x05error\x18\x01 \x01(\tR\x05error\x12-\n" + + "\atimings\x18\x02 \x03(\v2\x13.provisioner.TimingR\atimings\x123\n" + + "\tresources\x18\x03 \x03(\v2\x15.provisioner.ResourceR\tresources\x12:\n" + + "\n" + + "parameters\x18\x04 \x03(\v2\x1a.provisioner.RichParameterR\n" + + "parameters\x12a\n" + + "\x17external_auth_providers\x18\x05 \x03(\v2).provisioner.ExternalAuthProviderResourceR\x15externalAuthProviders\x12-\n" + + "\apresets\x18\x06 \x03(\v2\x13.provisioner.PresetR\apresets\x12 \n" + + "\fhas_ai_tasks\x18\a \x01(\bR\n" + + "hasAiTasks\x12.\n" + + "\bai_tasks\x18\b \x03(\v2\x13.provisioner.AITaskR\aaiTasks\x12.\n" + + "\x13has_external_agents\x18\t \x01(\bR\x11hasExternalAgents\"\xfa\x01\n" + "\x06Timing\x120\n" + "\x05start\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x05start\x12,\n" + "\x03end\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x03end\x12\x16\n" + @@ -4995,7 +5061,11 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "\x04NONE\x10\x00\x12\n" + "\n" + "\x06CREATE\x10\x01\x12\t\n" + - "\x05CLAIM\x10\x02*5\n" + + "\x05CLAIM\x10\x02*D\n" + + "\vGraphSource\x12\x12\n" + + "\x0eSOURCE_UNKNOWN\x10\x00\x12\x0f\n" + + "\vSOURCE_PLAN\x10\x01\x12\x10\n" + + "\fSOURCE_STATE\x10\x02*5\n" + "\vTimingState\x12\v\n" + "\aSTARTED\x10\x00\x12\r\n" + "\tCOMPLETED\x10\x01\x12\n" + @@ -5019,7 +5089,7 @@ func file_provisionersdk_proto_provisioner_proto_rawDescGZIP() []byte { return file_provisionersdk_proto_provisioner_proto_rawDescData } -var file_provisionersdk_proto_provisioner_proto_enumTypes = make([]protoimpl.EnumInfo, 8) +var file_provisionersdk_proto_provisioner_proto_enumTypes = make([]protoimpl.EnumInfo, 9) var file_provisionersdk_proto_provisioner_proto_msgTypes = make([]protoimpl.MessageInfo, 55) var file_provisionersdk_proto_provisioner_proto_goTypes = []any{ (ParameterFormType)(0), // 0: provisioner.ParameterFormType @@ -5028,142 +5098,145 @@ var file_provisionersdk_proto_provisioner_proto_goTypes = []any{ (AppOpenIn)(0), // 3: provisioner.AppOpenIn (WorkspaceTransition)(0), // 4: provisioner.WorkspaceTransition (PrebuiltWorkspaceBuildStage)(0), // 5: provisioner.PrebuiltWorkspaceBuildStage - (TimingState)(0), // 6: provisioner.TimingState - (DataUploadType)(0), // 7: provisioner.DataUploadType - (*Empty)(nil), // 8: provisioner.Empty - (*TemplateVariable)(nil), // 9: provisioner.TemplateVariable - (*RichParameterOption)(nil), // 10: provisioner.RichParameterOption - (*RichParameter)(nil), // 11: provisioner.RichParameter - (*RichParameterValue)(nil), // 12: provisioner.RichParameterValue - (*ExpirationPolicy)(nil), // 13: provisioner.ExpirationPolicy - (*Schedule)(nil), // 14: provisioner.Schedule - (*Scheduling)(nil), // 15: provisioner.Scheduling - (*Prebuild)(nil), // 16: provisioner.Prebuild - (*Preset)(nil), // 17: provisioner.Preset - (*PresetParameter)(nil), // 18: provisioner.PresetParameter - (*ResourceReplacement)(nil), // 19: provisioner.ResourceReplacement - (*VariableValue)(nil), // 20: provisioner.VariableValue - (*Log)(nil), // 21: provisioner.Log - (*InstanceIdentityAuth)(nil), // 22: provisioner.InstanceIdentityAuth - (*ExternalAuthProviderResource)(nil), // 23: provisioner.ExternalAuthProviderResource - (*ExternalAuthProvider)(nil), // 24: provisioner.ExternalAuthProvider - (*Agent)(nil), // 25: provisioner.Agent - (*ResourcesMonitoring)(nil), // 26: provisioner.ResourcesMonitoring - (*MemoryResourceMonitor)(nil), // 27: provisioner.MemoryResourceMonitor - (*VolumeResourceMonitor)(nil), // 28: provisioner.VolumeResourceMonitor - (*DisplayApps)(nil), // 29: provisioner.DisplayApps - (*Env)(nil), // 30: provisioner.Env - (*Script)(nil), // 31: provisioner.Script - (*Devcontainer)(nil), // 32: provisioner.Devcontainer - (*App)(nil), // 33: provisioner.App - (*Healthcheck)(nil), // 34: provisioner.Healthcheck - (*Resource)(nil), // 35: provisioner.Resource - (*Module)(nil), // 36: provisioner.Module - (*Role)(nil), // 37: provisioner.Role - (*RunningAgentAuthToken)(nil), // 38: provisioner.RunningAgentAuthToken - (*AITaskSidebarApp)(nil), // 39: provisioner.AITaskSidebarApp - (*AITask)(nil), // 40: provisioner.AITask - (*Metadata)(nil), // 41: provisioner.Metadata - (*Config)(nil), // 42: provisioner.Config - (*ParseRequest)(nil), // 43: provisioner.ParseRequest - (*ParseComplete)(nil), // 44: provisioner.ParseComplete - (*InitRequest)(nil), // 45: provisioner.InitRequest - (*InitComplete)(nil), // 46: provisioner.InitComplete - (*PlanRequest)(nil), // 47: provisioner.PlanRequest - (*PlanComplete)(nil), // 48: provisioner.PlanComplete - (*ApplyRequest)(nil), // 49: provisioner.ApplyRequest - (*ApplyComplete)(nil), // 50: provisioner.ApplyComplete - (*GraphRequest)(nil), // 51: provisioner.GraphRequest - (*GraphComplete)(nil), // 52: provisioner.GraphComplete - (*Timing)(nil), // 53: provisioner.Timing - (*CancelRequest)(nil), // 54: provisioner.CancelRequest - (*Request)(nil), // 55: provisioner.Request - (*Response)(nil), // 56: provisioner.Response - (*DataUpload)(nil), // 57: provisioner.DataUpload - (*ChunkPiece)(nil), // 58: provisioner.ChunkPiece - (*Agent_Metadata)(nil), // 59: provisioner.Agent.Metadata - nil, // 60: provisioner.Agent.EnvEntry - (*Resource_Metadata)(nil), // 61: provisioner.Resource.Metadata - nil, // 62: provisioner.ParseComplete.WorkspaceTagsEntry - (*timestamppb.Timestamp)(nil), // 63: google.protobuf.Timestamp + (GraphSource)(0), // 6: provisioner.GraphSource + (TimingState)(0), // 7: provisioner.TimingState + (DataUploadType)(0), // 8: provisioner.DataUploadType + (*Empty)(nil), // 9: provisioner.Empty + (*TemplateVariable)(nil), // 10: provisioner.TemplateVariable + (*RichParameterOption)(nil), // 11: provisioner.RichParameterOption + (*RichParameter)(nil), // 12: provisioner.RichParameter + (*RichParameterValue)(nil), // 13: provisioner.RichParameterValue + (*ExpirationPolicy)(nil), // 14: provisioner.ExpirationPolicy + (*Schedule)(nil), // 15: provisioner.Schedule + (*Scheduling)(nil), // 16: provisioner.Scheduling + (*Prebuild)(nil), // 17: provisioner.Prebuild + (*Preset)(nil), // 18: provisioner.Preset + (*PresetParameter)(nil), // 19: provisioner.PresetParameter + (*ResourceReplacement)(nil), // 20: provisioner.ResourceReplacement + (*VariableValue)(nil), // 21: provisioner.VariableValue + (*Log)(nil), // 22: provisioner.Log + (*InstanceIdentityAuth)(nil), // 23: provisioner.InstanceIdentityAuth + (*ExternalAuthProviderResource)(nil), // 24: provisioner.ExternalAuthProviderResource + (*ExternalAuthProvider)(nil), // 25: provisioner.ExternalAuthProvider + (*Agent)(nil), // 26: provisioner.Agent + (*ResourcesMonitoring)(nil), // 27: provisioner.ResourcesMonitoring + (*MemoryResourceMonitor)(nil), // 28: provisioner.MemoryResourceMonitor + (*VolumeResourceMonitor)(nil), // 29: provisioner.VolumeResourceMonitor + (*DisplayApps)(nil), // 30: provisioner.DisplayApps + (*Env)(nil), // 31: provisioner.Env + (*Script)(nil), // 32: provisioner.Script + (*Devcontainer)(nil), // 33: provisioner.Devcontainer + (*App)(nil), // 34: provisioner.App + (*Healthcheck)(nil), // 35: provisioner.Healthcheck + (*Resource)(nil), // 36: provisioner.Resource + (*Module)(nil), // 37: provisioner.Module + (*Role)(nil), // 38: provisioner.Role + (*RunningAgentAuthToken)(nil), // 39: provisioner.RunningAgentAuthToken + (*AITaskSidebarApp)(nil), // 40: provisioner.AITaskSidebarApp + (*AITask)(nil), // 41: provisioner.AITask + (*Metadata)(nil), // 42: provisioner.Metadata + (*Config)(nil), // 43: provisioner.Config + (*ParseRequest)(nil), // 44: provisioner.ParseRequest + (*ParseComplete)(nil), // 45: provisioner.ParseComplete + (*InitRequest)(nil), // 46: provisioner.InitRequest + (*InitComplete)(nil), // 47: provisioner.InitComplete + (*PlanRequest)(nil), // 48: provisioner.PlanRequest + (*PlanComplete)(nil), // 49: provisioner.PlanComplete + (*ApplyRequest)(nil), // 50: provisioner.ApplyRequest + (*ApplyComplete)(nil), // 51: provisioner.ApplyComplete + (*GraphRequest)(nil), // 52: provisioner.GraphRequest + (*GraphComplete)(nil), // 53: provisioner.GraphComplete + (*Timing)(nil), // 54: provisioner.Timing + (*CancelRequest)(nil), // 55: provisioner.CancelRequest + (*Request)(nil), // 56: provisioner.Request + (*Response)(nil), // 57: provisioner.Response + (*DataUpload)(nil), // 58: provisioner.DataUpload + (*ChunkPiece)(nil), // 59: provisioner.ChunkPiece + (*Agent_Metadata)(nil), // 60: provisioner.Agent.Metadata + nil, // 61: provisioner.Agent.EnvEntry + (*Resource_Metadata)(nil), // 62: provisioner.Resource.Metadata + nil, // 63: provisioner.ParseComplete.WorkspaceTagsEntry + (*timestamppb.Timestamp)(nil), // 64: google.protobuf.Timestamp } var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ - 10, // 0: provisioner.RichParameter.options:type_name -> provisioner.RichParameterOption + 11, // 0: provisioner.RichParameter.options:type_name -> provisioner.RichParameterOption 0, // 1: provisioner.RichParameter.form_type:type_name -> provisioner.ParameterFormType - 14, // 2: provisioner.Scheduling.schedule:type_name -> provisioner.Schedule - 13, // 3: provisioner.Prebuild.expiration_policy:type_name -> provisioner.ExpirationPolicy - 15, // 4: provisioner.Prebuild.scheduling:type_name -> provisioner.Scheduling - 18, // 5: provisioner.Preset.parameters:type_name -> provisioner.PresetParameter - 16, // 6: provisioner.Preset.prebuild:type_name -> provisioner.Prebuild + 15, // 2: provisioner.Scheduling.schedule:type_name -> provisioner.Schedule + 14, // 3: provisioner.Prebuild.expiration_policy:type_name -> provisioner.ExpirationPolicy + 16, // 4: provisioner.Prebuild.scheduling:type_name -> provisioner.Scheduling + 19, // 5: provisioner.Preset.parameters:type_name -> provisioner.PresetParameter + 17, // 6: provisioner.Preset.prebuild:type_name -> provisioner.Prebuild 1, // 7: provisioner.Log.level:type_name -> provisioner.LogLevel - 60, // 8: provisioner.Agent.env:type_name -> provisioner.Agent.EnvEntry - 33, // 9: provisioner.Agent.apps:type_name -> provisioner.App - 59, // 10: provisioner.Agent.metadata:type_name -> provisioner.Agent.Metadata - 29, // 11: provisioner.Agent.display_apps:type_name -> provisioner.DisplayApps - 31, // 12: provisioner.Agent.scripts:type_name -> provisioner.Script - 30, // 13: provisioner.Agent.extra_envs:type_name -> provisioner.Env - 26, // 14: provisioner.Agent.resources_monitoring:type_name -> provisioner.ResourcesMonitoring - 32, // 15: provisioner.Agent.devcontainers:type_name -> provisioner.Devcontainer - 27, // 16: provisioner.ResourcesMonitoring.memory:type_name -> provisioner.MemoryResourceMonitor - 28, // 17: provisioner.ResourcesMonitoring.volumes:type_name -> provisioner.VolumeResourceMonitor - 34, // 18: provisioner.App.healthcheck:type_name -> provisioner.Healthcheck + 61, // 8: provisioner.Agent.env:type_name -> provisioner.Agent.EnvEntry + 34, // 9: provisioner.Agent.apps:type_name -> provisioner.App + 60, // 10: provisioner.Agent.metadata:type_name -> provisioner.Agent.Metadata + 30, // 11: provisioner.Agent.display_apps:type_name -> provisioner.DisplayApps + 32, // 12: provisioner.Agent.scripts:type_name -> provisioner.Script + 31, // 13: provisioner.Agent.extra_envs:type_name -> provisioner.Env + 27, // 14: provisioner.Agent.resources_monitoring:type_name -> provisioner.ResourcesMonitoring + 33, // 15: provisioner.Agent.devcontainers:type_name -> provisioner.Devcontainer + 28, // 16: provisioner.ResourcesMonitoring.memory:type_name -> provisioner.MemoryResourceMonitor + 29, // 17: provisioner.ResourcesMonitoring.volumes:type_name -> provisioner.VolumeResourceMonitor + 35, // 18: provisioner.App.healthcheck:type_name -> provisioner.Healthcheck 2, // 19: provisioner.App.sharing_level:type_name -> provisioner.AppSharingLevel 3, // 20: provisioner.App.open_in:type_name -> provisioner.AppOpenIn - 25, // 21: provisioner.Resource.agents:type_name -> provisioner.Agent - 61, // 22: provisioner.Resource.metadata:type_name -> provisioner.Resource.Metadata - 39, // 23: provisioner.AITask.sidebar_app:type_name -> provisioner.AITaskSidebarApp + 26, // 21: provisioner.Resource.agents:type_name -> provisioner.Agent + 62, // 22: provisioner.Resource.metadata:type_name -> provisioner.Resource.Metadata + 40, // 23: provisioner.AITask.sidebar_app:type_name -> provisioner.AITaskSidebarApp 4, // 24: provisioner.Metadata.workspace_transition:type_name -> provisioner.WorkspaceTransition - 37, // 25: provisioner.Metadata.workspace_owner_rbac_roles:type_name -> provisioner.Role + 38, // 25: provisioner.Metadata.workspace_owner_rbac_roles:type_name -> provisioner.Role 5, // 26: provisioner.Metadata.prebuilt_workspace_build_stage:type_name -> provisioner.PrebuiltWorkspaceBuildStage - 38, // 27: provisioner.Metadata.running_agent_auth_tokens:type_name -> provisioner.RunningAgentAuthToken - 9, // 28: provisioner.ParseComplete.template_variables:type_name -> provisioner.TemplateVariable - 62, // 29: provisioner.ParseComplete.workspace_tags:type_name -> provisioner.ParseComplete.WorkspaceTagsEntry - 36, // 30: provisioner.InitComplete.modules:type_name -> provisioner.Module - 41, // 31: provisioner.PlanRequest.metadata:type_name -> provisioner.Metadata - 12, // 32: provisioner.PlanRequest.rich_parameter_values:type_name -> provisioner.RichParameterValue - 20, // 33: provisioner.PlanRequest.variable_values:type_name -> provisioner.VariableValue - 24, // 34: provisioner.PlanRequest.external_auth_providers:type_name -> provisioner.ExternalAuthProvider - 12, // 35: provisioner.PlanRequest.previous_parameter_values:type_name -> provisioner.RichParameterValue - 35, // 36: provisioner.PlanComplete.resources:type_name -> provisioner.Resource - 11, // 37: provisioner.PlanComplete.parameters:type_name -> provisioner.RichParameter - 23, // 38: provisioner.PlanComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource - 53, // 39: provisioner.PlanComplete.timings:type_name -> provisioner.Timing - 36, // 40: provisioner.PlanComplete.modules:type_name -> provisioner.Module - 17, // 41: provisioner.PlanComplete.presets:type_name -> provisioner.Preset - 19, // 42: provisioner.PlanComplete.resource_replacements:type_name -> provisioner.ResourceReplacement - 40, // 43: provisioner.PlanComplete.ai_tasks:type_name -> provisioner.AITask - 41, // 44: provisioner.ApplyRequest.metadata:type_name -> provisioner.Metadata - 35, // 45: provisioner.ApplyComplete.resources:type_name -> provisioner.Resource - 11, // 46: provisioner.ApplyComplete.parameters:type_name -> provisioner.RichParameter - 23, // 47: provisioner.ApplyComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource - 53, // 48: provisioner.ApplyComplete.timings:type_name -> provisioner.Timing - 40, // 49: provisioner.ApplyComplete.ai_tasks:type_name -> provisioner.AITask - 63, // 50: provisioner.Timing.start:type_name -> google.protobuf.Timestamp - 63, // 51: provisioner.Timing.end:type_name -> google.protobuf.Timestamp - 6, // 52: provisioner.Timing.state:type_name -> provisioner.TimingState - 42, // 53: provisioner.Request.config:type_name -> provisioner.Config - 43, // 54: provisioner.Request.parse:type_name -> provisioner.ParseRequest - 45, // 55: provisioner.Request.init:type_name -> provisioner.InitRequest - 47, // 56: provisioner.Request.plan:type_name -> provisioner.PlanRequest - 49, // 57: provisioner.Request.apply:type_name -> provisioner.ApplyRequest - 51, // 58: provisioner.Request.graph:type_name -> provisioner.GraphRequest - 54, // 59: provisioner.Request.cancel:type_name -> provisioner.CancelRequest - 21, // 60: provisioner.Response.log:type_name -> provisioner.Log - 44, // 61: provisioner.Response.parse:type_name -> provisioner.ParseComplete - 46, // 62: provisioner.Response.init:type_name -> provisioner.InitComplete - 48, // 63: provisioner.Response.plan:type_name -> provisioner.PlanComplete - 50, // 64: provisioner.Response.apply:type_name -> provisioner.ApplyComplete - 52, // 65: provisioner.Response.graph:type_name -> provisioner.GraphComplete - 57, // 66: provisioner.Response.data_upload:type_name -> provisioner.DataUpload - 58, // 67: provisioner.Response.chunk_piece:type_name -> provisioner.ChunkPiece - 7, // 68: provisioner.DataUpload.upload_type:type_name -> provisioner.DataUploadType - 55, // 69: provisioner.Provisioner.Session:input_type -> provisioner.Request - 56, // 70: provisioner.Provisioner.Session:output_type -> provisioner.Response - 70, // [70:71] is the sub-list for method output_type - 69, // [69:70] is the sub-list for method input_type - 69, // [69:69] is the sub-list for extension type_name - 69, // [69:69] is the sub-list for extension extendee - 0, // [0:69] is the sub-list for field type_name + 39, // 27: provisioner.Metadata.running_agent_auth_tokens:type_name -> provisioner.RunningAgentAuthToken + 10, // 28: provisioner.ParseComplete.template_variables:type_name -> provisioner.TemplateVariable + 63, // 29: provisioner.ParseComplete.workspace_tags:type_name -> provisioner.ParseComplete.WorkspaceTagsEntry + 54, // 30: provisioner.InitComplete.timings:type_name -> provisioner.Timing + 37, // 31: provisioner.InitComplete.modules:type_name -> provisioner.Module + 42, // 32: provisioner.PlanRequest.metadata:type_name -> provisioner.Metadata + 13, // 33: provisioner.PlanRequest.rich_parameter_values:type_name -> provisioner.RichParameterValue + 21, // 34: provisioner.PlanRequest.variable_values:type_name -> provisioner.VariableValue + 25, // 35: provisioner.PlanRequest.external_auth_providers:type_name -> provisioner.ExternalAuthProvider + 13, // 36: provisioner.PlanRequest.previous_parameter_values:type_name -> provisioner.RichParameterValue + 54, // 37: provisioner.PlanComplete.timings:type_name -> provisioner.Timing + 20, // 38: provisioner.PlanComplete.resource_replacements:type_name -> provisioner.ResourceReplacement + 42, // 39: provisioner.ApplyRequest.metadata:type_name -> provisioner.Metadata + 36, // 40: provisioner.ApplyComplete.resources:type_name -> provisioner.Resource + 12, // 41: provisioner.ApplyComplete.parameters:type_name -> provisioner.RichParameter + 24, // 42: provisioner.ApplyComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource + 54, // 43: provisioner.ApplyComplete.timings:type_name -> provisioner.Timing + 41, // 44: provisioner.ApplyComplete.ai_tasks:type_name -> provisioner.AITask + 6, // 45: provisioner.GraphRequest.source:type_name -> provisioner.GraphSource + 54, // 46: provisioner.GraphComplete.timings:type_name -> provisioner.Timing + 36, // 47: provisioner.GraphComplete.resources:type_name -> provisioner.Resource + 12, // 48: provisioner.GraphComplete.parameters:type_name -> provisioner.RichParameter + 24, // 49: provisioner.GraphComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource + 18, // 50: provisioner.GraphComplete.presets:type_name -> provisioner.Preset + 41, // 51: provisioner.GraphComplete.ai_tasks:type_name -> provisioner.AITask + 64, // 52: provisioner.Timing.start:type_name -> google.protobuf.Timestamp + 64, // 53: provisioner.Timing.end:type_name -> google.protobuf.Timestamp + 7, // 54: provisioner.Timing.state:type_name -> provisioner.TimingState + 43, // 55: provisioner.Request.config:type_name -> provisioner.Config + 44, // 56: provisioner.Request.parse:type_name -> provisioner.ParseRequest + 46, // 57: provisioner.Request.init:type_name -> provisioner.InitRequest + 48, // 58: provisioner.Request.plan:type_name -> provisioner.PlanRequest + 50, // 59: provisioner.Request.apply:type_name -> provisioner.ApplyRequest + 52, // 60: provisioner.Request.graph:type_name -> provisioner.GraphRequest + 55, // 61: provisioner.Request.cancel:type_name -> provisioner.CancelRequest + 22, // 62: provisioner.Response.log:type_name -> provisioner.Log + 45, // 63: provisioner.Response.parse:type_name -> provisioner.ParseComplete + 47, // 64: provisioner.Response.init:type_name -> provisioner.InitComplete + 49, // 65: provisioner.Response.plan:type_name -> provisioner.PlanComplete + 51, // 66: provisioner.Response.apply:type_name -> provisioner.ApplyComplete + 53, // 67: provisioner.Response.graph:type_name -> provisioner.GraphComplete + 58, // 68: provisioner.Response.data_upload:type_name -> provisioner.DataUpload + 59, // 69: provisioner.Response.chunk_piece:type_name -> provisioner.ChunkPiece + 8, // 70: provisioner.DataUpload.upload_type:type_name -> provisioner.DataUploadType + 56, // 71: provisioner.Provisioner.Session:input_type -> provisioner.Request + 57, // 72: provisioner.Provisioner.Session:output_type -> provisioner.Response + 72, // [72:73] is the sub-list for method output_type + 71, // [71:72] is the sub-list for method input_type + 71, // [71:71] is the sub-list for extension type_name + 71, // [71:71] is the sub-list for extension extendee + 0, // [0:71] is the sub-list for field type_name } func init() { file_provisionersdk_proto_provisioner_proto_init() } @@ -5202,7 +5275,7 @@ func file_provisionersdk_proto_provisioner_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_provisionersdk_proto_provisioner_proto_rawDesc), len(file_provisionersdk_proto_provisioner_proto_rawDesc)), - NumEnums: 8, + NumEnums: 9, NumMessages: 55, NumExtensions: 0, NumServices: 1, diff --git a/provisionersdk/proto/provisioner.proto b/provisionersdk/proto/provisioner.proto index 867a1f305057f..a75c1c83cbeeb 100644 --- a/provisionersdk/proto/provisioner.proto +++ b/provisionersdk/proto/provisioner.proto @@ -406,9 +406,10 @@ message InitRequest { message InitComplete { string error = 1; - repeated Module modules = 2; - bytes module_files = 3; - bytes module_files_hash = 4; + repeated Timing timings = 2; + repeated Module modules = 3; + bytes module_files = 4; + bytes module_files_hash = 5; } // PlanRequest asks the provisioner to plan what resources & parameters it will create @@ -426,24 +427,11 @@ message PlanRequest { // PlanComplete indicates a request to plan completed. message PlanComplete { string error = 1; - repeated Resource resources = 2; - repeated RichParameter parameters = 3; - repeated ExternalAuthProviderResource external_auth_providers = 4; - repeated Timing timings = 6; - repeated Module modules = 7; - repeated Preset presets = 8; - bytes plan = 9; - repeated ResourceReplacement resource_replacements = 10; - bytes module_files = 11; - bytes module_files_hash = 12; - // Whether a template has any `coder_ai_task` resources defined, even if not planned for creation. - // During a template import, a plan is run which may not yield in any `coder_ai_task` resources, but nonetheless we - // still need to know that such resources are defined. - // - // See `hasAITaskResources` in provisioner/terraform/resources.go for more details. - bool has_ai_tasks = 13; - repeated provisioner.AITask ai_tasks = 14; - bool has_external_agents = 15; + repeated Timing timings = 2; + bytes plan = 3; + int32 dailyCost = 4; + repeated ResourceReplacement resource_replacements = 5; + int32 ai_task_count = 6; } // ApplyRequest asks the provisioner to apply the changes. Apply MUST be preceded by a successful plan request/response @@ -465,11 +453,31 @@ message ApplyComplete { repeated provisioner.AITask ai_tasks = 7; } +enum GraphSource { + SOURCE_UNKNOWN = 0; + SOURCE_PLAN = 1; + SOURCE_STATE = 2; +} + message GraphRequest { + GraphSource source = 1; } message GraphComplete { - string error = 2; + string error = 1; + repeated Timing timings = 2; + repeated Resource resources = 3; + repeated RichParameter parameters = 4; + repeated ExternalAuthProviderResource external_auth_providers = 5; + repeated Preset presets = 6; + // Whether a template has any `coder_ai_task` resources defined, even if not planned for creation. + // During a template import, a plan is run which may not yield in any `coder_ai_task` resources, but nonetheless we + // still need to know that such resources are defined. + // + // See `hasAITaskResources` in provisioner/terraform/resources.go for more details. + bool has_ai_tasks = 7; + repeated provisioner.AITask ai_tasks = 8; + bool has_external_agents = 9; } message Timing { diff --git a/provisionersdk/session.go b/provisionersdk/session.go index c3e1c1e82fc6b..9c191fb08bf1d 100644 --- a/provisionersdk/session.go +++ b/provisionersdk/session.go @@ -126,26 +126,23 @@ func (s *Session) handleRequests() error { resp.Type = &proto.Response_Parse{Parse: complete} } if init := req.GetInit(); init != nil { - r := &request[*proto.InitRequest, *proto.InitComplete]{ - req: init, - session: s, - serverFn: s.server.Init, - cancels: requests, + if s.initialized != nil { + return xerrors.New("cannot init more than once per session") } - complete, err := r.do() + initResp, err := s.handleInitRequest(init, requests) if err != nil { return err } - resp.Type = &proto.Response_Init{Init: complete} - if complete.Error == "" { - s.initialized = &initialized{} - } + resp.Type = &proto.Response_Init{Init: initResp} } if plan := req.GetPlan(); plan != nil { if s.initialized == nil { return xerrors.New("cannot plan before successful init") } - planResp := s.handlePlanRequest(plan, requests) + planResp, err := s.handlePlanRequest(plan, requests) + if err != nil { + return err + } if planResp.Error == "" { planned = true } @@ -175,20 +172,24 @@ func (s *Session) handleRequests() error { return nil } -func (s *Session) handlePlanRequest(plan *proto.PlanRequest, requests <-chan *proto.Request) *proto.PlanComplete { - r := &request[*proto.PlanRequest, *proto.PlanComplete]{ - req: plan, +func (s *Session) handleInitRequest(init *proto.InitRequest, requests <-chan *proto.Request) (*proto.InitComplete, error) { + r := &request[*proto.InitRequest, *proto.InitComplete]{ + req: init, session: s, - serverFn: s.server.Plan, + serverFn: s.server.Init, cancels: requests, } complete, err := r.do() if err != nil { - return complete + return nil, err + } + if complete.Error != "" { + return complete, nil } + s.initialized = &initialized{} // If the size of the complete message is too large, we need to stream the module files separately. - if protobuf.Size(&proto.Response{Type: &proto.Response_Plan{Plan: complete}}) > drpcsdk.MaxMessageSize { + if protobuf.Size(&proto.Response{Type: &proto.Response_Init{Init: complete}}) > drpcsdk.MaxMessageSize { // It is likely the modules that is pushing the message size over the limit. // Send the modules over a stream of messages instead. s.Logger.Info(s.Context(), "plan response too large, sending modules as stream", @@ -213,7 +214,25 @@ func (s *Session) handlePlanRequest(plan *proto.PlanRequest, requests <-chan *pr } } - return complete + return complete, nil +} + +func (s *Session) handlePlanRequest(plan *proto.PlanRequest, requests <-chan *proto.Request) (*proto.PlanComplete, error) { + r := &request[*proto.PlanRequest, *proto.PlanComplete]{ + req: plan, + session: s, + serverFn: s.server.Plan, + cancels: requests, + } + complete, err := r.do() + if err != nil { + return nil, err + } + if complete.Error != "" { + return complete, nil + } + + return complete, nil } type Session struct { From c89d82420796c9b25a8347617a454e7676c99f10 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 13:28:52 -0600 Subject: [PATCH 05/56] graph step in executor --- provisioner/echo/serve.go | 79 ++++++++------- provisioner/terraform/executor.go | 13 +-- provisionerd/runner/graph.go | 6 +- provisionerd/runner/plan.go | 6 +- provisionerd/runner/runner.go | 12 ++- provisionersdk/proto/provisioner.pb.go | 128 +++++++++---------------- provisionersdk/proto/provisioner.proto | 6 +- provisionersdk/serve.go | 1 + provisionersdk/session.go | 17 ++++ 9 files changed, 124 insertions(+), 144 deletions(-) diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index 440c6483e4c70..4de22505fc8be 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -25,8 +25,8 @@ import ( // "aws_instance" resource with an agent that has the given auth token. func ProvisionApplyWithAgentAndAPIKeyScope(authToken string, apiKeyScope string) []*proto.Response { return []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example_with_scope", Type: "aws_instance", @@ -48,8 +48,8 @@ func ProvisionApplyWithAgentAndAPIKeyScope(authToken string, apiKeyScope string) // "aws_instance" resource with an agent that has the given auth token. func ProvisionApplyWithAgent(authToken string) []*proto.Response { return []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", @@ -205,6 +205,11 @@ func (e *echo) Init(s *provisionersdk.Session, r *proto.InitRequest, canceledOrC panic("implement me") } +func (e *echo) Graph(s *provisionersdk.Session, r *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete { + //TODO implement me + panic("implement me") +} + // Plan reads requests from the provided directory to stream responses. func (*echo) Plan(sess *provisionersdk.Session, req *proto.PlanRequest, canceledOrComplete <-chan struct{}) *proto.PlanComplete { responses, err := readResponses( @@ -297,23 +302,18 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response ExtraFiles: nil, } } - if responses.ProvisionInit == nil { - for _, resp := range responses.ProvisionApply { + // source apply from the graph if graph exists + if responses.ProvisionApply == nil && len(responses.ProvisionGraph) > 0 { + for _, resp := range responses.ProvisionGraph { if resp.GetLog() != nil { - responses.ProvisionInit = append(responses.ProvisionInit, resp) + responses.ProvisionApply = append(responses.ProvisionApply, resp) continue } - responses.ProvisionInit = append(responses.ProvisionInit, &proto.Response{ - Type: &proto.Response_Init{Init: &proto.InitComplete{ - Error: resp.GetApply().GetError(), - Timings: nil, - Modules: nil, - ModuleFiles: nil, - ModuleFilesHash: nil, - }, - }, - }, - ) + responses.ProvisionApply = append(responses.ProvisionApply, &proto.Response{ + Type: &proto.Response_Apply{Apply: &proto.ApplyComplete{ + Error: resp.GetGraph().GetError(), + }}, + }) } } if responses.ProvisionGraph == nil { @@ -324,29 +324,41 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response } responses.ProvisionGraph = append(responses.ProvisionGraph, &proto.Response{ Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ - Error: resp.GetApply().GetError(), - Timings: nil, - Resources: resp.GetApply().GetResources(), - Parameters: resp.GetApply().GetParameters(), - ExternalAuthProviders: resp.GetApply().GetExternalAuthProviders(), - HasAiTasks: len(resp.GetApply().GetAiTasks()) > 0, - AiTasks: resp.GetApply().GetAiTasks(), - HasExternalAgents: false, + Error: resp.GetApply().GetError(), }}, }) } } + if responses.ProvisionInit == nil { + for _, resp := range responses.ProvisionGraph { + if resp.GetLog() != nil { + responses.ProvisionInit = append(responses.ProvisionInit, resp) + continue + } + responses.ProvisionInit = append(responses.ProvisionInit, &proto.Response{ + Type: &proto.Response_Init{Init: &proto.InitComplete{ + Error: resp.GetGraph().GetError(), + Timings: nil, + Modules: nil, + ModuleFiles: nil, + ModuleFilesHash: nil, + }, + }, + }, + ) + } + } if responses.ProvisionPlan == nil { - for _, resp := range responses.ProvisionApply { + for _, resp := range responses.ProvisionGraph { if resp.GetLog() != nil { responses.ProvisionPlan = append(responses.ProvisionPlan, resp) continue } responses.ProvisionPlan = append(responses.ProvisionPlan, &proto.Response{ Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ - Error: resp.GetApply().GetError(), + Error: resp.GetGraph().GetError(), Plan: []byte("{}"), - AiTaskCount: int32(len(resp.GetApply().GetAiTasks())), + AiTaskCount: int32(len(resp.GetGraph().GetAiTasks())), }}, }) } @@ -579,10 +591,9 @@ data "coder_parameter" "{{ .Name }}" { func WithResources(resources []*proto.Resource) *Responses { return &Responses{ - Parse: ParseComplete, - ProvisionApply: []*proto.Response{{Type: &proto.Response_Apply{Apply: &proto.ApplyComplete{ - Resources: resources, - }}}}, + Parse: ParseComplete, + ProvisionInit: InitComplete, + ProvisionApply: []*proto.Response{{Type: &proto.Response_Apply{Apply: &proto.ApplyComplete{}}}}, ProvisionGraph: []*proto.Response{{Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ Resources: resources, }}}}, @@ -595,8 +606,10 @@ func WithResources(resources []*proto.Resource) *Responses { func WithExtraFiles(extraFiles map[string][]byte) *Responses { return &Responses{ Parse: ParseComplete, + ProvisionInit: InitComplete, ProvisionApply: ApplyComplete, ProvisionPlan: PlanComplete, + ProvisionGraph: GraphComplete, ExtraFiles: extraFiles, } } diff --git a/provisioner/terraform/executor.go b/provisioner/terraform/executor.go index d8c7c9f546003..c04a09529454e 100644 --- a/provisioner/terraform/executor.go +++ b/provisioner/terraform/executor.go @@ -553,11 +553,6 @@ func (e *executor) apply( return nil, xerrors.Errorf("terraform apply: %w", err) } - // `terraform show` & `terraform graph` - state, err := e.stateResources(ctx, killCtx) - if err != nil { - return nil, err - } statefilePath := e.files.StateFilePath() stateContent, err := os.ReadFile(statefilePath) if err != nil { @@ -566,12 +561,8 @@ func (e *executor) apply( agg := e.timings.aggregate() return &proto.ApplyComplete{ - Parameters: state.Parameters, - Resources: state.Resources, - ExternalAuthProviders: state.ExternalAuthProviders, - State: stateContent, - Timings: agg, - AiTasks: state.AITasks, + State: stateContent, + Timings: agg, }, nil } diff --git a/provisionerd/runner/graph.go b/provisionerd/runner/graph.go index 0ba325e9667c9..a06dac45bc2ea 100644 --- a/provisionerd/runner/graph.go +++ b/provisionerd/runner/graph.go @@ -16,13 +16,13 @@ func (r *Runner) graph(ctx context.Context, req *sdkproto.GraphRequest) (*sdkpro err := r.session.Send(&sdkproto.Request{Type: &sdkproto.Request_Graph{Graph: req}}) if err != nil { - return nil, r.failedJobf("send init request: %v", err) + return nil, r.failedJobf("send graph request: %v", err) } for { msg, err := r.session.Recv() if err != nil { - return nil, r.failedJobf("receive init response: %v", err) + return nil, r.failedJobf("receive graph response: %v", err) } switch msgType := msg.Type.(type) { case *sdkproto.Response_Log: @@ -42,7 +42,7 @@ func (r *Runner) graph(ctx context.Context, req *sdkproto.GraphRequest) (*sdkpro case *sdkproto.Response_Graph: return msgType.Graph, nil default: - return nil, r.failedJobf("unexpected init response type %T", msg.Type) + return nil, r.failedJobf("unexpected graph response type %T", msg.Type) } } } diff --git a/provisionerd/runner/plan.go b/provisionerd/runner/plan.go index a212ce30c67ec..1fbba0eecc126 100644 --- a/provisionerd/runner/plan.go +++ b/provisionerd/runner/plan.go @@ -16,13 +16,13 @@ func (r *Runner) plan(ctx context.Context, stage string, req *sdkproto.PlanReque err := r.session.Send(&sdkproto.Request{Type: &sdkproto.Request_Plan{Plan: req}}) if err != nil { - return nil, r.failedJobf("send init request: %v", err) + return nil, r.failedJobf("send plan request: %v", err) } for { msg, err := r.session.Recv() if err != nil { - return nil, r.failedJobf("receive init response: %v", err) + return nil, r.failedJobf("receive plan response: %v", err) } switch msgType := msg.Type.(type) { case *sdkproto.Response_Log: @@ -41,7 +41,7 @@ func (r *Runner) plan(ctx context.Context, stage string, req *sdkproto.PlanReque case *sdkproto.Response_Plan: return msgType.Plan, nil default: - return nil, r.failedJobf("unexpected init response type %T", msg.Type) + return nil, r.failedJobf("unexpected plan response type %T", msg.Type) } } } diff --git a/provisionerd/runner/runner.go b/provisionerd/runner/runner.go index 7818f345a3c68..1d7b6083bafa0 100644 --- a/provisionerd/runner/runner.go +++ b/provisionerd/runner/runner.go @@ -747,7 +747,9 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( return nil, xerrors.Errorf("plan during template import provision error: %s", planComplete.Error) } - graphComplete, failed := r.graph(ctx, &sdkproto.GraphRequest{}) + graphComplete, failed := r.graph(ctx, &sdkproto.GraphRequest{ + Source: sdkproto.GraphSource_SOURCE_PLAN, + }) if failed != nil { return nil, xerrors.Errorf("graph during template import provision: %w", failed) } @@ -1067,7 +1069,9 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p } // Run Terraform Graph - graphComplete, failed := r.graph(ctx, &sdkproto.GraphRequest{}) + graphComplete, failed := r.graph(ctx, &sdkproto.GraphRequest{ + Source: sdkproto.GraphSource_SOURCE_STATE, + }) if failed != nil { return nil, failed } @@ -1115,8 +1119,8 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p } r.logger.Info(context.Background(), "apply successful", - slog.F("resource_count", len(applyComplete.Resources)), - slog.F("resources", resourceNames(applyComplete.Resources)), + slog.F("resource_count", len(graphComplete.Resources)), + slog.F("resources", resourceNames(graphComplete.Resources)), slog.F("state_len", len(applyComplete.State)), ) r.flushQueuedLogs(ctx) diff --git a/provisionersdk/proto/provisioner.pb.go b/provisionersdk/proto/provisioner.pb.go index 63f09ecbaa429..8de7f30772854 100644 --- a/provisionersdk/proto/provisioner.pb.go +++ b/provisionersdk/proto/provisioner.pb.go @@ -3658,16 +3658,12 @@ func (x *ApplyRequest) GetState() []byte { // ApplyComplete indicates a request to apply completed. type ApplyComplete struct { - state protoimpl.MessageState `protogen:"open.v1"` - State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - Resources []*Resource `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources,omitempty"` - Parameters []*RichParameter `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"` - ExternalAuthProviders []*ExternalAuthProviderResource `protobuf:"bytes,5,rep,name=external_auth_providers,json=externalAuthProviders,proto3" json:"external_auth_providers,omitempty"` - Timings []*Timing `protobuf:"bytes,6,rep,name=timings,proto3" json:"timings,omitempty"` - AiTasks []*AITask `protobuf:"bytes,7,rep,name=ai_tasks,json=aiTasks,proto3" json:"ai_tasks,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + Timings []*Timing `protobuf:"bytes,3,rep,name=timings,proto3" json:"timings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ApplyComplete) Reset() { @@ -3714,27 +3710,6 @@ func (x *ApplyComplete) GetError() string { return "" } -func (x *ApplyComplete) GetResources() []*Resource { - if x != nil { - return x.Resources - } - return nil -} - -func (x *ApplyComplete) GetParameters() []*RichParameter { - if x != nil { - return x.Parameters - } - return nil -} - -func (x *ApplyComplete) GetExternalAuthProviders() []*ExternalAuthProviderResource { - if x != nil { - return x.ExternalAuthProviders - } - return nil -} - func (x *ApplyComplete) GetTimings() []*Timing { if x != nil { return x.Timings @@ -3742,13 +3717,6 @@ func (x *ApplyComplete) GetTimings() []*Timing { return nil } -func (x *ApplyComplete) GetAiTasks() []*AITask { - if x != nil { - return x.AiTasks - } - return nil -} - type GraphRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Source GraphSource `protobuf:"varint,1,opt,name=source,proto3,enum=provisioner.GraphSource" json:"source,omitempty"` @@ -4953,17 +4921,11 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "\rai_task_count\x18\x06 \x01(\x05R\vaiTaskCount\"W\n" + "\fApplyRequest\x121\n" + "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12\x14\n" + - "\x05state\x18\x06 \x01(\fR\x05state\"\xee\x02\n" + + "\x05state\x18\x06 \x01(\fR\x05state\"j\n" + "\rApplyComplete\x12\x14\n" + "\x05state\x18\x01 \x01(\fR\x05state\x12\x14\n" + - "\x05error\x18\x02 \x01(\tR\x05error\x123\n" + - "\tresources\x18\x03 \x03(\v2\x15.provisioner.ResourceR\tresources\x12:\n" + - "\n" + - "parameters\x18\x04 \x03(\v2\x1a.provisioner.RichParameterR\n" + - "parameters\x12a\n" + - "\x17external_auth_providers\x18\x05 \x03(\v2).provisioner.ExternalAuthProviderResourceR\x15externalAuthProviders\x12-\n" + - "\atimings\x18\x06 \x03(\v2\x13.provisioner.TimingR\atimings\x12.\n" + - "\bai_tasks\x18\a \x03(\v2\x13.provisioner.AITaskR\aaiTasks\"@\n" + + "\x05error\x18\x02 \x01(\tR\x05error\x12-\n" + + "\atimings\x18\x03 \x03(\v2\x13.provisioner.TimingR\atimings\"@\n" + "\fGraphRequest\x120\n" + "\x06source\x18\x01 \x01(\x0e2\x18.provisioner.GraphSourceR\x06source\"\xd9\x03\n" + "\rGraphComplete\x12\x14\n" + @@ -5199,44 +5161,40 @@ var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ 54, // 37: provisioner.PlanComplete.timings:type_name -> provisioner.Timing 20, // 38: provisioner.PlanComplete.resource_replacements:type_name -> provisioner.ResourceReplacement 42, // 39: provisioner.ApplyRequest.metadata:type_name -> provisioner.Metadata - 36, // 40: provisioner.ApplyComplete.resources:type_name -> provisioner.Resource - 12, // 41: provisioner.ApplyComplete.parameters:type_name -> provisioner.RichParameter - 24, // 42: provisioner.ApplyComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource - 54, // 43: provisioner.ApplyComplete.timings:type_name -> provisioner.Timing - 41, // 44: provisioner.ApplyComplete.ai_tasks:type_name -> provisioner.AITask - 6, // 45: provisioner.GraphRequest.source:type_name -> provisioner.GraphSource - 54, // 46: provisioner.GraphComplete.timings:type_name -> provisioner.Timing - 36, // 47: provisioner.GraphComplete.resources:type_name -> provisioner.Resource - 12, // 48: provisioner.GraphComplete.parameters:type_name -> provisioner.RichParameter - 24, // 49: provisioner.GraphComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource - 18, // 50: provisioner.GraphComplete.presets:type_name -> provisioner.Preset - 41, // 51: provisioner.GraphComplete.ai_tasks:type_name -> provisioner.AITask - 64, // 52: provisioner.Timing.start:type_name -> google.protobuf.Timestamp - 64, // 53: provisioner.Timing.end:type_name -> google.protobuf.Timestamp - 7, // 54: provisioner.Timing.state:type_name -> provisioner.TimingState - 43, // 55: provisioner.Request.config:type_name -> provisioner.Config - 44, // 56: provisioner.Request.parse:type_name -> provisioner.ParseRequest - 46, // 57: provisioner.Request.init:type_name -> provisioner.InitRequest - 48, // 58: provisioner.Request.plan:type_name -> provisioner.PlanRequest - 50, // 59: provisioner.Request.apply:type_name -> provisioner.ApplyRequest - 52, // 60: provisioner.Request.graph:type_name -> provisioner.GraphRequest - 55, // 61: provisioner.Request.cancel:type_name -> provisioner.CancelRequest - 22, // 62: provisioner.Response.log:type_name -> provisioner.Log - 45, // 63: provisioner.Response.parse:type_name -> provisioner.ParseComplete - 47, // 64: provisioner.Response.init:type_name -> provisioner.InitComplete - 49, // 65: provisioner.Response.plan:type_name -> provisioner.PlanComplete - 51, // 66: provisioner.Response.apply:type_name -> provisioner.ApplyComplete - 53, // 67: provisioner.Response.graph:type_name -> provisioner.GraphComplete - 58, // 68: provisioner.Response.data_upload:type_name -> provisioner.DataUpload - 59, // 69: provisioner.Response.chunk_piece:type_name -> provisioner.ChunkPiece - 8, // 70: provisioner.DataUpload.upload_type:type_name -> provisioner.DataUploadType - 56, // 71: provisioner.Provisioner.Session:input_type -> provisioner.Request - 57, // 72: provisioner.Provisioner.Session:output_type -> provisioner.Response - 72, // [72:73] is the sub-list for method output_type - 71, // [71:72] is the sub-list for method input_type - 71, // [71:71] is the sub-list for extension type_name - 71, // [71:71] is the sub-list for extension extendee - 0, // [0:71] is the sub-list for field type_name + 54, // 40: provisioner.ApplyComplete.timings:type_name -> provisioner.Timing + 6, // 41: provisioner.GraphRequest.source:type_name -> provisioner.GraphSource + 54, // 42: provisioner.GraphComplete.timings:type_name -> provisioner.Timing + 36, // 43: provisioner.GraphComplete.resources:type_name -> provisioner.Resource + 12, // 44: provisioner.GraphComplete.parameters:type_name -> provisioner.RichParameter + 24, // 45: provisioner.GraphComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource + 18, // 46: provisioner.GraphComplete.presets:type_name -> provisioner.Preset + 41, // 47: provisioner.GraphComplete.ai_tasks:type_name -> provisioner.AITask + 64, // 48: provisioner.Timing.start:type_name -> google.protobuf.Timestamp + 64, // 49: provisioner.Timing.end:type_name -> google.protobuf.Timestamp + 7, // 50: provisioner.Timing.state:type_name -> provisioner.TimingState + 43, // 51: provisioner.Request.config:type_name -> provisioner.Config + 44, // 52: provisioner.Request.parse:type_name -> provisioner.ParseRequest + 46, // 53: provisioner.Request.init:type_name -> provisioner.InitRequest + 48, // 54: provisioner.Request.plan:type_name -> provisioner.PlanRequest + 50, // 55: provisioner.Request.apply:type_name -> provisioner.ApplyRequest + 52, // 56: provisioner.Request.graph:type_name -> provisioner.GraphRequest + 55, // 57: provisioner.Request.cancel:type_name -> provisioner.CancelRequest + 22, // 58: provisioner.Response.log:type_name -> provisioner.Log + 45, // 59: provisioner.Response.parse:type_name -> provisioner.ParseComplete + 47, // 60: provisioner.Response.init:type_name -> provisioner.InitComplete + 49, // 61: provisioner.Response.plan:type_name -> provisioner.PlanComplete + 51, // 62: provisioner.Response.apply:type_name -> provisioner.ApplyComplete + 53, // 63: provisioner.Response.graph:type_name -> provisioner.GraphComplete + 58, // 64: provisioner.Response.data_upload:type_name -> provisioner.DataUpload + 59, // 65: provisioner.Response.chunk_piece:type_name -> provisioner.ChunkPiece + 8, // 66: provisioner.DataUpload.upload_type:type_name -> provisioner.DataUploadType + 56, // 67: provisioner.Provisioner.Session:input_type -> provisioner.Request + 57, // 68: provisioner.Provisioner.Session:output_type -> provisioner.Response + 68, // [68:69] is the sub-list for method output_type + 67, // [67:68] is the sub-list for method input_type + 67, // [67:67] is the sub-list for extension type_name + 67, // [67:67] is the sub-list for extension extendee + 0, // [0:67] is the sub-list for field type_name } func init() { file_provisionersdk_proto_provisioner_proto_init() } diff --git a/provisionersdk/proto/provisioner.proto b/provisionersdk/proto/provisioner.proto index a75c1c83cbeeb..0979601956f32 100644 --- a/provisionersdk/proto/provisioner.proto +++ b/provisionersdk/proto/provisioner.proto @@ -446,11 +446,7 @@ message ApplyRequest { message ApplyComplete { bytes state = 1; string error = 2; - repeated Resource resources = 3; - repeated RichParameter parameters = 4; - repeated ExternalAuthProviderResource external_auth_providers = 5; - repeated Timing timings = 6; - repeated provisioner.AITask ai_tasks = 7; + repeated Timing timings = 3; } enum GraphSource { diff --git a/provisionersdk/serve.go b/provisionersdk/serve.go index 35d09b30aceb3..2deb8a0815f83 100644 --- a/provisionersdk/serve.go +++ b/provisionersdk/serve.go @@ -39,6 +39,7 @@ type Server interface { Parse(s *Session, r *proto.ParseRequest, canceledOrComplete <-chan struct{}) *proto.ParseComplete Plan(s *Session, r *proto.PlanRequest, canceledOrComplete <-chan struct{}) *proto.PlanComplete Apply(s *Session, r *proto.ApplyRequest, canceledOrComplete <-chan struct{}) *proto.ApplyComplete + Graph(s *Session, r *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete } // Serve starts a dRPC connection for the provisioner and transport provided. diff --git a/provisionersdk/session.go b/provisionersdk/session.go index 9c191fb08bf1d..aad9f502ed89f 100644 --- a/provisionersdk/session.go +++ b/provisionersdk/session.go @@ -164,6 +164,23 @@ func (s *Session) handleRequests() error { } resp.Type = &proto.Response_Apply{Apply: complete} } + if graph := req.GetGraph(); graph != nil { + if s.initialized == nil { + return xerrors.New("cannot graph before successful init") + } + + r := &request[*proto.GraphRequest, *proto.GraphComplete]{ + req: graph, + session: s, + serverFn: s.server.Graph, + cancels: requests, + } + complete, err := r.do() + if err != nil { + return err + } + resp.Type = &proto.Response_Graph{Graph: complete} + } err := s.stream.Send(resp) if err != nil { return xerrors.Errorf("send response: %w", err) From cbac23e124616991075bd89f13c5fdd75f6162b7 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 13:34:09 -0600 Subject: [PATCH 06/56] formatting --- provisioner/echo/serve.go | 19 ++++++++++--------- provisionerd/runner/graph.go | 1 - provisionerd/runner/init.go | 1 - provisionerd/runner/runner.go | 1 - 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index 4de22505fc8be..e0d0293a65e37 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -201,12 +201,12 @@ func (*echo) Parse(sess *provisionersdk.Session, _ *proto.ParseRequest, _ <-chan } func (e *echo) Init(s *provisionersdk.Session, r *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete { - //TODO implement me + // TODO implement me panic("implement me") } func (e *echo) Graph(s *provisionersdk.Session, r *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete { - //TODO implement me + // TODO implement me panic("implement me") } @@ -336,13 +336,14 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response continue } responses.ProvisionInit = append(responses.ProvisionInit, &proto.Response{ - Type: &proto.Response_Init{Init: &proto.InitComplete{ - Error: resp.GetGraph().GetError(), - Timings: nil, - Modules: nil, - ModuleFiles: nil, - ModuleFilesHash: nil, - }, + Type: &proto.Response_Init{ + Init: &proto.InitComplete{ + Error: resp.GetGraph().GetError(), + Timings: nil, + Modules: nil, + ModuleFiles: nil, + ModuleFilesHash: nil, + }, }, }, ) diff --git a/provisionerd/runner/graph.go b/provisionerd/runner/graph.go index a06dac45bc2ea..eca5050b8d1e8 100644 --- a/provisionerd/runner/graph.go +++ b/provisionerd/runner/graph.go @@ -29,7 +29,6 @@ func (r *Runner) graph(ctx context.Context, req *sdkproto.GraphRequest) (*sdkpro r.logProvisionerJobLog(context.Background(), msgType.Log.Level, "terraform graphing", slog.F("level", msgType.Log.Level), slog.F("output", msgType.Log.Output), - //slog.F("workspace_build_id", r.job.GetWorkspaceBuild().WorkspaceBuildId), ) r.queueLog(ctx, &proto.Log{ diff --git a/provisionerd/runner/init.go b/provisionerd/runner/init.go index c40d7464c079b..1e50140952858 100644 --- a/provisionerd/runner/init.go +++ b/provisionerd/runner/init.go @@ -34,7 +34,6 @@ func (r *Runner) init(ctx context.Context, omitModules bool, templateArchive []b r.logProvisionerJobLog(context.Background(), msgType.Log.Level, "terraform initialization", slog.F("level", msgType.Log.Level), slog.F("output", msgType.Log.Output), - //slog.F("workspace_build_id", r.job.GetWorkspaceBuild().WorkspaceBuildId), ) r.queueLog(ctx, &proto.Log{ diff --git a/provisionerd/runner/runner.go b/provisionerd/runner/runner.go index 1d7b6083bafa0..1c8f1219cee64 100644 --- a/provisionerd/runner/runner.go +++ b/provisionerd/runner/runner.go @@ -514,7 +514,6 @@ func (r *Runner) runTemplateImport(ctx context.Context) (*proto.CompletedJob, *p defer span.End() failedJob := r.configure(&sdkproto.Config{ - //TemplateSourceArchive: r.job.GetTemplateSourceArchive(), TemplateId: strings2.EmptyToNil(r.job.GetTemplateImport().Metadata.TemplateId), TemplateVersionId: strings2.EmptyToNil(r.job.GetTemplateImport().Metadata.TemplateVersionId), ExpReuseTerraformWorkspace: ptr.Ref(false), From 94aa0f7893fb4a4f7985f9e11f2d76f17719477e Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 13:39:00 -0600 Subject: [PATCH 07/56] fix echo provisioner --- provisioner/echo/serve.go | 60 +++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index e0d0293a65e37..6a81808407f96 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -200,14 +200,48 @@ func (*echo) Parse(sess *provisionersdk.Session, _ *proto.ParseRequest, _ <-chan return provisionersdk.ParseErrorf("complete response missing") } -func (e *echo) Init(s *provisionersdk.Session, r *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete { - // TODO implement me - panic("implement me") +func (e *echo) Init(sess *provisionersdk.Session, req *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete { + responses, err := readResponses( + sess, + "", // transition not supported for echo graph responses + "init.protobuf") + if err != nil { + return &proto.InitComplete{Error: err.Error()} + } + for _, response := range responses { + if log := response.GetLog(); log != nil { + sess.ProvisionLog(log.Level, log.Output) + } + if complete := response.GetInit(); complete != nil { + return complete + } + } + + // some tests use Echo without a complete response to test cancel + <-canceledOrComplete + return provisionersdk.InitErrorf("canceled") } -func (e *echo) Graph(s *provisionersdk.Session, r *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete { - // TODO implement me - panic("implement me") +func (e *echo) Graph(sess *provisionersdk.Session, req *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete { + responses, err := readResponses( + sess, + "", // transition not supported for echo graph responses + "graph.protobuf") + if err != nil { + return &proto.GraphComplete{Error: err.Error()} + } + for _, response := range responses { + if log := response.GetLog(); log != nil { + sess.ProvisionLog(log.Level, log.Output) + } + if complete := response.GetGraph(); complete != nil { + return complete + } + } + + // some tests use Echo without a complete response to test cancel + <-canceledOrComplete + return provisionersdk.GraphError("canceled") } // Plan reads requests from the provided directory to stream responses. @@ -271,10 +305,8 @@ type Responses struct { ProvisionGraph []*proto.Response // Used to mock specific transition responses. They are prioritized over the generic responses. - ProvisionInitMap map[proto.WorkspaceTransition][]*proto.Response ProvisionPlanMap map[proto.WorkspaceTransition][]*proto.Response ProvisionApplyMap map[proto.WorkspaceTransition][]*proto.Response - ProvisionGraphMap map[proto.WorkspaceTransition][]*proto.Response ExtraFiles map[string][]byte } @@ -409,6 +441,12 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response return nil, err } } + for index, response := range responses.ProvisionInit { + err := writeProto(fmt.Sprintf("%d.init.protobuf", index), response) + if err != nil { + return nil, err + } + } for index, response := range responses.ProvisionApply { err := writeProto(fmt.Sprintf("%d.apply.protobuf", index), response) if err != nil { @@ -421,6 +459,12 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response return nil, err } } + for index, response := range responses.ProvisionGraph { + err := writeProto(fmt.Sprintf("%d.graph.protobuf", index), response) + if err != nil { + return nil, err + } + } for trans, m := range responses.ProvisionApplyMap { for i, rs := range m { err := writeProto(fmt.Sprintf("%d.%s.apply.protobuf", i, strings.ToLower(trans.String())), rs) From d454ca15d244ef4397ead91b38efd052f3f4eb57 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 13:43:34 -0600 Subject: [PATCH 08/56] fmt --- provisionersdk/session.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/provisionersdk/session.go b/provisionersdk/session.go index aad9f502ed89f..282ec1172ae70 100644 --- a/provisionersdk/session.go +++ b/provisionersdk/session.go @@ -266,8 +266,7 @@ type Session struct { logLevel int32 } -type initialized struct { -} +type initialized struct{} func (s *Session) Context() context.Context { return s.stream.Context() From 2ac5bcfb1a9a64ebd5f3ff8bf76a9a17e1aef25f Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 13:44:51 -0600 Subject: [PATCH 09/56] fix dynamic param test --- coderd/coderdtest/dynamicparameters.go | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/coderd/coderdtest/dynamicparameters.go b/coderd/coderdtest/dynamicparameters.go index 1cb60632aeaaa..7facd83221371 100644 --- a/coderd/coderdtest/dynamicparameters.go +++ b/coderd/coderdtest/dynamicparameters.go @@ -50,12 +50,24 @@ func DynamicParameterTemplate(t *testing.T, client *codersdk.Client, org uuid.UU } files := echo.WithExtraFiles(extraFiles) + files.ProvisionInit = []*proto.Response{{ + Type: &proto.Response_Init{ + Init: &proto.InitComplete{ + ModuleFiles: args.ModulesArchive, + }, + }, + }} files.ProvisionPlan = []*proto.Response{{ Type: &proto.Response_Plan{ Plan: &proto.PlanComplete{ - Plan: args.Plan, - ModuleFiles: args.ModulesArchive, - Parameters: args.StaticParams, + Plan: args.Plan, + }, + }, + }} + files.ProvisionGraph = []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ + Parameters: args.StaticParams, }, }, }} From 3c94ed9fe852c9b982adbd0828a7f1a768c98e30 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 15:37:13 -0600 Subject: [PATCH 10/56] fix tests --- cli/create_test.go | 8 +- cli/restart_test.go | 4 +- cli/start_test.go | 18 +-- cli/task_test.go | 8 +- cli/templatepresets_test.go | 4 +- cli/templatepush_test.go | 8 +- enterprise/coderd/coderd_test.go | 14 +-- enterprise/coderd/prebuilds/claim_test.go | 27 +--- provisioner/echo/serve.go | 19 ++- provisioner/echo/serve_test.go | 143 ++++++++++++++-------- provisionerd/runner/runner.go | 6 +- provisionersdk/proto/provisioner.pb.go | 84 +++++++------ provisionersdk/proto/provisioner.proto | 15 +-- provisionersdk/serve_test.go | 20 +++ provisionersdk/session.go | 4 + 15 files changed, 224 insertions(+), 158 deletions(-) diff --git a/cli/create_test.go b/cli/create_test.go index dd26e450d3916..a57e359e725be 100644 --- a/cli/create_test.go +++ b/cli/create_test.go @@ -304,8 +304,8 @@ func prepareEchoResponses(parameters []*proto.RichParameter, presets ...*proto.P Parse: echo.ParseComplete, ProvisionPlan: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: parameters, Presets: presets, }, @@ -1576,8 +1576,8 @@ func TestCreateWithGitAuth(t *testing.T) { Parse: echo.ParseComplete, ProvisionPlan: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ ExternalAuthProviders: []*proto.ExternalAuthProviderResource{{Id: "github"}}, }, }, diff --git a/cli/restart_test.go b/cli/restart_test.go index 01be7e590cebf..dd22785416670 100644 --- a/cli/restart_test.go +++ b/cli/restart_test.go @@ -308,8 +308,8 @@ func TestRestartWithParameters(t *testing.T) { Parse: echo.ParseComplete, ProvisionPlan: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: immutableParameterName, diff --git a/cli/start_test.go b/cli/start_test.go index 6e58b40e30778..721d43e846ce5 100644 --- a/cli/start_test.go +++ b/cli/start_test.go @@ -38,8 +38,8 @@ func mutableParamsResponse() *echo.Responses { Parse: echo.ParseComplete, ProvisionPlan: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: mutableParameterName, @@ -61,8 +61,8 @@ func immutableParamsResponse() *echo.Responses { Parse: echo.ParseComplete, ProvisionPlan: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: immutableParameterName, @@ -83,11 +83,13 @@ func TestStart(t *testing.T) { echoResponses := func() *echo.Responses { return &echo.Responses{ - Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionPlan: echo.PlanComplete, + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: ephemeralParameterName, diff --git a/cli/task_test.go b/cli/task_test.go index fca04372600d8..1b098175ee14c 100644 --- a/cli/task_test.go +++ b/cli/task_test.go @@ -287,8 +287,8 @@ func createAITaskTemplate(t *testing.T, client *codersdk.Client, orgID uuid.UUID Parse: echo.ParseComplete, ProvisionPlan: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ HasAiTasks: true, }, }, @@ -296,8 +296,8 @@ func createAITaskTemplate(t *testing.T, client *codersdk.Client, orgID uuid.UUID }, ProvisionApply: []*proto.Response{ { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Name: "example", diff --git a/cli/templatepresets_test.go b/cli/templatepresets_test.go index 3a8c8c39f0211..3468dbdf94966 100644 --- a/cli/templatepresets_test.go +++ b/cli/templatepresets_test.go @@ -284,8 +284,8 @@ func templateWithPresets(presets []*proto.Preset) *echo.Responses { Parse: echo.ParseComplete, ProvisionPlan: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Presets: presets, }, }, diff --git a/cli/templatepush_test.go b/cli/templatepush_test.go index 28c5adc20f213..1f5ae0bcf2ace 100644 --- a/cli/templatepush_test.go +++ b/cli/templatepush_test.go @@ -1325,8 +1325,8 @@ func completeWithAgent() *echo.Responses { Parse: echo.ParseComplete, ProvisionPlan: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Type: "compute", @@ -1346,8 +1346,8 @@ func completeWithAgent() *echo.Responses { }, ProvisionApply: []*proto.Response{ { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Type: "compute", diff --git a/enterprise/coderd/coderd_test.go b/enterprise/coderd/coderd_test.go index c3e6e1579fe91..8e14a156f9826 100644 --- a/enterprise/coderd/coderd_test.go +++ b/enterprise/coderd/coderd_test.go @@ -655,21 +655,21 @@ func TestManagedAgentLimit(t *testing.T) { // build. appID := uuid.NewString() echoRes := &echo.Responses{ - Parse: echo.ParseComplete, + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, ProvisionPlan: []*proto.Response{ { Type: &proto.Response_Plan{ Plan: &proto.PlanComplete{ - Plan: []byte("{}"), - ModuleFiles: []byte{}, - HasAiTasks: true, + Plan: []byte("{}"), }, }, }, }, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionApply: echo.ApplyComplete, + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", diff --git a/enterprise/coderd/prebuilds/claim_test.go b/enterprise/coderd/prebuilds/claim_test.go index 217a9ff09614a..d4326a4fd0eff 100644 --- a/enterprise/coderd/prebuilds/claim_test.go +++ b/enterprise/coderd/prebuilds/claim_test.go @@ -384,10 +384,10 @@ func TestClaimPrebuild(t *testing.T) { func templateWithAgentAndPresetsWithPrebuilds(desiredInstances int32) *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Type: "compute", @@ -442,26 +442,5 @@ func templateWithAgentAndPresetsWithPrebuilds(desiredInstances int32) *echo.Resp }, }, }, - ProvisionApply: []*proto.Response{ - { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ - Resources: []*proto.Resource{ - { - Type: "compute", - Name: "main", - Agents: []*proto.Agent{ - { - Name: "smith", - OperatingSystem: "linux", - Architecture: "i386", - }, - }, - }, - }, - }, - }, - }, - }, } } diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index 6a81808407f96..431b73e7d7dda 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -12,6 +12,7 @@ import ( "text/template" "github.com/google/uuid" + "github.com/spf13/afero" "golang.org/x/xerrors" protobuf "google.golang.org/protobuf/proto" @@ -201,6 +202,11 @@ func (*echo) Parse(sess *provisionersdk.Session, _ *proto.ParseRequest, _ <-chan } func (e *echo) Init(sess *provisionersdk.Session, req *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete { + err := sess.Files.ExtractArchive(sess.Context(), sess.Logger, afero.NewOsFs(), req.TemplateSourceArchive) + if err != nil { + return provisionersdk.InitErrorf("extract archive: %s", err.Error()) + } + responses, err := readResponses( sess, "", // transition not supported for echo graph responses @@ -225,7 +231,7 @@ func (e *echo) Init(sess *provisionersdk.Session, req *proto.InitRequest, cancel func (e *echo) Graph(sess *provisionersdk.Session, req *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete { responses, err := readResponses( sess, - "", // transition not supported for echo graph responses + strings.ToLower(req.GetMetadata().GetWorkspaceTransition().String()), "graph.protobuf") if err != nil { return &proto.GraphComplete{Error: err.Error()} @@ -307,6 +313,7 @@ type Responses struct { // Used to mock specific transition responses. They are prioritized over the generic responses. ProvisionPlanMap map[proto.WorkspaceTransition][]*proto.Response ProvisionApplyMap map[proto.WorkspaceTransition][]*proto.Response + ProvisionGraphMap map[proto.WorkspaceTransition][]*proto.Response ExtraFiles map[string][]byte } @@ -488,6 +495,16 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response } } } + for trans, m := range responses.ProvisionGraphMap { + for i, resp := range m { + graph := resp.GetGraph() + + err := writeProto(fmt.Sprintf("%d.%s.graph.protobuf", i, strings.ToLower(trans.String())), graph) + if err != nil { + return nil, err + } + } + } dirs := []string{} for name, content := range responses.ExtraFiles { logger.Debug(ctx, "extra file", slog.F("name", name)) diff --git a/provisioner/echo/serve_test.go b/provisioner/echo/serve_test.go index 9168f1be6d22e..b300f2463ffef 100644 --- a/provisioner/echo/serve_test.go +++ b/provisioner/echo/serve_test.go @@ -65,9 +65,12 @@ func TestEcho(t *testing.T) { err := client.Close() require.NoError(t, err) }() - err = client.Send(&proto.Request{Type: &proto.Request_Config{Config: &proto.Config{ - TemplateSourceArchive: data, - }}}) + err = client.Send(&proto.Request{Type: &proto.Request_Config{Config: &proto.Config{}}}) + require.NoError(t, err) + + err = client.Send(&proto.Request{Type: &proto.Request_Init{Init: &proto.InitRequest{TemplateSourceArchive: data}}}) + require.NoError(t, err) + _, err = client.Recv() require.NoError(t, err) err = client.Send(&proto.Request{Type: &proto.Request_Parse{Parse: &proto.ParseRequest{}}}) @@ -96,11 +99,7 @@ func TestEcho(t *testing.T) { }, { Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ - Resources: []*proto.Resource{{ - Name: "resource", - }}, - }, + Plan: &proto.PlanComplete{}, }, }, } @@ -115,7 +114,22 @@ func TestEcho(t *testing.T) { }, { Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Apply: &proto.ApplyComplete{}, + }, + }, + } + graphResponses := []*proto.Response{ + { + Type: &proto.Response_Log{ + Log: &proto.Log{ + Level: proto.LogLevel_INFO, + Output: "graph output", + }, + }, + }, + { + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "resource", }}, @@ -124,8 +138,10 @@ func TestEcho(t *testing.T) { }, } data, err := echo.Tar(&echo.Responses{ + ProvisionInit: echo.InitComplete, ProvisionPlan: planResponses, ProvisionApply: applyResponses, + ProvisionGraph: graphResponses, }) require.NoError(t, err) client, err := api.Session(ctx) @@ -134,9 +150,15 @@ func TestEcho(t *testing.T) { err := client.Close() require.NoError(t, err) }() - err = client.Send(&proto.Request{Type: &proto.Request_Config{Config: &proto.Config{ - TemplateSourceArchive: data, - }}}) + err = client.Send(&proto.Request{Type: &proto.Request_Config{Config: &proto.Config{}}}) + require.NoError(t, err) + + err = client.Send(&proto.Request{Type: &proto.Request_Init{ + Init: &proto.InitRequest{ + TemplateSourceArchive: data, + }, + }}) + _, err = client.Recv() require.NoError(t, err) err = client.Send(&proto.Request{Type: &proto.Request_Plan{Plan: &proto.PlanRequest{}}}) @@ -146,8 +168,6 @@ func TestEcho(t *testing.T) { require.Equal(t, planResponses[0].GetLog().Output, log.GetLog().Output) complete, err := client.Recv() require.NoError(t, err) - require.Equal(t, planResponses[1].GetPlan().Resources[0].Name, - complete.GetPlan().Resources[0].Name) err = client.Send(&proto.Request{Type: &proto.Request_Apply{Apply: &proto.ApplyRequest{}}}) require.NoError(t, err) @@ -156,8 +176,19 @@ func TestEcho(t *testing.T) { require.Equal(t, applyResponses[0].GetLog().Output, log.GetLog().Output) complete, err = client.Recv() require.NoError(t, err) - require.Equal(t, applyResponses[1].GetApply().Resources[0].Name, - complete.GetApply().Resources[0].Name) + + err = client.Send(&proto.Request{Type: &proto.Request_Graph{ + Graph: &proto.GraphRequest{ + Source: proto.GraphSource_SOURCE_STATE, + }, + }}) + log, err = client.Recv() + require.NoError(t, err) + require.Equal(t, graphResponses[0].GetLog().Output, log.GetLog().Output) + complete, err = client.Recv() + require.NoError(t, err) + require.Equal(t, graphResponses[1].GetGraph().Resources[0].Name, + complete.GetGraph().Resources[0].Name) }) t.Run("ProvisionStop", func(t *testing.T) { @@ -165,13 +196,12 @@ func TestEcho(t *testing.T) { // Stop responses should be returned when the workspace is being stopped. data, err := echo.Tar(&echo.Responses{ - ProvisionApply: applyCompleteResource("DEFAULT"), - ProvisionPlan: planCompleteResource("DEFAULT"), - ProvisionPlanMap: map[proto.WorkspaceTransition][]*proto.Response{ - proto.WorkspaceTransition_STOP: planCompleteResource("STOP"), - }, - ProvisionApplyMap: map[proto.WorkspaceTransition][]*proto.Response{ - proto.WorkspaceTransition_STOP: applyCompleteResource("STOP"), + ProvisionInit: echo.InitComplete, + ProvisionApply: echo.ApplyComplete, + ProvisionPlan: echo.PlanComplete, + ProvisionGraph: graphCompleteResource("DEFAULT"), + ProvisionGraphMap: map[proto.WorkspaceTransition][]*proto.Response{ + proto.WorkspaceTransition_STOP: graphCompleteResource("STOP"), }, }) require.NoError(t, err) @@ -182,15 +212,18 @@ func TestEcho(t *testing.T) { err := client.Close() require.NoError(t, err) }() - err = client.Send(&proto.Request{Type: &proto.Request_Config{Config: &proto.Config{ - TemplateSourceArchive: data, - }}}) + err = client.Send(&proto.Request{Type: &proto.Request_Config{Config: &proto.Config{}}}) + require.NoError(t, err) + + err = client.Send(&proto.Request{Type: &proto.Request_Init{Init: &proto.InitRequest{TemplateSourceArchive: data}}}) + require.NoError(t, err) + _, err = client.Recv() require.NoError(t, err) // Do stop. err = client.Send(&proto.Request{ - Type: &proto.Request_Plan{ - Plan: &proto.PlanRequest{ + Type: &proto.Request_Graph{ + Graph: &proto.GraphRequest{ Metadata: &proto.Metadata{ WorkspaceTransition: proto.WorkspaceTransition_STOP, }, @@ -203,13 +236,13 @@ func TestEcho(t *testing.T) { require.NoError(t, err) require.Equal(t, "STOP", - complete.GetPlan().Resources[0].Name, + complete.GetGraph().Resources[0].Name, ) // Do start. err = client.Send(&proto.Request{ - Type: &proto.Request_Plan{ - Plan: &proto.PlanRequest{ + Type: &proto.Request_Graph{ + Graph: &proto.GraphRequest{ Metadata: &proto.Metadata{ WorkspaceTransition: proto.WorkspaceTransition_START, }, @@ -222,7 +255,7 @@ func TestEcho(t *testing.T) { require.NoError(t, err) require.Equal(t, "DEFAULT", - complete.GetPlan().Resources[0].Name, + complete.GetGraph().Resources[0].Name, ) }) @@ -246,8 +279,8 @@ func TestEcho(t *testing.T) { }, }, }, { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "resource", }}, @@ -256,7 +289,8 @@ func TestEcho(t *testing.T) { }} data, err := echo.Tar(&echo.Responses{ ProvisionPlan: echo.PlanComplete, - ProvisionApply: responses, + ProvisionApply: echo.ApplyComplete, + ProvisionGraph: responses, }) require.NoError(t, err) client, err := api.Session(ctx) @@ -266,11 +300,15 @@ func TestEcho(t *testing.T) { require.NoError(t, err) }() err = client.Send(&proto.Request{Type: &proto.Request_Config{Config: &proto.Config{ - TemplateSourceArchive: data, - ProvisionerLogLevel: "debug", + ProvisionerLogLevel: "debug", }}}) require.NoError(t, err) + err = client.Send(&proto.Request{Type: &proto.Request_Init{Init: &proto.InitRequest{TemplateSourceArchive: data}}}) + require.NoError(t, err) + _, err = client.Recv() + require.NoError(t, err) + // Plan is required before apply err = client.Send(&proto.Request{Type: &proto.Request_Plan{Plan: &proto.PlanRequest{}}}) require.NoError(t, err) @@ -280,33 +318,30 @@ func TestEcho(t *testing.T) { err = client.Send(&proto.Request{Type: &proto.Request_Apply{Apply: &proto.ApplyRequest{}}}) require.NoError(t, err) + _, err = client.Recv() + require.NoError(t, err) + + err = client.Send(&proto.Request{Type: &proto.Request_Graph{ + Graph: &proto.GraphRequest{ + Source: proto.GraphSource_SOURCE_STATE, + }, + }}) + require.NoError(t, err) log, err := client.Recv() require.NoError(t, err) // Skip responses[0] as it's trace level require.Equal(t, responses[1].GetLog().Output, log.GetLog().Output) complete, err = client.Recv() require.NoError(t, err) - require.Equal(t, responses[2].GetApply().Resources[0].Name, - complete.GetApply().Resources[0].Name) + require.Equal(t, responses[2].GetGraph().Resources[0].Name, + complete.GetGraph().Resources[0].Name) }) } -func planCompleteResource(name string) []*proto.Response { - return []*proto.Response{{ - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ - Resources: []*proto.Resource{{ - Name: name, - }}, - }, - }, - }} -} - -func applyCompleteResource(name string) []*proto.Response { +func graphCompleteResource(name string) []*proto.Response { return []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: name, }}, diff --git a/provisionerd/runner/runner.go b/provisionerd/runner/runner.go index 1c8f1219cee64..9a4e8dbc06f34 100644 --- a/provisionerd/runner/runner.go +++ b/provisionerd/runner/runner.go @@ -747,7 +747,8 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( } graphComplete, failed := r.graph(ctx, &sdkproto.GraphRequest{ - Source: sdkproto.GraphSource_SOURCE_PLAN, + Metadata: metadata, + Source: sdkproto.GraphSource_SOURCE_PLAN, }) if failed != nil { return nil, xerrors.Errorf("graph during template import provision: %w", failed) @@ -1069,7 +1070,8 @@ func (r *Runner) runWorkspaceBuild(ctx context.Context) (*proto.CompletedJob, *p // Run Terraform Graph graphComplete, failed := r.graph(ctx, &sdkproto.GraphRequest{ - Source: sdkproto.GraphSource_SOURCE_STATE, + Metadata: r.job.GetWorkspaceBuild().Metadata, + Source: sdkproto.GraphSource_SOURCE_STATE, }) if failed != nil { return nil, failed diff --git a/provisionersdk/proto/provisioner.pb.go b/provisionersdk/proto/provisioner.pb.go index 8de7f30772854..7807735e36c51 100644 --- a/provisionersdk/proto/provisioner.pb.go +++ b/provisionersdk/proto/provisioner.pb.go @@ -3719,7 +3719,8 @@ func (x *ApplyComplete) GetTimings() []*Timing { type GraphRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Source GraphSource `protobuf:"varint,1,opt,name=source,proto3,enum=provisioner.GraphSource" json:"source,omitempty"` + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Source GraphSource `protobuf:"varint,2,opt,name=source,proto3,enum=provisioner.GraphSource" json:"source,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3754,6 +3755,13 @@ func (*GraphRequest) Descriptor() ([]byte, []int) { return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{43} } +func (x *GraphRequest) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + func (x *GraphRequest) GetSource() GraphSource { if x != nil { return x.Source @@ -4925,9 +4933,10 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "\rApplyComplete\x12\x14\n" + "\x05state\x18\x01 \x01(\fR\x05state\x12\x14\n" + "\x05error\x18\x02 \x01(\tR\x05error\x12-\n" + - "\atimings\x18\x03 \x03(\v2\x13.provisioner.TimingR\atimings\"@\n" + - "\fGraphRequest\x120\n" + - "\x06source\x18\x01 \x01(\x0e2\x18.provisioner.GraphSourceR\x06source\"\xd9\x03\n" + + "\atimings\x18\x03 \x03(\v2\x13.provisioner.TimingR\atimings\"s\n" + + "\fGraphRequest\x121\n" + + "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x120\n" + + "\x06source\x18\x02 \x01(\x0e2\x18.provisioner.GraphSourceR\x06source\"\xd9\x03\n" + "\rGraphComplete\x12\x14\n" + "\x05error\x18\x01 \x01(\tR\x05error\x12-\n" + "\atimings\x18\x02 \x03(\v2\x13.provisioner.TimingR\atimings\x123\n" + @@ -5162,39 +5171,40 @@ var file_provisionersdk_proto_provisioner_proto_depIdxs = []int32{ 20, // 38: provisioner.PlanComplete.resource_replacements:type_name -> provisioner.ResourceReplacement 42, // 39: provisioner.ApplyRequest.metadata:type_name -> provisioner.Metadata 54, // 40: provisioner.ApplyComplete.timings:type_name -> provisioner.Timing - 6, // 41: provisioner.GraphRequest.source:type_name -> provisioner.GraphSource - 54, // 42: provisioner.GraphComplete.timings:type_name -> provisioner.Timing - 36, // 43: provisioner.GraphComplete.resources:type_name -> provisioner.Resource - 12, // 44: provisioner.GraphComplete.parameters:type_name -> provisioner.RichParameter - 24, // 45: provisioner.GraphComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource - 18, // 46: provisioner.GraphComplete.presets:type_name -> provisioner.Preset - 41, // 47: provisioner.GraphComplete.ai_tasks:type_name -> provisioner.AITask - 64, // 48: provisioner.Timing.start:type_name -> google.protobuf.Timestamp - 64, // 49: provisioner.Timing.end:type_name -> google.protobuf.Timestamp - 7, // 50: provisioner.Timing.state:type_name -> provisioner.TimingState - 43, // 51: provisioner.Request.config:type_name -> provisioner.Config - 44, // 52: provisioner.Request.parse:type_name -> provisioner.ParseRequest - 46, // 53: provisioner.Request.init:type_name -> provisioner.InitRequest - 48, // 54: provisioner.Request.plan:type_name -> provisioner.PlanRequest - 50, // 55: provisioner.Request.apply:type_name -> provisioner.ApplyRequest - 52, // 56: provisioner.Request.graph:type_name -> provisioner.GraphRequest - 55, // 57: provisioner.Request.cancel:type_name -> provisioner.CancelRequest - 22, // 58: provisioner.Response.log:type_name -> provisioner.Log - 45, // 59: provisioner.Response.parse:type_name -> provisioner.ParseComplete - 47, // 60: provisioner.Response.init:type_name -> provisioner.InitComplete - 49, // 61: provisioner.Response.plan:type_name -> provisioner.PlanComplete - 51, // 62: provisioner.Response.apply:type_name -> provisioner.ApplyComplete - 53, // 63: provisioner.Response.graph:type_name -> provisioner.GraphComplete - 58, // 64: provisioner.Response.data_upload:type_name -> provisioner.DataUpload - 59, // 65: provisioner.Response.chunk_piece:type_name -> provisioner.ChunkPiece - 8, // 66: provisioner.DataUpload.upload_type:type_name -> provisioner.DataUploadType - 56, // 67: provisioner.Provisioner.Session:input_type -> provisioner.Request - 57, // 68: provisioner.Provisioner.Session:output_type -> provisioner.Response - 68, // [68:69] is the sub-list for method output_type - 67, // [67:68] is the sub-list for method input_type - 67, // [67:67] is the sub-list for extension type_name - 67, // [67:67] is the sub-list for extension extendee - 0, // [0:67] is the sub-list for field type_name + 42, // 41: provisioner.GraphRequest.metadata:type_name -> provisioner.Metadata + 6, // 42: provisioner.GraphRequest.source:type_name -> provisioner.GraphSource + 54, // 43: provisioner.GraphComplete.timings:type_name -> provisioner.Timing + 36, // 44: provisioner.GraphComplete.resources:type_name -> provisioner.Resource + 12, // 45: provisioner.GraphComplete.parameters:type_name -> provisioner.RichParameter + 24, // 46: provisioner.GraphComplete.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource + 18, // 47: provisioner.GraphComplete.presets:type_name -> provisioner.Preset + 41, // 48: provisioner.GraphComplete.ai_tasks:type_name -> provisioner.AITask + 64, // 49: provisioner.Timing.start:type_name -> google.protobuf.Timestamp + 64, // 50: provisioner.Timing.end:type_name -> google.protobuf.Timestamp + 7, // 51: provisioner.Timing.state:type_name -> provisioner.TimingState + 43, // 52: provisioner.Request.config:type_name -> provisioner.Config + 44, // 53: provisioner.Request.parse:type_name -> provisioner.ParseRequest + 46, // 54: provisioner.Request.init:type_name -> provisioner.InitRequest + 48, // 55: provisioner.Request.plan:type_name -> provisioner.PlanRequest + 50, // 56: provisioner.Request.apply:type_name -> provisioner.ApplyRequest + 52, // 57: provisioner.Request.graph:type_name -> provisioner.GraphRequest + 55, // 58: provisioner.Request.cancel:type_name -> provisioner.CancelRequest + 22, // 59: provisioner.Response.log:type_name -> provisioner.Log + 45, // 60: provisioner.Response.parse:type_name -> provisioner.ParseComplete + 47, // 61: provisioner.Response.init:type_name -> provisioner.InitComplete + 49, // 62: provisioner.Response.plan:type_name -> provisioner.PlanComplete + 51, // 63: provisioner.Response.apply:type_name -> provisioner.ApplyComplete + 53, // 64: provisioner.Response.graph:type_name -> provisioner.GraphComplete + 58, // 65: provisioner.Response.data_upload:type_name -> provisioner.DataUpload + 59, // 66: provisioner.Response.chunk_piece:type_name -> provisioner.ChunkPiece + 8, // 67: provisioner.DataUpload.upload_type:type_name -> provisioner.DataUploadType + 56, // 68: provisioner.Provisioner.Session:input_type -> provisioner.Request + 57, // 69: provisioner.Provisioner.Session:output_type -> provisioner.Response + 69, // [69:70] is the sub-list for method output_type + 68, // [68:69] is the sub-list for method input_type + 68, // [68:68] is the sub-list for extension type_name + 68, // [68:68] is the sub-list for extension extendee + 0, // [0:68] is the sub-list for field type_name } func init() { file_provisionersdk_proto_provisioner_proto_init() } diff --git a/provisionersdk/proto/provisioner.proto b/provisionersdk/proto/provisioner.proto index 0979601956f32..eb8a81b61e834 100644 --- a/provisionersdk/proto/provisioner.proto +++ b/provisionersdk/proto/provisioner.proto @@ -369,16 +369,12 @@ message Metadata { // Config represents execution configuration shared by all subsequent requests in the Session message Config { - // template_source_archive is a tar of the template source files - bytes no_use_template_source_archive = 1; - // state is the provisioner state (if any) - bytes no_use_state = 2; - string provisioner_log_level = 3; + string provisioner_log_level = 1; // Template imports can omit template id - optional string template_id = 4; + optional string template_id = 2; // Dry runs omit version id - optional string template_version_id = 5; - optional bool exp_reuse_terraform_workspace = 6; // Whether to reuse existing terraform workspaces if they exist. + optional string template_version_id = 3; + optional bool exp_reuse_terraform_workspace = 4; // Whether to reuse existing terraform workspaces if they exist. } // ParseRequest consumes source-code to produce inputs. @@ -456,7 +452,8 @@ enum GraphSource { } message GraphRequest { - GraphSource source = 1; + Metadata metadata = 1; + GraphSource source = 2; } message GraphComplete { diff --git a/provisionersdk/serve_test.go b/provisionersdk/serve_test.go index 4fc7342b1eed2..ffd3c0ccf02e8 100644 --- a/provisionersdk/serve_test.go +++ b/provisionersdk/serve_test.go @@ -44,6 +44,11 @@ func TestProvisionerSDK(t *testing.T) { err = s.Send(&proto.Request{Type: &proto.Request_Config{Config: &proto.Config{}}}) require.NoError(t, err) + err = s.Send(&proto.Request{Type: &proto.Request_Init{Init: &proto.InitRequest{}}}) + require.NoError(t, err) + _, err = s.Recv() + require.NoError(t, err) + err = s.Send(&proto.Request{Type: &proto.Request_Parse{Parse: &proto.ParseRequest{}}}) require.NoError(t, err) msg, err := s.Recv() @@ -102,6 +107,11 @@ func TestProvisionerSDK(t *testing.T) { err = s.Send(&proto.Request{Type: &proto.Request_Config{Config: &proto.Config{}}}) require.NoError(t, err) + err = s.Send(&proto.Request{Type: &proto.Request_Init{Init: &proto.InitRequest{}}}) + require.NoError(t, err) + _, err = s.Recv() + require.NoError(t, err) + err = s.Send(&proto.Request{Type: &proto.Request_Parse{Parse: &proto.ParseRequest{}}}) require.NoError(t, err) msg, err := s.Recv() @@ -135,8 +145,18 @@ func TestProvisionerSDK(t *testing.T) { }) } +var _ provisionersdk.Server = unimplementedServer{} + type unimplementedServer struct{} +func (s2 unimplementedServer) Init(s *provisionersdk.Session, r *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete { + return &proto.InitComplete{} +} + +func (s2 unimplementedServer) Graph(s *provisionersdk.Session, r *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete { + return &proto.GraphComplete{Error: "unimplemented"} +} + func (unimplementedServer) Parse(_ *provisionersdk.Session, _ *proto.ParseRequest, _ <-chan struct{}) *proto.ParseComplete { return &proto.ParseComplete{Error: "unimplemented"} } diff --git a/provisionersdk/session.go b/provisionersdk/session.go index 282ec1172ae70..0a034a88266c4 100644 --- a/provisionersdk/session.go +++ b/provisionersdk/session.go @@ -106,6 +106,10 @@ func (s *Session) handleRequests() error { } resp := &proto.Response{} if parse := req.GetParse(); parse != nil { + if s.initialized == nil { + // Files must be initialized before parsing. + return xerrors.New("cannot parse before successful init") + } r := &request[*proto.ParseRequest, *proto.ParseComplete]{ req: parse, session: s, From 0e00edf0c4f8a747693ded158446ae718066ca6e Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 16:14:03 -0600 Subject: [PATCH 11/56] solve more tests --- cli/templatepush_test.go | 23 +------ enterprise/coderd/provisionerdaemons_test.go | 12 ++-- enterprise/coderd/templates_test.go | 16 ++--- enterprise/coderd/workspaceagents_test.go | 38 ++++------- enterprise/coderd/workspacequota_test.go | 48 +++++++------- enterprise/coderd/workspaces_test.go | 24 +++---- provisioner/echo/serve.go | 69 +++++++++++++++++++- provisionersdk/proto/provisioner.pb.go | 43 ++++-------- 8 files changed, 139 insertions(+), 134 deletions(-) diff --git a/cli/templatepush_test.go b/cli/templatepush_test.go index 1f5ae0bcf2ace..df4d5327ba65c 100644 --- a/cli/templatepush_test.go +++ b/cli/templatepush_test.go @@ -1323,28 +1323,7 @@ func createEchoResponsesWithTemplateVariables(templateVariables []*proto.Templat func completeWithAgent() *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ - { - Type: &proto.Response_Graph{ - Graph: &proto.GraphComplete{ - Resources: []*proto.Resource{ - { - Type: "compute", - Name: "main", - Agents: []*proto.Agent{ - { - Name: "smith", - OperatingSystem: "linux", - Architecture: "i386", - }, - }, - }, - }, - }, - }, - }, - }, - ProvisionApply: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ diff --git a/enterprise/coderd/provisionerdaemons_test.go b/enterprise/coderd/provisionerdaemons_test.go index 5797e978fa34c..b0d336775ef0b 100644 --- a/enterprise/coderd/provisionerdaemons_test.go +++ b/enterprise/coderd/provisionerdaemons_test.go @@ -256,9 +256,9 @@ func TestProvisionerDaemonServe(t *testing.T) { authToken := uuid.NewString() data, err := echo.Tar(&echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*sdkproto.Response{{ - Type: &sdkproto.Response_Plan{ - Plan: &sdkproto.PlanComplete{ + ProvisionGraph: []*sdkproto.Response{{ + Type: &sdkproto.Response_Graph{ + Graph: &sdkproto.GraphComplete{ Resources: []*sdkproto.Resource{{ Name: "example", Type: "aws_instance", @@ -446,9 +446,9 @@ func TestProvisionerDaemonServe(t *testing.T) { authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*sdkproto.Response{{ - Type: &sdkproto.Response_Apply{ - Apply: &sdkproto.ApplyComplete{ + ProvisionGraph: []*sdkproto.Response{{ + Type: &sdkproto.Response_Graph{ + Graph: &sdkproto.GraphComplete{ Resources: []*sdkproto.Resource{{ Name: "example", Type: "aws_instance", diff --git a/enterprise/coderd/templates_test.go b/enterprise/coderd/templates_test.go index e5e97085716da..17f4fe903cf5f 100644 --- a/enterprise/coderd/templates_test.go +++ b/enterprise/coderd/templates_test.go @@ -147,7 +147,7 @@ func TestTemplates(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ + ProvisionGraph: []*proto.Response{{ Type: &proto.Response_Log{ Log: &proto.Log{ Level: proto.LogLevel_INFO, @@ -155,8 +155,8 @@ func TestTemplates(t *testing.T) { }, }, }, { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "some", Type: "example", @@ -2161,10 +2161,10 @@ func TestInvalidateTemplatePrebuilds(t *testing.T) { }) templateAdminClient, _ := coderdtest.CreateAnotherUser(t, ownerClient, owner.OrganizationID, rbac.RoleTemplateAdmin()) - buildPlanResponse := func(presets ...*proto.Preset) *proto.Response { + buildGraphResponse := func(presets ...*proto.Preset) *proto.Response { return &proto.Response{ - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Presets: presets, Parameters: templateVersionParameters, }, @@ -2174,8 +2174,8 @@ func TestInvalidateTemplatePrebuilds(t *testing.T) { version1 := coderdtest.CreateTemplateVersion(t, templateAdminClient, owner.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{buildPlanResponse(presetWithParameters1, presetWithParameters2)}, ProvisionApply: echo.ApplyComplete, + ProvisionGraph: []*proto.Response{buildGraphResponse(presetWithParameters1, presetWithParameters2)}, }) coderdtest.AwaitTemplateVersionJobCompleted(t, templateAdminClient, version1.ID) template := coderdtest.CreateTemplate(t, templateAdminClient, owner.OrganizationID, version1.ID) @@ -2193,7 +2193,7 @@ func TestInvalidateTemplatePrebuilds(t *testing.T) { // Given the template is updated... version2 := coderdtest.UpdateTemplateVersion(t, templateAdminClient, owner.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{buildPlanResponse(presetWithParameters2, presetWithParameters3)}, + ProvisionGraph: []*proto.Response{buildGraphResponse(presetWithParameters2, presetWithParameters3)}, ProvisionApply: echo.ApplyComplete, }, template.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, templateAdminClient, version2.ID) diff --git a/enterprise/coderd/workspaceagents_test.go b/enterprise/coderd/workspaceagents_test.go index a150c0cdc06d5..6fc1e8aff4825 100644 --- a/enterprise/coderd/workspaceagents_test.go +++ b/enterprise/coderd/workspaceagents_test.go @@ -134,10 +134,10 @@ func TestReinitializeAgent(t *testing.T) { agentToken := uuid.UUID{3} version := coderdtest.CreateTemplateVersion(t, client, orgID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Presets: []*proto.Preset{ { Name: "test-preset", @@ -146,25 +146,6 @@ func TestReinitializeAgent(t *testing.T) { }, }, }, - Resources: []*proto.Resource{ - { - Agents: []*proto.Agent{ - { - Name: "smith", - OperatingSystem: "linux", - Architecture: "i386", - }, - }, - }, - }, - }, - }, - }, - }, - ProvisionApply: []*proto.Response{ - { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ Resources: []*proto.Resource{ { Type: "compute", @@ -191,6 +172,13 @@ func TestReinitializeAgent(t *testing.T) { }, }, }, + ProvisionApply: []*proto.Response{ + { + Type: &proto.Response_Apply{ + Apply: &proto.ApplyComplete{}, + }, + }, + }, }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -273,9 +261,9 @@ func setupWorkspaceAgent(t *testing.T, client *codersdk.Client, user codersdk.Cr authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", diff --git a/enterprise/coderd/workspacequota_test.go b/enterprise/coderd/workspacequota_test.go index 937aa8d57433a..535a3aff70667 100644 --- a/enterprise/coderd/workspacequota_test.go +++ b/enterprise/coderd/workspacequota_test.go @@ -121,9 +121,9 @@ func TestWorkspaceQuota(t *testing.T) { authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", @@ -221,9 +221,9 @@ func TestWorkspaceQuota(t *testing.T) { proto.WorkspaceTransition_START: planWithCost(2), proto.WorkspaceTransition_STOP: planWithCost(1), }, - ProvisionApplyMap: map[proto.WorkspaceTransition][]*proto.Response{ - proto.WorkspaceTransition_START: applyWithCost(2), - proto.WorkspaceTransition_STOP: applyWithCost(1), + ProvisionGraphMap: map[proto.WorkspaceTransition][]*proto.Response{ + proto.WorkspaceTransition_START: graphWithCost(2), + proto.WorkspaceTransition_STOP: graphWithCost(1), }, }) @@ -423,9 +423,9 @@ func TestWorkspaceQuota(t *testing.T) { authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", @@ -459,9 +459,9 @@ func TestWorkspaceQuota(t *testing.T) { // Test with a template that has zero cost - should pass versionZeroCost := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", @@ -543,9 +543,9 @@ func TestWorkspaceQuota(t *testing.T) { authToken := uuid.NewString() version1 := coderdtest.CreateTemplateVersion(t, owner, first.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", @@ -567,9 +567,9 @@ func TestWorkspaceQuota(t *testing.T) { version2 := coderdtest.CreateTemplateVersion(t, owner, second.ID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", @@ -1156,20 +1156,16 @@ func planWithCost(cost int32) []*proto.Response { return []*proto.Response{{ Type: &proto.Response_Plan{ Plan: &proto.PlanComplete{ - Resources: []*proto.Resource{{ - Name: "example", - Type: "aws_instance", - DailyCost: cost, - }}, + DailyCost: cost, }, }, }} } -func applyWithCost(cost int32) []*proto.Response { +func graphWithCost(cost int32) []*proto.Response { return []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", diff --git a/enterprise/coderd/workspaces_test.go b/enterprise/coderd/workspaces_test.go index 7cf9cd890b6df..8fbd2fed46e04 100644 --- a/enterprise/coderd/workspaces_test.go +++ b/enterprise/coderd/workspaces_test.go @@ -2579,10 +2579,10 @@ func templateWithAgentAndPresetsWithPrebuilds(desiredInstances int32) *echo.Resp return r } - applyResponse := func(withAgent bool) *proto.Response { + graphResponse := func(withAgent bool) *proto.Response { return &proto.Response{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{resource(withAgent)}, }, }, @@ -2591,9 +2591,9 @@ func templateWithAgentAndPresetsWithPrebuilds(desiredInstances int32) *echo.Resp return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{{ - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Presets: []*proto.Preset{{ Name: "preset-test", Parameters: []*proto.PresetParameter{{Name: "k1", Value: "v1"}}, @@ -2602,9 +2602,9 @@ func templateWithAgentAndPresetsWithPrebuilds(desiredInstances int32) *echo.Resp }, }, }}, - ProvisionApplyMap: map[proto.WorkspaceTransition][]*proto.Response{ - proto.WorkspaceTransition_START: {applyResponse(true)}, - proto.WorkspaceTransition_STOP: {applyResponse(false)}, + ProvisionGraphMap: map[proto.WorkspaceTransition][]*proto.Response{ + proto.WorkspaceTransition_START: {graphResponse(true)}, + proto.WorkspaceTransition_STOP: {graphResponse(false)}, }, } } @@ -2612,10 +2612,10 @@ func templateWithAgentAndPresetsWithPrebuilds(desiredInstances int32) *echo.Resp func templateWithFailedResponseAndPresetsWithPrebuilds(desiredInstances int32) *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Presets: []*proto.Preset{ { Name: "preset-test", diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index 431b73e7d7dda..35ffc14997f1e 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -318,6 +318,59 @@ type Responses struct { ExtraFiles map[string][]byte } +func isType[T any](x any) bool { + _, ok := x.(T) + return ok +} + +func (r *Responses) Valid() error { + isLog := isType[*proto.Response_Log] + isParse := isType[*proto.Response_Parse] + isInit := isType[*proto.Response_Init] + isDataUpload := isType[*proto.Response_DataUpload] + isChunkPiece := isType[*proto.Response_ChunkPiece] + isPlan := isType[*proto.Response_Plan] + isApply := isType[*proto.Response_Apply] + isGraph := isType[*proto.Response_Graph] + + for _, parse := range r.Parse { + ty := parse.Type + if !(isParse(ty) || isLog(ty)) { + return xerrors.Errorf("invalid parse response type: %T", ty) + } + } + + for _, init := range r.ProvisionInit { + ty := init.Type + if !(isInit(ty) || isLog(ty) || isChunkPiece(ty) || isDataUpload(ty)) { + return xerrors.Errorf("invalid init response type: %T", ty) + } + } + + for _, plan := range r.ProvisionPlan { + ty := plan.Type + if !(isPlan(ty) || isLog(ty)) { + return xerrors.Errorf("invalid plan response type: %T", ty) + } + } + + for _, apply := range r.ProvisionApply { + ty := apply.Type + if !(isApply(ty) || isLog(ty)) { + return xerrors.Errorf("invalid apply response type: %T", ty) + } + } + + for _, graph := range r.ProvisionGraph { + ty := graph.Type + if !(isGraph(ty) || isLog(ty)) { + return xerrors.Errorf("invalid graph response type: %T", ty) + } + } + + return nil +} + // Tar returns a tar archive of responses to provisioner operations. func Tar(responses *Responses) ([]byte, error) { logger := slog.Make() @@ -438,6 +491,13 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response if err != nil { return err } + + response := new(proto.Response) + err = protobuf.Unmarshal(data, response) + if err != nil { + return fmt.Errorf("you must have saved the wrong type, the proto cannot unmarshal: %w", err) + } + logger.Debug(context.Background(), "proto written", slog.F("name", name), slog.F("bytes_written", n)) return nil @@ -497,9 +557,7 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response } for trans, m := range responses.ProvisionGraphMap { for i, resp := range m { - graph := resp.GetGraph() - - err := writeProto(fmt.Sprintf("%d.%s.graph.protobuf", i, strings.ToLower(trans.String())), graph) + err := writeProto(fmt.Sprintf("%d.%s.graph.protobuf", i, strings.ToLower(trans.String())), resp) if err != nil { return nil, err } @@ -585,6 +643,11 @@ terraform { if err != nil { return nil, err } + + if err := responses.Valid(); err != nil { + return nil, xerrors.Errorf("responses invalid: %w", err) + } + return buffer.Bytes(), nil } diff --git a/provisionersdk/proto/provisioner.pb.go b/provisionersdk/proto/provisioner.pb.go index 7807735e36c51..aab3bbb1f041d 100644 --- a/provisionersdk/proto/provisioner.pb.go +++ b/provisionersdk/proto/provisioner.pb.go @@ -3104,17 +3104,13 @@ func (x *Metadata) GetTemplateVersionId() string { // Config represents execution configuration shared by all subsequent requests in the Session type Config struct { - state protoimpl.MessageState `protogen:"open.v1"` - // template_source_archive is a tar of the template source files - NoUseTemplateSourceArchive []byte `protobuf:"bytes,1,opt,name=no_use_template_source_archive,json=noUseTemplateSourceArchive,proto3" json:"no_use_template_source_archive,omitempty"` - // state is the provisioner state (if any) - NoUseState []byte `protobuf:"bytes,2,opt,name=no_use_state,json=noUseState,proto3" json:"no_use_state,omitempty"` - ProvisionerLogLevel string `protobuf:"bytes,3,opt,name=provisioner_log_level,json=provisionerLogLevel,proto3" json:"provisioner_log_level,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ProvisionerLogLevel string `protobuf:"bytes,1,opt,name=provisioner_log_level,json=provisionerLogLevel,proto3" json:"provisioner_log_level,omitempty"` // Template imports can omit template id - TemplateId *string `protobuf:"bytes,4,opt,name=template_id,json=templateId,proto3,oneof" json:"template_id,omitempty"` + TemplateId *string `protobuf:"bytes,2,opt,name=template_id,json=templateId,proto3,oneof" json:"template_id,omitempty"` // Dry runs omit version id - TemplateVersionId *string `protobuf:"bytes,5,opt,name=template_version_id,json=templateVersionId,proto3,oneof" json:"template_version_id,omitempty"` - ExpReuseTerraformWorkspace *bool `protobuf:"varint,6,opt,name=exp_reuse_terraform_workspace,json=expReuseTerraformWorkspace,proto3,oneof" json:"exp_reuse_terraform_workspace,omitempty"` // Whether to reuse existing terraform workspaces if they exist. + TemplateVersionId *string `protobuf:"bytes,3,opt,name=template_version_id,json=templateVersionId,proto3,oneof" json:"template_version_id,omitempty"` + ExpReuseTerraformWorkspace *bool `protobuf:"varint,4,opt,name=exp_reuse_terraform_workspace,json=expReuseTerraformWorkspace,proto3,oneof" json:"exp_reuse_terraform_workspace,omitempty"` // Whether to reuse existing terraform workspaces if they exist. unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3149,20 +3145,6 @@ func (*Config) Descriptor() ([]byte, []int) { return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{34} } -func (x *Config) GetNoUseTemplateSourceArchive() []byte { - if x != nil { - return x.NoUseTemplateSourceArchive - } - return nil -} - -func (x *Config) GetNoUseState() []byte { - if x != nil { - return x.NoUseState - } - return nil -} - func (x *Config) GetProvisionerLogLevel() string { if x != nil { return x.ProvisionerLogLevel @@ -4882,16 +4864,13 @@ const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + "\atask_id\x18\x16 \x01(\tR\x06taskId\x12\x1f\n" + "\vtask_prompt\x18\x17 \x01(\tR\n" + "taskPrompt\x12.\n" + - "\x13template_version_id\x18\x18 \x01(\tR\x11templateVersionId\"\x8f\x03\n" + - "\x06Config\x12B\n" + - "\x1eno_use_template_source_archive\x18\x01 \x01(\fR\x1anoUseTemplateSourceArchive\x12 \n" + - "\fno_use_state\x18\x02 \x01(\fR\n" + - "noUseState\x122\n" + - "\x15provisioner_log_level\x18\x03 \x01(\tR\x13provisionerLogLevel\x12$\n" + - "\vtemplate_id\x18\x04 \x01(\tH\x00R\n" + + "\x13template_version_id\x18\x18 \x01(\tR\x11templateVersionId\"\xa9\x02\n" + + "\x06Config\x122\n" + + "\x15provisioner_log_level\x18\x01 \x01(\tR\x13provisionerLogLevel\x12$\n" + + "\vtemplate_id\x18\x02 \x01(\tH\x00R\n" + "templateId\x88\x01\x01\x123\n" + - "\x13template_version_id\x18\x05 \x01(\tH\x01R\x11templateVersionId\x88\x01\x01\x12F\n" + - "\x1dexp_reuse_terraform_workspace\x18\x06 \x01(\bH\x02R\x1aexpReuseTerraformWorkspace\x88\x01\x01B\x0e\n" + + "\x13template_version_id\x18\x03 \x01(\tH\x01R\x11templateVersionId\x88\x01\x01\x12F\n" + + "\x1dexp_reuse_terraform_workspace\x18\x04 \x01(\bH\x02R\x1aexpReuseTerraformWorkspace\x88\x01\x01B\x0e\n" + "\f_template_idB\x16\n" + "\x14_template_version_idB \n" + "\x1e_exp_reuse_terraform_workspace\"\x0e\n" + From d15327a2a614fb97badc2a867a22fcf294a25b61 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 25 Nov 2025 16:17:16 -0600 Subject: [PATCH 12/56] solve more tests --- enterprise/coderd/workspaces_test.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/enterprise/coderd/workspaces_test.go b/enterprise/coderd/workspaces_test.go index 8fbd2fed46e04..6d005e5ef7730 100644 --- a/enterprise/coderd/workspaces_test.go +++ b/enterprise/coderd/workspaces_test.go @@ -2584,6 +2584,11 @@ func templateWithAgentAndPresetsWithPrebuilds(desiredInstances int32) *echo.Resp Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ Resources: []*proto.Resource{resource(withAgent)}, + Presets: []*proto.Preset{{ + Name: "preset-test", + Parameters: []*proto.PresetParameter{{Name: "k1", Value: "v1"}}, + Prebuild: &proto.Prebuild{Instances: desiredInstances}, + }}, }, }, } @@ -2593,13 +2598,7 @@ func templateWithAgentAndPresetsWithPrebuilds(desiredInstances int32) *echo.Resp Parse: echo.ParseComplete, ProvisionGraph: []*proto.Response{{ Type: &proto.Response_Graph{ - Graph: &proto.GraphComplete{ - Presets: []*proto.Preset{{ - Name: "preset-test", - Parameters: []*proto.PresetParameter{{Name: "k1", Value: "v1"}}, - Prebuild: &proto.Prebuild{Instances: desiredInstances}, - }}, - }, + Graph: &proto.GraphComplete{}, }, }}, ProvisionGraphMap: map[proto.WorkspaceTransition][]*proto.Response{ From 121f9f8062f3204dd91e2dcd6eb058d801cbfd93 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 09:39:35 -0600 Subject: [PATCH 13/56] more test fixes --- coderd/aitasks_test.go | 46 +++++------ coderd/audit_test.go | 33 +------- coderd/insights_test.go | 20 ++--- coderd/templateversions_test.go | 36 ++++----- coderd/workspaceagents_test.go | 8 +- coderd/workspacebuilds_test.go | 28 +++---- coderd/workspaceresourceauth_test.go | 18 ++--- coderd/workspaces_test.go | 114 +++++++++++++-------------- 8 files changed, 131 insertions(+), 172 deletions(-) diff --git a/coderd/aitasks_test.go b/coderd/aitasks_test.go index 3301f8bdd5f31..289e7052c8a85 100644 --- a/coderd/aitasks_test.go +++ b/coderd/aitasks_test.go @@ -61,19 +61,11 @@ func TestTasks(t *testing.T) { taskAppID := uuid.New() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ HasAiTasks: true, - }, - }, - }, - }, - ProvisionApply: []*proto.Response{ - { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ Resources: []*proto.Resource{ { Name: "example", @@ -945,8 +937,8 @@ func TestTasksCreate(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{ - {Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{ + {Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ HasAiTasks: true, }}}, }, @@ -989,8 +981,8 @@ func TestTasksCreate(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{ - {Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{ + {Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{{Name: codersdk.AITaskPromptParameterName, Type: "string"}}, HasAiTasks: true, }}}, @@ -1091,8 +1083,8 @@ func TestTasksCreate(t *testing.T) { version = coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{ - {Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{ + {Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ HasAiTasks: true, }}}, }, @@ -1212,8 +1204,8 @@ func TestTasksCreate(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{ - {Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{ + {Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ HasAiTasks: true, }}}, }, @@ -1269,8 +1261,8 @@ func TestTasksCreate(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{ - {Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{ + {Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ HasAiTasks: true, }}}, }, @@ -1303,8 +1295,8 @@ func TestTasksCreate(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{ - {Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{ + {Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ HasAiTasks: true, }}}, }, @@ -1353,8 +1345,8 @@ func TestTasksCreate(t *testing.T) { version1 := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{ - {Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{ + {Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ HasAiTasks: true, }}}, }, @@ -1365,8 +1357,8 @@ func TestTasksCreate(t *testing.T) { version2 := coderdtest.UpdateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{ - {Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{ + {Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ HasAiTasks: true, }}}, }, diff --git a/coderd/audit_test.go b/coderd/audit_test.go index 13dbc9ccd8406..28bb05fbef5db 100644 --- a/coderd/audit_test.go +++ b/coderd/audit_test.go @@ -476,37 +476,10 @@ func TestAuditLogsFilter(t *testing.T) { func completeWithAgentAndApp() *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ - Resources: []*proto.Resource{ - { - Type: "compute", - Name: "main", - Agents: []*proto.Agent{ - { - Name: "smith", - OperatingSystem: "linux", - Architecture: "i386", - Apps: []*proto.App{ - { - Slug: "app", - DisplayName: "App", - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - ProvisionApply: []*proto.Response{ - { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Type: "compute", diff --git a/coderd/insights_test.go b/coderd/insights_test.go index a4a47bea396a6..8d4d48a1db178 100644 --- a/coderd/insights_test.go +++ b/coderd/insights_test.go @@ -641,22 +641,16 @@ func TestTemplateInsights_Golden(t *testing.T) { // Create the template version and template. version := coderdtest.CreateTemplateVersion(t, client, firstUser.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: parameters, + Resources: resources, }, }, }, }, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ - Resources: resources, - }, - }, - }}, }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -1539,9 +1533,9 @@ func TestUserActivityInsights_Golden(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, firstUser.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: resources, }, }, diff --git a/coderd/templateversions_test.go b/coderd/templateversions_test.go index f282f8420b52e..1efbefba81c56 100644 --- a/coderd/templateversions_test.go +++ b/coderd/templateversions_test.go @@ -857,9 +857,9 @@ func TestTemplateVersionsExternalAuth(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{{ - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ ExternalAuthProviders: []*proto.ExternalAuthProviderResource{{Id: "github", Optional: true}}, }, }, @@ -912,9 +912,9 @@ func TestTemplateVersionResources(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "some", Type: "example", @@ -953,7 +953,7 @@ func TestTemplateVersionLogs(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ + ProvisionGraph: []*proto.Response{{ Type: &proto.Response_Log{ Log: &proto.Log{ Level: proto.LogLevel_INFO, @@ -961,8 +961,8 @@ func TestTemplateVersionLogs(t *testing.T) { }, }, }, { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "some", Type: "example", @@ -1211,15 +1211,15 @@ func TestTemplateVersionDryRun(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { Type: &proto.Response_Log{ Log: &proto.Log{}, }, }, { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{resource}, }, }, @@ -2060,10 +2060,10 @@ func TestTemplateVersionParameters_Order(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: firstParameterName, @@ -2228,10 +2228,10 @@ func TestTemplateVersionHasExternalAgent(t *testing.T) { ctx := testutil.Context(t, testutil.WaitMedium) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Name: "example", diff --git a/coderd/workspaceagents_test.go b/coderd/workspaceagents_test.go index 6c12f91d37388..cfa40af822717 100644 --- a/coderd/workspaceagents_test.go +++ b/coderd/workspaceagents_test.go @@ -506,9 +506,9 @@ func TestWorkspaceAgentConnectRPC(t *testing.T) { version = coderdtest.UpdateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", @@ -2696,7 +2696,7 @@ type workspace struct { func waitForUpdates( t *testing.T, - //nolint:revive // t takes precedence +//nolint:revive // t takes precedence ctx context.Context, stream tailnetproto.DRPCTailnet_WorkspaceUpdatesClient, currentState map[uuid.UUID]workspace, diff --git a/coderd/workspacebuilds_test.go b/coderd/workspacebuilds_test.go index d0ab64b1aeb32..cb2ce79ff1716 100644 --- a/coderd/workspacebuilds_test.go +++ b/coderd/workspacebuilds_test.go @@ -825,9 +825,9 @@ func TestWorkspaceBuildResources(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "first_resource", Type: "example", @@ -1032,7 +1032,7 @@ func TestWorkspaceBuildLogs(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ + ProvisionGraph: []*proto.Response{{ Type: &proto.Response_Log{ Log: &proto.Log{ Level: proto.LogLevel_INFO, @@ -1040,8 +1040,8 @@ func TestWorkspaceBuildLogs(t *testing.T) { }, }, }, { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "some", Type: "example", @@ -1208,9 +1208,9 @@ func TestWorkspaceDeleteSuspendedUser(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, first.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{{ - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Error: "", Resources: nil, Parameters: nil, @@ -1642,9 +1642,9 @@ func TestPostWorkspaceBuild(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{{ - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Presets: []*proto.Preset{ { Name: "autodetected", @@ -1854,8 +1854,8 @@ func TestPostWorkspaceBuild(t *testing.T) { workspaceOwnerClient, member1 = coderdtest.CreateAnotherUser(t, adminClient, admin.OrganizationID) otherMemberClient, _ = coderdtest.CreateAnotherUser(t, adminClient, admin.OrganizationID) ws = dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{OwnerID: member1.ID, OrganizationID: admin.OrganizationID}). - Seed(database.WorkspaceBuild{Transition: database.WorkspaceTransitionDelete}). - Do() + Seed(database.WorkspaceBuild{Transition: database.WorkspaceTransitionDelete}). + Do() ) // This needs to be done separately as provisionerd handles marking the workspace as deleted diff --git a/coderd/workspaceresourceauth_test.go b/coderd/workspaceresourceauth_test.go index 73524a63ade62..5282adb0fb4d2 100644 --- a/coderd/workspaceresourceauth_test.go +++ b/coderd/workspaceresourceauth_test.go @@ -26,9 +26,9 @@ func TestPostWorkspaceAuthAzureInstanceIdentity(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "somename", Type: "someinstance", @@ -70,9 +70,9 @@ func TestPostWorkspaceAuthAWSInstanceIdentity(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "somename", Type: "someinstance", @@ -151,9 +151,9 @@ func TestPostWorkspaceAuthGoogleInstanceIdentity(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "somename", Type: "someinstance", diff --git a/coderd/workspaces_test.go b/coderd/workspaces_test.go index 4ab334222a438..7fd2922357afc 100644 --- a/coderd/workspaces_test.go +++ b/coderd/workspaces_test.go @@ -213,9 +213,9 @@ func TestWorkspace(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "some", Type: "example", @@ -254,9 +254,9 @@ func TestWorkspace(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "some", Type: "example", @@ -299,9 +299,9 @@ func TestWorkspace(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "some", Type: "example", @@ -660,9 +660,9 @@ func TestWorkspace(t *testing.T) { authz := coderdtest.AssertRBAC(t, api, client) // Create a plan response with the specified presets and parameters - planResponse := &proto.Response{ - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + graphResponse := &proto.Response{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Presets: tc.presets, Parameters: tc.templateVersionParameters, }, @@ -671,7 +671,7 @@ func TestWorkspace(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{planResponse}, + ProvisionGraph: []*proto.Response{graphResponse}, ProvisionApply: echo.ApplyComplete, }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -2253,9 +2253,9 @@ func TestWorkspaceFilterManual(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", @@ -2450,10 +2450,10 @@ func TestWorkspaceFilterManual(t *testing.T) { makeParameters := func(extra ...*proto.RichParameter) *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: append([]*proto.RichParameter{ {Name: paramOneName, Description: "", Mutable: true, Type: "string"}, {Name: paramTwoName, DisplayName: "", Description: "", Mutable: true, Type: "string"}, @@ -3307,9 +3307,9 @@ func TestWorkspaceWatcher(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", @@ -3461,9 +3461,9 @@ func TestWorkspaceResource(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "beta", Type: "example", @@ -3529,9 +3529,9 @@ func TestWorkspaceResource(t *testing.T) { } version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "some", Type: "example", @@ -3604,9 +3604,9 @@ func TestWorkspaceResource(t *testing.T) { } version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "some", Type: "example", @@ -3648,9 +3648,9 @@ func TestWorkspaceResource(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "some", Type: "example", @@ -3728,10 +3728,10 @@ func TestWorkspaceWithRichParameters(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: firstParameterName, @@ -3832,10 +3832,10 @@ func TestWorkspaceWithMultiSelectFailure(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: "param", @@ -3911,10 +3911,10 @@ func TestWorkspaceWithOptionalRichParameters(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: firstParameterName, @@ -4002,10 +4002,10 @@ func TestWorkspaceWithEphemeralRichParameters(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: firstParameterName, @@ -4804,8 +4804,8 @@ func TestWorkspaceListTasks(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{ - {Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{ + {Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ HasAiTasks: true, }}}, }, @@ -4874,9 +4874,9 @@ func TestWorkspaceAppUpsertRestart(t *testing.T) { // Create template version with workspace app version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "test-resource", Type: "example", @@ -4948,9 +4948,9 @@ func TestMultipleAITasksDisallowed(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{{ - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ HasAiTasks: true, AiTasks: []*proto.AITask{ { @@ -5172,10 +5172,10 @@ func TestWorkspaceCreateWithImplicitPreset(t *testing.T) { createTemplateWithPresets := func(t *testing.T, client *codersdk.Client, user codersdk.CreateFirstUserResponse, presets []*proto.Preset) (codersdk.Template, codersdk.TemplateVersion) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Presets: presets, }, }, From 974dff9bd4a282cfebe009934e48bb38770ef9f0 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 09:46:40 -0600 Subject: [PATCH 14/56] fmt --- coderd/workspaceagents_test.go | 2 +- coderd/workspacebuilds_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/coderd/workspaceagents_test.go b/coderd/workspaceagents_test.go index cfa40af822717..0ab4414703e51 100644 --- a/coderd/workspaceagents_test.go +++ b/coderd/workspaceagents_test.go @@ -2696,7 +2696,7 @@ type workspace struct { func waitForUpdates( t *testing.T, -//nolint:revive // t takes precedence + //nolint:revive // t takes precedence ctx context.Context, stream tailnetproto.DRPCTailnet_WorkspaceUpdatesClient, currentState map[uuid.UUID]workspace, diff --git a/coderd/workspacebuilds_test.go b/coderd/workspacebuilds_test.go index cb2ce79ff1716..9a992af999190 100644 --- a/coderd/workspacebuilds_test.go +++ b/coderd/workspacebuilds_test.go @@ -1854,8 +1854,8 @@ func TestPostWorkspaceBuild(t *testing.T) { workspaceOwnerClient, member1 = coderdtest.CreateAnotherUser(t, adminClient, admin.OrganizationID) otherMemberClient, _ = coderdtest.CreateAnotherUser(t, adminClient, admin.OrganizationID) ws = dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{OwnerID: member1.ID, OrganizationID: admin.OrganizationID}). - Seed(database.WorkspaceBuild{Transition: database.WorkspaceTransitionDelete}). - Do() + Seed(database.WorkspaceBuild{Transition: database.WorkspaceTransitionDelete}). + Do() ) // This needs to be done separately as provisionerd handles marking the workspace as deleted From 3e0c09961e23fdd0ef6d0dd64c92d81a6879b56e Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 09:57:09 -0600 Subject: [PATCH 15/56] test fixes --- coderd/autobuild/lifecycle_executor_test.go | 26 ++++------ coderd/workspaceapps/db_test.go | 6 +-- codersdk/toolsdk/toolsdk_test.go | 4 +- enterprise/cli/create_test.go | 14 ++---- enterprise/cli/externalworkspaces_test.go | 54 +++------------------ provisioner/echo/serve.go | 4 ++ 6 files changed, 28 insertions(+), 80 deletions(-) diff --git a/coderd/autobuild/lifecycle_executor_test.go b/coderd/autobuild/lifecycle_executor_test.go index 0610c781fe966..5a902b6f9e1d2 100644 --- a/coderd/autobuild/lifecycle_executor_test.go +++ b/coderd/autobuild/lifecycle_executor_test.go @@ -233,9 +233,9 @@ func TestExecutorAutostartTemplateUpdated(t *testing.T) { // Since initial version has no parameters, any parameters in the new version will be incompatible res = &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: "new", @@ -1644,10 +1644,10 @@ func mustProvisionWorkspaceWithParameters(t *testing.T, client *codersdk.Client, user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: richParameters, }, }, @@ -1774,17 +1774,10 @@ func TestExecutorTaskWorkspace(t *testing.T) { taskAppID := uuid.New() version := coderdtest.CreateTemplateVersion(t, client, orgID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{HasAiTasks: true}, - }, - }, - }, - ProvisionApply: []*proto.Response{ - { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Agents: []*proto.Agent{ @@ -1804,6 +1797,7 @@ func TestExecutorTaskWorkspace(t *testing.T) { }, }, }, + HasAiTasks: true, AiTasks: []*proto.AITask{ { AppId: taskAppID.String(), diff --git a/coderd/workspaceapps/db_test.go b/coderd/workspaceapps/db_test.go index a7ad1a85e5521..aa436f4cc3c30 100644 --- a/coderd/workspaceapps/db_test.go +++ b/coderd/workspaceapps/db_test.go @@ -121,9 +121,9 @@ func Test_ResolveRequest(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, firstUser.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", diff --git a/codersdk/toolsdk/toolsdk_test.go b/codersdk/toolsdk/toolsdk_test.go index f69bcc4d0e7fe..0a8a94c8dc9c7 100644 --- a/codersdk/toolsdk/toolsdk_test.go +++ b/codersdk/toolsdk/toolsdk_test.go @@ -1015,8 +1015,8 @@ func TestTools(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionApply: echo.ApplyComplete, - ProvisionPlan: []*proto.Response{ - {Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ + ProvisionGraph: []*proto.Response{ + {Type: &proto.Response_Graph{Graph: &proto.GraphComplete{ Parameters: []*proto.RichParameter{{Name: "AI Prompt", Type: "string"}}, HasAiTasks: true, }}}, diff --git a/enterprise/cli/create_test.go b/enterprise/cli/create_test.go index 44218abb5a58d..b6699430b8c6e 100644 --- a/enterprise/cli/create_test.go +++ b/enterprise/cli/create_test.go @@ -560,20 +560,12 @@ func TestEnterpriseCreateWithPreset(t *testing.T) { func prepareEchoResponses(parameters []*proto.RichParameter, presets ...*proto.Preset) *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: parameters, Presets: presets, - }, - }, - }, - }, - ProvisionApply: []*proto.Response{ - { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ Resources: []*proto.Resource{ { Type: "compute", diff --git a/enterprise/cli/externalworkspaces_test.go b/enterprise/cli/externalworkspaces_test.go index 9ce39c7c28afb..f8491e37fe040 100644 --- a/enterprise/cli/externalworkspaces_test.go +++ b/enterprise/cli/externalworkspaces_test.go @@ -24,10 +24,10 @@ import ( func completeWithExternalAgent() *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Type: "coder_external_agent", @@ -46,27 +46,6 @@ func completeWithExternalAgent() *echo.Responses { }, }, }, - ProvisionApply: []*proto.Response{ - { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ - Resources: []*proto.Resource{ - { - Type: "coder_external_agent", - Name: "main", - Agents: []*proto.Agent{ - { - Name: "external-agent", - OperatingSystem: "linux", - Architecture: "amd64", - }, - }, - }, - }, - }, - }, - }, - }, } } @@ -74,31 +53,10 @@ func completeWithExternalAgent() *echo.Responses { func completeWithRegularAgent() *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ - { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ - Resources: []*proto.Resource{ - { - Type: "compute", - Name: "main", - Agents: []*proto.Agent{ - { - Name: "regular-agent", - OperatingSystem: "linux", - Architecture: "amd64", - }, - }, - }, - }, - }, - }, - }, - }, - ProvisionApply: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Type: "compute", diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index 35ffc14997f1e..79ddb99c3daa1 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -241,6 +241,10 @@ func (e *echo) Graph(sess *provisionersdk.Session, req *proto.GraphRequest, canc sess.ProvisionLog(log.Level, log.Output) } if complete := response.GetGraph(); complete != nil { + if len(complete.AiTasks) > 0 { + // These two fields are linked; if there are AI tasks, indicate that. + complete.HasAiTasks = true + } return complete } } From 41f9dd504b9736e259482f42370f0c995524ac4d Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 10:31:14 -0600 Subject: [PATCH 16/56] test fixes --- provisioner/terraform/parse_test.go | 86 ++++++++++--- provisioner/terraform/provision_test.go | 156 ++++++++++++++---------- provisioner/terraform/timings_test.go | 5 +- provisionerd/runner/runner.go | 2 +- 4 files changed, 159 insertions(+), 90 deletions(-) diff --git a/provisioner/terraform/parse_test.go b/provisioner/terraform/parse_test.go index d2a505235f688..cc2f5346690d9 100644 --- a/provisioner/terraform/parse_test.go +++ b/provisioner/terraform/parse_test.go @@ -21,8 +21,9 @@ func TestParse(t *testing.T) { Name string Files map[string]string Response *proto.ParseComplete - // If ErrorContains is not empty, then the ParseComplete should have an Error containing the given string - ErrorContains string + // If ErrorContains is not empty, then the InitComplete should have an Error containing the given string + ErrorContains string + ParseErrorContains string }{ { Name: "single-variable", @@ -63,6 +64,7 @@ func TestParse(t *testing.T) { "main.tf": `variable "A" { validation { condition = var.A == "value" + error_message = "A must be 'value'" } }`, }, @@ -80,7 +82,7 @@ func TestParse(t *testing.T) { Files: map[string]string{ "main.tf": "a;sd;ajsd;lajsd;lasjdf;a", }, - ErrorContains: `The ";" character is not valid.`, + ErrorContains: `initialize terraform: exit status 1`, }, { Name: "multiple-variables", @@ -205,6 +207,15 @@ func TestParse(t *testing.T) { { Name: "workspace-tags", Files: map[string]string{ + `main.tf`: ` + terraform { + required_providers { + coder = { + source = "coder/coder" + } + } + } + `, "parameters.tf": `data "coder_parameter" "os_selector" { name = "os_selector" display_name = "Operating System" @@ -266,7 +277,13 @@ func TestParse(t *testing.T) { Name: "workspace-tags-in-a-single-file", Files: map[string]string{ "main.tf": ` - + terraform { + required_providers { + coder = { + source = "coder/coder" + } + } + } data "coder_parameter" "os_selector" { name = "os_selector" display_name = "Operating System" @@ -330,7 +347,13 @@ func TestParse(t *testing.T) { Name: "workspace-tags-duplicate-tag", Files: map[string]string{ "main.tf": ` - + terraform { + required_providers { + coder = { + source = "coder/coder" + } + } + } data "coder_workspace_tags" "custom_workspace_tags" { tags = { "cluster" = "developers" @@ -341,23 +364,30 @@ func TestParse(t *testing.T) { } `, }, - ErrorContains: `workspace tag "debug" is defined multiple times`, + ParseErrorContains: `workspace tag "debug" is defined multiple times`, }, { Name: "workspace-tags-wrong-tag-format", Files: map[string]string{ "main.tf": ` + terraform { + required_providers { + coder = { + source = "coder/coder" + } + } + } - data "coder_workspace_tags" "custom_workspace_tags" { - tags { - cluster = "developers" - debug = "yes" - cache = "no-cache" + data "coder_workspace_tags" "custom_workspace_tags" { + tags { + cluster = "developers" + debug = "yes" + cache = "no-cache" + } } - } `, }, - ErrorContains: `"tags" attribute is required by coder_workspace_tags`, + ParseErrorContains: `"tags" attribute is required by coder_workspace_tags`, }, { Name: "empty-main", @@ -379,27 +409,43 @@ func TestParse(t *testing.T) { t.Run(testCase.Name, func(t *testing.T) { t.Parallel() - session := configure(ctx, t, api, &proto.Config{ - TemplateSourceArchive: testutil.CreateTar(t, testCase.Files), - }) - - err := session.Send(&proto.Request{Type: &proto.Request_Parse{Parse: &proto.ParseRequest{}}}) + session := configure(ctx, t, api, &proto.Config{}) + err := sendInit(session, testutil.CreateTar(t, testCase.Files)) require.NoError(t, err) + // Init stage for { msg, err := session.Recv() require.NoError(t, err) + if msgLog, ok := msg.Type.(*proto.Response_Log); ok { + t.Logf("init log: %s", msgLog.Log.Output) + continue + } if testCase.ErrorContains != "" { - require.Contains(t, msg.GetParse().GetError(), testCase.ErrorContains) - break + require.Contains(t, msg.GetInit().GetError(), testCase.ErrorContains) + return // Stop test at this point } + break + } + + err = session.Send(&proto.Request{Type: &proto.Request_Parse{Parse: &proto.ParseRequest{}}}) + require.NoError(t, err) + + for { + msg, err := session.Recv() + require.NoError(t, err) // Ignore logs in this test if msg.GetLog() != nil { continue } + if testCase.ParseErrorContains != "" { + require.Contains(t, msg.GetParse().GetError(), testCase.ParseErrorContains) + return // Stop test at this point + } + // Ensure the want and got are equivalent! want, err := json.Marshal(testCase.Response) require.NoError(t, err) diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index 9a8a49c29b9ab..fbed7c1dd9d2b 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -81,6 +81,27 @@ func setupProvisioner(t *testing.T, opts *provisionerServeOptions) (context.Cont return ctx, api } +func initDo(t *testing.T, sess proto.DRPCProvisioner_SessionClient, archive []byte) *proto.InitComplete { + t.Helper() + err := sess.Send(&proto.Request{Type: &proto.Request_Init{Init: &proto.InitRequest{ + TemplateSourceArchive: archive, + OmitModuleFiles: false, + }, + }}) + require.NoError(t, err) + for { + msg, err := sess.Recv() + require.NoError(t, err) + if _, ok := msg.Type.(*proto.Response_Log); ok { + continue + } + + init := msg.GetInit() + require.NotNil(t, init) + return init + } +} + func configure(ctx context.Context, t *testing.T, client proto.DRPCProvisionerClient, config *proto.Config) proto.DRPCProvisioner_SessionClient { t.Helper() sess, err := client.Session(ctx) @@ -107,6 +128,12 @@ func readProvisionLog(t *testing.T, response proto.DRPCProvisioner_SessionClient return logBuf.String() } +func sendInit(sess proto.DRPCProvisioner_SessionClient, archive []byte) error { + return sess.Send(&proto.Request{Type: &proto.Request_Init{Init: &proto.InitRequest{ + TemplateSourceArchive: archive, + }}}) +} + func sendPlan(sess proto.DRPCProvisioner_SessionClient, transition proto.WorkspaceTransition) error { return sess.Send(&proto.Request{Type: &proto.Request_Plan{Plan: &proto.PlanRequest{ Metadata: &proto.Metadata{WorkspaceTransition: transition}, @@ -164,9 +191,8 @@ func TestProvision_Cancel(t *testing.T) { ctx, api := setupProvisioner(t, &provisionerServeOptions{ binaryPath: binPath, }) - sess := configure(ctx, t, api, &proto.Config{ - TemplateSourceArchive: testutil.CreateTar(t, nil), - }) + sess := configure(ctx, t, api, &proto.Config{}) + _ = initDo(t, sess, testutil.CreateTar(t, nil)) err = sendPlan(sess, proto.WorkspaceTransition_START) require.NoError(t, err) @@ -231,9 +257,8 @@ func TestProvision_CancelTimeout(t *testing.T) { exitTimeout: time.Second, }) - sess := configure(ctx, t, api, &proto.Config{ - TemplateSourceArchive: testutil.CreateTar(t, nil), - }) + sess := configure(ctx, t, api, &proto.Config{}) + _ = initDo(t, sess, testutil.CreateTar(t, nil)) // provisioner requires plan before apply, so test cancel with plan. err = sendPlan(sess, proto.WorkspaceTransition_START) @@ -316,9 +341,8 @@ func TestProvision_TextFileBusy(t *testing.T) { logger: &logger, }) - sess := configure(ctx, t, api, &proto.Config{ - TemplateSourceArchive: testutil.CreateTar(t, nil), - }) + sess := configure(ctx, t, api, &proto.Config{}) + _ = initDo(t, sess, testutil.CreateTar(t, nil)) err = sendPlan(sess, proto.WorkspaceTransition_START) require.NoError(t, err) @@ -347,7 +371,8 @@ func TestProvision(t *testing.T) { Metadata *proto.Metadata Request *proto.PlanRequest // Response may be nil to not check the response. - Response *proto.PlanComplete + Response *proto.GraphComplete + InitResponse *proto.InitComplete // If ErrorContains is not empty, PlanComplete should have an Error containing the given string ErrorContains string // If ExpectLogContains is not empty, then the logs should contain it. @@ -382,7 +407,7 @@ func TestProvision(t *testing.T) { Files: map[string]string{ "main.tf": `resource "null_resource" "A" {}`, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "A", Type: "null_resource", @@ -394,7 +419,7 @@ func TestProvision(t *testing.T) { Files: map[string]string{ "main.tf": `resource "null_resource" "A" {}`, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "A", Type: "null_resource", @@ -415,7 +440,7 @@ func TestProvision(t *testing.T) { } }`, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "A", Type: "null_resource", @@ -493,7 +518,7 @@ func TestProvision(t *testing.T) { }, }, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: "Example", @@ -571,7 +596,7 @@ func TestProvision(t *testing.T) { }, }, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Parameters: []*proto.RichParameter{ { Name: "Example", @@ -623,7 +648,7 @@ func TestProvision(t *testing.T) { AccessToken: "some-value", }}, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "null_resource", @@ -666,7 +691,7 @@ func TestProvision(t *testing.T) { WorkspaceOwnerSshPrivateKey: "fake private key", }, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "null_resource", @@ -709,7 +734,7 @@ func TestProvision(t *testing.T) { WorkspaceOwnerLoginType: "github", }, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "null_resource", @@ -738,16 +763,7 @@ func TestProvision(t *testing.T) { `, }, Request: &proto.PlanRequest{}, - Response: &proto.PlanComplete{ - Resources: []*proto.Resource{{ - Name: "example", - Type: "null_resource", - ModulePath: "module.hello", - }, { - Name: "inner_example", - Type: "null_resource", - ModulePath: "module.hello.module.there", - }}, + InitResponse: &proto.InitComplete{ Modules: []*proto.Module{{ Key: "hello", Version: "", @@ -758,6 +774,17 @@ func TestProvision(t *testing.T) { Source: "./inner_module", }}, }, + Response: &proto.GraphComplete{ + Resources: []*proto.Resource{{ + Name: "example", + Type: "null_resource", + ModulePath: "module.hello", + }, { + Name: "inner_example", + Type: "null_resource", + ModulePath: "module.hello.module.there", + }}, + }, }, { Name: "workspace-owner-rbac-roles", @@ -792,7 +819,7 @@ func TestProvision(t *testing.T) { WorkspaceOwnerRbacRoles: []*proto.Role{{Name: "member", OrgId: ""}}, }, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "null_resource", @@ -833,7 +860,7 @@ func TestProvision(t *testing.T) { PrebuiltWorkspaceBuildStage: proto.PrebuiltWorkspaceBuildStage_CREATE, }, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "null_resource", @@ -871,7 +898,7 @@ func TestProvision(t *testing.T) { PrebuiltWorkspaceBuildStage: proto.PrebuiltWorkspaceBuildStage_CLAIM, }, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "null_resource", @@ -910,7 +937,7 @@ func TestProvision(t *testing.T) { `, provider.TaskPromptParameterName), }, Request: &proto.PlanRequest{}, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{ { Name: "a", @@ -962,7 +989,7 @@ func TestProvision(t *testing.T) { } `, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "coder_external_agent", @@ -987,7 +1014,7 @@ func TestProvision(t *testing.T) { } `, }, - Response: &proto.PlanComplete{ + Response: &proto.GraphComplete{ Resources: []*proto.Resource{ { Name: "my-task", @@ -1043,9 +1070,8 @@ func TestProvision(t *testing.T) { ctx, api := setupProvisioner(t, &provisionerServeOptions{ cliConfigPath: cliConfigPath, }) - sess := configure(ctx, t, api, &proto.Config{ - TemplateSourceArchive: testutil.CreateTar(t, testCase.Files), - }) + sess := configure(ctx, t, api, &proto.Config{}) + initComplete := initDo(t, sess, testutil.CreateTar(t, testCase.Files)) planRequest := &proto.Request{Type: &proto.Request_Plan{Plan: &proto.PlanRequest{ Metadata: testCase.Metadata, @@ -1075,38 +1101,40 @@ func TestProvision(t *testing.T) { } resp := provision(planRequest) - planComplete := resp.GetPlan() - require.NotNil(t, planComplete) + graphComplete := resp.GetGraph() + require.NotNil(t, graphComplete) if testCase.ErrorContains != "" { - require.Contains(t, planComplete.GetError(), testCase.ErrorContains) + require.Contains(t, graphComplete.GetError(), testCase.ErrorContains) } if testCase.Response != nil { - require.Equal(t, testCase.Response.Error, planComplete.Error) + require.Equal(t, testCase.Response.Error, graphComplete.Error) // Remove randomly generated data and sort by name. - normalizeResources(planComplete.Resources) - resourcesGot, err := json.Marshal(planComplete.Resources) + normalizeResources(graphComplete.Resources) + resourcesGot, err := json.Marshal(graphComplete.Resources) require.NoError(t, err) resourcesWant, err := json.Marshal(testCase.Response.Resources) require.NoError(t, err) require.Equal(t, string(resourcesWant), string(resourcesGot)) - parametersGot, err := json.Marshal(planComplete.Parameters) + parametersGot, err := json.Marshal(graphComplete.Parameters) require.NoError(t, err) parametersWant, err := json.Marshal(testCase.Response.Parameters) require.NoError(t, err) require.Equal(t, string(parametersWant), string(parametersGot)) - modulesGot, err := json.Marshal(planComplete.Modules) - require.NoError(t, err) - modulesWant, err := json.Marshal(testCase.Response.Modules) + modulesGot, err := json.Marshal(initComplete.Modules) require.NoError(t, err) - require.Equal(t, string(modulesWant), string(modulesGot)) + if testCase.InitResponse != nil { + modulesWant, err := json.Marshal(testCase.InitResponse.Modules) + require.NoError(t, err) + require.Equal(t, string(modulesWant), string(modulesGot)) + } - require.Equal(t, planComplete.HasAiTasks, testCase.Response.HasAiTasks) - require.Equal(t, planComplete.HasExternalAgents, testCase.Response.HasExternalAgents) + require.Equal(t, graphComplete.HasAiTasks, testCase.Response.HasAiTasks) + require.Equal(t, graphComplete.HasExternalAgents, testCase.Response.HasExternalAgents) } if testCase.Apply { @@ -1117,8 +1145,8 @@ func TestProvision(t *testing.T) { require.NotNil(t, applyComplete) if testCase.Response != nil { - normalizeResources(applyComplete.Resources) - resourcesGot, err := json.Marshal(applyComplete.Resources) + normalizeResources(graphComplete.Resources) + resourcesGot, err := json.Marshal(graphComplete.Resources) require.NoError(t, err) resourcesWant, err := json.Marshal(testCase.Response.Resources) require.NoError(t, err) @@ -1160,9 +1188,8 @@ func TestProvision_ExtraEnv(t *testing.T) { t.Setenv("TF_SUPERSECRET", secretValue) ctx, api := setupProvisioner(t, nil) - sess := configure(ctx, t, api, &proto.Config{ - TemplateSourceArchive: testutil.CreateTar(t, map[string]string{"main.tf": `resource "null_resource" "A" {}`}), - }) + sess := configure(ctx, t, api, &proto.Config{}) + _ = initDo(t, sess, testutil.CreateTar(t, map[string]string{"main.tf": `resource "null_resource" "A" {}`})) err := sendPlan(sess, proto.WorkspaceTransition_START) require.NoError(t, err) @@ -1210,9 +1237,8 @@ func TestProvision_SafeEnv(t *testing.T) { ` ctx, api := setupProvisioner(t, nil) - sess := configure(ctx, t, api, &proto.Config{ - TemplateSourceArchive: testutil.CreateTar(t, map[string]string{"main.tf": echoResource}), - }) + sess := configure(ctx, t, api, &proto.Config{}) + _ = initDo(t, sess, testutil.CreateTar(t, map[string]string{"main.tf": echoResource})) err := sendPlan(sess, proto.WorkspaceTransition_START) require.NoError(t, err) @@ -1232,15 +1258,13 @@ func TestProvision_MalformedModules(t *testing.T) { t.Parallel() ctx, api := setupProvisioner(t, nil) - sess := configure(ctx, t, api, &proto.Config{ - TemplateSourceArchive: testutil.CreateTar(t, map[string]string{ - "main.tf": `module "hello" { source = "./module" }`, - "module/module.tf": `resource "null_`, - }), - }) - - err := sendPlan(sess, proto.WorkspaceTransition_START) + sess := configure(ctx, t, api, &proto.Config{}) + err := sendInit(sess, testutil.CreateTar(t, map[string]string{ + "main.tf": `module "hello" { source = "./module" }`, + "module/module.tf": `resource "null_`, + })) require.NoError(t, err) + log := readProvisionLog(t, sess) require.Contains(t, log, "Invalid block definition") } diff --git a/provisioner/terraform/timings_test.go b/provisioner/terraform/timings_test.go index 7a9ac84220a51..b90ce63a86f89 100644 --- a/provisioner/terraform/timings_test.go +++ b/provisioner/terraform/timings_test.go @@ -35,9 +35,8 @@ func TestTimingsFromProvision(t *testing.T) { ctx, api := setupProvisioner(t, &provisionerServeOptions{ binaryPath: fakeBin, }) - sess := configure(ctx, t, api, &proto.Config{ - TemplateSourceArchive: testutil.CreateTar(t, nil), - }) + sess := configure(ctx, t, api, &proto.Config{}) + _ = initDo(t, sess, testutil.CreateTar(t, nil)) ctx, cancel := context.WithTimeout(ctx, testutil.WaitLong) t.Cleanup(cancel) diff --git a/provisionerd/runner/runner.go b/provisionerd/runner/runner.go index 9a4e8dbc06f34..1cd11d1585b7a 100644 --- a/provisionerd/runner/runner.go +++ b/provisionerd/runner/runner.go @@ -768,7 +768,7 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters( Plan: planComplete.Plan, DailyCost: planComplete.DailyCost, HasAITasks: graphComplete.HasAiTasks, - HasExternalAgents: graphComplete.GetHasAiTasks(), + HasExternalAgents: graphComplete.HasExternalAgents, }, nil } From 4373086b6dc2215488f76d36f587e014e9277b13 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 10:33:53 -0600 Subject: [PATCH 17/56] make fmt --- provisioner/terraform/provision_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index fbed7c1dd9d2b..fff8fd80f79a3 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -83,10 +83,11 @@ func setupProvisioner(t *testing.T, opts *provisionerServeOptions) (context.Cont func initDo(t *testing.T, sess proto.DRPCProvisioner_SessionClient, archive []byte) *proto.InitComplete { t.Helper() - err := sess.Send(&proto.Request{Type: &proto.Request_Init{Init: &proto.InitRequest{ - TemplateSourceArchive: archive, - OmitModuleFiles: false, - }, + err := sess.Send(&proto.Request{Type: &proto.Request_Init{ + Init: &proto.InitRequest{ + TemplateSourceArchive: archive, + OmitModuleFiles: false, + }, }}) require.NoError(t, err) for { From 8ef0f894eb2842390c1c85a388ccd777e8e98a1a Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 11:04:44 -0600 Subject: [PATCH 18/56] provisioner test fixes --- provisionerd/provisionerd_test.go | 132 ++++++++++++++++++++++++++---- provisionerd/runner/graph.go | 17 ++++ provisionerd/runner/init.go | 17 ++++ provisionerd/runner/plan.go | 17 ++++ 4 files changed, 165 insertions(+), 18 deletions(-) diff --git a/provisionerd/provisionerd_test.go b/provisionerd/provisionerd_test.go index fc4d069a88597..e3204c01c81c2 100644 --- a/provisionerd/provisionerd_test.go +++ b/provisionerd/provisionerd_test.go @@ -11,6 +11,7 @@ import ( "time" "github.com/hashicorp/yamux" + "github.com/spf13/afero" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/atomic" @@ -131,6 +132,16 @@ func TestProvisionerd(t *testing.T) { } return c }, + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + closerMutex.Lock() + defer closerMutex.Unlock() + err := closer.Close() + c := &sdkproto.InitComplete{} + if err != nil { + c.Error = err.Error() + } + return c + }, }), }) closerMutex.Unlock() @@ -173,7 +184,17 @@ func TestProvisionerd(t *testing.T) { }, }), nil }, provisionerd.LocalProvisioners{ - "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{}), + "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + // TODO: This comes from ExtractArchive which is moved to the `init` step. + if !filepath.IsLocal("../../../etc/passwd") { + return &sdkproto.InitComplete{ + Error: "refusing to extract to non-local path", + } + } + return &sdkproto.InitComplete{} + }, + }), }) require.Condition(t, closedWithin(completeChan, testutil.WaitMedium)) require.NoError(t, closer.Close()) @@ -227,14 +248,16 @@ func TestProvisionerd(t *testing.T) { Readme: make([]byte, largeSize), } }, + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, plan: func( _ *provisionersdk.Session, _ *sdkproto.PlanRequest, _ <-chan struct{}, ) *sdkproto.PlanComplete { return &sdkproto.PlanComplete{ - Resources: []*sdkproto.Resource{}, - Plan: make([]byte, largeSize), + Plan: make([]byte, largeSize), } }, apply: func( @@ -246,6 +269,11 @@ func TestProvisionerd(t *testing.T) { State: make([]byte, largeSize), } }, + graph: func(s *provisionersdk.Session, r *sdkproto.GraphRequest, canceledOrComplete <-chan struct{}) *sdkproto.GraphComplete { + return &sdkproto.GraphComplete{ + Resources: []*sdkproto.Resource{}, + } + }, }), }) require.Condition(t, closedWithin(completeChan, testutil.WaitShort)) @@ -299,6 +327,9 @@ func TestProvisionerd(t *testing.T) { <-cancelOrComplete return &sdkproto.ParseComplete{} }, + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, }), }) require.Condition(t, closedWithin(completeChan, testutil.WaitShort)) @@ -349,6 +380,7 @@ func TestProvisionerd(t *testing.T) { }), nil }, provisionerd.LocalProvisioners{ "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: extractInit(t), parse: func( s *provisionersdk.Session, _ *sdkproto.ParseRequest, @@ -366,9 +398,7 @@ func TestProvisionerd(t *testing.T) { cancelOrComplete <-chan struct{}, ) *sdkproto.PlanComplete { s.ProvisionLog(sdkproto.LogLevel_INFO, "hello") - return &sdkproto.PlanComplete{ - Resources: []*sdkproto.Resource{}, - } + return &sdkproto.PlanComplete{} }, apply: func( _ *provisionersdk.Session, @@ -378,6 +408,11 @@ func TestProvisionerd(t *testing.T) { t.Error("dry run should not apply") return &sdkproto.ApplyComplete{} }, + graph: func(s *provisionersdk.Session, r *sdkproto.GraphRequest, canceledOrComplete <-chan struct{}) *sdkproto.GraphComplete { + return &sdkproto.GraphComplete{ + Resources: []*sdkproto.Resource{}, + } + }, }), }) @@ -433,14 +468,15 @@ func TestProvisionerd(t *testing.T) { }), nil }, provisionerd.LocalProvisioners{ "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, plan: func( _ *provisionersdk.Session, _ *sdkproto.PlanRequest, _ <-chan struct{}, ) *sdkproto.PlanComplete { - return &sdkproto.PlanComplete{ - Resources: []*sdkproto.Resource{}, - } + return &sdkproto.PlanComplete{} }, apply: func( _ *provisionersdk.Session, @@ -450,6 +486,11 @@ func TestProvisionerd(t *testing.T) { t.Error("dry run should not apply") return &sdkproto.ApplyComplete{} }, + graph: func(s *provisionersdk.Session, r *sdkproto.GraphRequest, canceledOrComplete <-chan struct{}) *sdkproto.GraphComplete { + return &sdkproto.GraphComplete{ + Resources: []*sdkproto.Resource{}, + } + }, }), }) @@ -498,6 +539,9 @@ func TestProvisionerd(t *testing.T) { }), nil }, provisionerd.LocalProvisioners{ "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, plan: func( s *provisionersdk.Session, _ *sdkproto.PlanRequest, @@ -513,6 +557,9 @@ func TestProvisionerd(t *testing.T) { ) *sdkproto.ApplyComplete { return &sdkproto.ApplyComplete{} }, + graph: func(s *provisionersdk.Session, r *sdkproto.GraphRequest, canceledOrComplete <-chan struct{}) *sdkproto.GraphComplete { + return &sdkproto.GraphComplete{} + }, }), }) require.Condition(t, closedWithin(acq.complete, testutil.WaitShort)) @@ -570,6 +617,9 @@ func TestProvisionerd(t *testing.T) { }), nil }, provisionerd.LocalProvisioners{ "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, plan: func( s *provisionersdk.Session, _ *sdkproto.PlanRequest, @@ -577,14 +627,7 @@ func TestProvisionerd(t *testing.T) { ) *sdkproto.PlanComplete { s.ProvisionLog(sdkproto.LogLevel_DEBUG, "wow") return &sdkproto.PlanComplete{ - Resources: []*sdkproto.Resource{ - { - DailyCost: 10, - }, - { - DailyCost: 15, - }, - }, + DailyCost: 25, } }, apply: func( @@ -593,7 +636,10 @@ func TestProvisionerd(t *testing.T) { _ <-chan struct{}, ) *sdkproto.ApplyComplete { t.Error("should not apply when resources exceed quota") - return &sdkproto.ApplyComplete{ + return &sdkproto.ApplyComplete{} + }, + graph: func(s *provisionersdk.Session, r *sdkproto.GraphRequest, canceledOrComplete <-chan struct{}) *sdkproto.GraphComplete { + return &sdkproto.GraphComplete{ Resources: []*sdkproto.Resource{ { DailyCost: 10, @@ -646,6 +692,12 @@ func TestProvisionerd(t *testing.T) { }), nil }, provisionerd.LocalProvisioners{ "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, + graph: func(s *provisionersdk.Session, r *sdkproto.GraphRequest, canceledOrComplete <-chan struct{}) *sdkproto.GraphComplete { + return &sdkproto.GraphComplete{} + }, plan: func( s *provisionersdk.Session, _ *sdkproto.PlanRequest, @@ -756,6 +808,9 @@ func TestProvisionerd(t *testing.T) { }), nil }, provisionerd.LocalProvisioners{ "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, plan: func( s *provisionersdk.Session, _ *sdkproto.PlanRequest, @@ -844,6 +899,9 @@ func TestProvisionerd(t *testing.T) { }), nil }, provisionerd.LocalProvisioners{ "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, plan: func( s *provisionersdk.Session, _ *sdkproto.PlanRequest, @@ -938,6 +996,9 @@ func TestProvisionerd(t *testing.T) { return client, nil }, provisionerd.LocalProvisioners{ "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, plan: func( _ *provisionersdk.Session, _ *sdkproto.PlanRequest, @@ -1031,6 +1092,9 @@ func TestProvisionerd(t *testing.T) { return client, nil }, provisionerd.LocalProvisioners{ "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, plan: func( _ *provisionersdk.Session, _ *sdkproto.PlanRequest, @@ -1045,6 +1109,9 @@ func TestProvisionerd(t *testing.T) { ) *sdkproto.ApplyComplete { return &sdkproto.ApplyComplete{} }, + graph: func(s *provisionersdk.Session, r *sdkproto.GraphRequest, canceledOrComplete <-chan struct{}) *sdkproto.GraphComplete { + return &sdkproto.GraphComplete{} + }, }), }) require.Condition(t, closedWithin(completeChan, testutil.WaitShort)) @@ -1125,6 +1192,12 @@ func TestProvisionerd(t *testing.T) { }), nil }, provisionerd.LocalProvisioners{ "someprovisioner": createProvisionerClient(t, done, provisionerTestServer{ + init: func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return &sdkproto.InitComplete{} + }, + graph: func(s *provisionersdk.Session, r *sdkproto.GraphRequest, canceledOrComplete <-chan struct{}) *sdkproto.GraphComplete { + return &sdkproto.GraphComplete{} + }, plan: func( s *provisionersdk.Session, _ *sdkproto.PlanRequest, @@ -1253,9 +1326,15 @@ func createProvisionerClient(t *testing.T, done <-chan struct{}, server provisio } type provisionerTestServer struct { + init func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete parse func(s *provisionersdk.Session, r *sdkproto.ParseRequest, canceledOrComplete <-chan struct{}) *sdkproto.ParseComplete plan func(s *provisionersdk.Session, r *sdkproto.PlanRequest, canceledOrComplete <-chan struct{}) *sdkproto.PlanComplete apply func(s *provisionersdk.Session, r *sdkproto.ApplyRequest, canceledOrComplete <-chan struct{}) *sdkproto.ApplyComplete + graph func(s *provisionersdk.Session, r *sdkproto.GraphRequest, canceledOrComplete <-chan struct{}) *sdkproto.GraphComplete +} + +func (p *provisionerTestServer) Init(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + return p.init(s, r, canceledOrComplete) } func (p *provisionerTestServer) Parse(s *provisionersdk.Session, r *sdkproto.ParseRequest, canceledOrComplete <-chan struct{}) *sdkproto.ParseComplete { @@ -1270,6 +1349,10 @@ func (p *provisionerTestServer) Apply(s *provisionersdk.Session, r *sdkproto.App return p.apply(s, r, canceledOrComplete) } +func (p *provisionerTestServer) Graph(s *provisionersdk.Session, r *sdkproto.GraphRequest, canceledOrComplete <-chan struct{}) *sdkproto.GraphComplete { + return p.graph(s, r, canceledOrComplete) +} + func (p *provisionerDaemonTestServer) UploadFile(stream proto.DRPCProvisionerDaemon_UploadFileStream) error { return p.uploadFile(stream) } @@ -1359,3 +1442,16 @@ func (a *acquireOne) acquireWithCancel(stream proto.DRPCProvisionerDaemon_Acquir } return nil } + +func extractInit(t *testing.T) func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + logger := slogtest.Make(t, nil) + return func(s *provisionersdk.Session, r *sdkproto.InitRequest, canceledOrComplete <-chan struct{}) *sdkproto.InitComplete { + err := s.Files.ExtractArchive(s.Context(), logger, afero.NewOsFs(), r.TemplateSourceArchive) + if err != nil { + return &sdkproto.InitComplete{ + Error: fmt.Sprintf("failed to extract template source archive: %v", err), + } + } + return &sdkproto.InitComplete{} + } +} diff --git a/provisionerd/runner/graph.go b/provisionerd/runner/graph.go index eca5050b8d1e8..53461f35f72c7 100644 --- a/provisionerd/runner/graph.go +++ b/provisionerd/runner/graph.go @@ -19,6 +19,23 @@ func (r *Runner) graph(ctx context.Context, req *sdkproto.GraphRequest) (*sdkpro return nil, r.failedJobf("send graph request: %v", err) } + nevermind := make(chan struct{}) + defer close(nevermind) + go func() { + select { + case <-nevermind: + return + case <-r.notStopped.Done(): + return + case <-r.notCanceled.Done(): + _ = r.session.Send(&sdkproto.Request{ + Type: &sdkproto.Request_Cancel{ + Cancel: &sdkproto.CancelRequest{}, + }, + }) + } + }() + for { msg, err := r.session.Recv() if err != nil { diff --git a/provisionerd/runner/init.go b/provisionerd/runner/init.go index 1e50140952858..a9420f846087d 100644 --- a/provisionerd/runner/init.go +++ b/provisionerd/runner/init.go @@ -23,6 +23,23 @@ func (r *Runner) init(ctx context.Context, omitModules bool, templateArchive []b return nil, r.failedJobf("send init request: %v", err) } + nevermind := make(chan struct{}) + defer close(nevermind) + go func() { + select { + case <-nevermind: + return + case <-r.notStopped.Done(): + return + case <-r.notCanceled.Done(): + _ = r.session.Send(&sdkproto.Request{ + Type: &sdkproto.Request_Cancel{ + Cancel: &sdkproto.CancelRequest{}, + }, + }) + } + }() + var moduleFilesUpload *sdkproto.DataBuilder for { msg, err := r.session.Recv() diff --git a/provisionerd/runner/plan.go b/provisionerd/runner/plan.go index 1fbba0eecc126..b623cc5209573 100644 --- a/provisionerd/runner/plan.go +++ b/provisionerd/runner/plan.go @@ -19,6 +19,23 @@ func (r *Runner) plan(ctx context.Context, stage string, req *sdkproto.PlanReque return nil, r.failedJobf("send plan request: %v", err) } + nevermind := make(chan struct{}) + defer close(nevermind) + go func() { + select { + case <-nevermind: + return + case <-r.notStopped.Done(): + return + case <-r.notCanceled.Done(): + _ = r.session.Send(&sdkproto.Request{ + Type: &sdkproto.Request_Cancel{ + Cancel: &sdkproto.CancelRequest{}, + }, + }) + } + }() + for { msg, err := r.session.Recv() if err != nil { From 346183ae4239e4598c826479749db257cd3e298e Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 11:58:49 -0600 Subject: [PATCH 19/56] scaletest fixes --- .../prometheusmetrics_test.go | 6 +- .../provisionerd/remoteprovisioners_test.go | 6 +- provisionerd/runner/init.go | 6 +- scaletest/agentconn/run_test.go | 6 +- scaletest/autostart/run_test.go | 6 +- scaletest/createworkspaces/run_test.go | 86 +++++++++---------- scaletest/reconnectingpty/run_test.go | 6 +- scaletest/workspacebuild/run_test.go | 15 +++- scaletest/workspacetraffic/run_test.go | 12 +-- scaletest/workspaceupdates/run_test.go | 6 +- 10 files changed, 83 insertions(+), 72 deletions(-) diff --git a/coderd/prometheusmetrics/prometheusmetrics_test.go b/coderd/prometheusmetrics/prometheusmetrics_test.go index e75f86e51b55c..febfff9f2e433 100644 --- a/coderd/prometheusmetrics/prometheusmetrics_test.go +++ b/coderd/prometheusmetrics/prometheusmetrics_test.go @@ -536,9 +536,9 @@ func TestAgents(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", diff --git a/enterprise/provisionerd/remoteprovisioners_test.go b/enterprise/provisionerd/remoteprovisioners_test.go index 7b89d696ee20e..ea4ad11eb1fd5 100644 --- a/enterprise/provisionerd/remoteprovisioners_test.go +++ b/enterprise/provisionerd/remoteprovisioners_test.go @@ -74,10 +74,14 @@ func TestRemoteConnector_Mainline(t *testing.T) { c := resp.Client s, err := c.Session(ctx) require.NoError(t, err) - err = s.Send(&sdkproto.Request{Type: &sdkproto.Request_Config{Config: &sdkproto.Config{ + err = s.Send(&sdkproto.Request{Type: &sdkproto.Request_Config{Config: &sdkproto.Config{}}}) + require.NoError(t, err) + err = s.Send(&sdkproto.Request{Type: &sdkproto.Request_Init{Init: &sdkproto.InitRequest{ TemplateSourceArchive: arc, }}}) require.NoError(t, err) + _, err = s.Recv() + require.NoError(t, err) err = s.Send(&sdkproto.Request{Type: &sdkproto.Request_Parse{Parse: &sdkproto.ParseRequest{}}}) require.NoError(t, err) r, err := s.Recv() diff --git a/provisionerd/runner/init.go b/provisionerd/runner/init.go index a9420f846087d..bdf20da9496db 100644 --- a/provisionerd/runner/init.go +++ b/provisionerd/runner/init.go @@ -75,7 +75,7 @@ func (r *Runner) init(ctx context.Context, omitModules bool, templateArchive []b moduleFilesUpload, err = sdkproto.NewDataBuilder(c) if err != nil { - return nil, r.failedJobf("create data builder: %w", err) + return nil, r.failedJobf("create data builder: %s", err.Error()) } case *sdkproto.Response_ChunkPiece: if omitModules { @@ -88,14 +88,14 @@ func (r *Runner) init(ctx context.Context, omitModules bool, templateArchive []b _, err := moduleFilesUpload.Add(c) if err != nil { - return nil, r.failedJobf("module files, add chunk piece: %w", err) + return nil, r.failedJobf("module files, add chunk piece: %s", err.Error()) } case *sdkproto.Response_Init: if moduleFilesUpload != nil { // If files were uploaded in multiple chunks, put them back together. moduleFilesData, err := moduleFilesUpload.Complete() if err != nil { - return nil, r.failedJobf("complete module files data upload: %w", err) + return nil, r.failedJobf("complete module files data upload: %s", err.Error()) } if !bytes.Equal(msgType.Init.ModuleFilesHash, moduleFilesUpload.Hash) { diff --git a/scaletest/agentconn/run_test.go b/scaletest/agentconn/run_test.go index 2b05c0c302b00..ee856f736e4a4 100644 --- a/scaletest/agentconn/run_test.go +++ b/scaletest/agentconn/run_test.go @@ -230,9 +230,9 @@ func setupRunnerTest(t *testing.T) (client *codersdk.Client, agentID uuid.UUID) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", diff --git a/scaletest/autostart/run_test.go b/scaletest/autostart/run_test.go index dc0fb9fea018e..6fb23b47c9a7f 100644 --- a/scaletest/autostart/run_test.go +++ b/scaletest/autostart/run_test.go @@ -43,10 +43,10 @@ func TestRun(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Name: "example", diff --git a/scaletest/createworkspaces/run_test.go b/scaletest/createworkspaces/run_test.go index 950ca7a7ea631..1fbcb0cb97cac 100644 --- a/scaletest/createworkspaces/run_test.go +++ b/scaletest/createworkspaces/run_test.go @@ -60,27 +60,11 @@ func Test_Runner(t *testing.T) { authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: testParameters, - }, - }, - }, - }, - ProvisionApply: []*proto.Response{ - { - Type: &proto.Response_Log{ - Log: &proto.Log{ - Level: proto.LogLevel_INFO, - Output: "hello from logs", - }, - }, - }, - { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ Resources: []*proto.Resource{ { Name: "example", @@ -101,6 +85,21 @@ func Test_Runner(t *testing.T) { }, }, }, + ProvisionApply: []*proto.Response{ + { + Type: &proto.Response_Log{ + Log: &proto.Log{ + Level: proto.LogLevel_INFO, + Output: "hello from logs", + }, + }, + }, + { + Type: &proto.Response_Apply{ + Apply: &proto.ApplyComplete{}, + }, + }, + }, }) version = coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -209,10 +208,10 @@ func Test_Runner(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: testParameters, }, }, @@ -341,27 +340,11 @@ func Test_Runner(t *testing.T) { authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: testParameters, - }, - }, - }, - }, - ProvisionApply: []*proto.Response{ - { - Type: &proto.Response_Log{ - Log: &proto.Log{ - Level: proto.LogLevel_INFO, - Output: "hello from logs", - }, - }, - }, - { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ Resources: []*proto.Resource{ { Name: "example", @@ -382,6 +365,21 @@ func Test_Runner(t *testing.T) { }, }, }, + ProvisionApply: []*proto.Response{ + { + Type: &proto.Response_Log{ + Log: &proto.Log{ + Level: proto.LogLevel_INFO, + Output: "hello from logs", + }, + }, + }, + { + Type: &proto.Response_Apply{ + Apply: &proto.ApplyComplete{}, + }, + }, + }, }) version = coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -484,10 +482,10 @@ func Test_Runner(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Parameters: testParameters, }, }, diff --git a/scaletest/reconnectingpty/run_test.go b/scaletest/reconnectingpty/run_test.go index 84e2b0abf828f..d10682ac7c366 100644 --- a/scaletest/reconnectingpty/run_test.go +++ b/scaletest/reconnectingpty/run_test.go @@ -257,9 +257,9 @@ func setupRunnerTest(t *testing.T) (client *codersdk.Client, agentID uuid.UUID) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", diff --git a/scaletest/workspacebuild/run_test.go b/scaletest/workspacebuild/run_test.go index 13b3e9b3eec78..6a42d2fef0c56 100644 --- a/scaletest/workspacebuild/run_test.go +++ b/scaletest/workspacebuild/run_test.go @@ -58,7 +58,14 @@ func Test_Runner(t *testing.T) { }, { Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Apply: &proto.ApplyComplete{}, + }, + }, + }, + ProvisionGraph: []*proto.Response{ + { + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Name: "example1", @@ -245,8 +252,10 @@ func Test_Runner(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ - Parse: echo.ParseComplete, - ProvisionPlan: echo.PlanComplete, + Parse: echo.ParseComplete, + ProvisionPlan: echo.PlanComplete, + ProvisionInit: echo.InitComplete, + ProvisionGraph: echo.GraphComplete, ProvisionApply: []*proto.Response{ { Type: &proto.Response_Apply{ diff --git a/scaletest/workspacetraffic/run_test.go b/scaletest/workspacetraffic/run_test.go index dd84747886456..beda847762ea9 100644 --- a/scaletest/workspacetraffic/run_test.go +++ b/scaletest/workspacetraffic/run_test.go @@ -49,9 +49,9 @@ func TestRun(t *testing.T) { version = coderdtest.CreateTemplateVersion(t, client, firstUser.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", @@ -168,9 +168,9 @@ func TestRun(t *testing.T) { version = coderdtest.CreateTemplateVersion(t, client, firstUser.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", diff --git a/scaletest/workspaceupdates/run_test.go b/scaletest/workspaceupdates/run_test.go index b31a6050dbbad..e2146fd65836c 100644 --- a/scaletest/workspaceupdates/run_test.go +++ b/scaletest/workspaceupdates/run_test.go @@ -39,10 +39,10 @@ func TestRun(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{ { Name: "example", From c8c6e3d7a85c142c4e1aed8deeb1448460fa95fd Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 12:03:43 -0600 Subject: [PATCH 20/56] test fixes --- coderd/workspaceapps/apptest/setup.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coderd/workspaceapps/apptest/setup.go b/coderd/workspaceapps/apptest/setup.go index 65eebf8ecada5..0cd09f6c333a8 100644 --- a/coderd/workspaceapps/apptest/setup.go +++ b/coderd/workspaceapps/apptest/setup.go @@ -463,9 +463,9 @@ func createWorkspaceWithApps(t *testing.T, client *codersdk.Client, orgID uuid.U version := coderdtest.CreateTemplateVersion(t, client, orgID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: []*proto.Response{{ - Type: &proto.Response_Apply{ - Apply: &proto.ApplyComplete{ + ProvisionGraph: []*proto.Response{{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Resources: []*proto.Resource{{ Name: "example", Type: "aws_instance", From 7bf97073b4f5adfcd949825608036fcabe6df98a Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 12:26:12 -0600 Subject: [PATCH 21/56] provisioner test fixes --- provisioner/terraform/provision.go | 2 + provisioner/terraform/provision_test.go | 73 ++++++++++++++++--------- 2 files changed, 49 insertions(+), 26 deletions(-) diff --git a/provisioner/terraform/provision.go b/provisioner/terraform/provision.go index 85c91d0b69d08..6b3c2c8dfd3b4 100644 --- a/provisioner/terraform/provision.go +++ b/provisioner/terraform/provision.go @@ -257,7 +257,9 @@ func (s *server) Graph( Parameters: state.Parameters, ExternalAuthProviders: state.ExternalAuthProviders, Presets: state.Presets, + HasAiTasks: state.HasAITasks, AiTasks: state.AITasks, + HasExternalAgents: state.HasExternalAgents, } } diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index fff8fd80f79a3..9aad9d71781a4 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -81,7 +81,7 @@ func setupProvisioner(t *testing.T, opts *provisionerServeOptions) (context.Cont return ctx, api } -func initDo(t *testing.T, sess proto.DRPCProvisioner_SessionClient, archive []byte) *proto.InitComplete { +func initDo(t *testing.T, sess proto.DRPCProvisioner_SessionClient, archive []byte, onLog ...func(log string)) *proto.InitComplete { t.Helper() err := sess.Send(&proto.Request{Type: &proto.Request_Init{ Init: &proto.InitRequest{ @@ -93,7 +93,10 @@ func initDo(t *testing.T, sess proto.DRPCProvisioner_SessionClient, archive []by for { msg, err := sess.Recv() require.NoError(t, err) - if _, ok := msg.Type.(*proto.Response_Log); ok { + if logMsg, ok := msg.Type.(*proto.Response_Log); ok { + for _, do := range onLog { + do(logMsg.Log.Output) + } continue } @@ -372,12 +375,14 @@ func TestProvision(t *testing.T) { Metadata *proto.Metadata Request *proto.PlanRequest // Response may be nil to not check the response. - Response *proto.GraphComplete - InitResponse *proto.InitComplete + Response *proto.GraphComplete + InitResponse *proto.InitComplete + InitErrorContains string + InitExpectLogContains string // If ErrorContains is not empty, PlanComplete should have an Error containing the given string - ErrorContains string - // If ExpectLogContains is not empty, then the logs should contain it. - ExpectLogContains string + PlanErrorContains string + // If PlanExpectLogContains is not empty, then the logs should contain it. + PlanExpectLogContains string // If Apply is true, then send an Apply request and check we get the same Resources as in Response. Apply bool // Some tests may need to be skipped until the relevant provider version is released. @@ -391,8 +396,8 @@ func TestProvision(t *testing.T) { "main.tf": `variable "A" { }`, }, - ErrorContains: "terraform plan:", - ExpectLogContains: "No value for required variable", + PlanErrorContains: "terraform plan:", + PlanExpectLogContains: "No value for required variable", }, { Name: "missing-variable-dry-run", @@ -400,8 +405,8 @@ func TestProvision(t *testing.T) { "main.tf": `variable "A" { }`, }, - ErrorContains: "terraform plan:", - ExpectLogContains: "No value for required variable", + PlanErrorContains: "terraform plan:", + PlanExpectLogContains: "No value for required variable", }, { Name: "single-resource-dry-run", @@ -454,18 +459,18 @@ func TestProvision(t *testing.T) { Files: map[string]string{ "main.tf": `a`, }, - ErrorContains: "initialize terraform", - ExpectLogContains: "Argument or block definition required", - SkipCacheProviders: true, + InitErrorContains: "initialize terraform", + InitExpectLogContains: "Argument or block definition required", + SkipCacheProviders: true, }, { Name: "bad-syntax-2", Files: map[string]string{ "main.tf": `;asdf;`, }, - ErrorContains: "initialize terraform", - ExpectLogContains: `The ";" character is not valid.`, - SkipCacheProviders: true, + InitErrorContains: "initialize terraform", + InitExpectLogContains: `The ";" character is not valid.`, + SkipCacheProviders: true, }, { Name: "destroy-no-state", @@ -475,7 +480,7 @@ func TestProvision(t *testing.T) { Metadata: &proto.Metadata{ WorkspaceTransition: proto.WorkspaceTransition_DESTROY, }, - ExpectLogContains: "nothing to do", + PlanExpectLogContains: "nothing to do", }, { Name: "rich-parameter-with-value", @@ -1072,7 +1077,17 @@ func TestProvision(t *testing.T) { cliConfigPath: cliConfigPath, }) sess := configure(ctx, t, api, &proto.Config{}) - initComplete := initDo(t, sess, testutil.CreateTar(t, testCase.Files)) + initLogGot := testCase.InitExpectLogContains == "" + initComplete := initDo(t, sess, testutil.CreateTar(t, testCase.Files), func(log string) { + if strings.Contains(log, testCase.InitExpectLogContains) { + initLogGot = true + } + }) + require.Truef(t, initLogGot, "did not get expected init log substring %q", testCase.InitExpectLogContains) + if testCase.InitErrorContains != "" { + require.Contains(t, initComplete.Error, testCase.InitErrorContains) + return + } planRequest := &proto.Request{Type: &proto.Request_Plan{Plan: &proto.PlanRequest{ Metadata: testCase.Metadata, @@ -1081,7 +1096,7 @@ func TestProvision(t *testing.T) { planRequest = &proto.Request{Type: &proto.Request_Plan{Plan: testCase.Request}} } - gotExpectedLog := testCase.ExpectLogContains == "" + gotExpectedLog := testCase.PlanExpectLogContains == "" provision := func(req *proto.Request) *proto.Response { err := sess.Send(req) @@ -1090,7 +1105,7 @@ func TestProvision(t *testing.T) { msg, err := sess.Recv() require.NoError(t, err) if msg.GetLog() != nil { - if testCase.ExpectLogContains != "" && strings.Contains(msg.GetLog().Output, testCase.ExpectLogContains) { + if testCase.PlanExpectLogContains != "" && strings.Contains(msg.GetLog().Output, testCase.PlanExpectLogContains) { gotExpectedLog = true } @@ -1102,13 +1117,19 @@ func TestProvision(t *testing.T) { } resp := provision(planRequest) - graphComplete := resp.GetGraph() - require.NotNil(t, graphComplete) + planComplete := resp.GetPlan() + require.NotNil(t, planComplete) - if testCase.ErrorContains != "" { - require.Contains(t, graphComplete.GetError(), testCase.ErrorContains) + if testCase.PlanErrorContains != "" { + require.Contains(t, planComplete.GetError(), testCase.PlanErrorContains) } + graphCompleteResp := provision(&proto.Request{Type: &proto.Request_Graph{Graph: &proto.GraphRequest{ + Source: proto.GraphSource_SOURCE_PLAN, + }}}) + graphComplete := graphCompleteResp.GetGraph() + require.NotNil(t, graphCompleteResp) + if testCase.Response != nil { require.Equal(t, testCase.Response.Error, graphComplete.Error) @@ -1156,7 +1177,7 @@ func TestProvision(t *testing.T) { } if !gotExpectedLog { - t.Fatalf("expected log string %q but never saw it", testCase.ExpectLogContains) + t.Fatalf("expected log string %q but never saw it", testCase.PlanExpectLogContains) } }) } From 11815cbe0ca7a5a9fb4667ddfd750b8da9da9ff7 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 18:26:30 +0000 Subject: [PATCH 22/56] make gen --- site/e2e/provisionerGenerated.ts | 251 ++++++++++++++++++++----------- 1 file changed, 166 insertions(+), 85 deletions(-) diff --git a/site/e2e/provisionerGenerated.ts b/site/e2e/provisionerGenerated.ts index ba9071ab625e8..d148101625ce4 100644 --- a/site/e2e/provisionerGenerated.ts +++ b/site/e2e/provisionerGenerated.ts @@ -69,6 +69,13 @@ export enum PrebuiltWorkspaceBuildStage { UNRECOGNIZED = -1, } +export enum GraphSource { + SOURCE_UNKNOWN = 0, + SOURCE_PLAN = 1, + SOURCE_STATE = 2, + UNRECOGNIZED = -1, +} + export enum TimingState { STARTED = 0, COMPLETED = 1, @@ -410,10 +417,6 @@ export interface Metadata { /** Config represents execution configuration shared by all subsequent requests in the Session */ export interface Config { - /** template_source_archive is a tar of the template source files */ - templateSourceArchive: Uint8Array; - /** state is the provisioner state (if any) */ - state: Uint8Array; provisionerLogLevel: string; /** Template imports can omit template id */ templateId?: @@ -444,6 +447,26 @@ export interface ParseComplete_WorkspaceTagsEntry { value: string; } +export interface InitRequest { + /** template_source_archive is a tar of the template source files */ + templateSourceArchive: Uint8Array; + /** + * If true, the provisioner can safely assume the caller does not need the + * module files downloaded by the `terraform init` command. + * Ideally this boolean would be flipped in its truthy value, however since + * this is costly, the zero value omitting the module files is preferred. + */ + omitModuleFiles: boolean; +} + +export interface InitComplete { + error: string; + timings: Timing[]; + modules: Module[]; + moduleFiles: Uint8Array; + moduleFilesHash: Uint8Array; +} + /** PlanRequest asks the provisioner to plan what resources & parameters it will create */ export interface PlanRequest { metadata: Metadata | undefined; @@ -451,39 +474,18 @@ export interface PlanRequest { variableValues: VariableValue[]; externalAuthProviders: ExternalAuthProvider[]; previousParameterValues: RichParameterValue[]; - /** - * If true, the provisioner can safely assume the caller does not need the - * module files downloaded by the `terraform init` command. - * Ideally this boolean would be flipped in its truthy value, however for - * backwards compatibility reasons, the zero value should be the previous - * behavior of downloading the module files. - */ - omitModuleFiles: boolean; + /** state is the provisioner state (if any) */ + state: Uint8Array; } /** PlanComplete indicates a request to plan completed. */ export interface PlanComplete { error: string; - resources: Resource[]; - parameters: RichParameter[]; - externalAuthProviders: ExternalAuthProviderResource[]; timings: Timing[]; - modules: Module[]; - presets: Preset[]; plan: Uint8Array; + dailyCost: number; resourceReplacements: ResourceReplacement[]; - moduleFiles: Uint8Array; - moduleFilesHash: Uint8Array; - /** - * Whether a template has any `coder_ai_task` resources defined, even if not planned for creation. - * During a template import, a plan is run which may not yield in any `coder_ai_task` resources, but nonetheless we - * still need to know that such resources are defined. - * - * See `hasAITaskResources` in provisioner/terraform/resources.go for more details. - */ - hasAiTasks: boolean; - aiTasks: AITask[]; - hasExternalAgents: boolean; + aiTaskCount: number; } /** @@ -491,18 +493,42 @@ export interface PlanComplete { * in the same Session. The plan data is not transmitted over the wire and is cached by the provisioner in the Session. */ export interface ApplyRequest { - metadata: Metadata | undefined; + metadata: + | Metadata + | undefined; + /** state is the provisioner state (if any) */ + state: Uint8Array; } /** ApplyComplete indicates a request to apply completed. */ export interface ApplyComplete { state: Uint8Array; error: string; + timings: Timing[]; +} + +export interface GraphRequest { + metadata: Metadata | undefined; + source: GraphSource; +} + +export interface GraphComplete { + error: string; + timings: Timing[]; resources: Resource[]; parameters: RichParameter[]; externalAuthProviders: ExternalAuthProviderResource[]; - timings: Timing[]; + presets: Preset[]; + /** + * Whether a template has any `coder_ai_task` resources defined, even if not planned for creation. + * During a template import, a plan is run which may not yield in any `coder_ai_task` resources, but nonetheless we + * still need to know that such resources are defined. + * + * See `hasAITaskResources` in provisioner/terraform/resources.go for more details. + */ + hasAiTasks: boolean; aiTasks: AITask[]; + hasExternalAgents: boolean; } export interface Timing { @@ -522,16 +548,20 @@ export interface CancelRequest { export interface Request { config?: Config | undefined; parse?: ParseRequest | undefined; + init?: InitRequest | undefined; plan?: PlanRequest | undefined; apply?: ApplyRequest | undefined; + graph?: GraphRequest | undefined; cancel?: CancelRequest | undefined; } export interface Response { log?: Log | undefined; parse?: ParseComplete | undefined; + init?: InitComplete | undefined; plan?: PlanComplete | undefined; apply?: ApplyComplete | undefined; + graph?: GraphComplete | undefined; dataUpload?: DataUpload | undefined; chunkPiece?: ChunkPiece | undefined; } @@ -1318,23 +1348,17 @@ export const Metadata = { export const Config = { encode(message: Config, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.templateSourceArchive.length !== 0) { - writer.uint32(10).bytes(message.templateSourceArchive); - } - if (message.state.length !== 0) { - writer.uint32(18).bytes(message.state); - } if (message.provisionerLogLevel !== "") { - writer.uint32(26).string(message.provisionerLogLevel); + writer.uint32(10).string(message.provisionerLogLevel); } if (message.templateId !== undefined) { - writer.uint32(34).string(message.templateId); + writer.uint32(18).string(message.templateId); } if (message.templateVersionId !== undefined) { - writer.uint32(42).string(message.templateVersionId); + writer.uint32(26).string(message.templateVersionId); } if (message.expReuseTerraformWorkspace !== undefined) { - writer.uint32(48).bool(message.expReuseTerraformWorkspace); + writer.uint32(32).bool(message.expReuseTerraformWorkspace); } return writer; }, @@ -1376,6 +1400,39 @@ export const ParseComplete_WorkspaceTagsEntry = { }, }; +export const InitRequest = { + encode(message: InitRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.templateSourceArchive.length !== 0) { + writer.uint32(10).bytes(message.templateSourceArchive); + } + if (message.omitModuleFiles !== false) { + writer.uint32(24).bool(message.omitModuleFiles); + } + return writer; + }, +}; + +export const InitComplete = { + encode(message: InitComplete, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.error !== "") { + writer.uint32(10).string(message.error); + } + for (const v of message.timings) { + Timing.encode(v!, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.modules) { + Module.encode(v!, writer.uint32(26).fork()).ldelim(); + } + if (message.moduleFiles.length !== 0) { + writer.uint32(34).bytes(message.moduleFiles); + } + if (message.moduleFilesHash.length !== 0) { + writer.uint32(42).bytes(message.moduleFilesHash); + } + return writer; + }, +}; + export const PlanRequest = { encode(message: PlanRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.metadata !== undefined) { @@ -1393,8 +1450,8 @@ export const PlanRequest = { for (const v of message.previousParameterValues) { RichParameterValue.encode(v!, writer.uint32(42).fork()).ldelim(); } - if (message.omitModuleFiles !== false) { - writer.uint32(48).bool(message.omitModuleFiles); + if (message.state.length !== 0) { + writer.uint32(50).bytes(message.state); } return writer; }, @@ -1405,44 +1462,20 @@ export const PlanComplete = { if (message.error !== "") { writer.uint32(10).string(message.error); } - for (const v of message.resources) { - Resource.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.parameters) { - RichParameter.encode(v!, writer.uint32(26).fork()).ldelim(); - } - for (const v of message.externalAuthProviders) { - ExternalAuthProviderResource.encode(v!, writer.uint32(34).fork()).ldelim(); - } for (const v of message.timings) { - Timing.encode(v!, writer.uint32(50).fork()).ldelim(); - } - for (const v of message.modules) { - Module.encode(v!, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.presets) { - Preset.encode(v!, writer.uint32(66).fork()).ldelim(); + Timing.encode(v!, writer.uint32(18).fork()).ldelim(); } if (message.plan.length !== 0) { - writer.uint32(74).bytes(message.plan); - } - for (const v of message.resourceReplacements) { - ResourceReplacement.encode(v!, writer.uint32(82).fork()).ldelim(); - } - if (message.moduleFiles.length !== 0) { - writer.uint32(90).bytes(message.moduleFiles); + writer.uint32(26).bytes(message.plan); } - if (message.moduleFilesHash.length !== 0) { - writer.uint32(98).bytes(message.moduleFilesHash); - } - if (message.hasAiTasks !== false) { - writer.uint32(104).bool(message.hasAiTasks); + if (message.dailyCost !== 0) { + writer.uint32(32).int32(message.dailyCost); } - for (const v of message.aiTasks) { - AITask.encode(v!, writer.uint32(114).fork()).ldelim(); + for (const v of message.resourceReplacements) { + ResourceReplacement.encode(v!, writer.uint32(42).fork()).ldelim(); } - if (message.hasExternalAgents !== false) { - writer.uint32(120).bool(message.hasExternalAgents); + if (message.aiTaskCount !== 0) { + writer.uint32(48).int32(message.aiTaskCount); } return writer; }, @@ -1453,6 +1486,9 @@ export const ApplyRequest = { if (message.metadata !== undefined) { Metadata.encode(message.metadata, writer.uint32(10).fork()).ldelim(); } + if (message.state.length !== 0) { + writer.uint32(50).bytes(message.state); + } return writer; }, }; @@ -1465,6 +1501,33 @@ export const ApplyComplete = { if (message.error !== "") { writer.uint32(18).string(message.error); } + for (const v of message.timings) { + Timing.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, +}; + +export const GraphRequest = { + encode(message: GraphRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.metadata !== undefined) { + Metadata.encode(message.metadata, writer.uint32(10).fork()).ldelim(); + } + if (message.source !== 0) { + writer.uint32(16).int32(message.source); + } + return writer; + }, +}; + +export const GraphComplete = { + encode(message: GraphComplete, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.error !== "") { + writer.uint32(10).string(message.error); + } + for (const v of message.timings) { + Timing.encode(v!, writer.uint32(18).fork()).ldelim(); + } for (const v of message.resources) { Resource.encode(v!, writer.uint32(26).fork()).ldelim(); } @@ -1474,11 +1537,17 @@ export const ApplyComplete = { for (const v of message.externalAuthProviders) { ExternalAuthProviderResource.encode(v!, writer.uint32(42).fork()).ldelim(); } - for (const v of message.timings) { - Timing.encode(v!, writer.uint32(50).fork()).ldelim(); + for (const v of message.presets) { + Preset.encode(v!, writer.uint32(50).fork()).ldelim(); + } + if (message.hasAiTasks !== false) { + writer.uint32(56).bool(message.hasAiTasks); } for (const v of message.aiTasks) { - AITask.encode(v!, writer.uint32(58).fork()).ldelim(); + AITask.encode(v!, writer.uint32(66).fork()).ldelim(); + } + if (message.hasExternalAgents !== false) { + writer.uint32(72).bool(message.hasExternalAgents); } return writer; }, @@ -1525,14 +1594,20 @@ export const Request = { if (message.parse !== undefined) { ParseRequest.encode(message.parse, writer.uint32(18).fork()).ldelim(); } + if (message.init !== undefined) { + InitRequest.encode(message.init, writer.uint32(26).fork()).ldelim(); + } if (message.plan !== undefined) { - PlanRequest.encode(message.plan, writer.uint32(26).fork()).ldelim(); + PlanRequest.encode(message.plan, writer.uint32(34).fork()).ldelim(); } if (message.apply !== undefined) { - ApplyRequest.encode(message.apply, writer.uint32(34).fork()).ldelim(); + ApplyRequest.encode(message.apply, writer.uint32(42).fork()).ldelim(); + } + if (message.graph !== undefined) { + GraphRequest.encode(message.graph, writer.uint32(50).fork()).ldelim(); } if (message.cancel !== undefined) { - CancelRequest.encode(message.cancel, writer.uint32(42).fork()).ldelim(); + CancelRequest.encode(message.cancel, writer.uint32(58).fork()).ldelim(); } return writer; }, @@ -1546,17 +1621,23 @@ export const Response = { if (message.parse !== undefined) { ParseComplete.encode(message.parse, writer.uint32(18).fork()).ldelim(); } + if (message.init !== undefined) { + InitComplete.encode(message.init, writer.uint32(26).fork()).ldelim(); + } if (message.plan !== undefined) { - PlanComplete.encode(message.plan, writer.uint32(26).fork()).ldelim(); + PlanComplete.encode(message.plan, writer.uint32(34).fork()).ldelim(); } if (message.apply !== undefined) { - ApplyComplete.encode(message.apply, writer.uint32(34).fork()).ldelim(); + ApplyComplete.encode(message.apply, writer.uint32(42).fork()).ldelim(); + } + if (message.graph !== undefined) { + GraphComplete.encode(message.graph, writer.uint32(50).fork()).ldelim(); } if (message.dataUpload !== undefined) { - DataUpload.encode(message.dataUpload, writer.uint32(42).fork()).ldelim(); + DataUpload.encode(message.dataUpload, writer.uint32(58).fork()).ldelim(); } if (message.chunkPiece !== undefined) { - ChunkPiece.encode(message.chunkPiece, writer.uint32(50).fork()).ldelim(); + ChunkPiece.encode(message.chunkPiece, writer.uint32(66).fork()).ldelim(); } return writer; }, From ef7b33e2c3617a673e13e7bb4b628b9c7a5d31e9 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 12:35:45 -0600 Subject: [PATCH 23/56] e2e fixes --- site/e2e/helpers.ts | 78 ++++++++++++------- site/e2e/tests/app.spec.ts | 4 +- site/e2e/tests/outdatedAgent.spec.ts | 4 +- site/e2e/tests/outdatedCLI.spec.ts | 4 +- site/e2e/tests/webTerminal.spec.ts | 4 +- .../tests/workspaces/createWorkspace.spec.ts | 2 +- 6 files changed, 57 insertions(+), 39 deletions(-) diff --git a/site/e2e/helpers.ts b/site/e2e/helpers.ts index cda6966a56c91..5ef64d7fff939 100644 --- a/site/e2e/helpers.ts +++ b/site/e2e/helpers.ts @@ -32,6 +32,7 @@ import { type ApplyComplete, AppSharingLevel, type ExternalAuthProviderResource, + type GraphComplete, type ParseComplete, type PlanComplete, type Resource, @@ -540,12 +541,14 @@ type RecursivePartial = { }; interface EchoProvisionerResponses { + init?: RecursivePartial[]; // parse is for observing any Terraform variables parse?: RecursivePartial[]; // plan occurs when the template is imported plan?: RecursivePartial[]; // apply occurs when the workspace is built apply?: RecursivePartial[]; + graph?: RecursivePartial[]; // extraFiles allows the bundling of terraform files in echo provisioner tars // in order to support dynamic parameters extraFiles?: Map; @@ -560,6 +563,13 @@ const emptyPlan = new TextEncoder().encode("{}"); const createTemplateVersionTar = async ( responses: EchoProvisionerResponses = {}, ): Promise => { + if (!responses.init) { + responses.init = [ + { + init: {}, + }, + ]; + } if (!responses.parse) { responses.parse = [ { @@ -575,17 +585,24 @@ const createTemplateVersionTar = async ( ]; } if (!responses.plan) { - responses.plan = responses.apply.map((response) => { + responses.plan = [ + { + plan: {}, + }, + ]; + } + if (!responses.graph) { + responses.graph = responses.apply.map((response) => { if (response.log) { return response; } return { - plan: { - error: response.apply?.error ?? "", - resources: response.apply?.resources ?? [], - parameters: response.apply?.parameters ?? [], - externalAuthProviders: response.apply?.externalAuthProviders ?? [], - timings: response.apply?.timings ?? [], + graph: { + error: response.graph?.error ?? "", + resources: response.graph?.resources ?? [], + parameters: response.graph?.parameters ?? [], + externalAuthProviders: response.graph?.externalAuthProviders ?? [], + timings: response.graph?.timings ?? [], presets: [], resourceReplacements: [], plan: emptyPlan, @@ -698,7 +715,7 @@ const createTemplateVersionTar = async ( }; responses.apply.forEach((response, index) => { - response.apply = { + response.graph = { error: "", state: new Uint8Array(), resources: [], @@ -706,17 +723,17 @@ const createTemplateVersionTar = async ( externalAuthProviders: [], timings: [], aiTasks: [], - ...response.apply, + ...response.graph, } as ApplyComplete; - response.apply.resources = response.apply.resources?.map(fillResource); + response.graph.resources = response.graph.resources?.map(fillResource); tar.addFile( `${index}.apply.protobuf`, Response.encode(response as Response).finish(), ); }); - responses.plan.forEach((response, index) => { - response.plan = { + responses.graph.forEach((response, index) => { + response.graph = { error: "", resources: [], parameters: [], @@ -729,9 +746,9 @@ const createTemplateVersionTar = async ( moduleFiles: new Uint8Array(), moduleFilesHash: new Uint8Array(), aiTasks: [], - ...response.plan, - } as PlanComplete; - response.plan.resources = response.plan.resources?.map(fillResource); + ...response.graph, + } as GraphComplete; + response.graph.resources = response.graph.resources?.map(fillResource); tar.addFile( `${index}.plan.protobuf`, @@ -889,21 +906,22 @@ ${options}} parse: {}, }, ], - plan: [ + graph: [ { - plan: { + graph: { parameters: richParameters, + resources: [ + { + name: "example", + }, + ], }, }, ], apply: [ { apply: { - resources: [ - { - name: "example", - }, - ], + }, }, ], @@ -920,22 +938,22 @@ export const echoResponsesWithExternalAuth = ( parse: {}, }, ], - plan: [ + graph: [ { - plan: { + graph: { externalAuthProviders: providers, + resources: [ + { + name: "example", + }, + ], }, }, ], apply: [ { apply: { - externalAuthProviders: providers, - resources: [ - { - name: "example", - }, - ], + }, }, ], diff --git a/site/e2e/tests/app.spec.ts b/site/e2e/tests/app.spec.ts index 3cb58fcc66c34..3433df6e32d29 100644 --- a/site/e2e/tests/app.spec.ts +++ b/site/e2e/tests/app.spec.ts @@ -32,9 +32,9 @@ test("app", async ({ context, page }) => { } const appName = "test-app"; const template = await createTemplate(page, { - apply: [ + graph: [ { - apply: { + graph: { resources: [ { agents: [ diff --git a/site/e2e/tests/outdatedAgent.spec.ts b/site/e2e/tests/outdatedAgent.spec.ts index 46696b36edeab..9992a5476e8ab 100644 --- a/site/e2e/tests/outdatedAgent.spec.ts +++ b/site/e2e/tests/outdatedAgent.spec.ts @@ -25,9 +25,9 @@ test.skip(`ssh with agent ${agentVersion}`, async ({ page }) => { const token = randomUUID(); const template = await createTemplate(page, { - apply: [ + graph: [ { - apply: { + graph: { resources: [ { agents: [ diff --git a/site/e2e/tests/outdatedCLI.spec.ts b/site/e2e/tests/outdatedCLI.spec.ts index 4f8472d2a019b..cad37bb05a46b 100644 --- a/site/e2e/tests/outdatedCLI.spec.ts +++ b/site/e2e/tests/outdatedCLI.spec.ts @@ -23,9 +23,9 @@ test.beforeEach(async ({ page }) => { test(`ssh with client ${clientVersion}`, async ({ page }) => { const token = randomUUID(); const template = await createTemplate(page, { - apply: [ + graph: [ { - apply: { + graph: { resources: [ { agents: [ diff --git a/site/e2e/tests/webTerminal.spec.ts b/site/e2e/tests/webTerminal.spec.ts index d03f78a8702b8..ccb3216ce8d03 100644 --- a/site/e2e/tests/webTerminal.spec.ts +++ b/site/e2e/tests/webTerminal.spec.ts @@ -18,9 +18,9 @@ test.beforeEach(async ({ page }) => { test("web terminal", async ({ context, page }) => { const token = randomUUID(); const template = await createTemplate(page, { - apply: [ + graph: [ { - apply: { + graph: { resources: [ { agents: [ diff --git a/site/e2e/tests/workspaces/createWorkspace.spec.ts b/site/e2e/tests/workspaces/createWorkspace.spec.ts index c6371c9c9a3b7..52c6b5c05857d 100644 --- a/site/e2e/tests/workspaces/createWorkspace.spec.ts +++ b/site/e2e/tests/workspaces/createWorkspace.spec.ts @@ -32,7 +32,7 @@ test.beforeEach(async ({ page }) => { test("create workspace", async ({ page }) => { await login(page, users.templateAdmin); const template = await createTemplate(page, { - apply: [{ apply: { resources: [{ name: "example" }] } }], + graph: [{ graph: { resources: [{ name: "example" }] } }], }); await login(page, users.member); From a422514b246d4a31807dd2366329b57bdab519b4 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 12:40:37 -0600 Subject: [PATCH 24/56] fmt --- site/e2e/helpers.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/site/e2e/helpers.ts b/site/e2e/helpers.ts index 5ef64d7fff939..5a9d1e2280c75 100644 --- a/site/e2e/helpers.ts +++ b/site/e2e/helpers.ts @@ -34,7 +34,6 @@ import { type ExternalAuthProviderResource, type GraphComplete, type ParseComplete, - type PlanComplete, type Resource, Response, type RichParameter, @@ -920,9 +919,7 @@ ${options}} ], apply: [ { - apply: { - - }, + apply: {}, }, ], extraFiles: new Map([["main.tf", tf]]), @@ -952,9 +949,7 @@ export const echoResponsesWithExternalAuth = ( ], apply: [ { - apply: { - - }, + apply: {}, }, ], }; From c79f45e835835cdda222c43ccddd1fe1cca441d1 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 12:49:29 -0600 Subject: [PATCH 25/56] graph is at the end now --- provisioner/terraform/executor.go | 27 ------------------- provisioner/terraform/provision.go | 3 +++ .../WorkspaceTiming/StagesChart.tsx | 18 ++++++------- 3 files changed, 12 insertions(+), 36 deletions(-) diff --git a/provisioner/terraform/executor.go b/provisioner/terraform/executor.go index c04a09529454e..c7b859a0872b1 100644 --- a/provisioner/terraform/executor.go +++ b/provisioner/terraform/executor.go @@ -566,33 +566,6 @@ func (e *executor) apply( }, nil } -// stateResources must only be called while the lock is held. -func (e *executor) stateResources(ctx, killCtx context.Context) (*State, error) { - ctx, span := e.server.startTrace(ctx, tracing.FuncName()) - defer span.End() - - state, err := e.state(ctx, killCtx) - if err != nil { - return nil, err - } - rawGraph, err := e.graph(ctx, killCtx) - if err != nil { - return nil, xerrors.Errorf("get terraform graph: %w", err) - } - converted := &State{} - if state.Values == nil { - return converted, nil - } - - converted, err = ConvertState(ctx, []*tfjson.StateModule{ - state.Values.RootModule, - }, rawGraph, e.server.logger) - if err != nil { - return nil, err - } - return converted, nil -} - // state must only be called while the lock is held. func (e *executor) state(ctx, killCtx context.Context) (*tfjson.State, error) { ctx, span := e.server.startTrace(ctx, tracing.FuncName()) diff --git a/provisioner/terraform/provision.go b/provisioner/terraform/provision.go index 6b3c2c8dfd3b4..229d6771579a5 100644 --- a/provisioner/terraform/provision.go +++ b/provisioner/terraform/provision.go @@ -146,6 +146,7 @@ func (s *server) Init( s.logger.Debug(ctx, "ran initialization") return &proto.InitComplete{ + Timings: e.timings.aggregate(), Modules: modules, ModuleFiles: moduleFiles, ModuleFilesHash: nil, @@ -240,7 +241,9 @@ func (s *server) Graph( return provisionersdk.GraphError("unknown graph source: %q", request.Source.String()) } + endStage := e.timings.startStage(database.ProvisionerJobTimingStageGraph) rawGraph, err := e.graph(ctx, killCtx) + endStage(err) if err != nil { return provisionersdk.GraphError("generate graph: %s", err) } diff --git a/site/src/modules/workspaces/WorkspaceTiming/StagesChart.tsx b/site/src/modules/workspaces/WorkspaceTiming/StagesChart.tsx index 103d4717f20c6..b1c8c50befbde 100644 --- a/site/src/modules/workspaces/WorkspaceTiming/StagesChart.tsx +++ b/site/src/modules/workspaces/WorkspaceTiming/StagesChart.tsx @@ -246,31 +246,31 @@ export const provisioningStages: Stage[] = [ }, }, { - name: "graph", - label: "graph", + name: "apply", + label: "apply", section: "provisioning", tooltip: { title: ( <> - Terraform graph + Terraform apply - List all resources in plan, used to update coderd database. + Execute Terraform plan to create/modify/delete resources into + desired states. ), }, }, { - name: "apply", - label: "apply", + name: "graph", + label: "graph", section: "provisioning", tooltip: { title: ( <> - Terraform apply + Terraform graph - Execute Terraform plan to create/modify/delete resources into - desired states. + List all resources in plan, used to update coderd database. ), From 1c76f440b7fbdcf90b61b115e9545733b7952241 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 12:50:54 -0600 Subject: [PATCH 26/56] test --- enterprise/coderd/templates_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/enterprise/coderd/templates_test.go b/enterprise/coderd/templates_test.go index 17f4fe903cf5f..cbb30be6e36d7 100644 --- a/enterprise/coderd/templates_test.go +++ b/enterprise/coderd/templates_test.go @@ -2239,10 +2239,10 @@ func TestInvalidateTemplatePrebuilds_RegularUser(t *testing.T) { // Given version1 := coderdtest.CreateTemplateVersion(t, ownerClient, owner.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { - Type: &proto.Response_Plan{ - Plan: &proto.PlanComplete{ + Type: &proto.Response_Graph{ + Graph: &proto.GraphComplete{ Presets: []*proto.Preset{presetWithParameters1}, Parameters: templateVersionParameters, }, From de937695fcab4f8013c4166954aa4c0f4b6d9ffc Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 12:53:29 -0600 Subject: [PATCH 27/56] ci push From 0a695030db55c328f974b73e3944f7998a476a26 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 19:06:29 +0000 Subject: [PATCH 28/56] make gen --- provisionerd/proto/provisionerd.pb.go | 1213 +++++--- provisionerd/proto/provisionerd_drpc.pb.go | 2 +- provisionersdk/proto/provisioner.pb.go | 3062 +++++++++++++------ provisionersdk/proto/provisioner_drpc.pb.go | 2 +- 4 files changed, 2923 insertions(+), 1356 deletions(-) diff --git a/provisionerd/proto/provisionerd.pb.go b/provisionerd/proto/provisionerd.pb.go index e7c0f7a4eaf8a..e66e1a33de1f4 100644 --- a/provisionerd/proto/provisionerd.pb.go +++ b/provisionerd/proto/provisionerd.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.9 -// protoc v6.32.0 +// protoc-gen-go v1.30.0 +// protoc v4.23.4 // source: provisionerd/proto/provisionerd.proto package proto @@ -12,7 +12,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -71,16 +70,18 @@ func (LogSource) EnumDescriptor() ([]byte, []int) { // Empty indicates a successful request/response. type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } func (x *Empty) Reset() { *x = Empty{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Empty) String() string { @@ -91,7 +92,7 @@ func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108,13 +109,16 @@ func (*Empty) Descriptor() ([]byte, []int) { // AcquiredJob is returned when a provisioner daemon has a job locked. type AcquiredJob struct { - state protoimpl.MessageState `protogen:"open.v1"` - JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Provisioner string `protobuf:"bytes,3,opt,name=provisioner,proto3" json:"provisioner,omitempty"` - UserName string `protobuf:"bytes,4,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` - TemplateSourceArchive []byte `protobuf:"bytes,5,opt,name=template_source_archive,json=templateSourceArchive,proto3" json:"template_source_archive,omitempty"` - // Types that are valid to be assigned to Type: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Provisioner string `protobuf:"bytes,3,opt,name=provisioner,proto3" json:"provisioner,omitempty"` + UserName string `protobuf:"bytes,4,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` + TemplateSourceArchive []byte `protobuf:"bytes,5,opt,name=template_source_archive,json=templateSourceArchive,proto3" json:"template_source_archive,omitempty"` + // Types that are assignable to Type: // // *AcquiredJob_WorkspaceBuild_ // *AcquiredJob_TemplateImport_ @@ -122,16 +126,16 @@ type AcquiredJob struct { Type isAcquiredJob_Type `protobuf_oneof:"type"` // trace_metadata is currently used for tracing information only. It allows // jobs to be tied to the request that created them. - TraceMetadata map[string]string `protobuf:"bytes,9,rep,name=trace_metadata,json=traceMetadata,proto3" json:"trace_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + TraceMetadata map[string]string `protobuf:"bytes,9,rep,name=trace_metadata,json=traceMetadata,proto3" json:"trace_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *AcquiredJob) Reset() { *x = AcquiredJob{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AcquiredJob) String() string { @@ -142,7 +146,7 @@ func (*AcquiredJob) ProtoMessage() {} func (x *AcquiredJob) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,36 +196,30 @@ func (x *AcquiredJob) GetTemplateSourceArchive() []byte { return nil } -func (x *AcquiredJob) GetType() isAcquiredJob_Type { - if x != nil { - return x.Type +func (m *AcquiredJob) GetType() isAcquiredJob_Type { + if m != nil { + return m.Type } return nil } func (x *AcquiredJob) GetWorkspaceBuild() *AcquiredJob_WorkspaceBuild { - if x != nil { - if x, ok := x.Type.(*AcquiredJob_WorkspaceBuild_); ok { - return x.WorkspaceBuild - } + if x, ok := x.GetType().(*AcquiredJob_WorkspaceBuild_); ok { + return x.WorkspaceBuild } return nil } func (x *AcquiredJob) GetTemplateImport() *AcquiredJob_TemplateImport { - if x != nil { - if x, ok := x.Type.(*AcquiredJob_TemplateImport_); ok { - return x.TemplateImport - } + if x, ok := x.GetType().(*AcquiredJob_TemplateImport_); ok { + return x.TemplateImport } return nil } func (x *AcquiredJob) GetTemplateDryRun() *AcquiredJob_TemplateDryRun { - if x != nil { - if x, ok := x.Type.(*AcquiredJob_TemplateDryRun_); ok { - return x.TemplateDryRun - } + if x, ok := x.GetType().(*AcquiredJob_TemplateDryRun_); ok { + return x.TemplateDryRun } return nil } @@ -256,25 +254,28 @@ func (*AcquiredJob_TemplateImport_) isAcquiredJob_Type() {} func (*AcquiredJob_TemplateDryRun_) isAcquiredJob_Type() {} type FailedJob struct { - state protoimpl.MessageState `protogen:"open.v1"` - JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - // Types that are valid to be assigned to Type: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + // Types that are assignable to Type: // // *FailedJob_WorkspaceBuild_ // *FailedJob_TemplateImport_ // *FailedJob_TemplateDryRun_ - Type isFailedJob_Type `protobuf_oneof:"type"` - ErrorCode string `protobuf:"bytes,6,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Type isFailedJob_Type `protobuf_oneof:"type"` + ErrorCode string `protobuf:"bytes,6,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` } func (x *FailedJob) Reset() { *x = FailedJob{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FailedJob) String() string { @@ -285,7 +286,7 @@ func (*FailedJob) ProtoMessage() {} func (x *FailedJob) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,36 +315,30 @@ func (x *FailedJob) GetError() string { return "" } -func (x *FailedJob) GetType() isFailedJob_Type { - if x != nil { - return x.Type +func (m *FailedJob) GetType() isFailedJob_Type { + if m != nil { + return m.Type } return nil } func (x *FailedJob) GetWorkspaceBuild() *FailedJob_WorkspaceBuild { - if x != nil { - if x, ok := x.Type.(*FailedJob_WorkspaceBuild_); ok { - return x.WorkspaceBuild - } + if x, ok := x.GetType().(*FailedJob_WorkspaceBuild_); ok { + return x.WorkspaceBuild } return nil } func (x *FailedJob) GetTemplateImport() *FailedJob_TemplateImport { - if x != nil { - if x, ok := x.Type.(*FailedJob_TemplateImport_); ok { - return x.TemplateImport - } + if x, ok := x.GetType().(*FailedJob_TemplateImport_); ok { + return x.TemplateImport } return nil } func (x *FailedJob) GetTemplateDryRun() *FailedJob_TemplateDryRun { - if x != nil { - if x, ok := x.Type.(*FailedJob_TemplateDryRun_); ok { - return x.TemplateDryRun - } + if x, ok := x.GetType().(*FailedJob_TemplateDryRun_); ok { + return x.TemplateDryRun } return nil } @@ -379,23 +374,26 @@ func (*FailedJob_TemplateDryRun_) isFailedJob_Type() {} // CompletedJob is sent when the provisioner daemon completes a job. type CompletedJob struct { - state protoimpl.MessageState `protogen:"open.v1"` - JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - // Types that are valid to be assigned to Type: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // Types that are assignable to Type: // // *CompletedJob_WorkspaceBuild_ // *CompletedJob_TemplateImport_ // *CompletedJob_TemplateDryRun_ - Type isCompletedJob_Type `protobuf_oneof:"type"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Type isCompletedJob_Type `protobuf_oneof:"type"` } func (x *CompletedJob) Reset() { *x = CompletedJob{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CompletedJob) String() string { @@ -406,7 +404,7 @@ func (*CompletedJob) ProtoMessage() {} func (x *CompletedJob) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,36 +426,30 @@ func (x *CompletedJob) GetJobId() string { return "" } -func (x *CompletedJob) GetType() isCompletedJob_Type { - if x != nil { - return x.Type +func (m *CompletedJob) GetType() isCompletedJob_Type { + if m != nil { + return m.Type } return nil } func (x *CompletedJob) GetWorkspaceBuild() *CompletedJob_WorkspaceBuild { - if x != nil { - if x, ok := x.Type.(*CompletedJob_WorkspaceBuild_); ok { - return x.WorkspaceBuild - } + if x, ok := x.GetType().(*CompletedJob_WorkspaceBuild_); ok { + return x.WorkspaceBuild } return nil } func (x *CompletedJob) GetTemplateImport() *CompletedJob_TemplateImport { - if x != nil { - if x, ok := x.Type.(*CompletedJob_TemplateImport_); ok { - return x.TemplateImport - } + if x, ok := x.GetType().(*CompletedJob_TemplateImport_); ok { + return x.TemplateImport } return nil } func (x *CompletedJob) GetTemplateDryRun() *CompletedJob_TemplateDryRun { - if x != nil { - if x, ok := x.Type.(*CompletedJob_TemplateDryRun_); ok { - return x.TemplateDryRun - } + if x, ok := x.GetType().(*CompletedJob_TemplateDryRun_); ok { + return x.TemplateDryRun } return nil } @@ -486,21 +478,24 @@ func (*CompletedJob_TemplateDryRun_) isCompletedJob_Type() {} // Log represents output from a job. type Log struct { - state protoimpl.MessageState `protogen:"open.v1"` - Source LogSource `protobuf:"varint,1,opt,name=source,proto3,enum=provisionerd.LogSource" json:"source,omitempty"` - Level proto.LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=provisioner.LogLevel" json:"level,omitempty"` - CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Stage string `protobuf:"bytes,4,opt,name=stage,proto3" json:"stage,omitempty"` - Output string `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Source LogSource `protobuf:"varint,1,opt,name=source,proto3,enum=provisionerd.LogSource" json:"source,omitempty"` + Level proto.LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=provisioner.LogLevel" json:"level,omitempty"` + CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Stage string `protobuf:"bytes,4,opt,name=stage,proto3" json:"stage,omitempty"` + Output string `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"` } func (x *Log) Reset() { *x = Log{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Log) String() string { @@ -511,7 +506,7 @@ func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,22 +558,25 @@ func (x *Log) GetOutput() string { // This message should be sent periodically as a heartbeat. type UpdateJobRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` TemplateVariables []*proto.TemplateVariable `protobuf:"bytes,4,rep,name=template_variables,json=templateVariables,proto3" json:"template_variables,omitempty"` UserVariableValues []*proto.VariableValue `protobuf:"bytes,5,rep,name=user_variable_values,json=userVariableValues,proto3" json:"user_variable_values,omitempty"` Readme []byte `protobuf:"bytes,6,opt,name=readme,proto3" json:"readme,omitempty"` - WorkspaceTags map[string]string `protobuf:"bytes,7,rep,name=workspace_tags,json=workspaceTags,proto3" json:"workspace_tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + WorkspaceTags map[string]string `protobuf:"bytes,7,rep,name=workspace_tags,json=workspaceTags,proto3" json:"workspace_tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *UpdateJobRequest) Reset() { *x = UpdateJobRequest{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateJobRequest) String() string { @@ -589,7 +587,7 @@ func (*UpdateJobRequest) ProtoMessage() {} func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,18 +645,21 @@ func (x *UpdateJobRequest) GetWorkspaceTags() map[string]string { } type UpdateJobResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Canceled bool `protobuf:"varint,1,opt,name=canceled,proto3" json:"canceled,omitempty"` VariableValues []*proto.VariableValue `protobuf:"bytes,3,rep,name=variable_values,json=variableValues,proto3" json:"variable_values,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *UpdateJobResponse) Reset() { *x = UpdateJobResponse{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateJobResponse) String() string { @@ -669,7 +670,7 @@ func (*UpdateJobResponse) ProtoMessage() {} func (x *UpdateJobResponse) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -699,18 +700,21 @@ func (x *UpdateJobResponse) GetVariableValues() []*proto.VariableValue { } type CommitQuotaRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - DailyCost int32 `protobuf:"varint,2,opt,name=daily_cost,json=dailyCost,proto3" json:"daily_cost,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + DailyCost int32 `protobuf:"varint,2,opt,name=daily_cost,json=dailyCost,proto3" json:"daily_cost,omitempty"` } func (x *CommitQuotaRequest) Reset() { *x = CommitQuotaRequest{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CommitQuotaRequest) String() string { @@ -721,7 +725,7 @@ func (*CommitQuotaRequest) ProtoMessage() {} func (x *CommitQuotaRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,19 +755,22 @@ func (x *CommitQuotaRequest) GetDailyCost() int32 { } type CommitQuotaResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` - CreditsConsumed int32 `protobuf:"varint,2,opt,name=credits_consumed,json=creditsConsumed,proto3" json:"credits_consumed,omitempty"` - Budget int32 `protobuf:"varint,3,opt,name=budget,proto3" json:"budget,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` + CreditsConsumed int32 `protobuf:"varint,2,opt,name=credits_consumed,json=creditsConsumed,proto3" json:"credits_consumed,omitempty"` + Budget int32 `protobuf:"varint,3,opt,name=budget,proto3" json:"budget,omitempty"` } func (x *CommitQuotaResponse) Reset() { *x = CommitQuotaResponse{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CommitQuotaResponse) String() string { @@ -774,7 +781,7 @@ func (*CommitQuotaResponse) ProtoMessage() {} func (x *CommitQuotaResponse) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -811,16 +818,18 @@ func (x *CommitQuotaResponse) GetBudget() int32 { } type CancelAcquire struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } func (x *CancelAcquire) Reset() { *x = CancelAcquire{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CancelAcquire) String() string { @@ -831,7 +840,7 @@ func (*CancelAcquire) ProtoMessage() {} func (x *CancelAcquire) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -847,21 +856,24 @@ func (*CancelAcquire) Descriptor() ([]byte, []int) { } type UploadFileRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Type: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: // // *UploadFileRequest_DataUpload // *UploadFileRequest_ChunkPiece - Type isUploadFileRequest_Type `protobuf_oneof:"type"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Type isUploadFileRequest_Type `protobuf_oneof:"type"` } func (x *UploadFileRequest) Reset() { *x = UploadFileRequest{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UploadFileRequest) String() string { @@ -872,7 +884,7 @@ func (*UploadFileRequest) ProtoMessage() {} func (x *UploadFileRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,27 +899,23 @@ func (*UploadFileRequest) Descriptor() ([]byte, []int) { return file_provisionerd_proto_provisionerd_proto_rawDescGZIP(), []int{10} } -func (x *UploadFileRequest) GetType() isUploadFileRequest_Type { - if x != nil { - return x.Type +func (m *UploadFileRequest) GetType() isUploadFileRequest_Type { + if m != nil { + return m.Type } return nil } func (x *UploadFileRequest) GetDataUpload() *proto.DataUpload { - if x != nil { - if x, ok := x.Type.(*UploadFileRequest_DataUpload); ok { - return x.DataUpload - } + if x, ok := x.GetType().(*UploadFileRequest_DataUpload); ok { + return x.DataUpload } return nil } func (x *UploadFileRequest) GetChunkPiece() *proto.ChunkPiece { - if x != nil { - if x, ok := x.Type.(*UploadFileRequest_ChunkPiece); ok { - return x.ChunkPiece - } + if x, ok := x.GetType().(*UploadFileRequest_ChunkPiece); ok { + return x.ChunkPiece } return nil } @@ -929,7 +937,10 @@ func (*UploadFileRequest_DataUpload) isUploadFileRequest_Type() {} func (*UploadFileRequest_ChunkPiece) isUploadFileRequest_Type() {} type AcquiredJob_WorkspaceBuild struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + WorkspaceBuildId string `protobuf:"bytes,1,opt,name=workspace_build_id,json=workspaceBuildId,proto3" json:"workspace_build_id,omitempty"` WorkspaceName string `protobuf:"bytes,2,opt,name=workspace_name,json=workspaceName,proto3" json:"workspace_name,omitempty"` RichParameterValues []*proto.RichParameterValue `protobuf:"bytes,4,rep,name=rich_parameter_values,json=richParameterValues,proto3" json:"rich_parameter_values,omitempty"` @@ -943,15 +954,15 @@ type AcquiredJob_WorkspaceBuild struct { // for the first time. PreviousParameterValues []*proto.RichParameterValue `protobuf:"bytes,10,rep,name=previous_parameter_values,json=previousParameterValues,proto3" json:"previous_parameter_values,omitempty"` ExpReuseTerraformWorkspace *bool `protobuf:"varint,11,opt,name=exp_reuse_terraform_workspace,json=expReuseTerraformWorkspace,proto3,oneof" json:"exp_reuse_terraform_workspace,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *AcquiredJob_WorkspaceBuild) Reset() { *x = AcquiredJob_WorkspaceBuild{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AcquiredJob_WorkspaceBuild) String() string { @@ -962,7 +973,7 @@ func (*AcquiredJob_WorkspaceBuild) ProtoMessage() {} func (x *AcquiredJob_WorkspaceBuild) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1048,18 +1059,21 @@ func (x *AcquiredJob_WorkspaceBuild) GetExpReuseTerraformWorkspace() bool { } type AcquiredJob_TemplateImport struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Metadata *proto.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` UserVariableValues []*proto.VariableValue `protobuf:"bytes,2,rep,name=user_variable_values,json=userVariableValues,proto3" json:"user_variable_values,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *AcquiredJob_TemplateImport) Reset() { *x = AcquiredJob_TemplateImport{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AcquiredJob_TemplateImport) String() string { @@ -1070,7 +1084,7 @@ func (*AcquiredJob_TemplateImport) ProtoMessage() {} func (x *AcquiredJob_TemplateImport) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1100,19 +1114,22 @@ func (x *AcquiredJob_TemplateImport) GetUserVariableValues() []*proto.VariableVa } type AcquiredJob_TemplateDryRun struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + RichParameterValues []*proto.RichParameterValue `protobuf:"bytes,2,rep,name=rich_parameter_values,json=richParameterValues,proto3" json:"rich_parameter_values,omitempty"` VariableValues []*proto.VariableValue `protobuf:"bytes,3,rep,name=variable_values,json=variableValues,proto3" json:"variable_values,omitempty"` Metadata *proto.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *AcquiredJob_TemplateDryRun) Reset() { *x = AcquiredJob_TemplateDryRun{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AcquiredJob_TemplateDryRun) String() string { @@ -1123,7 +1140,7 @@ func (*AcquiredJob_TemplateDryRun) ProtoMessage() {} func (x *AcquiredJob_TemplateDryRun) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1160,18 +1177,21 @@ func (x *AcquiredJob_TemplateDryRun) GetMetadata() *proto.Metadata { } type FailedJob_WorkspaceBuild struct { - state protoimpl.MessageState `protogen:"open.v1"` - State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` - Timings []*proto.Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + Timings []*proto.Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` } func (x *FailedJob_WorkspaceBuild) Reset() { *x = FailedJob_WorkspaceBuild{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FailedJob_WorkspaceBuild) String() string { @@ -1182,7 +1202,7 @@ func (*FailedJob_WorkspaceBuild) ProtoMessage() {} func (x *FailedJob_WorkspaceBuild) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1212,16 +1232,18 @@ func (x *FailedJob_WorkspaceBuild) GetTimings() []*proto.Timing { } type FailedJob_TemplateImport struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } func (x *FailedJob_TemplateImport) Reset() { *x = FailedJob_TemplateImport{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FailedJob_TemplateImport) String() string { @@ -1232,7 +1254,7 @@ func (*FailedJob_TemplateImport) ProtoMessage() {} func (x *FailedJob_TemplateImport) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1248,16 +1270,18 @@ func (*FailedJob_TemplateImport) Descriptor() ([]byte, []int) { } type FailedJob_TemplateDryRun struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } func (x *FailedJob_TemplateDryRun) Reset() { *x = FailedJob_TemplateDryRun{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FailedJob_TemplateDryRun) String() string { @@ -1268,7 +1292,7 @@ func (*FailedJob_TemplateDryRun) ProtoMessage() {} func (x *FailedJob_TemplateDryRun) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1284,22 +1308,25 @@ func (*FailedJob_TemplateDryRun) Descriptor() ([]byte, []int) { } type CompletedJob_WorkspaceBuild struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` Resources []*proto.Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` Timings []*proto.Timing `protobuf:"bytes,3,rep,name=timings,proto3" json:"timings,omitempty"` Modules []*proto.Module `protobuf:"bytes,4,rep,name=modules,proto3" json:"modules,omitempty"` ResourceReplacements []*proto.ResourceReplacement `protobuf:"bytes,5,rep,name=resource_replacements,json=resourceReplacements,proto3" json:"resource_replacements,omitempty"` AiTasks []*proto.AITask `protobuf:"bytes,6,rep,name=ai_tasks,json=aiTasks,proto3" json:"ai_tasks,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *CompletedJob_WorkspaceBuild) Reset() { *x = CompletedJob_WorkspaceBuild{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CompletedJob_WorkspaceBuild) String() string { @@ -1310,7 +1337,7 @@ func (*CompletedJob_WorkspaceBuild) ProtoMessage() {} func (x *CompletedJob_WorkspaceBuild) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1368,7 +1395,10 @@ func (x *CompletedJob_WorkspaceBuild) GetAiTasks() []*proto.AITask { } type CompletedJob_TemplateImport struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + StartResources []*proto.Resource `protobuf:"bytes,1,rep,name=start_resources,json=startResources,proto3" json:"start_resources,omitempty"` StopResources []*proto.Resource `protobuf:"bytes,2,rep,name=stop_resources,json=stopResources,proto3" json:"stop_resources,omitempty"` RichParameters []*proto.RichParameter `protobuf:"bytes,3,rep,name=rich_parameters,json=richParameters,proto3" json:"rich_parameters,omitempty"` @@ -1382,15 +1412,15 @@ type CompletedJob_TemplateImport struct { ModuleFilesHash []byte `protobuf:"bytes,11,opt,name=module_files_hash,json=moduleFilesHash,proto3" json:"module_files_hash,omitempty"` HasAiTasks bool `protobuf:"varint,12,opt,name=has_ai_tasks,json=hasAiTasks,proto3" json:"has_ai_tasks,omitempty"` HasExternalAgents bool `protobuf:"varint,13,opt,name=has_external_agents,json=hasExternalAgents,proto3" json:"has_external_agents,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *CompletedJob_TemplateImport) Reset() { *x = CompletedJob_TemplateImport{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CompletedJob_TemplateImport) String() string { @@ -1401,7 +1431,7 @@ func (*CompletedJob_TemplateImport) ProtoMessage() {} func (x *CompletedJob_TemplateImport) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1508,18 +1538,21 @@ func (x *CompletedJob_TemplateImport) GetHasExternalAgents() bool { } type CompletedJob_TemplateDryRun struct { - state protoimpl.MessageState `protogen:"open.v1"` - Resources []*proto.Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` - Modules []*proto.Module `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resources []*proto.Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` + Modules []*proto.Module `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"` } func (x *CompletedJob_TemplateDryRun) Reset() { *x = CompletedJob_TemplateDryRun{} - mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CompletedJob_TemplateDryRun) String() string { @@ -1530,7 +1563,7 @@ func (*CompletedJob_TemplateDryRun) ProtoMessage() {} func (x *CompletedJob_TemplateDryRun) ProtoReflect() protoreflect.Message { mi := &file_provisionerd_proto_provisionerd_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1561,155 +1594,362 @@ func (x *CompletedJob_TemplateDryRun) GetModules() []*proto.Module { var File_provisionerd_proto_provisionerd_proto protoreflect.FileDescriptor -const file_provisionerd_proto_provisionerd_proto_rawDesc = "" + - "\n" + - "%provisionerd/proto/provisionerd.proto\x12\fprovisionerd\x1a&provisionersdk/proto/provisioner.proto\"\a\n" + - "\x05Empty\"\xe3\f\n" + - "\vAcquiredJob\x12\x15\n" + - "\x06job_id\x18\x01 \x01(\tR\x05jobId\x12\x1d\n" + - "\n" + - "created_at\x18\x02 \x01(\x03R\tcreatedAt\x12 \n" + - "\vprovisioner\x18\x03 \x01(\tR\vprovisioner\x12\x1b\n" + - "\tuser_name\x18\x04 \x01(\tR\buserName\x126\n" + - "\x17template_source_archive\x18\x05 \x01(\fR\x15templateSourceArchive\x12S\n" + - "\x0fworkspace_build\x18\x06 \x01(\v2(.provisionerd.AcquiredJob.WorkspaceBuildH\x00R\x0eworkspaceBuild\x12S\n" + - "\x0ftemplate_import\x18\a \x01(\v2(.provisionerd.AcquiredJob.TemplateImportH\x00R\x0etemplateImport\x12T\n" + - "\x10template_dry_run\x18\b \x01(\v2(.provisionerd.AcquiredJob.TemplateDryRunH\x00R\x0etemplateDryRun\x12S\n" + - "\x0etrace_metadata\x18\t \x03(\v2,.provisionerd.AcquiredJob.TraceMetadataEntryR\rtraceMetadata\x1a\x8d\x05\n" + - "\x0eWorkspaceBuild\x12,\n" + - "\x12workspace_build_id\x18\x01 \x01(\tR\x10workspaceBuildId\x12%\n" + - "\x0eworkspace_name\x18\x02 \x01(\tR\rworkspaceName\x12S\n" + - "\x15rich_parameter_values\x18\x04 \x03(\v2\x1f.provisioner.RichParameterValueR\x13richParameterValues\x12C\n" + - "\x0fvariable_values\x18\x05 \x03(\v2\x1a.provisioner.VariableValueR\x0evariableValues\x12Y\n" + - "\x17external_auth_providers\x18\x06 \x03(\v2!.provisioner.ExternalAuthProviderR\x15externalAuthProviders\x121\n" + - "\bmetadata\x18\a \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12\x14\n" + - "\x05state\x18\b \x01(\fR\x05state\x12\x1b\n" + - "\tlog_level\x18\t \x01(\tR\blogLevel\x12[\n" + - "\x19previous_parameter_values\x18\n" + - " \x03(\v2\x1f.provisioner.RichParameterValueR\x17previousParameterValues\x12F\n" + - "\x1dexp_reuse_terraform_workspace\x18\v \x01(\bH\x00R\x1aexpReuseTerraformWorkspace\x88\x01\x01B \n" + - "\x1e_exp_reuse_terraform_workspaceJ\x04\b\x03\x10\x04\x1a\x91\x01\n" + - "\x0eTemplateImport\x121\n" + - "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12L\n" + - "\x14user_variable_values\x18\x02 \x03(\v2\x1a.provisioner.VariableValueR\x12userVariableValues\x1a\xe3\x01\n" + - "\x0eTemplateDryRun\x12S\n" + - "\x15rich_parameter_values\x18\x02 \x03(\v2\x1f.provisioner.RichParameterValueR\x13richParameterValues\x12C\n" + - "\x0fvariable_values\x18\x03 \x03(\v2\x1a.provisioner.VariableValueR\x0evariableValues\x121\n" + - "\bmetadata\x18\x04 \x01(\v2\x15.provisioner.MetadataR\bmetadataJ\x04\b\x01\x10\x02\x1a@\n" + - "\x12TraceMetadataEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x06\n" + - "\x04type\"\xd4\x03\n" + - "\tFailedJob\x12\x15\n" + - "\x06job_id\x18\x01 \x01(\tR\x05jobId\x12\x14\n" + - "\x05error\x18\x02 \x01(\tR\x05error\x12Q\n" + - "\x0fworkspace_build\x18\x03 \x01(\v2&.provisionerd.FailedJob.WorkspaceBuildH\x00R\x0eworkspaceBuild\x12Q\n" + - "\x0ftemplate_import\x18\x04 \x01(\v2&.provisionerd.FailedJob.TemplateImportH\x00R\x0etemplateImport\x12R\n" + - "\x10template_dry_run\x18\x05 \x01(\v2&.provisionerd.FailedJob.TemplateDryRunH\x00R\x0etemplateDryRun\x12\x1d\n" + - "\n" + - "error_code\x18\x06 \x01(\tR\terrorCode\x1aU\n" + - "\x0eWorkspaceBuild\x12\x14\n" + - "\x05state\x18\x01 \x01(\fR\x05state\x12-\n" + - "\atimings\x18\x02 \x03(\v2\x13.provisioner.TimingR\atimings\x1a\x10\n" + - "\x0eTemplateImport\x1a\x10\n" + - "\x0eTemplateDryRunB\x06\n" + - "\x04type\"\xbb\v\n" + - "\fCompletedJob\x12\x15\n" + - "\x06job_id\x18\x01 \x01(\tR\x05jobId\x12T\n" + - "\x0fworkspace_build\x18\x02 \x01(\v2).provisionerd.CompletedJob.WorkspaceBuildH\x00R\x0eworkspaceBuild\x12T\n" + - "\x0ftemplate_import\x18\x03 \x01(\v2).provisionerd.CompletedJob.TemplateImportH\x00R\x0etemplateImport\x12U\n" + - "\x10template_dry_run\x18\x04 \x01(\v2).provisionerd.CompletedJob.TemplateDryRunH\x00R\x0etemplateDryRun\x1a\xc0\x02\n" + - "\x0eWorkspaceBuild\x12\x14\n" + - "\x05state\x18\x01 \x01(\fR\x05state\x123\n" + - "\tresources\x18\x02 \x03(\v2\x15.provisioner.ResourceR\tresources\x12-\n" + - "\atimings\x18\x03 \x03(\v2\x13.provisioner.TimingR\atimings\x12-\n" + - "\amodules\x18\x04 \x03(\v2\x13.provisioner.ModuleR\amodules\x12U\n" + - "\x15resource_replacements\x18\x05 \x03(\v2 .provisioner.ResourceReplacementR\x14resourceReplacements\x12.\n" + - "\bai_tasks\x18\x06 \x03(\v2\x13.provisioner.AITaskR\aaiTasks\x1a\xcf\x05\n" + - "\x0eTemplateImport\x12>\n" + - "\x0fstart_resources\x18\x01 \x03(\v2\x15.provisioner.ResourceR\x0estartResources\x12<\n" + - "\x0estop_resources\x18\x02 \x03(\v2\x15.provisioner.ResourceR\rstopResources\x12C\n" + - "\x0frich_parameters\x18\x03 \x03(\v2\x1a.provisioner.RichParameterR\x0erichParameters\x12A\n" + - "\x1dexternal_auth_providers_names\x18\x04 \x03(\tR\x1aexternalAuthProvidersNames\x12a\n" + - "\x17external_auth_providers\x18\x05 \x03(\v2).provisioner.ExternalAuthProviderResourceR\x15externalAuthProviders\x128\n" + - "\rstart_modules\x18\x06 \x03(\v2\x13.provisioner.ModuleR\fstartModules\x126\n" + - "\fstop_modules\x18\a \x03(\v2\x13.provisioner.ModuleR\vstopModules\x12-\n" + - "\apresets\x18\b \x03(\v2\x13.provisioner.PresetR\apresets\x12\x12\n" + - "\x04plan\x18\t \x01(\fR\x04plan\x12!\n" + - "\fmodule_files\x18\n" + - " \x01(\fR\vmoduleFiles\x12*\n" + - "\x11module_files_hash\x18\v \x01(\fR\x0fmoduleFilesHash\x12 \n" + - "\fhas_ai_tasks\x18\f \x01(\bR\n" + - "hasAiTasks\x12.\n" + - "\x13has_external_agents\x18\r \x01(\bR\x11hasExternalAgents\x1at\n" + - "\x0eTemplateDryRun\x123\n" + - "\tresources\x18\x01 \x03(\v2\x15.provisioner.ResourceR\tresources\x12-\n" + - "\amodules\x18\x02 \x03(\v2\x13.provisioner.ModuleR\amodulesB\x06\n" + - "\x04type\"\xb0\x01\n" + - "\x03Log\x12/\n" + - "\x06source\x18\x01 \x01(\x0e2\x17.provisionerd.LogSourceR\x06source\x12+\n" + - "\x05level\x18\x02 \x01(\x0e2\x15.provisioner.LogLevelR\x05level\x12\x1d\n" + - "\n" + - "created_at\x18\x03 \x01(\x03R\tcreatedAt\x12\x14\n" + - "\x05stage\x18\x04 \x01(\tR\x05stage\x12\x16\n" + - "\x06output\x18\x05 \x01(\tR\x06output\"\xa6\x03\n" + - "\x10UpdateJobRequest\x12\x15\n" + - "\x06job_id\x18\x01 \x01(\tR\x05jobId\x12%\n" + - "\x04logs\x18\x02 \x03(\v2\x11.provisionerd.LogR\x04logs\x12L\n" + - "\x12template_variables\x18\x04 \x03(\v2\x1d.provisioner.TemplateVariableR\x11templateVariables\x12L\n" + - "\x14user_variable_values\x18\x05 \x03(\v2\x1a.provisioner.VariableValueR\x12userVariableValues\x12\x16\n" + - "\x06readme\x18\x06 \x01(\fR\x06readme\x12X\n" + - "\x0eworkspace_tags\x18\a \x03(\v21.provisionerd.UpdateJobRequest.WorkspaceTagsEntryR\rworkspaceTags\x1a@\n" + - "\x12WorkspaceTagsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01J\x04\b\x03\x10\x04\"z\n" + - "\x11UpdateJobResponse\x12\x1a\n" + - "\bcanceled\x18\x01 \x01(\bR\bcanceled\x12C\n" + - "\x0fvariable_values\x18\x03 \x03(\v2\x1a.provisioner.VariableValueR\x0evariableValuesJ\x04\b\x02\x10\x03\"J\n" + - "\x12CommitQuotaRequest\x12\x15\n" + - "\x06job_id\x18\x01 \x01(\tR\x05jobId\x12\x1d\n" + - "\n" + - "daily_cost\x18\x02 \x01(\x05R\tdailyCost\"h\n" + - "\x13CommitQuotaResponse\x12\x0e\n" + - "\x02ok\x18\x01 \x01(\bR\x02ok\x12)\n" + - "\x10credits_consumed\x18\x02 \x01(\x05R\x0fcreditsConsumed\x12\x16\n" + - "\x06budget\x18\x03 \x01(\x05R\x06budget\"\x0f\n" + - "\rCancelAcquire\"\x93\x01\n" + - "\x11UploadFileRequest\x12:\n" + - "\vdata_upload\x18\x01 \x01(\v2\x17.provisioner.DataUploadH\x00R\n" + - "dataUpload\x12:\n" + - "\vchunk_piece\x18\x02 \x01(\v2\x17.provisioner.ChunkPieceH\x00R\n" + - "chunkPieceB\x06\n" + - "\x04type*4\n" + - "\tLogSource\x12\x16\n" + - "\x12PROVISIONER_DAEMON\x10\x00\x12\x0f\n" + - "\vPROVISIONER\x10\x012\x8b\x04\n" + - "\x11ProvisionerDaemon\x12A\n" + - "\n" + - "AcquireJob\x12\x13.provisionerd.Empty\x1a\x19.provisionerd.AcquiredJob\"\x03\x88\x02\x01\x12R\n" + - "\x14AcquireJobWithCancel\x12\x1b.provisionerd.CancelAcquire\x1a\x19.provisionerd.AcquiredJob(\x010\x01\x12R\n" + - "\vCommitQuota\x12 .provisionerd.CommitQuotaRequest\x1a!.provisionerd.CommitQuotaResponse\x12L\n" + - "\tUpdateJob\x12\x1e.provisionerd.UpdateJobRequest\x1a\x1f.provisionerd.UpdateJobResponse\x127\n" + - "\aFailJob\x12\x17.provisionerd.FailedJob\x1a\x13.provisionerd.Empty\x12>\n" + - "\vCompleteJob\x12\x1a.provisionerd.CompletedJob\x1a\x13.provisionerd.Empty\x12D\n" + - "\n" + - "UploadFile\x12\x1f.provisionerd.UploadFileRequest\x1a\x13.provisionerd.Empty(\x01B.Z,github.com/coder/coder/v2/provisionerd/protob\x06proto3" +var file_provisionerd_proto_provisionerd_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, + 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xe3, 0x0c, 0x0a, 0x0b, 0x41, 0x63, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x20, 0x0a, 0x0b, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x12, 0x1b, + 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x15, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x72, 0x63, 0x68, + 0x69, 0x76, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x0f, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, + 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x54, 0x0a, + 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, + 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4a, + 0x6f, 0x62, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, + 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, + 0x52, 0x75, 0x6e, 0x12, 0x53, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x8d, 0x05, 0x0a, 0x0e, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x53, 0x0a, 0x15, 0x72, 0x69, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, + 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x13, 0x72, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x17, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x15, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x5b, 0x0a, 0x19, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, + 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x1d, 0x65, 0x78, 0x70, 0x5f, + 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x5f, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x00, 0x52, 0x1a, 0x65, 0x78, 0x70, 0x52, 0x65, 0x75, 0x73, 0x65, 0x54, 0x65, 0x72, 0x72, 0x61, + 0x66, 0x6f, 0x72, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x20, 0x0a, 0x1e, 0x5f, 0x65, 0x78, 0x70, 0x5f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x74, + 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x1a, 0x91, 0x01, 0x0a, 0x0e, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4c, + 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x75, 0x73, 0x65, 0x72, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0xe3, 0x01, 0x0a, + 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, + 0x53, 0x0a, 0x15, 0x72, 0x69, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, + 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x13, 0x72, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x01, + 0x10, 0x02, 0x1a, 0x40, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 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, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xd4, 0x03, 0x0a, + 0x09, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, + 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x51, 0x0a, 0x0f, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x64, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x52, 0x0a, + 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, + 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x48, + 0x00, 0x52, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, + 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x1a, 0x55, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, + 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x07, + 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x10, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x10, 0x0a, 0x0e, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x22, 0xbb, 0x0b, 0x0a, 0x0c, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x0f, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x48, + 0x00, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x12, 0x54, 0x0a, 0x0f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x55, 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x5f, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x48, 0x00, 0x52, 0x0e, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x1a, 0xc0, + 0x02, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x07, + 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x69, + 0x6e, 0x67, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x15, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x61, 0x69, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x2e, 0x41, 0x49, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x07, 0x61, 0x69, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x1a, 0xcf, 0x05, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3e, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0e, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x72, 0x69, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x72, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1a, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x17, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x38, 0x0a, + 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x70, 0x5f, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, + 0x2d, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, + 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x6c, + 0x61, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, 0x61, 0x69, 0x5f, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x41, 0x69, 0x54, 0x61, + 0x73, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x68, 0x61, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x11, 0x68, 0x61, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x1a, 0x74, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, + 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x22, 0xa6, 0x03, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, + 0x12, 0x25, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x4c, 0x6f, + 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x4c, 0x0a, 0x12, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x12, 0x75, 0x73, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0e, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x61, 0x67, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x54, 0x61, 0x67, 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, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x7a, 0x0a, + 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x43, + 0x0a, 0x0f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x4a, 0x0a, 0x12, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x5f, + 0x63, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x61, 0x69, 0x6c, + 0x79, 0x43, 0x6f, 0x73, 0x74, 0x22, 0x68, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, + 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x12, 0x29, 0x0a, 0x10, + 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x43, + 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x22, + 0x0f, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x22, 0x93, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x75, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x70, 0x69, 0x65, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x69, 0x65, 0x63, 0x65, + 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x69, 0x65, 0x63, 0x65, 0x42, 0x06, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x34, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, + 0x45, 0x52, 0x5f, 0x44, 0x41, 0x45, 0x4d, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, + 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x32, 0x8b, 0x04, 0x0a, + 0x11, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x44, 0x61, 0x65, 0x6d, + 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4a, 0x6f, 0x62, + 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, + 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x52, 0x0a, 0x14, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x4a, 0x6f, 0x62, 0x57, 0x69, 0x74, 0x68, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x1b, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x28, 0x01, 0x30, 0x01, 0x12, 0x52, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, 0x75, + 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, + 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x46, + 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x1a, + 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x1a, + 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, + 0x6c, 0x65, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, + 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x01, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} var ( file_provisionerd_proto_provisionerd_proto_rawDescOnce sync.Once - file_provisionerd_proto_provisionerd_proto_rawDescData []byte + file_provisionerd_proto_provisionerd_proto_rawDescData = file_provisionerd_proto_provisionerd_proto_rawDesc ) func file_provisionerd_proto_provisionerd_proto_rawDescGZIP() []byte { file_provisionerd_proto_provisionerd_proto_rawDescOnce.Do(func() { - file_provisionerd_proto_provisionerd_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_provisionerd_proto_provisionerd_proto_rawDesc), len(file_provisionerd_proto_provisionerd_proto_rawDesc))) + file_provisionerd_proto_provisionerd_proto_rawDescData = protoimpl.X.CompressGZIP(file_provisionerd_proto_provisionerd_proto_rawDescData) }) return file_provisionerd_proto_provisionerd_proto_rawDescData } var file_provisionerd_proto_provisionerd_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_provisionerd_proto_provisionerd_proto_msgTypes = make([]protoimpl.MessageInfo, 22) -var file_provisionerd_proto_provisionerd_proto_goTypes = []any{ +var file_provisionerd_proto_provisionerd_proto_goTypes = []interface{}{ (LogSource)(0), // 0: provisionerd.LogSource (*Empty)(nil), // 1: provisionerd.Empty (*AcquiredJob)(nil), // 2: provisionerd.AcquiredJob @@ -1821,31 +2061,273 @@ func file_provisionerd_proto_provisionerd_proto_init() { if File_provisionerd_proto_provisionerd_proto != nil { return } - file_provisionerd_proto_provisionerd_proto_msgTypes[1].OneofWrappers = []any{ + if !protoimpl.UnsafeEnabled { + file_provisionerd_proto_provisionerd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcquiredJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FailedJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompletedJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Log); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateJobResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitQuotaRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitQuotaResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelAcquire); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UploadFileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcquiredJob_WorkspaceBuild); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcquiredJob_TemplateImport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcquiredJob_TemplateDryRun); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FailedJob_WorkspaceBuild); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FailedJob_TemplateImport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FailedJob_TemplateDryRun); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompletedJob_WorkspaceBuild); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompletedJob_TemplateImport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompletedJob_TemplateDryRun); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_provisionerd_proto_provisionerd_proto_msgTypes[1].OneofWrappers = []interface{}{ (*AcquiredJob_WorkspaceBuild_)(nil), (*AcquiredJob_TemplateImport_)(nil), (*AcquiredJob_TemplateDryRun_)(nil), } - file_provisionerd_proto_provisionerd_proto_msgTypes[2].OneofWrappers = []any{ + file_provisionerd_proto_provisionerd_proto_msgTypes[2].OneofWrappers = []interface{}{ (*FailedJob_WorkspaceBuild_)(nil), (*FailedJob_TemplateImport_)(nil), (*FailedJob_TemplateDryRun_)(nil), } - file_provisionerd_proto_provisionerd_proto_msgTypes[3].OneofWrappers = []any{ + file_provisionerd_proto_provisionerd_proto_msgTypes[3].OneofWrappers = []interface{}{ (*CompletedJob_WorkspaceBuild_)(nil), (*CompletedJob_TemplateImport_)(nil), (*CompletedJob_TemplateDryRun_)(nil), } - file_provisionerd_proto_provisionerd_proto_msgTypes[10].OneofWrappers = []any{ + file_provisionerd_proto_provisionerd_proto_msgTypes[10].OneofWrappers = []interface{}{ (*UploadFileRequest_DataUpload)(nil), (*UploadFileRequest_ChunkPiece)(nil), } - file_provisionerd_proto_provisionerd_proto_msgTypes[11].OneofWrappers = []any{} + file_provisionerd_proto_provisionerd_proto_msgTypes[11].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_provisionerd_proto_provisionerd_proto_rawDesc), len(file_provisionerd_proto_provisionerd_proto_rawDesc)), + RawDescriptor: file_provisionerd_proto_provisionerd_proto_rawDesc, NumEnums: 1, NumMessages: 22, NumExtensions: 0, @@ -1857,6 +2339,7 @@ func file_provisionerd_proto_provisionerd_proto_init() { MessageInfos: file_provisionerd_proto_provisionerd_proto_msgTypes, }.Build() File_provisionerd_proto_provisionerd_proto = out.File + file_provisionerd_proto_provisionerd_proto_rawDesc = nil file_provisionerd_proto_provisionerd_proto_goTypes = nil file_provisionerd_proto_provisionerd_proto_depIdxs = nil } diff --git a/provisionerd/proto/provisionerd_drpc.pb.go b/provisionerd/proto/provisionerd_drpc.pb.go index 8b40a31a57488..72f131b5c5fd6 100644 --- a/provisionerd/proto/provisionerd_drpc.pb.go +++ b/provisionerd/proto/provisionerd_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: (devel) +// protoc-gen-go-drpc version: v0.0.34 // source: provisionerd/proto/provisionerd.proto package proto diff --git a/provisionersdk/proto/provisioner.pb.go b/provisionersdk/proto/provisioner.pb.go index aab3bbb1f041d..69f73eb8fa0f7 100644 --- a/provisionersdk/proto/provisioner.pb.go +++ b/provisionersdk/proto/provisioner.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.9 -// protoc v6.32.0 +// protoc-gen-go v1.30.0 +// protoc v4.23.4 // source: provisionersdk/proto/provisioner.proto package proto @@ -12,7 +12,6 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -498,16 +497,18 @@ func (DataUploadType) EnumDescriptor() ([]byte, []int) { // Empty indicates a successful request/response. type Empty struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } func (x *Empty) Reset() { *x = Empty{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Empty) String() string { @@ -518,7 +519,7 @@ func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,22 +536,25 @@ func (*Empty) Descriptor() ([]byte, []int) { // TemplateVariable represents a Terraform variable. type TemplateVariable struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"` - Sensitive bool `protobuf:"varint,6,opt,name=sensitive,proto3" json:"sensitive,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"` + Sensitive bool `protobuf:"varint,6,opt,name=sensitive,proto3" json:"sensitive,omitempty"` } func (x *TemplateVariable) Reset() { *x = TemplateVariable{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TemplateVariable) String() string { @@ -561,7 +565,7 @@ func (*TemplateVariable) ProtoMessage() {} func (x *TemplateVariable) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,20 +624,23 @@ func (x *TemplateVariable) GetSensitive() bool { // RichParameterOption represents a singular option that a parameter may expose. type RichParameterOption struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - Icon string `protobuf:"bytes,4,opt,name=icon,proto3" json:"icon,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + Icon string `protobuf:"bytes,4,opt,name=icon,proto3" json:"icon,omitempty"` } func (x *RichParameterOption) Reset() { *x = RichParameterOption{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RichParameterOption) String() string { @@ -644,7 +651,7 @@ func (*RichParameterOption) ProtoMessage() {} func (x *RichParameterOption) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -689,7 +696,10 @@ func (x *RichParameterOption) GetIcon() string { // RichParameter represents a variable that is exposed. type RichParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` @@ -704,19 +714,19 @@ type RichParameter struct { ValidationMonotonic string `protobuf:"bytes,12,opt,name=validation_monotonic,json=validationMonotonic,proto3" json:"validation_monotonic,omitempty"` Required bool `protobuf:"varint,13,opt,name=required,proto3" json:"required,omitempty"` // legacy_variable_name was removed (= 14) - DisplayName string `protobuf:"bytes,15,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Order int32 `protobuf:"varint,16,opt,name=order,proto3" json:"order,omitempty"` - Ephemeral bool `protobuf:"varint,17,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` - FormType ParameterFormType `protobuf:"varint,18,opt,name=form_type,json=formType,proto3,enum=provisioner.ParameterFormType" json:"form_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + DisplayName string `protobuf:"bytes,15,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Order int32 `protobuf:"varint,16,opt,name=order,proto3" json:"order,omitempty"` + Ephemeral bool `protobuf:"varint,17,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` + FormType ParameterFormType `protobuf:"varint,18,opt,name=form_type,json=formType,proto3,enum=provisioner.ParameterFormType" json:"form_type,omitempty"` } func (x *RichParameter) Reset() { *x = RichParameter{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RichParameter) String() string { @@ -727,7 +737,7 @@ func (*RichParameter) ProtoMessage() {} func (x *RichParameter) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -863,18 +873,21 @@ func (x *RichParameter) GetFormType() ParameterFormType { // RichParameterValue holds the key/value mapping of a parameter. type RichParameterValue struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } func (x *RichParameterValue) Reset() { *x = RichParameterValue{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RichParameterValue) String() string { @@ -885,7 +898,7 @@ func (*RichParameterValue) ProtoMessage() {} func (x *RichParameterValue) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,17 +931,20 @@ func (x *RichParameterValue) GetValue() string { // If a prebuild remains unclaimed for longer than ttl seconds, it is deleted and // recreated to prevent staleness. type ExpirationPolicy struct { - state protoimpl.MessageState `protogen:"open.v1"` - Ttl int32 `protobuf:"varint,1,opt,name=ttl,proto3" json:"ttl,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ttl int32 `protobuf:"varint,1,opt,name=ttl,proto3" json:"ttl,omitempty"` } func (x *ExpirationPolicy) Reset() { *x = ExpirationPolicy{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExpirationPolicy) String() string { @@ -939,7 +955,7 @@ func (*ExpirationPolicy) ProtoMessage() {} func (x *ExpirationPolicy) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -962,18 +978,21 @@ func (x *ExpirationPolicy) GetTtl() int32 { } type Schedule struct { - state protoimpl.MessageState `protogen:"open.v1"` - Cron string `protobuf:"bytes,1,opt,name=cron,proto3" json:"cron,omitempty"` - Instances int32 `protobuf:"varint,2,opt,name=instances,proto3" json:"instances,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cron string `protobuf:"bytes,1,opt,name=cron,proto3" json:"cron,omitempty"` + Instances int32 `protobuf:"varint,2,opt,name=instances,proto3" json:"instances,omitempty"` } func (x *Schedule) Reset() { *x = Schedule{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Schedule) String() string { @@ -984,7 +1003,7 @@ func (*Schedule) ProtoMessage() {} func (x *Schedule) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1014,18 +1033,21 @@ func (x *Schedule) GetInstances() int32 { } type Scheduling struct { - state protoimpl.MessageState `protogen:"open.v1"` - Timezone string `protobuf:"bytes,1,opt,name=timezone,proto3" json:"timezone,omitempty"` - Schedule []*Schedule `protobuf:"bytes,2,rep,name=schedule,proto3" json:"schedule,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timezone string `protobuf:"bytes,1,opt,name=timezone,proto3" json:"timezone,omitempty"` + Schedule []*Schedule `protobuf:"bytes,2,rep,name=schedule,proto3" json:"schedule,omitempty"` } func (x *Scheduling) Reset() { *x = Scheduling{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Scheduling) String() string { @@ -1036,7 +1058,7 @@ func (*Scheduling) ProtoMessage() {} func (x *Scheduling) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1066,19 +1088,22 @@ func (x *Scheduling) GetSchedule() []*Schedule { } type Prebuild struct { - state protoimpl.MessageState `protogen:"open.v1"` - Instances int32 `protobuf:"varint,1,opt,name=instances,proto3" json:"instances,omitempty"` - ExpirationPolicy *ExpirationPolicy `protobuf:"bytes,2,opt,name=expiration_policy,json=expirationPolicy,proto3" json:"expiration_policy,omitempty"` - Scheduling *Scheduling `protobuf:"bytes,3,opt,name=scheduling,proto3" json:"scheduling,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Instances int32 `protobuf:"varint,1,opt,name=instances,proto3" json:"instances,omitempty"` + ExpirationPolicy *ExpirationPolicy `protobuf:"bytes,2,opt,name=expiration_policy,json=expirationPolicy,proto3" json:"expiration_policy,omitempty"` + Scheduling *Scheduling `protobuf:"bytes,3,opt,name=scheduling,proto3" json:"scheduling,omitempty"` } func (x *Prebuild) Reset() { *x = Prebuild{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Prebuild) String() string { @@ -1089,7 +1114,7 @@ func (*Prebuild) ProtoMessage() {} func (x *Prebuild) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,22 +1152,25 @@ func (x *Prebuild) GetScheduling() *Scheduling { // Preset represents a set of preset parameters for a template version. type Preset struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Parameters []*PresetParameter `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty"` - Prebuild *Prebuild `protobuf:"bytes,3,opt,name=prebuild,proto3" json:"prebuild,omitempty"` - Default bool `protobuf:"varint,4,opt,name=default,proto3" json:"default,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Parameters []*PresetParameter `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty"` + Prebuild *Prebuild `protobuf:"bytes,3,opt,name=prebuild,proto3" json:"prebuild,omitempty"` + Default bool `protobuf:"varint,4,opt,name=default,proto3" json:"default,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` } func (x *Preset) Reset() { *x = Preset{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Preset) String() string { @@ -1153,7 +1181,7 @@ func (*Preset) ProtoMessage() {} func (x *Preset) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1211,18 +1239,21 @@ func (x *Preset) GetIcon() string { } type PresetParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } func (x *PresetParameter) Reset() { *x = PresetParameter{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PresetParameter) String() string { @@ -1233,7 +1264,7 @@ func (*PresetParameter) ProtoMessage() {} func (x *PresetParameter) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,18 +1294,21 @@ func (x *PresetParameter) GetValue() string { } type ResourceReplacement struct { - state protoimpl.MessageState `protogen:"open.v1"` - Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` } func (x *ResourceReplacement) Reset() { *x = ResourceReplacement{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResourceReplacement) String() string { @@ -1285,7 +1319,7 @@ func (*ResourceReplacement) ProtoMessage() {} func (x *ResourceReplacement) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1316,19 +1350,22 @@ func (x *ResourceReplacement) GetPaths() []string { // VariableValue holds the key/value mapping of a Terraform variable. type VariableValue struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Sensitive bool `protobuf:"varint,3,opt,name=sensitive,proto3" json:"sensitive,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Sensitive bool `protobuf:"varint,3,opt,name=sensitive,proto3" json:"sensitive,omitempty"` } func (x *VariableValue) Reset() { *x = VariableValue{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *VariableValue) String() string { @@ -1339,7 +1376,7 @@ func (*VariableValue) ProtoMessage() {} func (x *VariableValue) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,18 +1414,21 @@ func (x *VariableValue) GetSensitive() bool { // Log represents output from a request. type Log struct { - state protoimpl.MessageState `protogen:"open.v1"` - Level LogLevel `protobuf:"varint,1,opt,name=level,proto3,enum=provisioner.LogLevel" json:"level,omitempty"` - Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level LogLevel `protobuf:"varint,1,opt,name=level,proto3,enum=provisioner.LogLevel" json:"level,omitempty"` + Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` } func (x *Log) Reset() { *x = Log{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Log) String() string { @@ -1399,7 +1439,7 @@ func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1429,17 +1469,20 @@ func (x *Log) GetOutput() string { } type InstanceIdentityAuth struct { - state protoimpl.MessageState `protogen:"open.v1"` - InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` } func (x *InstanceIdentityAuth) Reset() { *x = InstanceIdentityAuth{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *InstanceIdentityAuth) String() string { @@ -1450,7 +1493,7 @@ func (*InstanceIdentityAuth) ProtoMessage() {} func (x *InstanceIdentityAuth) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1473,18 +1516,21 @@ func (x *InstanceIdentityAuth) GetInstanceId() string { } type ExternalAuthProviderResource struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Optional bool `protobuf:"varint,2,opt,name=optional,proto3" json:"optional,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Optional bool `protobuf:"varint,2,opt,name=optional,proto3" json:"optional,omitempty"` } func (x *ExternalAuthProviderResource) Reset() { *x = ExternalAuthProviderResource{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExternalAuthProviderResource) String() string { @@ -1495,7 +1541,7 @@ func (*ExternalAuthProviderResource) ProtoMessage() {} func (x *ExternalAuthProviderResource) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1525,18 +1571,21 @@ func (x *ExternalAuthProviderResource) GetOptional() bool { } type ExternalAuthProvider struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` } func (x *ExternalAuthProvider) Reset() { *x = ExternalAuthProvider{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExternalAuthProvider) String() string { @@ -1547,7 +1596,7 @@ func (*ExternalAuthProvider) ProtoMessage() {} func (x *ExternalAuthProvider) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,16 +1627,19 @@ func (x *ExternalAuthProvider) GetAccessToken() string { // Agent represents a running agent on the workspace. type Agent struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Env map[string]string `protobuf:"bytes,3,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Env map[string]string `protobuf:"bytes,3,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Field 4 was startup_script, now removed. OperatingSystem string `protobuf:"bytes,5,opt,name=operating_system,json=operatingSystem,proto3" json:"operating_system,omitempty"` Architecture string `protobuf:"bytes,6,opt,name=architecture,proto3" json:"architecture,omitempty"` Directory string `protobuf:"bytes,7,opt,name=directory,proto3" json:"directory,omitempty"` Apps []*App `protobuf:"bytes,8,rep,name=apps,proto3" json:"apps,omitempty"` - // Types that are valid to be assigned to Auth: + // Types that are assignable to Auth: // // *Agent_Token // *Agent_InstanceId @@ -1606,15 +1658,15 @@ type Agent struct { ResourcesMonitoring *ResourcesMonitoring `protobuf:"bytes,24,opt,name=resources_monitoring,json=resourcesMonitoring,proto3" json:"resources_monitoring,omitempty"` Devcontainers []*Devcontainer `protobuf:"bytes,25,rep,name=devcontainers,proto3" json:"devcontainers,omitempty"` ApiKeyScope string `protobuf:"bytes,26,opt,name=api_key_scope,json=apiKeyScope,proto3" json:"api_key_scope,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *Agent) Reset() { *x = Agent{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Agent) String() string { @@ -1625,7 +1677,7 @@ func (*Agent) ProtoMessage() {} func (x *Agent) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1689,27 +1741,23 @@ func (x *Agent) GetApps() []*App { return nil } -func (x *Agent) GetAuth() isAgent_Auth { - if x != nil { - return x.Auth +func (m *Agent) GetAuth() isAgent_Auth { + if m != nil { + return m.Auth } return nil } func (x *Agent) GetToken() string { - if x != nil { - if x, ok := x.Auth.(*Agent_Token); ok { - return x.Token - } + if x, ok := x.GetAuth().(*Agent_Token); ok { + return x.Token } return "" } func (x *Agent) GetInstanceId() string { - if x != nil { - if x, ok := x.Auth.(*Agent_InstanceId); ok { - return x.InstanceId - } + if x, ok := x.GetAuth().(*Agent_InstanceId); ok { + return x.InstanceId } return "" } @@ -1808,18 +1856,21 @@ func (*Agent_Token) isAgent_Auth() {} func (*Agent_InstanceId) isAgent_Auth() {} type ResourcesMonitoring struct { - state protoimpl.MessageState `protogen:"open.v1"` - Memory *MemoryResourceMonitor `protobuf:"bytes,1,opt,name=memory,proto3" json:"memory,omitempty"` - Volumes []*VolumeResourceMonitor `protobuf:"bytes,2,rep,name=volumes,proto3" json:"volumes,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Memory *MemoryResourceMonitor `protobuf:"bytes,1,opt,name=memory,proto3" json:"memory,omitempty"` + Volumes []*VolumeResourceMonitor `protobuf:"bytes,2,rep,name=volumes,proto3" json:"volumes,omitempty"` } func (x *ResourcesMonitoring) Reset() { *x = ResourcesMonitoring{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResourcesMonitoring) String() string { @@ -1830,7 +1881,7 @@ func (*ResourcesMonitoring) ProtoMessage() {} func (x *ResourcesMonitoring) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1860,18 +1911,21 @@ func (x *ResourcesMonitoring) GetVolumes() []*VolumeResourceMonitor { } type MemoryResourceMonitor struct { - state protoimpl.MessageState `protogen:"open.v1"` - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - Threshold int32 `protobuf:"varint,2,opt,name=threshold,proto3" json:"threshold,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + Threshold int32 `protobuf:"varint,2,opt,name=threshold,proto3" json:"threshold,omitempty"` } func (x *MemoryResourceMonitor) Reset() { *x = MemoryResourceMonitor{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MemoryResourceMonitor) String() string { @@ -1882,7 +1936,7 @@ func (*MemoryResourceMonitor) ProtoMessage() {} func (x *MemoryResourceMonitor) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1912,19 +1966,22 @@ func (x *MemoryResourceMonitor) GetThreshold() int32 { } type VolumeResourceMonitor struct { - state protoimpl.MessageState `protogen:"open.v1"` - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` - Threshold int32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` + Threshold int32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` } func (x *VolumeResourceMonitor) Reset() { *x = VolumeResourceMonitor{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *VolumeResourceMonitor) String() string { @@ -1935,7 +1992,7 @@ func (*VolumeResourceMonitor) ProtoMessage() {} func (x *VolumeResourceMonitor) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1972,21 +2029,24 @@ func (x *VolumeResourceMonitor) GetThreshold() int32 { } type DisplayApps struct { - state protoimpl.MessageState `protogen:"open.v1"` - Vscode bool `protobuf:"varint,1,opt,name=vscode,proto3" json:"vscode,omitempty"` - VscodeInsiders bool `protobuf:"varint,2,opt,name=vscode_insiders,json=vscodeInsiders,proto3" json:"vscode_insiders,omitempty"` - WebTerminal bool `protobuf:"varint,3,opt,name=web_terminal,json=webTerminal,proto3" json:"web_terminal,omitempty"` - SshHelper bool `protobuf:"varint,4,opt,name=ssh_helper,json=sshHelper,proto3" json:"ssh_helper,omitempty"` - PortForwardingHelper bool `protobuf:"varint,5,opt,name=port_forwarding_helper,json=portForwardingHelper,proto3" json:"port_forwarding_helper,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Vscode bool `protobuf:"varint,1,opt,name=vscode,proto3" json:"vscode,omitempty"` + VscodeInsiders bool `protobuf:"varint,2,opt,name=vscode_insiders,json=vscodeInsiders,proto3" json:"vscode_insiders,omitempty"` + WebTerminal bool `protobuf:"varint,3,opt,name=web_terminal,json=webTerminal,proto3" json:"web_terminal,omitempty"` + SshHelper bool `protobuf:"varint,4,opt,name=ssh_helper,json=sshHelper,proto3" json:"ssh_helper,omitempty"` + PortForwardingHelper bool `protobuf:"varint,5,opt,name=port_forwarding_helper,json=portForwardingHelper,proto3" json:"port_forwarding_helper,omitempty"` } func (x *DisplayApps) Reset() { *x = DisplayApps{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DisplayApps) String() string { @@ -1997,7 +2057,7 @@ func (*DisplayApps) ProtoMessage() {} func (x *DisplayApps) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2048,18 +2108,21 @@ func (x *DisplayApps) GetPortForwardingHelper() bool { } type Env struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } func (x *Env) Reset() { *x = Env{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Env) String() string { @@ -2070,7 +2133,7 @@ func (*Env) ProtoMessage() {} func (x *Env) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2101,25 +2164,28 @@ func (x *Env) GetValue() string { // Script represents a script to be run on the workspace. type Script struct { - state protoimpl.MessageState `protogen:"open.v1"` - DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Icon string `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"` - Script string `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` - Cron string `protobuf:"bytes,4,opt,name=cron,proto3" json:"cron,omitempty"` - StartBlocksLogin bool `protobuf:"varint,5,opt,name=start_blocks_login,json=startBlocksLogin,proto3" json:"start_blocks_login,omitempty"` - RunOnStart bool `protobuf:"varint,6,opt,name=run_on_start,json=runOnStart,proto3" json:"run_on_start,omitempty"` - RunOnStop bool `protobuf:"varint,7,opt,name=run_on_stop,json=runOnStop,proto3" json:"run_on_stop,omitempty"` - TimeoutSeconds int32 `protobuf:"varint,8,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` - LogPath string `protobuf:"bytes,9,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Icon string `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"` + Script string `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` + Cron string `protobuf:"bytes,4,opt,name=cron,proto3" json:"cron,omitempty"` + StartBlocksLogin bool `protobuf:"varint,5,opt,name=start_blocks_login,json=startBlocksLogin,proto3" json:"start_blocks_login,omitempty"` + RunOnStart bool `protobuf:"varint,6,opt,name=run_on_start,json=runOnStart,proto3" json:"run_on_start,omitempty"` + RunOnStop bool `protobuf:"varint,7,opt,name=run_on_stop,json=runOnStop,proto3" json:"run_on_stop,omitempty"` + TimeoutSeconds int32 `protobuf:"varint,8,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` + LogPath string `protobuf:"bytes,9,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"` } func (x *Script) Reset() { *x = Script{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Script) String() string { @@ -2130,7 +2196,7 @@ func (*Script) ProtoMessage() {} func (x *Script) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2209,19 +2275,22 @@ func (x *Script) GetLogPath() string { } type Devcontainer struct { - state protoimpl.MessageState `protogen:"open.v1"` - WorkspaceFolder string `protobuf:"bytes,1,opt,name=workspace_folder,json=workspaceFolder,proto3" json:"workspace_folder,omitempty"` - ConfigPath string `protobuf:"bytes,2,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkspaceFolder string `protobuf:"bytes,1,opt,name=workspace_folder,json=workspaceFolder,proto3" json:"workspace_folder,omitempty"` + ConfigPath string `protobuf:"bytes,2,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` } func (x *Devcontainer) Reset() { *x = Devcontainer{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Devcontainer) String() string { @@ -2232,7 +2301,7 @@ func (*Devcontainer) ProtoMessage() {} func (x *Devcontainer) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2270,33 +2339,36 @@ func (x *Devcontainer) GetName() string { // App represents a dev-accessible application on the workspace. type App struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // slug is the unique identifier for the app, usually the name from the // template. It must be URL-safe and hostname-safe. - Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"` - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Command string `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"` - Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` - Icon string `protobuf:"bytes,5,opt,name=icon,proto3" json:"icon,omitempty"` - Subdomain bool `protobuf:"varint,6,opt,name=subdomain,proto3" json:"subdomain,omitempty"` - Healthcheck *Healthcheck `protobuf:"bytes,7,opt,name=healthcheck,proto3" json:"healthcheck,omitempty"` - SharingLevel AppSharingLevel `protobuf:"varint,8,opt,name=sharing_level,json=sharingLevel,proto3,enum=provisioner.AppSharingLevel" json:"sharing_level,omitempty"` - External bool `protobuf:"varint,9,opt,name=external,proto3" json:"external,omitempty"` - Order int64 `protobuf:"varint,10,opt,name=order,proto3" json:"order,omitempty"` - Hidden bool `protobuf:"varint,11,opt,name=hidden,proto3" json:"hidden,omitempty"` - OpenIn AppOpenIn `protobuf:"varint,12,opt,name=open_in,json=openIn,proto3,enum=provisioner.AppOpenIn" json:"open_in,omitempty"` - Group string `protobuf:"bytes,13,opt,name=group,proto3" json:"group,omitempty"` - Id string `protobuf:"bytes,14,opt,name=id,proto3" json:"id,omitempty"` // If nil, new UUID will be generated. - Tooltip string `protobuf:"bytes,15,opt,name=tooltip,proto3" json:"tooltip,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Command string `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"` + Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` + Icon string `protobuf:"bytes,5,opt,name=icon,proto3" json:"icon,omitempty"` + Subdomain bool `protobuf:"varint,6,opt,name=subdomain,proto3" json:"subdomain,omitempty"` + Healthcheck *Healthcheck `protobuf:"bytes,7,opt,name=healthcheck,proto3" json:"healthcheck,omitempty"` + SharingLevel AppSharingLevel `protobuf:"varint,8,opt,name=sharing_level,json=sharingLevel,proto3,enum=provisioner.AppSharingLevel" json:"sharing_level,omitempty"` + External bool `protobuf:"varint,9,opt,name=external,proto3" json:"external,omitempty"` + Order int64 `protobuf:"varint,10,opt,name=order,proto3" json:"order,omitempty"` + Hidden bool `protobuf:"varint,11,opt,name=hidden,proto3" json:"hidden,omitempty"` + OpenIn AppOpenIn `protobuf:"varint,12,opt,name=open_in,json=openIn,proto3,enum=provisioner.AppOpenIn" json:"open_in,omitempty"` + Group string `protobuf:"bytes,13,opt,name=group,proto3" json:"group,omitempty"` + Id string `protobuf:"bytes,14,opt,name=id,proto3" json:"id,omitempty"` // If nil, new UUID will be generated. + Tooltip string `protobuf:"bytes,15,opt,name=tooltip,proto3" json:"tooltip,omitempty"` } func (x *App) Reset() { *x = App{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *App) String() string { @@ -2307,7 +2379,7 @@ func (*App) ProtoMessage() {} func (x *App) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2429,19 +2501,22 @@ func (x *App) GetTooltip() string { // Healthcheck represents configuration for checking for app readiness. type Healthcheck struct { - state protoimpl.MessageState `protogen:"open.v1"` - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - Interval int32 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` - Threshold int32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Interval int32 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` + Threshold int32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"` } func (x *Healthcheck) Reset() { *x = Healthcheck{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Healthcheck) String() string { @@ -2452,7 +2527,7 @@ func (*Healthcheck) ProtoMessage() {} func (x *Healthcheck) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2490,25 +2565,28 @@ func (x *Healthcheck) GetThreshold() int32 { // Resource represents created infrastructure. type Resource struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Agents []*Agent `protobuf:"bytes,3,rep,name=agents,proto3" json:"agents,omitempty"` - Metadata []*Resource_Metadata `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty"` - Hide bool `protobuf:"varint,5,opt,name=hide,proto3" json:"hide,omitempty"` - Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` - InstanceType string `protobuf:"bytes,7,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` - DailyCost int32 `protobuf:"varint,8,opt,name=daily_cost,json=dailyCost,proto3" json:"daily_cost,omitempty"` - ModulePath string `protobuf:"bytes,9,opt,name=module_path,json=modulePath,proto3" json:"module_path,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Agents []*Agent `protobuf:"bytes,3,rep,name=agents,proto3" json:"agents,omitempty"` + Metadata []*Resource_Metadata `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty"` + Hide bool `protobuf:"varint,5,opt,name=hide,proto3" json:"hide,omitempty"` + Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` + InstanceType string `protobuf:"bytes,7,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` + DailyCost int32 `protobuf:"varint,8,opt,name=daily_cost,json=dailyCost,proto3" json:"daily_cost,omitempty"` + ModulePath string `protobuf:"bytes,9,opt,name=module_path,json=modulePath,proto3" json:"module_path,omitempty"` } func (x *Resource) Reset() { *x = Resource{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Resource) String() string { @@ -2519,7 +2597,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2598,20 +2676,23 @@ func (x *Resource) GetModulePath() string { } type Module struct { - state protoimpl.MessageState `protogen:"open.v1"` - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Dir string `protobuf:"bytes,4,opt,name=dir,proto3" json:"dir,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Dir string `protobuf:"bytes,4,opt,name=dir,proto3" json:"dir,omitempty"` } func (x *Module) Reset() { *x = Module{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Module) String() string { @@ -2622,7 +2703,7 @@ func (*Module) ProtoMessage() {} func (x *Module) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2666,18 +2747,21 @@ func (x *Module) GetDir() string { } type Role struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` } func (x *Role) Reset() { *x = Role{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Role) String() string { @@ -2688,7 +2772,7 @@ func (*Role) ProtoMessage() {} func (x *Role) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2718,18 +2802,21 @@ func (x *Role) GetOrgId() string { } type RunningAgentAuthToken struct { - state protoimpl.MessageState `protogen:"open.v1"` - AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` } func (x *RunningAgentAuthToken) Reset() { *x = RunningAgentAuthToken{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RunningAgentAuthToken) String() string { @@ -2740,7 +2827,7 @@ func (*RunningAgentAuthToken) ProtoMessage() {} func (x *RunningAgentAuthToken) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2770,17 +2857,20 @@ func (x *RunningAgentAuthToken) GetToken() string { } type AITaskSidebarApp struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *AITaskSidebarApp) Reset() { *x = AITaskSidebarApp{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AITaskSidebarApp) String() string { @@ -2791,7 +2881,7 @@ func (*AITaskSidebarApp) ProtoMessage() {} func (x *AITaskSidebarApp) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2814,19 +2904,22 @@ func (x *AITaskSidebarApp) GetId() string { } type AITask struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - SidebarApp *AITaskSidebarApp `protobuf:"bytes,2,opt,name=sidebar_app,json=sidebarApp,proto3,oneof" json:"sidebar_app,omitempty"` - AppId string `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SidebarApp *AITaskSidebarApp `protobuf:"bytes,2,opt,name=sidebar_app,json=sidebarApp,proto3,oneof" json:"sidebar_app,omitempty"` + AppId string `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` } func (x *AITask) Reset() { *x = AITask{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AITask) String() string { @@ -2837,7 +2930,7 @@ func (*AITask) ProtoMessage() {} func (x *AITask) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2875,7 +2968,10 @@ func (x *AITask) GetAppId() string { // Metadata is information about a workspace used in the execution of a build type Metadata struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + CoderUrl string `protobuf:"bytes,1,opt,name=coder_url,json=coderUrl,proto3" json:"coder_url,omitempty"` WorkspaceTransition WorkspaceTransition `protobuf:"varint,2,opt,name=workspace_transition,json=workspaceTransition,proto3,enum=provisioner.WorkspaceTransition" json:"workspace_transition,omitempty"` WorkspaceName string `protobuf:"bytes,3,opt,name=workspace_name,json=workspaceName,proto3" json:"workspace_name,omitempty"` @@ -2900,15 +2996,15 @@ type Metadata struct { TaskId string `protobuf:"bytes,22,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` TaskPrompt string `protobuf:"bytes,23,opt,name=task_prompt,json=taskPrompt,proto3" json:"task_prompt,omitempty"` TemplateVersionId string `protobuf:"bytes,24,opt,name=template_version_id,json=templateVersionId,proto3" json:"template_version_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *Metadata) Reset() { *x = Metadata{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Metadata) String() string { @@ -2919,7 +3015,7 @@ func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3104,22 +3200,25 @@ func (x *Metadata) GetTemplateVersionId() string { // Config represents execution configuration shared by all subsequent requests in the Session type Config struct { - state protoimpl.MessageState `protogen:"open.v1"` - ProvisionerLogLevel string `protobuf:"bytes,1,opt,name=provisioner_log_level,json=provisionerLogLevel,proto3" json:"provisioner_log_level,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProvisionerLogLevel string `protobuf:"bytes,1,opt,name=provisioner_log_level,json=provisionerLogLevel,proto3" json:"provisioner_log_level,omitempty"` // Template imports can omit template id TemplateId *string `protobuf:"bytes,2,opt,name=template_id,json=templateId,proto3,oneof" json:"template_id,omitempty"` // Dry runs omit version id TemplateVersionId *string `protobuf:"bytes,3,opt,name=template_version_id,json=templateVersionId,proto3,oneof" json:"template_version_id,omitempty"` ExpReuseTerraformWorkspace *bool `protobuf:"varint,4,opt,name=exp_reuse_terraform_workspace,json=expReuseTerraformWorkspace,proto3,oneof" json:"exp_reuse_terraform_workspace,omitempty"` // Whether to reuse existing terraform workspaces if they exist. - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *Config) Reset() { *x = Config{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Config) String() string { @@ -3130,7 +3229,7 @@ func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3175,16 +3274,18 @@ func (x *Config) GetExpReuseTerraformWorkspace() bool { // ParseRequest consumes source-code to produce inputs. type ParseRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } func (x *ParseRequest) Reset() { *x = ParseRequest{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ParseRequest) String() string { @@ -3195,7 +3296,7 @@ func (*ParseRequest) ProtoMessage() {} func (x *ParseRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3212,20 +3313,23 @@ func (*ParseRequest) Descriptor() ([]byte, []int) { // ParseComplete indicates a request to parse completed. type ParseComplete struct { - state protoimpl.MessageState `protogen:"open.v1"` - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - TemplateVariables []*TemplateVariable `protobuf:"bytes,2,rep,name=template_variables,json=templateVariables,proto3" json:"template_variables,omitempty"` - Readme []byte `protobuf:"bytes,3,opt,name=readme,proto3" json:"readme,omitempty"` - WorkspaceTags map[string]string `protobuf:"bytes,4,rep,name=workspace_tags,json=workspaceTags,proto3" json:"workspace_tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + TemplateVariables []*TemplateVariable `protobuf:"bytes,2,rep,name=template_variables,json=templateVariables,proto3" json:"template_variables,omitempty"` + Readme []byte `protobuf:"bytes,3,opt,name=readme,proto3" json:"readme,omitempty"` + WorkspaceTags map[string]string `protobuf:"bytes,4,rep,name=workspace_tags,json=workspaceTags,proto3" json:"workspace_tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *ParseComplete) Reset() { *x = ParseComplete{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ParseComplete) String() string { @@ -3236,7 +3340,7 @@ func (*ParseComplete) ProtoMessage() {} func (x *ParseComplete) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[36] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3280,7 +3384,10 @@ func (x *ParseComplete) GetWorkspaceTags() map[string]string { } type InitRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // template_source_archive is a tar of the template source files TemplateSourceArchive []byte `protobuf:"bytes,1,opt,name=template_source_archive,json=templateSourceArchive,proto3" json:"template_source_archive,omitempty"` // If true, the provisioner can safely assume the caller does not need the @@ -3288,15 +3395,15 @@ type InitRequest struct { // Ideally this boolean would be flipped in its truthy value, however since // this is costly, the zero value omitting the module files is preferred. OmitModuleFiles bool `protobuf:"varint,3,opt,name=omit_module_files,json=omitModuleFiles,proto3" json:"omit_module_files,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *InitRequest) Reset() { *x = InitRequest{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *InitRequest) String() string { @@ -3307,7 +3414,7 @@ func (*InitRequest) ProtoMessage() {} func (x *InitRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[37] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3337,21 +3444,24 @@ func (x *InitRequest) GetOmitModuleFiles() bool { } type InitComplete struct { - state protoimpl.MessageState `protogen:"open.v1"` - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Timings []*Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` - Modules []*Module `protobuf:"bytes,3,rep,name=modules,proto3" json:"modules,omitempty"` - ModuleFiles []byte `protobuf:"bytes,4,opt,name=module_files,json=moduleFiles,proto3" json:"module_files,omitempty"` - ModuleFilesHash []byte `protobuf:"bytes,5,opt,name=module_files_hash,json=moduleFilesHash,proto3" json:"module_files_hash,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Timings []*Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` + Modules []*Module `protobuf:"bytes,3,rep,name=modules,proto3" json:"modules,omitempty"` + ModuleFiles []byte `protobuf:"bytes,4,opt,name=module_files,json=moduleFiles,proto3" json:"module_files,omitempty"` + ModuleFilesHash []byte `protobuf:"bytes,5,opt,name=module_files_hash,json=moduleFilesHash,proto3" json:"module_files_hash,omitempty"` } func (x *InitComplete) Reset() { *x = InitComplete{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *InitComplete) String() string { @@ -3362,7 +3472,7 @@ func (*InitComplete) ProtoMessage() {} func (x *InitComplete) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[38] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3414,23 +3524,26 @@ func (x *InitComplete) GetModuleFilesHash() []byte { // PlanRequest asks the provisioner to plan what resources & parameters it will create type PlanRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` RichParameterValues []*RichParameterValue `protobuf:"bytes,2,rep,name=rich_parameter_values,json=richParameterValues,proto3" json:"rich_parameter_values,omitempty"` VariableValues []*VariableValue `protobuf:"bytes,3,rep,name=variable_values,json=variableValues,proto3" json:"variable_values,omitempty"` ExternalAuthProviders []*ExternalAuthProvider `protobuf:"bytes,4,rep,name=external_auth_providers,json=externalAuthProviders,proto3" json:"external_auth_providers,omitempty"` PreviousParameterValues []*RichParameterValue `protobuf:"bytes,5,rep,name=previous_parameter_values,json=previousParameterValues,proto3" json:"previous_parameter_values,omitempty"` // state is the provisioner state (if any) - State []byte `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + State []byte `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` } func (x *PlanRequest) Reset() { *x = PlanRequest{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PlanRequest) String() string { @@ -3441,7 +3554,7 @@ func (*PlanRequest) ProtoMessage() {} func (x *PlanRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[39] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3500,22 +3613,25 @@ func (x *PlanRequest) GetState() []byte { // PlanComplete indicates a request to plan completed. type PlanComplete struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Timings []*Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` Plan []byte `protobuf:"bytes,3,opt,name=plan,proto3" json:"plan,omitempty"` DailyCost int32 `protobuf:"varint,4,opt,name=dailyCost,proto3" json:"dailyCost,omitempty"` ResourceReplacements []*ResourceReplacement `protobuf:"bytes,5,rep,name=resource_replacements,json=resourceReplacements,proto3" json:"resource_replacements,omitempty"` AiTaskCount int32 `protobuf:"varint,6,opt,name=ai_task_count,json=aiTaskCount,proto3" json:"ai_task_count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *PlanComplete) Reset() { *x = PlanComplete{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PlanComplete) String() string { @@ -3526,7 +3642,7 @@ func (*PlanComplete) ProtoMessage() {} func (x *PlanComplete) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[40] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3586,19 +3702,22 @@ func (x *PlanComplete) GetAiTaskCount() int32 { // ApplyRequest asks the provisioner to apply the changes. Apply MUST be preceded by a successful plan request/response // in the same Session. The plan data is not transmitted over the wire and is cached by the provisioner in the Session. type ApplyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - // state is the provisioner state (if any) - State []byte `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // state is the provisioner state (if any) + State []byte `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` } func (x *ApplyRequest) Reset() { *x = ApplyRequest{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyRequest) String() string { @@ -3609,7 +3728,7 @@ func (*ApplyRequest) ProtoMessage() {} func (x *ApplyRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[41] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3640,19 +3759,22 @@ func (x *ApplyRequest) GetState() []byte { // ApplyComplete indicates a request to apply completed. type ApplyComplete struct { - state protoimpl.MessageState `protogen:"open.v1"` - State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - Timings []*Timing `protobuf:"bytes,3,rep,name=timings,proto3" json:"timings,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + Timings []*Timing `protobuf:"bytes,3,rep,name=timings,proto3" json:"timings,omitempty"` } func (x *ApplyComplete) Reset() { *x = ApplyComplete{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyComplete) String() string { @@ -3663,7 +3785,7 @@ func (*ApplyComplete) ProtoMessage() {} func (x *ApplyComplete) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[42] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3700,18 +3822,21 @@ func (x *ApplyComplete) GetTimings() []*Timing { } type GraphRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - Source GraphSource `protobuf:"varint,2,opt,name=source,proto3,enum=provisioner.GraphSource" json:"source,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Source GraphSource `protobuf:"varint,2,opt,name=source,proto3,enum=provisioner.GraphSource" json:"source,omitempty"` } func (x *GraphRequest) Reset() { *x = GraphRequest{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GraphRequest) String() string { @@ -3722,7 +3847,7 @@ func (*GraphRequest) ProtoMessage() {} func (x *GraphRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[43] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3752,7 +3877,10 @@ func (x *GraphRequest) GetSource() GraphSource { } type GraphComplete struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Timings []*Timing `protobuf:"bytes,2,rep,name=timings,proto3" json:"timings,omitempty"` Resources []*Resource `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources,omitempty"` @@ -3767,15 +3895,15 @@ type GraphComplete struct { HasAiTasks bool `protobuf:"varint,7,opt,name=has_ai_tasks,json=hasAiTasks,proto3" json:"has_ai_tasks,omitempty"` AiTasks []*AITask `protobuf:"bytes,8,rep,name=ai_tasks,json=aiTasks,proto3" json:"ai_tasks,omitempty"` HasExternalAgents bool `protobuf:"varint,9,opt,name=has_external_agents,json=hasExternalAgents,proto3" json:"has_external_agents,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *GraphComplete) Reset() { *x = GraphComplete{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GraphComplete) String() string { @@ -3786,7 +3914,7 @@ func (*GraphComplete) ProtoMessage() {} func (x *GraphComplete) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[44] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3865,23 +3993,26 @@ func (x *GraphComplete) GetHasExternalAgents() bool { } type Timing struct { - state protoimpl.MessageState `protogen:"open.v1"` - Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` - End *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` - Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` - Resource string `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"` - Stage string `protobuf:"bytes,6,opt,name=stage,proto3" json:"stage,omitempty"` - State TimingState `protobuf:"varint,7,opt,name=state,proto3,enum=provisioner.TimingState" json:"state,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` + End *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` + Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` + Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` + Resource string `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"` + Stage string `protobuf:"bytes,6,opt,name=stage,proto3" json:"stage,omitempty"` + State TimingState `protobuf:"varint,7,opt,name=state,proto3,enum=provisioner.TimingState" json:"state,omitempty"` } func (x *Timing) Reset() { *x = Timing{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Timing) String() string { @@ -3892,7 +4023,7 @@ func (*Timing) ProtoMessage() {} func (x *Timing) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[45] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3958,16 +4089,18 @@ func (x *Timing) GetState() TimingState { // CancelRequest requests that the previous request be canceled gracefully. type CancelRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } func (x *CancelRequest) Reset() { *x = CancelRequest{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CancelRequest) String() string { @@ -3978,7 +4111,7 @@ func (*CancelRequest) ProtoMessage() {} func (x *CancelRequest) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[46] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3994,8 +4127,11 @@ func (*CancelRequest) Descriptor() ([]byte, []int) { } type Request struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Type: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: // // *Request_Config // *Request_Parse @@ -4004,16 +4140,16 @@ type Request struct { // *Request_Apply // *Request_Graph // *Request_Cancel - Type isRequest_Type `protobuf_oneof:"type"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Type isRequest_Type `protobuf_oneof:"type"` } func (x *Request) Reset() { *x = Request{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Request) String() string { @@ -4024,7 +4160,7 @@ func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[47] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4039,72 +4175,58 @@ func (*Request) Descriptor() ([]byte, []int) { return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{47} } -func (x *Request) GetType() isRequest_Type { - if x != nil { - return x.Type +func (m *Request) GetType() isRequest_Type { + if m != nil { + return m.Type } return nil } func (x *Request) GetConfig() *Config { - if x != nil { - if x, ok := x.Type.(*Request_Config); ok { - return x.Config - } + if x, ok := x.GetType().(*Request_Config); ok { + return x.Config } return nil } func (x *Request) GetParse() *ParseRequest { - if x != nil { - if x, ok := x.Type.(*Request_Parse); ok { - return x.Parse - } + if x, ok := x.GetType().(*Request_Parse); ok { + return x.Parse } return nil } func (x *Request) GetInit() *InitRequest { - if x != nil { - if x, ok := x.Type.(*Request_Init); ok { - return x.Init - } + if x, ok := x.GetType().(*Request_Init); ok { + return x.Init } return nil } func (x *Request) GetPlan() *PlanRequest { - if x != nil { - if x, ok := x.Type.(*Request_Plan); ok { - return x.Plan - } + if x, ok := x.GetType().(*Request_Plan); ok { + return x.Plan } return nil } func (x *Request) GetApply() *ApplyRequest { - if x != nil { - if x, ok := x.Type.(*Request_Apply); ok { - return x.Apply - } + if x, ok := x.GetType().(*Request_Apply); ok { + return x.Apply } return nil } func (x *Request) GetGraph() *GraphRequest { - if x != nil { - if x, ok := x.Type.(*Request_Graph); ok { - return x.Graph - } + if x, ok := x.GetType().(*Request_Graph); ok { + return x.Graph } return nil } func (x *Request) GetCancel() *CancelRequest { - if x != nil { - if x, ok := x.Type.(*Request_Cancel); ok { - return x.Cancel - } + if x, ok := x.GetType().(*Request_Cancel); ok { + return x.Cancel } return nil } @@ -4156,8 +4278,11 @@ func (*Request_Graph) isRequest_Type() {} func (*Request_Cancel) isRequest_Type() {} type Response struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Type: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: // // *Response_Log // *Response_Parse @@ -4167,16 +4292,16 @@ type Response struct { // *Response_Graph // *Response_DataUpload // *Response_ChunkPiece - Type isResponse_Type `protobuf_oneof:"type"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Type isResponse_Type `protobuf_oneof:"type"` } func (x *Response) Reset() { *x = Response{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Response) String() string { @@ -4187,7 +4312,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[48] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4202,81 +4327,65 @@ func (*Response) Descriptor() ([]byte, []int) { return file_provisionersdk_proto_provisioner_proto_rawDescGZIP(), []int{48} } -func (x *Response) GetType() isResponse_Type { - if x != nil { - return x.Type +func (m *Response) GetType() isResponse_Type { + if m != nil { + return m.Type } return nil } func (x *Response) GetLog() *Log { - if x != nil { - if x, ok := x.Type.(*Response_Log); ok { - return x.Log - } + if x, ok := x.GetType().(*Response_Log); ok { + return x.Log } return nil } func (x *Response) GetParse() *ParseComplete { - if x != nil { - if x, ok := x.Type.(*Response_Parse); ok { - return x.Parse - } + if x, ok := x.GetType().(*Response_Parse); ok { + return x.Parse } return nil } func (x *Response) GetInit() *InitComplete { - if x != nil { - if x, ok := x.Type.(*Response_Init); ok { - return x.Init - } + if x, ok := x.GetType().(*Response_Init); ok { + return x.Init } return nil } func (x *Response) GetPlan() *PlanComplete { - if x != nil { - if x, ok := x.Type.(*Response_Plan); ok { - return x.Plan - } + if x, ok := x.GetType().(*Response_Plan); ok { + return x.Plan } return nil } func (x *Response) GetApply() *ApplyComplete { - if x != nil { - if x, ok := x.Type.(*Response_Apply); ok { - return x.Apply - } + if x, ok := x.GetType().(*Response_Apply); ok { + return x.Apply } return nil } func (x *Response) GetGraph() *GraphComplete { - if x != nil { - if x, ok := x.Type.(*Response_Graph); ok { - return x.Graph - } + if x, ok := x.GetType().(*Response_Graph); ok { + return x.Graph } return nil } func (x *Response) GetDataUpload() *DataUpload { - if x != nil { - if x, ok := x.Type.(*Response_DataUpload); ok { - return x.DataUpload - } + if x, ok := x.GetType().(*Response_DataUpload); ok { + return x.DataUpload } return nil } func (x *Response) GetChunkPiece() *ChunkPiece { - if x != nil { - if x, ok := x.Type.(*Response_ChunkPiece); ok { - return x.ChunkPiece - } + if x, ok := x.GetType().(*Response_ChunkPiece); ok { + return x.ChunkPiece } return nil } @@ -4334,24 +4443,27 @@ func (*Response_DataUpload) isResponse_Type() {} func (*Response_ChunkPiece) isResponse_Type() {} type DataUpload struct { - state protoimpl.MessageState `protogen:"open.v1"` - UploadType DataUploadType `protobuf:"varint,1,opt,name=upload_type,json=uploadType,proto3,enum=provisioner.DataUploadType" json:"upload_type,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UploadType DataUploadType `protobuf:"varint,1,opt,name=upload_type,json=uploadType,proto3,enum=provisioner.DataUploadType" json:"upload_type,omitempty"` // data_hash is the sha256 of the payload to be uploaded. // This is also used to uniquely identify the upload. DataHash []byte `protobuf:"bytes,2,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` // file_size is the total size of the data being uploaded. FileSize int64 `protobuf:"varint,3,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"` // Number of chunks to be uploaded. - Chunks int32 `protobuf:"varint,4,opt,name=chunks,proto3" json:"chunks,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Chunks int32 `protobuf:"varint,4,opt,name=chunks,proto3" json:"chunks,omitempty"` } func (x *DataUpload) Reset() { *x = DataUpload{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DataUpload) String() string { @@ -4362,7 +4474,7 @@ func (*DataUpload) ProtoMessage() {} func (x *DataUpload) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[49] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4407,21 +4519,24 @@ func (x *DataUpload) GetChunks() int32 { // ChunkPiece is used to stream over large files (over the 4mb limit). type ChunkPiece struct { - state protoimpl.MessageState `protogen:"open.v1"` - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // full_data_hash should match the hash from the original // DataUpload message - FullDataHash []byte `protobuf:"bytes,2,opt,name=full_data_hash,json=fullDataHash,proto3" json:"full_data_hash,omitempty"` - PieceIndex int32 `protobuf:"varint,3,opt,name=piece_index,json=pieceIndex,proto3" json:"piece_index,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + FullDataHash []byte `protobuf:"bytes,2,opt,name=full_data_hash,json=fullDataHash,proto3" json:"full_data_hash,omitempty"` + PieceIndex int32 `protobuf:"varint,3,opt,name=piece_index,json=pieceIndex,proto3" json:"piece_index,omitempty"` } func (x *ChunkPiece) Reset() { *x = ChunkPiece{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ChunkPiece) String() string { @@ -4432,7 +4547,7 @@ func (*ChunkPiece) ProtoMessage() {} func (x *ChunkPiece) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[50] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4469,22 +4584,25 @@ func (x *ChunkPiece) GetPieceIndex() int32 { } type Agent_Metadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Script string `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` - Interval int64 `protobuf:"varint,4,opt,name=interval,proto3" json:"interval,omitempty"` - Timeout int64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"` - Order int64 `protobuf:"varint,6,opt,name=order,proto3" json:"order,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Script string `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` + Interval int64 `protobuf:"varint,4,opt,name=interval,proto3" json:"interval,omitempty"` + Timeout int64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"` + Order int64 `protobuf:"varint,6,opt,name=order,proto3" json:"order,omitempty"` } func (x *Agent_Metadata) Reset() { *x = Agent_Metadata{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Agent_Metadata) String() string { @@ -4495,7 +4613,7 @@ func (*Agent_Metadata) ProtoMessage() {} func (x *Agent_Metadata) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[51] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4553,20 +4671,23 @@ func (x *Agent_Metadata) GetOrder() int64 { } type Resource_Metadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Sensitive bool `protobuf:"varint,3,opt,name=sensitive,proto3" json:"sensitive,omitempty"` - IsNull bool `protobuf:"varint,4,opt,name=is_null,json=isNull,proto3" json:"is_null,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Sensitive bool `protobuf:"varint,3,opt,name=sensitive,proto3" json:"sensitive,omitempty"` + IsNull bool `protobuf:"varint,4,opt,name=is_null,json=isNull,proto3" json:"is_null,omitempty"` } func (x *Resource_Metadata) Reset() { *x = Resource_Metadata{} - mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Resource_Metadata) String() string { @@ -4577,7 +4698,7 @@ func (*Resource_Metadata) ProtoMessage() {} func (x *Resource_Metadata) ProtoReflect() protoreflect.Message { mi := &file_provisionersdk_proto_provisioner_proto_msgTypes[53] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4622,426 +4743,750 @@ func (x *Resource_Metadata) GetIsNull() bool { var File_provisionersdk_proto_provisioner_proto protoreflect.FileDescriptor -const file_provisionersdk_proto_provisioner_proto_rawDesc = "" + - "\n" + - "&provisionersdk/proto/provisioner.proto\x12\vprovisioner\x1a\x1fgoogle/protobuf/timestamp.proto\"\a\n" + - "\x05Empty\"\xbb\x01\n" + - "\x10TemplateVariable\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + - "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x12\n" + - "\x04type\x18\x03 \x01(\tR\x04type\x12#\n" + - "\rdefault_value\x18\x04 \x01(\tR\fdefaultValue\x12\x1a\n" + - "\brequired\x18\x05 \x01(\bR\brequired\x12\x1c\n" + - "\tsensitive\x18\x06 \x01(\bR\tsensitive\"u\n" + - "\x13RichParameterOption\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + - "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x14\n" + - "\x05value\x18\x03 \x01(\tR\x05value\x12\x12\n" + - "\x04icon\x18\x04 \x01(\tR\x04icon\"\xbb\x05\n" + - "\rRichParameter\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + - "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x12\n" + - "\x04type\x18\x03 \x01(\tR\x04type\x12\x18\n" + - "\amutable\x18\x04 \x01(\bR\amutable\x12#\n" + - "\rdefault_value\x18\x05 \x01(\tR\fdefaultValue\x12\x12\n" + - "\x04icon\x18\x06 \x01(\tR\x04icon\x12:\n" + - "\aoptions\x18\a \x03(\v2 .provisioner.RichParameterOptionR\aoptions\x12)\n" + - "\x10validation_regex\x18\b \x01(\tR\x0fvalidationRegex\x12)\n" + - "\x10validation_error\x18\t \x01(\tR\x0fvalidationError\x12*\n" + - "\x0evalidation_min\x18\n" + - " \x01(\x05H\x00R\rvalidationMin\x88\x01\x01\x12*\n" + - "\x0evalidation_max\x18\v \x01(\x05H\x01R\rvalidationMax\x88\x01\x01\x121\n" + - "\x14validation_monotonic\x18\f \x01(\tR\x13validationMonotonic\x12\x1a\n" + - "\brequired\x18\r \x01(\bR\brequired\x12!\n" + - "\fdisplay_name\x18\x0f \x01(\tR\vdisplayName\x12\x14\n" + - "\x05order\x18\x10 \x01(\x05R\x05order\x12\x1c\n" + - "\tephemeral\x18\x11 \x01(\bR\tephemeral\x12;\n" + - "\tform_type\x18\x12 \x01(\x0e2\x1e.provisioner.ParameterFormTypeR\bformTypeB\x11\n" + - "\x0f_validation_minB\x11\n" + - "\x0f_validation_maxJ\x04\b\x0e\x10\x0fR\x14legacy_variable_name\">\n" + - "\x12RichParameterValue\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value\"$\n" + - "\x10ExpirationPolicy\x12\x10\n" + - "\x03ttl\x18\x01 \x01(\x05R\x03ttl\"<\n" + - "\bSchedule\x12\x12\n" + - "\x04cron\x18\x01 \x01(\tR\x04cron\x12\x1c\n" + - "\tinstances\x18\x02 \x01(\x05R\tinstances\"[\n" + - "\n" + - "Scheduling\x12\x1a\n" + - "\btimezone\x18\x01 \x01(\tR\btimezone\x121\n" + - "\bschedule\x18\x02 \x03(\v2\x15.provisioner.ScheduleR\bschedule\"\xad\x01\n" + - "\bPrebuild\x12\x1c\n" + - "\tinstances\x18\x01 \x01(\x05R\tinstances\x12J\n" + - "\x11expiration_policy\x18\x02 \x01(\v2\x1d.provisioner.ExpirationPolicyR\x10expirationPolicy\x127\n" + - "\n" + - "scheduling\x18\x03 \x01(\v2\x17.provisioner.SchedulingR\n" + - "scheduling\"\xdd\x01\n" + - "\x06Preset\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12<\n" + - "\n" + - "parameters\x18\x02 \x03(\v2\x1c.provisioner.PresetParameterR\n" + - "parameters\x121\n" + - "\bprebuild\x18\x03 \x01(\v2\x15.provisioner.PrebuildR\bprebuild\x12\x18\n" + - "\adefault\x18\x04 \x01(\bR\adefault\x12 \n" + - "\vdescription\x18\x05 \x01(\tR\vdescription\x12\x12\n" + - "\x04icon\x18\x06 \x01(\tR\x04icon\";\n" + - "\x0fPresetParameter\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value\"G\n" + - "\x13ResourceReplacement\x12\x1a\n" + - "\bresource\x18\x01 \x01(\tR\bresource\x12\x14\n" + - "\x05paths\x18\x02 \x03(\tR\x05paths\"W\n" + - "\rVariableValue\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value\x12\x1c\n" + - "\tsensitive\x18\x03 \x01(\bR\tsensitive\"J\n" + - "\x03Log\x12+\n" + - "\x05level\x18\x01 \x01(\x0e2\x15.provisioner.LogLevelR\x05level\x12\x16\n" + - "\x06output\x18\x02 \x01(\tR\x06output\"7\n" + - "\x14InstanceIdentityAuth\x12\x1f\n" + - "\vinstance_id\x18\x01 \x01(\tR\n" + - "instanceId\"J\n" + - "\x1cExternalAuthProviderResource\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + - "\boptional\x18\x02 \x01(\bR\boptional\"I\n" + - "\x14ExternalAuthProvider\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12!\n" + - "\faccess_token\x18\x02 \x01(\tR\vaccessToken\"\xda\b\n" + - "\x05Agent\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12-\n" + - "\x03env\x18\x03 \x03(\v2\x1b.provisioner.Agent.EnvEntryR\x03env\x12)\n" + - "\x10operating_system\x18\x05 \x01(\tR\x0foperatingSystem\x12\"\n" + - "\farchitecture\x18\x06 \x01(\tR\farchitecture\x12\x1c\n" + - "\tdirectory\x18\a \x01(\tR\tdirectory\x12$\n" + - "\x04apps\x18\b \x03(\v2\x10.provisioner.AppR\x04apps\x12\x16\n" + - "\x05token\x18\t \x01(\tH\x00R\x05token\x12!\n" + - "\vinstance_id\x18\n" + - " \x01(\tH\x00R\n" + - "instanceId\x12<\n" + - "\x1aconnection_timeout_seconds\x18\v \x01(\x05R\x18connectionTimeoutSeconds\x12/\n" + - "\x13troubleshooting_url\x18\f \x01(\tR\x12troubleshootingUrl\x12\x1b\n" + - "\tmotd_file\x18\r \x01(\tR\bmotdFile\x127\n" + - "\bmetadata\x18\x12 \x03(\v2\x1b.provisioner.Agent.MetadataR\bmetadata\x12;\n" + - "\fdisplay_apps\x18\x14 \x01(\v2\x18.provisioner.DisplayAppsR\vdisplayApps\x12-\n" + - "\ascripts\x18\x15 \x03(\v2\x13.provisioner.ScriptR\ascripts\x12/\n" + - "\n" + - "extra_envs\x18\x16 \x03(\v2\x10.provisioner.EnvR\textraEnvs\x12\x14\n" + - "\x05order\x18\x17 \x01(\x03R\x05order\x12S\n" + - "\x14resources_monitoring\x18\x18 \x01(\v2 .provisioner.ResourcesMonitoringR\x13resourcesMonitoring\x12?\n" + - "\rdevcontainers\x18\x19 \x03(\v2\x19.provisioner.DevcontainerR\rdevcontainers\x12\"\n" + - "\rapi_key_scope\x18\x1a \x01(\tR\vapiKeyScope\x1a\xa3\x01\n" + - "\bMetadata\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12!\n" + - "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x12\x16\n" + - "\x06script\x18\x03 \x01(\tR\x06script\x12\x1a\n" + - "\binterval\x18\x04 \x01(\x03R\binterval\x12\x18\n" + - "\atimeout\x18\x05 \x01(\x03R\atimeout\x12\x14\n" + - "\x05order\x18\x06 \x01(\x03R\x05order\x1a6\n" + - "\bEnvEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x06\n" + - "\x04authJ\x04\b\x0e\x10\x0fR\x12login_before_ready\"\x8f\x01\n" + - "\x13ResourcesMonitoring\x12:\n" + - "\x06memory\x18\x01 \x01(\v2\".provisioner.MemoryResourceMonitorR\x06memory\x12<\n" + - "\avolumes\x18\x02 \x03(\v2\".provisioner.VolumeResourceMonitorR\avolumes\"O\n" + - "\x15MemoryResourceMonitor\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x1c\n" + - "\tthreshold\x18\x02 \x01(\x05R\tthreshold\"c\n" + - "\x15VolumeResourceMonitor\x12\x12\n" + - "\x04path\x18\x01 \x01(\tR\x04path\x12\x18\n" + - "\aenabled\x18\x02 \x01(\bR\aenabled\x12\x1c\n" + - "\tthreshold\x18\x03 \x01(\x05R\tthreshold\"\xc6\x01\n" + - "\vDisplayApps\x12\x16\n" + - "\x06vscode\x18\x01 \x01(\bR\x06vscode\x12'\n" + - "\x0fvscode_insiders\x18\x02 \x01(\bR\x0evscodeInsiders\x12!\n" + - "\fweb_terminal\x18\x03 \x01(\bR\vwebTerminal\x12\x1d\n" + - "\n" + - "ssh_helper\x18\x04 \x01(\bR\tsshHelper\x124\n" + - "\x16port_forwarding_helper\x18\x05 \x01(\bR\x14portForwardingHelper\"/\n" + - "\x03Env\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value\"\x9f\x02\n" + - "\x06Script\x12!\n" + - "\fdisplay_name\x18\x01 \x01(\tR\vdisplayName\x12\x12\n" + - "\x04icon\x18\x02 \x01(\tR\x04icon\x12\x16\n" + - "\x06script\x18\x03 \x01(\tR\x06script\x12\x12\n" + - "\x04cron\x18\x04 \x01(\tR\x04cron\x12,\n" + - "\x12start_blocks_login\x18\x05 \x01(\bR\x10startBlocksLogin\x12 \n" + - "\frun_on_start\x18\x06 \x01(\bR\n" + - "runOnStart\x12\x1e\n" + - "\vrun_on_stop\x18\a \x01(\bR\trunOnStop\x12'\n" + - "\x0ftimeout_seconds\x18\b \x01(\x05R\x0etimeoutSeconds\x12\x19\n" + - "\blog_path\x18\t \x01(\tR\alogPath\"n\n" + - "\fDevcontainer\x12)\n" + - "\x10workspace_folder\x18\x01 \x01(\tR\x0fworkspaceFolder\x12\x1f\n" + - "\vconfig_path\x18\x02 \x01(\tR\n" + - "configPath\x12\x12\n" + - "\x04name\x18\x03 \x01(\tR\x04name\"\xd4\x03\n" + - "\x03App\x12\x12\n" + - "\x04slug\x18\x01 \x01(\tR\x04slug\x12!\n" + - "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x12\x18\n" + - "\acommand\x18\x03 \x01(\tR\acommand\x12\x10\n" + - "\x03url\x18\x04 \x01(\tR\x03url\x12\x12\n" + - "\x04icon\x18\x05 \x01(\tR\x04icon\x12\x1c\n" + - "\tsubdomain\x18\x06 \x01(\bR\tsubdomain\x12:\n" + - "\vhealthcheck\x18\a \x01(\v2\x18.provisioner.HealthcheckR\vhealthcheck\x12A\n" + - "\rsharing_level\x18\b \x01(\x0e2\x1c.provisioner.AppSharingLevelR\fsharingLevel\x12\x1a\n" + - "\bexternal\x18\t \x01(\bR\bexternal\x12\x14\n" + - "\x05order\x18\n" + - " \x01(\x03R\x05order\x12\x16\n" + - "\x06hidden\x18\v \x01(\bR\x06hidden\x12/\n" + - "\aopen_in\x18\f \x01(\x0e2\x16.provisioner.AppOpenInR\x06openIn\x12\x14\n" + - "\x05group\x18\r \x01(\tR\x05group\x12\x0e\n" + - "\x02id\x18\x0e \x01(\tR\x02id\x12\x18\n" + - "\atooltip\x18\x0f \x01(\tR\atooltip\"Y\n" + - "\vHealthcheck\x12\x10\n" + - "\x03url\x18\x01 \x01(\tR\x03url\x12\x1a\n" + - "\binterval\x18\x02 \x01(\x05R\binterval\x12\x1c\n" + - "\tthreshold\x18\x03 \x01(\x05R\tthreshold\"\x92\x03\n" + - "\bResource\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + - "\x04type\x18\x02 \x01(\tR\x04type\x12*\n" + - "\x06agents\x18\x03 \x03(\v2\x12.provisioner.AgentR\x06agents\x12:\n" + - "\bmetadata\x18\x04 \x03(\v2\x1e.provisioner.Resource.MetadataR\bmetadata\x12\x12\n" + - "\x04hide\x18\x05 \x01(\bR\x04hide\x12\x12\n" + - "\x04icon\x18\x06 \x01(\tR\x04icon\x12#\n" + - "\rinstance_type\x18\a \x01(\tR\finstanceType\x12\x1d\n" + - "\n" + - "daily_cost\x18\b \x01(\x05R\tdailyCost\x12\x1f\n" + - "\vmodule_path\x18\t \x01(\tR\n" + - "modulePath\x1ai\n" + - "\bMetadata\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value\x12\x1c\n" + - "\tsensitive\x18\x03 \x01(\bR\tsensitive\x12\x17\n" + - "\ais_null\x18\x04 \x01(\bR\x06isNull\"^\n" + - "\x06Module\x12\x16\n" + - "\x06source\x18\x01 \x01(\tR\x06source\x12\x18\n" + - "\aversion\x18\x02 \x01(\tR\aversion\x12\x10\n" + - "\x03key\x18\x03 \x01(\tR\x03key\x12\x10\n" + - "\x03dir\x18\x04 \x01(\tR\x03dir\"1\n" + - "\x04Role\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x15\n" + - "\x06org_id\x18\x02 \x01(\tR\x05orgId\"H\n" + - "\x15RunningAgentAuthToken\x12\x19\n" + - "\bagent_id\x18\x01 \x01(\tR\aagentId\x12\x14\n" + - "\x05token\x18\x02 \x01(\tR\x05token\"\"\n" + - "\x10AITaskSidebarApp\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x84\x01\n" + - "\x06AITask\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12C\n" + - "\vsidebar_app\x18\x02 \x01(\v2\x1d.provisioner.AITaskSidebarAppH\x00R\n" + - "sidebarApp\x88\x01\x01\x12\x15\n" + - "\x06app_id\x18\x03 \x01(\tR\x05appIdB\x0e\n" + - "\f_sidebar_app\"\xb4\n" + - "\n" + - "\bMetadata\x12\x1b\n" + - "\tcoder_url\x18\x01 \x01(\tR\bcoderUrl\x12S\n" + - "\x14workspace_transition\x18\x02 \x01(\x0e2 .provisioner.WorkspaceTransitionR\x13workspaceTransition\x12%\n" + - "\x0eworkspace_name\x18\x03 \x01(\tR\rworkspaceName\x12'\n" + - "\x0fworkspace_owner\x18\x04 \x01(\tR\x0eworkspaceOwner\x12!\n" + - "\fworkspace_id\x18\x05 \x01(\tR\vworkspaceId\x12,\n" + - "\x12workspace_owner_id\x18\x06 \x01(\tR\x10workspaceOwnerId\x122\n" + - "\x15workspace_owner_email\x18\a \x01(\tR\x13workspaceOwnerEmail\x12#\n" + - "\rtemplate_name\x18\b \x01(\tR\ftemplateName\x12)\n" + - "\x10template_version\x18\t \x01(\tR\x0ftemplateVersion\x12H\n" + - "!workspace_owner_oidc_access_token\x18\n" + - " \x01(\tR\x1dworkspaceOwnerOidcAccessToken\x12A\n" + - "\x1dworkspace_owner_session_token\x18\v \x01(\tR\x1aworkspaceOwnerSessionToken\x12\x1f\n" + - "\vtemplate_id\x18\f \x01(\tR\n" + - "templateId\x120\n" + - "\x14workspace_owner_name\x18\r \x01(\tR\x12workspaceOwnerName\x124\n" + - "\x16workspace_owner_groups\x18\x0e \x03(\tR\x14workspaceOwnerGroups\x12B\n" + - "\x1eworkspace_owner_ssh_public_key\x18\x0f \x01(\tR\x1aworkspaceOwnerSshPublicKey\x12D\n" + - "\x1fworkspace_owner_ssh_private_key\x18\x10 \x01(\tR\x1bworkspaceOwnerSshPrivateKey\x12,\n" + - "\x12workspace_build_id\x18\x11 \x01(\tR\x10workspaceBuildId\x12;\n" + - "\x1aworkspace_owner_login_type\x18\x12 \x01(\tR\x17workspaceOwnerLoginType\x12N\n" + - "\x1aworkspace_owner_rbac_roles\x18\x13 \x03(\v2\x11.provisioner.RoleR\x17workspaceOwnerRbacRoles\x12m\n" + - "\x1eprebuilt_workspace_build_stage\x18\x14 \x01(\x0e2(.provisioner.PrebuiltWorkspaceBuildStageR\x1bprebuiltWorkspaceBuildStage\x12]\n" + - "\x19running_agent_auth_tokens\x18\x15 \x03(\v2\".provisioner.RunningAgentAuthTokenR\x16runningAgentAuthTokens\x12\x17\n" + - "\atask_id\x18\x16 \x01(\tR\x06taskId\x12\x1f\n" + - "\vtask_prompt\x18\x17 \x01(\tR\n" + - "taskPrompt\x12.\n" + - "\x13template_version_id\x18\x18 \x01(\tR\x11templateVersionId\"\xa9\x02\n" + - "\x06Config\x122\n" + - "\x15provisioner_log_level\x18\x01 \x01(\tR\x13provisionerLogLevel\x12$\n" + - "\vtemplate_id\x18\x02 \x01(\tH\x00R\n" + - "templateId\x88\x01\x01\x123\n" + - "\x13template_version_id\x18\x03 \x01(\tH\x01R\x11templateVersionId\x88\x01\x01\x12F\n" + - "\x1dexp_reuse_terraform_workspace\x18\x04 \x01(\bH\x02R\x1aexpReuseTerraformWorkspace\x88\x01\x01B\x0e\n" + - "\f_template_idB\x16\n" + - "\x14_template_version_idB \n" + - "\x1e_exp_reuse_terraform_workspace\"\x0e\n" + - "\fParseRequest\"\xa3\x02\n" + - "\rParseComplete\x12\x14\n" + - "\x05error\x18\x01 \x01(\tR\x05error\x12L\n" + - "\x12template_variables\x18\x02 \x03(\v2\x1d.provisioner.TemplateVariableR\x11templateVariables\x12\x16\n" + - "\x06readme\x18\x03 \x01(\fR\x06readme\x12T\n" + - "\x0eworkspace_tags\x18\x04 \x03(\v2-.provisioner.ParseComplete.WorkspaceTagsEntryR\rworkspaceTags\x1a@\n" + - "\x12WorkspaceTagsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"q\n" + - "\vInitRequest\x126\n" + - "\x17template_source_archive\x18\x01 \x01(\fR\x15templateSourceArchive\x12*\n" + - "\x11omit_module_files\x18\x03 \x01(\bR\x0fomitModuleFiles\"\xd1\x01\n" + - "\fInitComplete\x12\x14\n" + - "\x05error\x18\x01 \x01(\tR\x05error\x12-\n" + - "\atimings\x18\x02 \x03(\v2\x13.provisioner.TimingR\atimings\x12-\n" + - "\amodules\x18\x03 \x03(\v2\x13.provisioner.ModuleR\amodules\x12!\n" + - "\fmodule_files\x18\x04 \x01(\fR\vmoduleFiles\x12*\n" + - "\x11module_files_hash\x18\x05 \x01(\fR\x0fmoduleFilesHash\"\xa8\x03\n" + - "\vPlanRequest\x121\n" + - "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12S\n" + - "\x15rich_parameter_values\x18\x02 \x03(\v2\x1f.provisioner.RichParameterValueR\x13richParameterValues\x12C\n" + - "\x0fvariable_values\x18\x03 \x03(\v2\x1a.provisioner.VariableValueR\x0evariableValues\x12Y\n" + - "\x17external_auth_providers\x18\x04 \x03(\v2!.provisioner.ExternalAuthProviderR\x15externalAuthProviders\x12[\n" + - "\x19previous_parameter_values\x18\x05 \x03(\v2\x1f.provisioner.RichParameterValueR\x17previousParameterValues\x12\x14\n" + - "\x05state\x18\x06 \x01(\fR\x05state\"\x80\x02\n" + - "\fPlanComplete\x12\x14\n" + - "\x05error\x18\x01 \x01(\tR\x05error\x12-\n" + - "\atimings\x18\x02 \x03(\v2\x13.provisioner.TimingR\atimings\x12\x12\n" + - "\x04plan\x18\x03 \x01(\fR\x04plan\x12\x1c\n" + - "\tdailyCost\x18\x04 \x01(\x05R\tdailyCost\x12U\n" + - "\x15resource_replacements\x18\x05 \x03(\v2 .provisioner.ResourceReplacementR\x14resourceReplacements\x12\"\n" + - "\rai_task_count\x18\x06 \x01(\x05R\vaiTaskCount\"W\n" + - "\fApplyRequest\x121\n" + - "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x12\x14\n" + - "\x05state\x18\x06 \x01(\fR\x05state\"j\n" + - "\rApplyComplete\x12\x14\n" + - "\x05state\x18\x01 \x01(\fR\x05state\x12\x14\n" + - "\x05error\x18\x02 \x01(\tR\x05error\x12-\n" + - "\atimings\x18\x03 \x03(\v2\x13.provisioner.TimingR\atimings\"s\n" + - "\fGraphRequest\x121\n" + - "\bmetadata\x18\x01 \x01(\v2\x15.provisioner.MetadataR\bmetadata\x120\n" + - "\x06source\x18\x02 \x01(\x0e2\x18.provisioner.GraphSourceR\x06source\"\xd9\x03\n" + - "\rGraphComplete\x12\x14\n" + - "\x05error\x18\x01 \x01(\tR\x05error\x12-\n" + - "\atimings\x18\x02 \x03(\v2\x13.provisioner.TimingR\atimings\x123\n" + - "\tresources\x18\x03 \x03(\v2\x15.provisioner.ResourceR\tresources\x12:\n" + - "\n" + - "parameters\x18\x04 \x03(\v2\x1a.provisioner.RichParameterR\n" + - "parameters\x12a\n" + - "\x17external_auth_providers\x18\x05 \x03(\v2).provisioner.ExternalAuthProviderResourceR\x15externalAuthProviders\x12-\n" + - "\apresets\x18\x06 \x03(\v2\x13.provisioner.PresetR\apresets\x12 \n" + - "\fhas_ai_tasks\x18\a \x01(\bR\n" + - "hasAiTasks\x12.\n" + - "\bai_tasks\x18\b \x03(\v2\x13.provisioner.AITaskR\aaiTasks\x12.\n" + - "\x13has_external_agents\x18\t \x01(\bR\x11hasExternalAgents\"\xfa\x01\n" + - "\x06Timing\x120\n" + - "\x05start\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x05start\x12,\n" + - "\x03end\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x03end\x12\x16\n" + - "\x06action\x18\x03 \x01(\tR\x06action\x12\x16\n" + - "\x06source\x18\x04 \x01(\tR\x06source\x12\x1a\n" + - "\bresource\x18\x05 \x01(\tR\bresource\x12\x14\n" + - "\x05stage\x18\x06 \x01(\tR\x05stage\x12.\n" + - "\x05state\x18\a \x01(\x0e2\x18.provisioner.TimingStateR\x05state\"\x0f\n" + - "\rCancelRequest\"\xef\x02\n" + - "\aRequest\x12-\n" + - "\x06config\x18\x01 \x01(\v2\x13.provisioner.ConfigH\x00R\x06config\x121\n" + - "\x05parse\x18\x02 \x01(\v2\x19.provisioner.ParseRequestH\x00R\x05parse\x12.\n" + - "\x04init\x18\x03 \x01(\v2\x18.provisioner.InitRequestH\x00R\x04init\x12.\n" + - "\x04plan\x18\x04 \x01(\v2\x18.provisioner.PlanRequestH\x00R\x04plan\x121\n" + - "\x05apply\x18\x05 \x01(\v2\x19.provisioner.ApplyRequestH\x00R\x05apply\x121\n" + - "\x05graph\x18\x06 \x01(\v2\x19.provisioner.GraphRequestH\x00R\x05graph\x124\n" + - "\x06cancel\x18\a \x01(\v2\x1a.provisioner.CancelRequestH\x00R\x06cancelB\x06\n" + - "\x04type\"\xae\x03\n" + - "\bResponse\x12$\n" + - "\x03log\x18\x01 \x01(\v2\x10.provisioner.LogH\x00R\x03log\x122\n" + - "\x05parse\x18\x02 \x01(\v2\x1a.provisioner.ParseCompleteH\x00R\x05parse\x12/\n" + - "\x04init\x18\x03 \x01(\v2\x19.provisioner.InitCompleteH\x00R\x04init\x12/\n" + - "\x04plan\x18\x04 \x01(\v2\x19.provisioner.PlanCompleteH\x00R\x04plan\x122\n" + - "\x05apply\x18\x05 \x01(\v2\x1a.provisioner.ApplyCompleteH\x00R\x05apply\x122\n" + - "\x05graph\x18\x06 \x01(\v2\x1a.provisioner.GraphCompleteH\x00R\x05graph\x12:\n" + - "\vdata_upload\x18\a \x01(\v2\x17.provisioner.DataUploadH\x00R\n" + - "dataUpload\x12:\n" + - "\vchunk_piece\x18\b \x01(\v2\x17.provisioner.ChunkPieceH\x00R\n" + - "chunkPieceB\x06\n" + - "\x04type\"\x9c\x01\n" + - "\n" + - "DataUpload\x12<\n" + - "\vupload_type\x18\x01 \x01(\x0e2\x1b.provisioner.DataUploadTypeR\n" + - "uploadType\x12\x1b\n" + - "\tdata_hash\x18\x02 \x01(\fR\bdataHash\x12\x1b\n" + - "\tfile_size\x18\x03 \x01(\x03R\bfileSize\x12\x16\n" + - "\x06chunks\x18\x04 \x01(\x05R\x06chunks\"g\n" + - "\n" + - "ChunkPiece\x12\x12\n" + - "\x04data\x18\x01 \x01(\fR\x04data\x12$\n" + - "\x0efull_data_hash\x18\x02 \x01(\fR\ffullDataHash\x12\x1f\n" + - "\vpiece_index\x18\x03 \x01(\x05R\n" + - "pieceIndex*\xa8\x01\n" + - "\x11ParameterFormType\x12\v\n" + - "\aDEFAULT\x10\x00\x12\x0e\n" + - "\n" + - "FORM_ERROR\x10\x01\x12\t\n" + - "\x05RADIO\x10\x02\x12\f\n" + - "\bDROPDOWN\x10\x03\x12\t\n" + - "\x05INPUT\x10\x04\x12\f\n" + - "\bTEXTAREA\x10\x05\x12\n" + - "\n" + - "\x06SLIDER\x10\x06\x12\f\n" + - "\bCHECKBOX\x10\a\x12\n" + - "\n" + - "\x06SWITCH\x10\b\x12\r\n" + - "\tTAGSELECT\x10\t\x12\x0f\n" + - "\vMULTISELECT\x10\n" + - "*?\n" + - "\bLogLevel\x12\t\n" + - "\x05TRACE\x10\x00\x12\t\n" + - "\x05DEBUG\x10\x01\x12\b\n" + - "\x04INFO\x10\x02\x12\b\n" + - "\x04WARN\x10\x03\x12\t\n" + - "\x05ERROR\x10\x04*;\n" + - "\x0fAppSharingLevel\x12\t\n" + - "\x05OWNER\x10\x00\x12\x11\n" + - "\rAUTHENTICATED\x10\x01\x12\n" + - "\n" + - "\x06PUBLIC\x10\x02*5\n" + - "\tAppOpenIn\x12\x0e\n" + - "\x06WINDOW\x10\x00\x1a\x02\b\x01\x12\x0f\n" + - "\vSLIM_WINDOW\x10\x01\x12\a\n" + - "\x03TAB\x10\x02*7\n" + - "\x13WorkspaceTransition\x12\t\n" + - "\x05START\x10\x00\x12\b\n" + - "\x04STOP\x10\x01\x12\v\n" + - "\aDESTROY\x10\x02*>\n" + - "\x1bPrebuiltWorkspaceBuildStage\x12\b\n" + - "\x04NONE\x10\x00\x12\n" + - "\n" + - "\x06CREATE\x10\x01\x12\t\n" + - "\x05CLAIM\x10\x02*D\n" + - "\vGraphSource\x12\x12\n" + - "\x0eSOURCE_UNKNOWN\x10\x00\x12\x0f\n" + - "\vSOURCE_PLAN\x10\x01\x12\x10\n" + - "\fSOURCE_STATE\x10\x02*5\n" + - "\vTimingState\x12\v\n" + - "\aSTARTED\x10\x00\x12\r\n" + - "\tCOMPLETED\x10\x01\x12\n" + - "\n" + - "\x06FAILED\x10\x02*G\n" + - "\x0eDataUploadType\x12\x17\n" + - "\x13UPLOAD_TYPE_UNKNOWN\x10\x00\x12\x1c\n" + - "\x18UPLOAD_TYPE_MODULE_FILES\x10\x012I\n" + - "\vProvisioner\x12:\n" + - "\aSession\x12\x14.provisioner.Request\x1a\x15.provisioner.Response(\x010\x01B0Z.github.com/coder/coder/v2/provisionersdk/protob\x06proto3" +var file_provisionersdk_proto_provisioner_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x73, 0x64, 0x6b, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0xbb, 0x01, 0x0a, 0x10, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 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, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x75, 0x0a, + 0x13, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x69, 0x63, 0x6f, 0x6e, 0x22, 0xbb, 0x05, 0x0a, 0x0d, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, + 0x63, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x29, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, + 0x67, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, + 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0d, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, + 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x6e, 0x6f, + 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, + 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, + 0x72, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x46, 0x6f, + 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x69, 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x78, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x52, 0x14, 0x6c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x12, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 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, 0x22, 0x24, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x22, 0x3c, 0x0a, 0x08, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x5b, 0x0a, 0x0a, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, + 0x12, 0x31, 0x0a, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x4a, + 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x37, 0x0a, 0x0a, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x69, 0x6e, 0x67, 0x22, 0xdd, 0x01, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x12, 0x31, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, + 0x2e, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, + 0x63, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 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, + 0x22, 0x47, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0x57, 0x0a, 0x0d, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 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, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x22, 0x4a, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x2b, 0x0a, 0x05, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, + 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x37, + 0x0a, 0x14, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x1c, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x22, 0x49, 0x0a, 0x14, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xda, + 0x08, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x03, + 0x65, 0x6e, 0x76, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x6e, + 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x29, 0x0a, 0x10, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, + 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x72, + 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x61, 0x70, 0x70, 0x73, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x04, 0x61, 0x70, 0x70, 0x73, 0x12, 0x16, + 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x18, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x74, 0x72, 0x6f, 0x75, 0x62, + 0x6c, 0x65, 0x73, 0x68, 0x6f, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x72, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x73, 0x68, 0x6f, + 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x6f, 0x74, 0x64, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x6f, 0x74, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, + 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x61, 0x70, 0x70, 0x73, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x41, 0x70, 0x70, 0x73, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x41, 0x70, 0x70, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x52, 0x07, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x0a, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x5f, 0x65, 0x6e, 0x76, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x76, + 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x53, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x6d, + 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4d, 0x6f, 0x6e, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0d, 0x64, 0x65, 0x76, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x76, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x0d, 0x64, 0x65, 0x76, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x70, 0x69, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0xa3, 0x01, 0x0a, 0x08, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 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, 0x42, 0x06, 0x0a, 0x04, 0x61, 0x75, 0x74, + 0x68, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x52, 0x12, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x62, + 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x8f, 0x01, 0x0a, 0x13, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x6e, 0x67, 0x12, 0x3a, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, + 0x3c, 0x0a, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x6f, 0x6e, + 0x69, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x22, 0x4f, 0x0a, + 0x15, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, + 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x63, + 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x22, 0xc6, 0x01, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x41, + 0x70, 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x76, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x76, + 0x73, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x76, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x73, 0x69, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x65, 0x62, 0x5f, 0x74, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x65, 0x62, 0x54, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x73, 0x68, 0x5f, 0x68, + 0x65, 0x6c, 0x70, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x73, 0x68, + 0x48, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x66, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x77, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x03, + 0x45, 0x6e, 0x76, 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, 0x22, 0x9f, 0x02, + 0x0a, 0x06, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, + 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x69, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x75, 0x6e, + 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x72, 0x75, 0x6e, 0x4f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x72, + 0x75, 0x6e, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x09, 0x72, 0x75, 0x6e, 0x4f, 0x6e, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x22, + 0x6e, 0x0a, 0x0c, 0x44, 0x65, 0x76, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, + 0x29, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x66, 0x6f, 0x6c, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0xd4, 0x03, 0x0a, 0x03, 0x41, 0x70, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x75, 0x62, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x73, 0x75, 0x62, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x0b, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x0b, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x41, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, + 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x70, + 0x70, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0c, 0x73, + 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, + 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, + 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x52, 0x06, + 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, + 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x22, 0x59, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x22, 0x92, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, + 0x0a, 0x04, 0x68, 0x69, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x68, 0x69, + 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, + 0x61, 0x69, 0x6c, 0x79, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x09, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x69, 0x0a, 0x08, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 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, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x17, 0x0a, + 0x07, 0x69, 0x73, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x69, 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x22, 0x5e, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x64, 0x69, 0x72, 0x22, 0x31, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x15, 0x52, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x22, 0x0a, 0x10, 0x41, 0x49, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x69, 0x64, + 0x65, 0x62, 0x61, 0x72, 0x41, 0x70, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x84, 0x01, 0x0a, 0x06, 0x41, 0x49, 0x54, 0x61, + 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x73, 0x69, 0x64, 0x65, 0x62, 0x61, 0x72, 0x5f, 0x61, 0x70, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x49, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x69, 0x64, 0x65, + 0x62, 0x61, 0x72, 0x41, 0x70, 0x70, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x69, 0x64, 0x65, 0x62, 0x61, + 0x72, 0x41, 0x70, 0x70, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x62, 0x61, 0x72, 0x5f, 0x61, 0x70, 0x70, 0x22, 0xb4, + 0x0a, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x63, 0x6f, 0x64, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x53, 0x0a, 0x14, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, + 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x2c, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x77, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x32, + 0x0a, 0x15, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x21, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6f, 0x69, 0x64, 0x63, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x4f, 0x69, 0x64, + 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x41, 0x0a, 0x1d, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, + 0x6e, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, + 0x12, 0x30, 0x0a, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0e, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x42, 0x0a, 0x1e, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x73, 0x73, 0x68, 0x5f, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, + 0x53, 0x73, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x44, 0x0a, 0x1f, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, + 0x73, 0x73, 0x68, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x53, 0x73, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, + 0x12, 0x3b, 0x0a, 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, + 0x77, 0x6e, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4e, 0x0a, + 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x5f, 0x72, 0x62, 0x61, 0x63, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, + 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, + 0x77, 0x6e, 0x65, 0x72, 0x52, 0x62, 0x61, 0x63, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x6d, 0x0a, + 0x1e, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, + 0x14, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, + 0x1b, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x5d, 0x0a, 0x19, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x75, + 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x16, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, + 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x72, 0x6f, + 0x6d, 0x70, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x50, + 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x18, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xa9, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x32, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x5f, + 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x46, 0x0a, 0x1d, 0x65, 0x78, 0x70, 0x5f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x65, 0x72, + 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x1a, 0x65, 0x78, 0x70, 0x52, 0x65, 0x75, + 0x73, 0x65, 0x54, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, + 0x20, 0x0a, 0x1e, 0x5f, 0x65, 0x78, 0x70, 0x5f, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x65, + 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0xa3, 0x02, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x12, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x12, + 0x54, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x61, 0x67, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x54, 0x61, 0x67, 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, 0x71, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x15, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x2a, + 0x0a, 0x11, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6f, 0x6d, 0x69, 0x74, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x0c, 0x49, + 0x6e, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, + 0x2e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x48, 0x61, 0x73, 0x68, 0x22, 0xa8, + 0x03, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x53, 0x0a, 0x15, 0x72, 0x69, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, + 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x13, 0x72, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x17, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, + 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5b, 0x0a, 0x19, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, + 0x75, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x17, 0x70, 0x72, 0x65, 0x76, + 0x69, 0x6f, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x80, 0x02, 0x0a, 0x0c, 0x50, 0x6c, + 0x61, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, + 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, + 0x6c, 0x61, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x6f, 0x73, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x6f, 0x73, + 0x74, 0x12, 0x55, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x69, 0x5f, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0b, 0x61, 0x69, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x57, 0x0a, 0x0c, + 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x6a, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6f, + 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, + 0x73, 0x22, 0x73, 0x0a, 0x0c, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, + 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xd9, 0x03, 0x0a, 0x0d, 0x47, 0x72, 0x61, 0x70, 0x68, + 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2d, + 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x69, + 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x33, 0x0a, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x69, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x61, + 0x0a, 0x17, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x15, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, + 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, + 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x61, 0x73, 0x5f, 0x61, 0x69, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x41, 0x69, 0x54, 0x61, 0x73, + 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x61, 0x69, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x41, 0x49, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x07, 0x61, 0x69, 0x54, 0x61, 0x73, + 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x68, 0x61, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x11, 0x68, 0x61, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x06, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 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, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, + 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 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, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, + 0x2e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x69, 0x6d, + 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, + 0x0f, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0xef, 0x02, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x31, 0x0a, 0x05, 0x70, + 0x61, 0x72, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, 0x12, 0x2e, + 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x2e, + 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x12, 0x31, + 0x0a, 0x05, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x6c, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x70, 0x70, 0x6c, + 0x79, 0x12, 0x31, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x22, 0xae, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x24, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x48, 0x00, + 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x32, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x48, 0x00, 0x52, 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x69, 0x6e, 0x69, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x70, 0x6c, + 0x61, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x61, + 0x70, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6f, + 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x12, + 0x32, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x47, 0x72, 0x61, + 0x70, 0x68, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x12, 0x3a, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x75, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x55, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x3a, 0x0a, 0x0b, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x69, 0x65, 0x63, 0x65, 0x48, 0x00, 0x52, + 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x69, 0x65, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, + 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, + 0x6b, 0x73, 0x22, 0x67, 0x0a, 0x0a, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x50, 0x69, 0x65, 0x63, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x75, + 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, + 0x65, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2a, 0xa8, 0x01, 0x0a, 0x11, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x09, + 0x0a, 0x05, 0x52, 0x41, 0x44, 0x49, 0x4f, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x52, 0x4f, + 0x50, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x50, 0x55, 0x54, + 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x45, 0x58, 0x54, 0x41, 0x52, 0x45, 0x41, 0x10, 0x05, + 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x4c, 0x49, 0x44, 0x45, 0x52, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, + 0x43, 0x48, 0x45, 0x43, 0x4b, 0x42, 0x4f, 0x58, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x57, + 0x49, 0x54, 0x43, 0x48, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x41, 0x47, 0x53, 0x45, 0x4c, + 0x45, 0x43, 0x54, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x53, 0x45, + 0x4c, 0x45, 0x43, 0x54, 0x10, 0x0a, 0x2a, 0x3f, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, + 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x2a, 0x3b, 0x0a, 0x0f, 0x41, 0x70, 0x70, 0x53, 0x68, + 0x61, 0x72, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x57, + 0x4e, 0x45, 0x52, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, + 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, + 0x49, 0x43, 0x10, 0x02, 0x2a, 0x35, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x6e, 0x12, 0x0e, 0x0a, 0x06, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x10, 0x00, 0x1a, 0x02, 0x08, + 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x4c, 0x49, 0x4d, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, + 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x42, 0x10, 0x02, 0x2a, 0x37, 0x0a, 0x13, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x53, 0x54, 0x4f, 0x50, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x53, 0x54, 0x52, + 0x4f, 0x59, 0x10, 0x02, 0x2a, 0x3e, 0x0a, 0x1b, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, + 0x61, 0x67, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x41, + 0x49, 0x4d, 0x10, 0x02, 0x2a, 0x44, 0x0a, 0x0b, 0x47, 0x72, 0x61, 0x70, 0x68, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x4f, 0x55, 0x52, 0x43, + 0x45, 0x5f, 0x50, 0x4c, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x02, 0x2a, 0x35, 0x0a, 0x0b, 0x54, 0x69, + 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x41, + 0x52, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, + 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, + 0x02, 0x2a, 0x47, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, + 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x55, + 0x4c, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x32, 0x49, 0x0a, 0x0b, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x07, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, + 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x73, 0x64, + 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_provisionersdk_proto_provisioner_proto_rawDescOnce sync.Once - file_provisionersdk_proto_provisioner_proto_rawDescData []byte + file_provisionersdk_proto_provisioner_proto_rawDescData = file_provisionersdk_proto_provisioner_proto_rawDesc ) func file_provisionersdk_proto_provisioner_proto_rawDescGZIP() []byte { file_provisionersdk_proto_provisioner_proto_rawDescOnce.Do(func() { - file_provisionersdk_proto_provisioner_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_provisionersdk_proto_provisioner_proto_rawDesc), len(file_provisionersdk_proto_provisioner_proto_rawDesc))) + file_provisionersdk_proto_provisioner_proto_rawDescData = protoimpl.X.CompressGZIP(file_provisionersdk_proto_provisioner_proto_rawDescData) }) return file_provisionersdk_proto_provisioner_proto_rawDescData } var file_provisionersdk_proto_provisioner_proto_enumTypes = make([]protoimpl.EnumInfo, 9) var file_provisionersdk_proto_provisioner_proto_msgTypes = make([]protoimpl.MessageInfo, 55) -var file_provisionersdk_proto_provisioner_proto_goTypes = []any{ +var file_provisionersdk_proto_provisioner_proto_goTypes = []interface{}{ (ParameterFormType)(0), // 0: provisioner.ParameterFormType (LogLevel)(0), // 1: provisioner.LogLevel (AppSharingLevel)(0), // 2: provisioner.AppSharingLevel @@ -5191,14 +5636,652 @@ func file_provisionersdk_proto_provisioner_proto_init() { if File_provisionersdk_proto_provisioner_proto != nil { return } - file_provisionersdk_proto_provisioner_proto_msgTypes[3].OneofWrappers = []any{} - file_provisionersdk_proto_provisioner_proto_msgTypes[17].OneofWrappers = []any{ + if !protoimpl.UnsafeEnabled { + file_provisionersdk_proto_provisioner_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TemplateVariable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RichParameterOption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RichParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RichParameterValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExpirationPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Schedule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Scheduling); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Prebuild); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Preset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PresetParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceReplacement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VariableValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Log); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InstanceIdentityAuth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalAuthProviderResource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalAuthProvider); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Agent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourcesMonitoring); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MemoryResourceMonitor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VolumeResourceMonitor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisplayApps); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Env); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Script); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Devcontainer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*App); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Healthcheck); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Role); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunningAgentAuthToken); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AITaskSidebarApp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AITask); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Metadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParseComplete); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitComplete); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlanRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlanComplete); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplyComplete); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GraphRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GraphComplete); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Timing); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataUpload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChunkPiece); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Agent_Metadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resource_Metadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_provisionersdk_proto_provisioner_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_provisionersdk_proto_provisioner_proto_msgTypes[17].OneofWrappers = []interface{}{ (*Agent_Token)(nil), (*Agent_InstanceId)(nil), } - file_provisionersdk_proto_provisioner_proto_msgTypes[32].OneofWrappers = []any{} - file_provisionersdk_proto_provisioner_proto_msgTypes[34].OneofWrappers = []any{} - file_provisionersdk_proto_provisioner_proto_msgTypes[47].OneofWrappers = []any{ + file_provisionersdk_proto_provisioner_proto_msgTypes[32].OneofWrappers = []interface{}{} + file_provisionersdk_proto_provisioner_proto_msgTypes[34].OneofWrappers = []interface{}{} + file_provisionersdk_proto_provisioner_proto_msgTypes[47].OneofWrappers = []interface{}{ (*Request_Config)(nil), (*Request_Parse)(nil), (*Request_Init)(nil), @@ -5207,7 +6290,7 @@ func file_provisionersdk_proto_provisioner_proto_init() { (*Request_Graph)(nil), (*Request_Cancel)(nil), } - file_provisionersdk_proto_provisioner_proto_msgTypes[48].OneofWrappers = []any{ + file_provisionersdk_proto_provisioner_proto_msgTypes[48].OneofWrappers = []interface{}{ (*Response_Log)(nil), (*Response_Parse)(nil), (*Response_Init)(nil), @@ -5221,7 +6304,7 @@ func file_provisionersdk_proto_provisioner_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_provisionersdk_proto_provisioner_proto_rawDesc), len(file_provisionersdk_proto_provisioner_proto_rawDesc)), + RawDescriptor: file_provisionersdk_proto_provisioner_proto_rawDesc, NumEnums: 9, NumMessages: 55, NumExtensions: 0, @@ -5233,6 +6316,7 @@ func file_provisionersdk_proto_provisioner_proto_init() { MessageInfos: file_provisionersdk_proto_provisioner_proto_msgTypes, }.Build() File_provisionersdk_proto_provisioner_proto = out.File + file_provisionersdk_proto_provisioner_proto_rawDesc = nil file_provisionersdk_proto_provisioner_proto_goTypes = nil file_provisionersdk_proto_provisioner_proto_depIdxs = nil } diff --git a/provisionersdk/proto/provisioner_drpc.pb.go b/provisionersdk/proto/provisioner_drpc.pb.go index c9c54002439c2..e9c75e16404a2 100644 --- a/provisionersdk/proto/provisioner_drpc.pb.go +++ b/provisionersdk/proto/provisioner_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: (devel) +// protoc-gen-go-drpc version: v0.0.34 // source: provisionersdk/proto/provisioner.proto package proto From cf5acd3b25f05268ce5ac66e8b634090b1e357f6 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 13:06:42 -0600 Subject: [PATCH 29/56] more test fixes --- cli/ssh_test.go | 10 +++++----- coderd/activitybump_test.go | 2 +- coderd/coderd_test.go | 2 +- coderd/externalauth_test.go | 12 ++++++------ coderd/gitsshkey_test.go | 4 ++-- coderd/insights_test.go | 6 +++--- coderd/prometheusmetrics/prometheusmetrics_test.go | 2 +- coderd/templates_test.go | 2 +- coderd/workspaceagents_test.go | 2 +- coderd/workspaces_test.go | 6 +++--- enterprise/coderd/gitsshkey_test.go | 2 +- enterprise/coderd/provisionerdaemons_test.go | 2 +- enterprise/coderd/workspaceproxy_test.go | 4 ++-- enterprise/coderd/workspaces_test.go | 2 +- enterprise/wsproxy/wsproxy_test.go | 4 ++-- provisioner/echo/serve.go | 10 +++++----- provisioner/echo/serve_test.go | 4 +++- provisioner/terraform/executor.go | 2 +- provisioner/terraform/planresources.go | 6 +----- provisioner/terraform/timings.go | 9 --------- provisionerd/runner/quota.go | 11 ----------- provisionerd/runner/runner.go | 2 +- provisionersdk/serve_test.go | 4 ++-- 23 files changed, 44 insertions(+), 66 deletions(-) delete mode 100644 provisionerd/runner/quota.go diff --git a/cli/ssh_test.go b/cli/ssh_test.go index 7ce9d85258fa0..fac8c754056a8 100644 --- a/cli/ssh_test.go +++ b/cli/ssh_test.go @@ -155,7 +155,7 @@ func TestSSH(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID) @@ -244,7 +244,7 @@ func TestSSH(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID) @@ -305,7 +305,7 @@ func TestSSH(t *testing.T) { echoResponses := &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), } version := coderdtest.CreateTemplateVersion(t, ownerClient, owner.OrganizationID, echoResponses) @@ -326,7 +326,7 @@ func TestSSH(t *testing.T) { echoResponses2 := &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken2), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken2), } version = coderdtest.UpdateTemplateVersion(t, ownerClient, owner.OrganizationID, echoResponses2, template.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, ownerClient, version.ID) @@ -655,7 +655,7 @@ func TestSSH(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID) diff --git a/coderd/activitybump_test.go b/coderd/activitybump_test.go index e45895dd14a66..157640d828fe5 100644 --- a/coderd/activitybump_test.go +++ b/coderd/activitybump_test.go @@ -58,7 +58,7 @@ func TestWorkspaceActivityBump(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(agentToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(agentToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) diff --git a/coderd/coderd_test.go b/coderd/coderd_test.go index c94462814999e..4608a4aad9a0e 100644 --- a/coderd/coderd_test.go +++ b/coderd/coderd_test.go @@ -199,7 +199,7 @@ func TestDERPForceWebSockets(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) diff --git a/coderd/externalauth_test.go b/coderd/externalauth_test.go index 5219b54344320..7951ec3c51d8a 100644 --- a/coderd/externalauth_test.go +++ b/coderd/externalauth_test.go @@ -476,7 +476,7 @@ func TestExternalAuthCallback(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -507,7 +507,7 @@ func TestExternalAuthCallback(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -607,7 +607,7 @@ func TestExternalAuthCallback(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -668,7 +668,7 @@ func TestExternalAuthCallback(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -714,7 +714,7 @@ func TestExternalAuthCallback(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -779,7 +779,7 @@ func TestExternalAuthCallback(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgentAndAPIKeyScope(authToken, tt.apiKeyScope), + ProvisionGraph: echo.ProvisionApplyWithAgentAndAPIKeyScope(authToken, tt.apiKeyScope), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) diff --git a/coderd/gitsshkey_test.go b/coderd/gitsshkey_test.go index 27f9121bd39b4..bd3b14f3c1fa2 100644 --- a/coderd/gitsshkey_test.go +++ b/coderd/gitsshkey_test.go @@ -111,7 +111,7 @@ func TestAgentGitSSHKey(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) project := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -149,7 +149,7 @@ func TestAgentGitSSHKey_APIKeyScopes(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgentAndAPIKeyScope(authToken, tt.apiKeyScope), + ProvisionGraph: echo.ProvisionApplyWithAgentAndAPIKeyScope(authToken, tt.apiKeyScope), }) project := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) diff --git a/coderd/insights_test.go b/coderd/insights_test.go index 8d4d48a1db178..08b44839c0376 100644 --- a/coderd/insights_test.go +++ b/coderd/insights_test.go @@ -78,7 +78,7 @@ func TestDeploymentInsights(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) require.Empty(t, template.BuildTimeStats[codersdk.WorkspaceTransitionStart]) @@ -168,7 +168,7 @@ func TestUserActivityInsights_SanityCheck(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) require.Empty(t, template.BuildTimeStats[codersdk.WorkspaceTransitionStart]) @@ -266,7 +266,7 @@ func TestUserLatencyInsights(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) require.Empty(t, template.BuildTimeStats[codersdk.WorkspaceTransitionStart]) diff --git a/coderd/prometheusmetrics/prometheusmetrics_test.go b/coderd/prometheusmetrics/prometheusmetrics_test.go index febfff9f2e433..d5d7242142a66 100644 --- a/coderd/prometheusmetrics/prometheusmetrics_test.go +++ b/coderd/prometheusmetrics/prometheusmetrics_test.go @@ -866,7 +866,7 @@ func prepareWorkspaceAndAgent(ctx context.Context, t *testing.T, client *codersd version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) diff --git a/coderd/templates_test.go b/coderd/templates_test.go index df50b28ab861e..f99f5d07be2f6 100644 --- a/coderd/templates_test.go +++ b/coderd/templates_test.go @@ -1771,7 +1771,7 @@ func TestTemplateMetrics(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) require.Equal(t, -1, template.ActiveUserCount) diff --git a/coderd/workspaceagents_test.go b/coderd/workspaceagents_test.go index 0ab4414703e51..5a4a930ebe3b2 100644 --- a/coderd/workspaceagents_test.go +++ b/coderd/workspaceagents_test.go @@ -495,7 +495,7 @@ func TestWorkspaceAgentConnectRPC(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) diff --git a/coderd/workspaces_test.go b/coderd/workspaces_test.go index 7fd2922357afc..5234baeda00b2 100644 --- a/coderd/workspaces_test.go +++ b/coderd/workspaces_test.go @@ -2194,7 +2194,7 @@ func TestWorkspaceFilterManual(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -2222,7 +2222,7 @@ func TestWorkspaceFilterManual(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -2345,7 +2345,7 @@ func TestWorkspaceFilterManual(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) _ = coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) diff --git a/enterprise/coderd/gitsshkey_test.go b/enterprise/coderd/gitsshkey_test.go index 7045c8dd860fe..c51952ce19a8a 100644 --- a/enterprise/coderd/gitsshkey_test.go +++ b/enterprise/coderd/gitsshkey_test.go @@ -62,7 +62,7 @@ func TestAgentGitSSHKeyCustomRoles(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, org.ID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) project := coderdtest.CreateTemplate(t, client, org.ID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) diff --git a/enterprise/coderd/provisionerdaemons_test.go b/enterprise/coderd/provisionerdaemons_test.go index b0d336775ef0b..9804c3b9576a7 100644 --- a/enterprise/coderd/provisionerdaemons_test.go +++ b/enterprise/coderd/provisionerdaemons_test.go @@ -270,7 +270,7 @@ func TestProvisionerDaemonServe(t *testing.T) { }, }, }}, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) require.NoError(t, err) //nolint:gocritic // Not testing file upload in this test. diff --git a/enterprise/coderd/workspaceproxy_test.go b/enterprise/coderd/workspaceproxy_test.go index d4be30d82293b..e0f73a5c0d745 100644 --- a/enterprise/coderd/workspaceproxy_test.go +++ b/enterprise/coderd/workspaceproxy_test.go @@ -633,7 +633,7 @@ func TestIssueSignedAppToken(t *testing.T) { authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -756,7 +756,7 @@ func TestReconnectingPTYSignedToken(t *testing.T) { authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) diff --git a/enterprise/coderd/workspaces_test.go b/enterprise/coderd/workspaces_test.go index 6d005e5ef7730..98cd233f29401 100644 --- a/enterprise/coderd/workspaces_test.go +++ b/enterprise/coderd/workspaces_test.go @@ -861,7 +861,7 @@ func TestWorkspaceAutobuild(t *testing.T) { version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID, func(ctr *codersdk.CreateTemplateRequest) { diff --git a/enterprise/wsproxy/wsproxy_test.go b/enterprise/wsproxy/wsproxy_test.go index c876db113ea60..fcb6493ad1e7c 100644 --- a/enterprise/wsproxy/wsproxy_test.go +++ b/enterprise/wsproxy/wsproxy_test.go @@ -173,7 +173,7 @@ func TestDERP(t *testing.T) { authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -411,7 +411,7 @@ func TestDERPEndToEnd(t *testing.T) { authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionApply: echo.ProvisionApplyWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index 79ddb99c3daa1..d532a8c5ff962 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -22,7 +22,7 @@ import ( "github.com/coder/coder/v2/provisionersdk/proto" ) -// ProvisionApplyWithAgent returns provision responses that will mock a fake +// ProvisionGraphWithAgent returns provision responses that will mock a fake // "aws_instance" resource with an agent that has the given auth token. func ProvisionApplyWithAgentAndAPIKeyScope(authToken string, apiKeyScope string) []*proto.Response { return []*proto.Response{{ @@ -45,9 +45,9 @@ func ProvisionApplyWithAgentAndAPIKeyScope(authToken string, apiKeyScope string) }} } -// ProvisionApplyWithAgent returns provision responses that will mock a fake +// ProvisionGraphWithAgent returns provision responses that will mock a fake // "aws_instance" resource with an agent that has the given auth token. -func ProvisionApplyWithAgent(authToken string) []*proto.Response { +func ProvisionGraphWithAgent(authToken string) []*proto.Response { return []*proto.Response{{ Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ @@ -201,7 +201,7 @@ func (*echo) Parse(sess *provisionersdk.Session, _ *proto.ParseRequest, _ <-chan return provisionersdk.ParseErrorf("complete response missing") } -func (e *echo) Init(sess *provisionersdk.Session, req *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete { +func (*echo) Init(sess *provisionersdk.Session, req *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete { err := sess.Files.ExtractArchive(sess.Context(), sess.Logger, afero.NewOsFs(), req.TemplateSourceArchive) if err != nil { return provisionersdk.InitErrorf("extract archive: %s", err.Error()) @@ -228,7 +228,7 @@ func (e *echo) Init(sess *provisionersdk.Session, req *proto.InitRequest, cancel return provisionersdk.InitErrorf("canceled") } -func (e *echo) Graph(sess *provisionersdk.Session, req *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete { +func (*echo) Graph(sess *provisionersdk.Session, req *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete { responses, err := readResponses( sess, strings.ToLower(req.GetMetadata().GetWorkspaceTransition().String()), diff --git a/provisioner/echo/serve_test.go b/provisioner/echo/serve_test.go index b300f2463ffef..c52901994a06e 100644 --- a/provisioner/echo/serve_test.go +++ b/provisioner/echo/serve_test.go @@ -174,7 +174,7 @@ func TestEcho(t *testing.T) { log, err = client.Recv() require.NoError(t, err) require.Equal(t, applyResponses[0].GetLog().Output, log.GetLog().Output) - complete, err = client.Recv() + _, err = client.Recv() require.NoError(t, err) err = client.Send(&proto.Request{Type: &proto.Request_Graph{ @@ -182,6 +182,8 @@ func TestEcho(t *testing.T) { Source: proto.GraphSource_SOURCE_STATE, }, }}) + require.NoError(t, err) + log, err = client.Recv() require.NoError(t, err) require.Equal(t, graphResponses[0].GetLog().Output, log.GetLog().Output) diff --git a/provisioner/terraform/executor.go b/provisioner/terraform/executor.go index c7b859a0872b1..a5ea21f4cbc65 100644 --- a/provisioner/terraform/executor.go +++ b/provisioner/terraform/executor.go @@ -368,7 +368,7 @@ func (e *executor) plan(ctx, killCtx context.Context, env, vars []string, logr l } } - state, err := ConvertPlanState(ctx, e.server.logger, plan) + state, err := ConvertPlanState(plan) if err != nil { return nil, xerrors.Errorf("convert plan state: %w", err) } diff --git a/provisioner/terraform/planresources.go b/provisioner/terraform/planresources.go index cae557b3ba4e8..3c3758df1d373 100644 --- a/provisioner/terraform/planresources.go +++ b/provisioner/terraform/planresources.go @@ -1,13 +1,9 @@ package terraform import ( - "context" - tfjson "github.com/hashicorp/terraform-json" "github.com/mitchellh/mapstructure" "golang.org/x/xerrors" - - "cdr.dev/slog" ) type PlanState struct { @@ -35,7 +31,7 @@ func planModules(plan *tfjson.Plan) []*tfjson.StateModule { // ConvertPlanState consumes a terraform plan json output and produces a thinner // version of `State` to be used before `terraform apply`. `ConvertState` // requires `terraform graph`, this does not. -func ConvertPlanState(ctx context.Context, logger slog.Logger, plan *tfjson.Plan) (*PlanState, error) { +func ConvertPlanState(plan *tfjson.Plan) (*PlanState, error) { modules := planModules(plan) var dailyCost int32 diff --git a/provisioner/terraform/timings.go b/provisioner/terraform/timings.go index 0b150d2eafd4d..05b4e0cf8bbc7 100644 --- a/provisioner/terraform/timings.go +++ b/provisioner/terraform/timings.go @@ -281,12 +281,3 @@ func (e *timingSpan) toProto() *proto.Timing { State: e.state, } } - -func createGraphTimingsEvent(event timingKind) (time.Time, *timingSpan) { - return dbtime.Now(), &timingSpan{ - kind: event, - action: "building terraform dependency graph", - provider: "terraform", - resource: "state file", - } -} diff --git a/provisionerd/runner/quota.go b/provisionerd/runner/quota.go deleted file mode 100644 index 26c7e0478ec2c..0000000000000 --- a/provisionerd/runner/quota.go +++ /dev/null @@ -1,11 +0,0 @@ -package runner - -import "github.com/coder/coder/v2/provisionersdk/proto" - -func sumDailyCost(resources []*proto.Resource) int { - var sum int - for _, r := range resources { - sum += int(r.DailyCost) - } - return sum -} diff --git a/provisionerd/runner/runner.go b/provisionerd/runner/runner.go index 1cd11d1585b7a..fb39682878f08 100644 --- a/provisionerd/runner/runner.go +++ b/provisionerd/runner/runner.go @@ -912,7 +912,7 @@ func (r *Runner) commitQuota(ctx context.Context, cost int32) *proto.FailedJob { resp, err := r.quotaCommitter.CommitQuota(ctx, &proto.CommitQuotaRequest{ JobId: r.job.JobId, // #nosec G115 - Safe conversion as cost is expected to be within int32 range for provisioning costs - DailyCost: int32(cost), + DailyCost: cost, }) if err != nil { r.queueLog(ctx, &proto.Log{ diff --git a/provisionersdk/serve_test.go b/provisionersdk/serve_test.go index ffd3c0ccf02e8..ff79c3c16b226 100644 --- a/provisionersdk/serve_test.go +++ b/provisionersdk/serve_test.go @@ -149,11 +149,11 @@ var _ provisionersdk.Server = unimplementedServer{} type unimplementedServer struct{} -func (s2 unimplementedServer) Init(s *provisionersdk.Session, r *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete { +func (unimplementedServer) Init(s *provisionersdk.Session, r *proto.InitRequest, canceledOrComplete <-chan struct{}) *proto.InitComplete { return &proto.InitComplete{} } -func (s2 unimplementedServer) Graph(s *provisionersdk.Session, r *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete { +func (unimplementedServer) Graph(s *provisionersdk.Session, r *proto.GraphRequest, canceledOrComplete <-chan struct{}) *proto.GraphComplete { return &proto.GraphComplete{Error: "unimplemented"} } From b6c26711fbba4953fbf1dea42c7dd3ac0757aa51 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 13:12:36 -0600 Subject: [PATCH 30/56] more test fixes --- enterprise/coderd/provisionerdaemons_test.go | 25 ++++++--------- provisioner/echo/serve.go | 33 +++++++++++--------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/enterprise/coderd/provisionerdaemons_test.go b/enterprise/coderd/provisionerdaemons_test.go index 9804c3b9576a7..31f31285ee263 100644 --- a/enterprise/coderd/provisionerdaemons_test.go +++ b/enterprise/coderd/provisionerdaemons_test.go @@ -256,21 +256,16 @@ func TestProvisionerDaemonServe(t *testing.T) { authToken := uuid.NewString() data, err := echo.Tar(&echo.Responses{ Parse: echo.ParseComplete, - ProvisionGraph: []*sdkproto.Response{{ - Type: &sdkproto.Response_Graph{ - Graph: &sdkproto.GraphComplete{ - Resources: []*sdkproto.Resource{{ - Name: "example", - Type: "aws_instance", - Agents: []*sdkproto.Agent{{ - Id: uuid.NewString(), - Name: "example", - }}, - }}, - }, - }, - }}, - ProvisionGraph: echo.ProvisionGraphWithAgent(authToken), + ProvisionGraph: echo.ProvisionGraphWithAgent(authToken, func(g *sdkproto.GraphComplete) { + g.Resources = []*sdkproto.Resource{{ + Name: "example", + Type: "aws_instance", + Agents: []*sdkproto.Agent{{ + Id: uuid.NewString(), + Name: "example", + }}, + }} + }), }) require.NoError(t, err) //nolint:gocritic // Not testing file upload in this test. diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index d532a8c5ff962..b8c8be97cd7c0 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -47,22 +47,27 @@ func ProvisionApplyWithAgentAndAPIKeyScope(authToken string, apiKeyScope string) // ProvisionGraphWithAgent returns provision responses that will mock a fake // "aws_instance" resource with an agent that has the given auth token. -func ProvisionGraphWithAgent(authToken string) []*proto.Response { +func ProvisionGraphWithAgent(authToken string, muts ...func(g *proto.GraphComplete)) []*proto.Response { + gc := &proto.GraphComplete{ + Resources: []*proto.Resource{{ + Name: "example", + Type: "aws_instance", + Agents: []*proto.Agent{{ + Id: uuid.NewString(), + Name: "example", + Auth: &proto.Agent_Token{ + Token: authToken, + }, + }}, + }}, + } + for _, mut := range muts { + mut(gc) + } + return []*proto.Response{{ Type: &proto.Response_Graph{ - Graph: &proto.GraphComplete{ - Resources: []*proto.Resource{{ - Name: "example", - Type: "aws_instance", - Agents: []*proto.Agent{{ - Id: uuid.NewString(), - Name: "example", - Auth: &proto.Agent_Token{ - Token: authToken, - }, - }}, - }}, - }, + Graph: gc, }, }} } From 54109a4125f81f1ecdf30fc01a210a45f1ae07a2 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 13:18:45 -0600 Subject: [PATCH 31/56] fix linting --- provisioner/echo/serve.go | 5 +++-- provisioner/echo/serve_test.go | 6 ++++++ provisionerd/runner/init.go | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index b8c8be97cd7c0..de427a16b548e 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -458,8 +458,9 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response } responses.ProvisionPlan = append(responses.ProvisionPlan, &proto.Response{ Type: &proto.Response_Plan{Plan: &proto.PlanComplete{ - Error: resp.GetGraph().GetError(), - Plan: []byte("{}"), + Error: resp.GetGraph().GetError(), + Plan: []byte("{}"), + //nolint:gosec // the number of resources will not exceed int32 AiTaskCount: int32(len(resp.GetGraph().GetAiTasks())), }}, }) diff --git a/provisioner/echo/serve_test.go b/provisioner/echo/serve_test.go index c52901994a06e..035eec4a7779f 100644 --- a/provisioner/echo/serve_test.go +++ b/provisioner/echo/serve_test.go @@ -158,22 +158,28 @@ func TestEcho(t *testing.T) { TemplateSourceArchive: data, }, }}) + require.NoError(t, err) + _, err = client.Recv() require.NoError(t, err) err = client.Send(&proto.Request{Type: &proto.Request_Plan{Plan: &proto.PlanRequest{}}}) require.NoError(t, err) + log, err := client.Recv() require.NoError(t, err) require.Equal(t, planResponses[0].GetLog().Output, log.GetLog().Output) + complete, err := client.Recv() require.NoError(t, err) + require.NotNil(t, complete) err = client.Send(&proto.Request{Type: &proto.Request_Apply{Apply: &proto.ApplyRequest{}}}) require.NoError(t, err) log, err = client.Recv() require.NoError(t, err) require.Equal(t, applyResponses[0].GetLog().Output, log.GetLog().Output) + _, err = client.Recv() require.NoError(t, err) diff --git a/provisionerd/runner/init.go b/provisionerd/runner/init.go index bdf20da9496db..975d37708e23e 100644 --- a/provisionerd/runner/init.go +++ b/provisionerd/runner/init.go @@ -11,6 +11,7 @@ import ( sdkproto "github.com/coder/coder/v2/provisionersdk/proto" ) +//nolint:revive func (r *Runner) init(ctx context.Context, omitModules bool, templateArchive []byte) (*sdkproto.InitComplete, *proto.FailedJob) { ctx, span := r.startTrace(ctx, tracing.FuncName()) defer span.End() From 9630d94076500bcb0858e7bf79c80f2b0a22c207 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 13:23:41 -0600 Subject: [PATCH 32/56] fix linting --- provisioner/echo/serve.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioner/echo/serve.go b/provisioner/echo/serve.go index de427a16b548e..8f69e9e8ab0a1 100644 --- a/provisioner/echo/serve.go +++ b/provisioner/echo/serve.go @@ -505,7 +505,7 @@ func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Response response := new(proto.Response) err = protobuf.Unmarshal(data, response) if err != nil { - return fmt.Errorf("you must have saved the wrong type, the proto cannot unmarshal: %w", err) + return xerrors.Errorf("you must have saved the wrong type, the proto cannot unmarshal: %w", err) } logger.Debug(context.Background(), "proto written", slog.F("name", name), slog.F("bytes_written", n)) From 7ac45f381eb625b96eca33b2b0255adc4a5d2330 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 13:43:59 -0600 Subject: [PATCH 33/56] timing fixes --- provisioner/terraform/provision_test.go | 6 ++ provisioner/terraform/timings_test.go | 93 ++++++++++++++----------- 2 files changed, 57 insertions(+), 42 deletions(-) diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index 9aad9d71781a4..c4ebec17c0cf3 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -138,6 +138,12 @@ func sendInit(sess proto.DRPCProvisioner_SessionClient, archive []byte) error { }}}) } +func sendGraph(sess proto.DRPCProvisioner_SessionClient, source proto.GraphSource) error { + return sess.Send(&proto.Request{Type: &proto.Request_Graph{Graph: &proto.GraphRequest{ + Source: source, + }}}) +} + func sendPlan(sess proto.DRPCProvisioner_SessionClient, transition proto.WorkspaceTransition) error { return sess.Send(&proto.Request{Type: &proto.Request_Plan{Plan: &proto.PlanRequest{ Metadata: &proto.Metadata{WorkspaceTransition: transition}, diff --git a/provisioner/terraform/timings_test.go b/provisioner/terraform/timings_test.go index b90ce63a86f89..8b35a3745f230 100644 --- a/provisioner/terraform/timings_test.go +++ b/provisioner/terraform/timings_test.go @@ -4,6 +4,8 @@ package terraform_test import ( "context" + "encoding/json" + "fmt" "os" "path/filepath" "strings" @@ -36,63 +38,65 @@ func TestTimingsFromProvision(t *testing.T) { binaryPath: fakeBin, }) sess := configure(ctx, t, api, &proto.Config{}) - _ = initDo(t, sess, testutil.CreateTar(t, nil)) ctx, cancel := context.WithTimeout(ctx, testutil.WaitLong) t.Cleanup(cancel) - // When: a plan is executed in the provisioner, our fake terraform will be executed and will produce a - // state file and some log content. - err = sendPlan(sess, proto.WorkspaceTransition_START) - require.NoError(t, err) - var timings []*proto.Timing - for { - select { - case <-ctx.Done(): - t.Fatal(ctx.Err()) - default: - } - - msg, err := sess.Recv() - require.NoError(t, err) - - if log := msg.GetLog(); log != nil { - t.Logf("%s: %s: %s", "plan", log.Level.String(), log.Output) - } - if c := msg.GetPlan(); c != nil { - require.Empty(t, c.Error) - // Capture the timing information returned by the plan process. - timings = append(timings, c.GetTimings()...) + handleResponse := func(t *testing.T, stage string) { + t.Helper() + for { + select { + case <-ctx.Done(): + t.Fatal(ctx.Err()) + default: + } + + msg, err := sess.Recv() + require.NoError(t, err) + + if log := msg.GetLog(); log != nil { + t.Logf("%s: %s: %s", stage, log.Level.String(), log.Output) + continue + } + switch { + case msg.GetInit() != nil: + timings = append(timings, msg.GetInit().GetTimings()...) + case msg.GetPlan() != nil: + timings = append(timings, msg.GetPlan().GetTimings()...) + case msg.GetApply() != nil: + timings = append(timings, msg.GetApply().GetTimings()...) + case msg.GetGraph() != nil: + timings = append(timings, msg.GetGraph().GetTimings()...) + } break } } + // When: configured, our fake terraform will fake an init setup + err = sendInit(sess, testutil.CreateTar(t, nil)) + require.NoError(t, err) + handleResponse(t, "init") + + // When: a plan is executed in the provisioner, our fake terraform will be executed and will produce a + // state file and some log content. + err = sendPlan(sess, proto.WorkspaceTransition_START) + require.NoError(t, err) + + handleResponse(t, "plan") + // When: the plan has completed, let's trigger an apply. err = sendApply(sess, proto.WorkspaceTransition_START) require.NoError(t, err) - for { - select { - case <-ctx.Done(): - t.Fatal(ctx.Err()) - default: - } + handleResponse(t, "apply") - msg, err := sess.Recv() - require.NoError(t, err) + // When: the apply has completed, graph the results + err = sendGraph(sess, proto.GraphSource_SOURCE_STATE) + require.NoError(t, err) - if log := msg.GetLog(); log != nil { - t.Logf("%s: %s: %s", "apply", log.Level.String(), log.Output) - } - if c := msg.GetApply(); c != nil { - require.Empty(t, c.Error) - // Capture the timing information returned by the apply process. - timings = append(timings, c.GetTimings()...) - break - } - } + handleResponse(t, "graph") // Sort the timings stably to keep reduce flakiness. terraform_internal.StableSortTimings(t, timings) @@ -107,7 +111,8 @@ func TestTimingsFromProvision(t *testing.T) { // NOTE: These timings have been encoded to JSON format to make the tests more readable. initTimings := terraform_internal.ParseTimingLines(t, []byte(`{"start":"2025-10-22T17:48:29Z","end":"2025-10-22T17:48:31Z","action":"load","resource":"modules","stage":"init","state":"COMPLETED"} {"start":"2025-10-22T17:48:29Z","end":"2025-10-22T17:48:29Z","action":"load","resource":"backend","stage":"init","state":"COMPLETED"} -{"start":"2025-10-22T17:48:31Z","end":"2025-10-22T17:48:34Z","action":"load","resource":"provider plugins","stage":"init","state":"COMPLETED"}`)) +{"start":"2025-10-22T17:48:31Z","end":"2025-10-22T17:48:34Z","action":"load","resource":"provider plugins","stage":"init","state":"COMPLETED"} +{}`)) planTimings := terraform_internal.ParseTimingLines(t, []byte(`{"start":"2024-08-15T08:26:39.194726Z", "end":"2024-08-15T08:26:39.195836Z", "action":"read", "source":"coder", "resource":"data.coder_parameter.memory_size", "stage":"plan", "state":"COMPLETED"} {"start":"2024-08-15T08:26:39.194726Z", "end":"2024-08-15T08:26:39.195712Z", "action":"read", "source":"coder", "resource":"data.coder_provisioner.me", "stage":"plan", "state":"COMPLETED"} {"start":"2024-08-15T08:26:39.194726Z", "end":"2024-08-15T08:26:39.195820Z", "action":"read", "source":"coder", "resource":"data.coder_workspace.me", "stage":"plan", "state":"COMPLETED"}`)) @@ -118,6 +123,10 @@ func TestTimingsFromProvision(t *testing.T) { graphTimings := terraform_internal.ParseTimingLines(t, []byte(`{"start":"2000-01-01T01:01:01.123456Z", "end":"2000-01-01T01:01:01.123456Z", "action":"building terraform dependency graph", "source":"terraform", "resource":"state file", "stage":"graph", "state":"COMPLETED"}`)) graphTiming := graphTimings[0] + for _, ti := range timings { + msg, _ := json.Marshal(ti) + fmt.Println(string(msg)) + } require.Len(t, timings, len(initTimings)+len(planTimings)+len(applyTimings)+len(graphTimings)) // init/graph timings are computed dynamically during provisioning whereas plan/apply come from the logs (fixtures) in From 3d3b2932577ae94b28a3cd77d673183cb14bdb1e Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 13:47:45 -0600 Subject: [PATCH 34/56] linting --- provisioner/terraform/timings_test.go | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/provisioner/terraform/timings_test.go b/provisioner/terraform/timings_test.go index 8b35a3745f230..55c66d0049120 100644 --- a/provisioner/terraform/timings_test.go +++ b/provisioner/terraform/timings_test.go @@ -4,8 +4,6 @@ package terraform_test import ( "context" - "encoding/json" - "fmt" "os" "path/filepath" "strings" @@ -111,8 +109,7 @@ func TestTimingsFromProvision(t *testing.T) { // NOTE: These timings have been encoded to JSON format to make the tests more readable. initTimings := terraform_internal.ParseTimingLines(t, []byte(`{"start":"2025-10-22T17:48:29Z","end":"2025-10-22T17:48:31Z","action":"load","resource":"modules","stage":"init","state":"COMPLETED"} {"start":"2025-10-22T17:48:29Z","end":"2025-10-22T17:48:29Z","action":"load","resource":"backend","stage":"init","state":"COMPLETED"} -{"start":"2025-10-22T17:48:31Z","end":"2025-10-22T17:48:34Z","action":"load","resource":"provider plugins","stage":"init","state":"COMPLETED"} -{}`)) +{"start":"2025-10-22T17:48:31Z","end":"2025-10-22T17:48:34Z","action":"load","resource":"provider plugins","stage":"init","state":"COMPLETED"}`)) planTimings := terraform_internal.ParseTimingLines(t, []byte(`{"start":"2024-08-15T08:26:39.194726Z", "end":"2024-08-15T08:26:39.195836Z", "action":"read", "source":"coder", "resource":"data.coder_parameter.memory_size", "stage":"plan", "state":"COMPLETED"} {"start":"2024-08-15T08:26:39.194726Z", "end":"2024-08-15T08:26:39.195712Z", "action":"read", "source":"coder", "resource":"data.coder_provisioner.me", "stage":"plan", "state":"COMPLETED"} {"start":"2024-08-15T08:26:39.194726Z", "end":"2024-08-15T08:26:39.195820Z", "action":"read", "source":"coder", "resource":"data.coder_workspace.me", "stage":"plan", "state":"COMPLETED"}`)) @@ -120,14 +117,18 @@ func TestTimingsFromProvision(t *testing.T) { {"start":"2024-08-15T08:26:39.626722Z", "end":"2024-08-15T08:26:39.669954Z", "action":"create", "source":"docker", "resource":"docker_image.main", "stage":"apply", "state":"COMPLETED"} {"start":"2024-08-15T08:26:39.627335Z", "end":"2024-08-15T08:26:39.660616Z", "action":"create", "source":"docker", "resource":"docker_volume.home_volume", "stage":"apply", "state":"COMPLETED"} {"start":"2024-08-15T08:26:39.682223Z", "end":"2024-08-15T08:26:40.186482Z", "action":"create", "source":"docker", "resource":"docker_container.workspace[0]", "stage":"apply", "state":"COMPLETED"}`)) - graphTimings := terraform_internal.ParseTimingLines(t, []byte(`{"start":"2000-01-01T01:01:01.123456Z", "end":"2000-01-01T01:01:01.123456Z", "action":"building terraform dependency graph", "source":"terraform", "resource":"state file", "stage":"graph", "state":"COMPLETED"}`)) - graphTiming := graphTimings[0] + // Graphing is omitted as it is captured by the stage timing, which uses now() + totals := make(map[string]int) for _, ti := range timings { - msg, _ := json.Marshal(ti) - fmt.Println(string(msg)) + totals[ti.Stage]++ } - require.Len(t, timings, len(initTimings)+len(planTimings)+len(applyTimings)+len(graphTimings)) + require.Equal(t, totals["init"], len(initTimings), "init") + require.Equal(t, totals["plan"], len(planTimings), "plan") + require.Equal(t, totals["apply"], len(applyTimings), "apply") + + // Lastly total + require.Len(t, timings, len(initTimings)+len(planTimings)+len(applyTimings)) // init/graph timings are computed dynamically during provisioning whereas plan/apply come from the logs (fixtures) in // provisioner/terraform/testdata/timings-aggregation/fake-terraform.sh. @@ -142,9 +143,6 @@ func TestTimingsFromProvision(t *testing.T) { case string(database.ProvisionerJobTimingStageInit): require.True(t, terraform_internal.TimingsAreEqual(t, []*proto.Timing{initTimings[iCursor]}, []*proto.Timing{tim})) iCursor++ - case string(database.ProvisionerJobTimingStageGraph): - tim.Start, tim.End = graphTiming.Start, graphTiming.End - require.True(t, terraform_internal.TimingsAreEqual(t, []*proto.Timing{graphTiming}, []*proto.Timing{tim})) case string(database.ProvisionerJobTimingStagePlan): require.True(t, terraform_internal.TimingsAreEqual(t, []*proto.Timing{planTimings[pCursor]}, []*proto.Timing{tim})) pCursor++ From 25aa0464f08b68922a8f7a8212ef19f815276f9b Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 13:53:57 -0600 Subject: [PATCH 35/56] more tests --- cli/create_test.go | 6 ++++-- cli/restart_test.go | 2 +- cli/start_test.go | 4 ++-- cli/task_test.go | 12 ++---------- provisioner/echo/serve_test.go | 4 +++- 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/cli/create_test.go b/cli/create_test.go index a57e359e725be..e10191f5a3e29 100644 --- a/cli/create_test.go +++ b/cli/create_test.go @@ -1573,8 +1573,10 @@ func TestCreateValidateRichParameters(t *testing.T) { func TestCreateWithGitAuth(t *testing.T) { t.Parallel() echoResponses := &echo.Responses{ - Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionPlan: echo.PlanComplete, + ProvisionGraph: []*proto.Response{ { Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ diff --git a/cli/restart_test.go b/cli/restart_test.go index dd22785416670..a8cd7ee5f362f 100644 --- a/cli/restart_test.go +++ b/cli/restart_test.go @@ -306,7 +306,7 @@ func TestRestartWithParameters(t *testing.T) { echoResponses := func() *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ diff --git a/cli/start_test.go b/cli/start_test.go index 721d43e846ce5..e710a4185e3f3 100644 --- a/cli/start_test.go +++ b/cli/start_test.go @@ -36,7 +36,7 @@ const ( func mutableParamsResponse() *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ @@ -59,7 +59,7 @@ func mutableParamsResponse() *echo.Responses { func immutableParamsResponse() *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ diff --git a/cli/task_test.go b/cli/task_test.go index 1b098175ee14c..ec44930e23b96 100644 --- a/cli/task_test.go +++ b/cli/task_test.go @@ -285,16 +285,7 @@ func createAITaskTemplate(t *testing.T, client *codersdk.Client, orgID uuid.UUID taskAppID := uuid.New() version := coderdtest.CreateTemplateVersion(t, client, orgID, &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ - { - Type: &proto.Response_Graph{ - Graph: &proto.GraphComplete{ - HasAiTasks: true, - }, - }, - }, - }, - ProvisionApply: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ @@ -321,6 +312,7 @@ func createAITaskTemplate(t *testing.T, client *codersdk.Client, orgID uuid.UUID }, }, }, + HasAiTasks: true, AiTasks: []*proto.AITask{ { AppId: taskAppID.String(), diff --git a/provisioner/echo/serve_test.go b/provisioner/echo/serve_test.go index 035eec4a7779f..d170e9bfc6809 100644 --- a/provisioner/echo/serve_test.go +++ b/provisioner/echo/serve_test.go @@ -56,7 +56,8 @@ func TestEcho(t *testing.T) { }, } data, err := echo.Tar(&echo.Responses{ - Parse: responses, + Parse: responses, + ProvisionInit: echo.InitComplete, }) require.NoError(t, err) client, err := api.Session(ctx) @@ -296,6 +297,7 @@ func TestEcho(t *testing.T) { }, }} data, err := echo.Tar(&echo.Responses{ + ProvisionInit: echo.InitComplete, ProvisionPlan: echo.PlanComplete, ProvisionApply: echo.ApplyComplete, ProvisionGraph: responses, From 9e19ed4cadb85c1cc599374b9b3cf1625ec84695 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 14:05:49 -0600 Subject: [PATCH 36/56] more tests --- cli/create_test.go | 2 +- coderd/workspacebuilds_test.go | 50 ++++++++++--------------- provisioner/terraform/provision_test.go | 5 +-- 3 files changed, 23 insertions(+), 34 deletions(-) diff --git a/cli/create_test.go b/cli/create_test.go index e10191f5a3e29..b927c3713a8c1 100644 --- a/cli/create_test.go +++ b/cli/create_test.go @@ -302,7 +302,7 @@ func TestCreate(t *testing.T) { func prepareEchoResponses(parameters []*proto.RichParameter, presets ...*proto.Preset) *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ diff --git a/coderd/workspacebuilds_test.go b/coderd/workspacebuilds_test.go index 9a992af999190..ae2e7180ea8c0 100644 --- a/coderd/workspacebuilds_test.go +++ b/coderd/workspacebuilds_test.go @@ -556,13 +556,16 @@ func TestPatchCancelWorkspaceBuild(t *testing.T) { client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true}) user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ - Parse: echo.ParseComplete, + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionGraph: echo.GraphComplete, + ProvisionPlan: echo.PlanComplete, + // Echo will never applying since there is no complete message ProvisionApply: []*proto.Response{{ Type: &proto.Response_Log{ Log: &proto.Log{}, }, }}, - ProvisionPlan: echo.PlanComplete, }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) @@ -603,13 +606,16 @@ func TestPatchCancelWorkspaceBuild(t *testing.T) { client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true, Logger: &logger}) owner := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, &echo.Responses{ - Parse: echo.ParseComplete, + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionGraph: echo.GraphComplete, + ProvisionPlan: echo.PlanComplete, + // Echo will never applying ProvisionApply: []*proto.Response{{ Type: &proto.Response_Log{ Log: &proto.Log{}, }, }}, - ProvisionPlan: echo.PlanComplete, }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID) @@ -694,13 +700,16 @@ func TestPatchCancelWorkspaceBuild(t *testing.T) { client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true}) user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ - Parse: echo.ParseComplete, + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionGraph: echo.GraphComplete, + ProvisionPlan: echo.PlanComplete, + // Echo will never applying ProvisionApply: []*proto.Response{{ Type: &proto.Response_Log{ Log: &proto.Log{}, }, }}, - ProvisionPlan: echo.PlanComplete, }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) @@ -791,13 +800,16 @@ func TestPatchCancelWorkspaceBuild(t *testing.T) { client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true}) user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ - Parse: echo.ParseComplete, + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionGraph: echo.GraphComplete, + ProvisionPlan: echo.PlanComplete, + // Echo will never applying ProvisionApply: []*proto.Response{{ Type: &proto.Response_Log{ Log: &proto.Log{}, }, }}, - ProvisionPlan: echo.PlanComplete, }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) @@ -1483,28 +1495,6 @@ func TestPostWorkspaceBuild(t *testing.T) { require.Equal(t, http.StatusBadRequest, apiErr.StatusCode()) }) - t.Run("TemplateVersionFailedImport", func(t *testing.T) { - t.Parallel() - client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true}) - user := coderdtest.CreateFirstUser(t, client) - version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ - ProvisionApply: []*proto.Response{{}}, - }) - template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) - coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) - - ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong) - defer cancel() - - _, err := client.CreateWorkspace(ctx, user.OrganizationID, codersdk.Me, codersdk.CreateWorkspaceRequest{ - TemplateID: template.ID, - Name: "workspace", - }) - var apiErr *codersdk.Error - require.ErrorAs(t, err, &apiErr) - require.Equal(t, http.StatusBadRequest, apiErr.StatusCode()) - }) - t.Run("AlreadyActive", func(t *testing.T) { t.Parallel() client, closer := coderdtest.NewWithProvisionerCloser(t, nil) diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index c4ebec17c0cf3..cb5a7e2eab62e 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -352,9 +352,8 @@ func TestProvision_TextFileBusy(t *testing.T) { }) sess := configure(ctx, t, api, &proto.Config{}) - _ = initDo(t, sess, testutil.CreateTar(t, nil)) - err = sendPlan(sess, proto.WorkspaceTransition_START) + err = sendInit(sess, testutil.CreateTar(t, nil)) require.NoError(t, err) found := false @@ -362,7 +361,7 @@ func TestProvision_TextFileBusy(t *testing.T) { msg, err := sess.Recv() require.NoError(t, err) - if c := msg.GetPlan(); c != nil { + if c := msg.GetInit(); c != nil { require.Contains(t, c.Error, "exit status 1") found = true break From 9e7fb7eb53ca0635c1a8986fba0b06576cf7560a Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 14:16:52 -0600 Subject: [PATCH 37/56] more tests --- cli/templatepresets_test.go | 2 +- cli/templateversionarchive_test.go | 1 + coderd/autobuild/lifecycle_executor_test.go | 2 ++ coderd/templateversions_test.go | 1 + enterprise/coderd/workspaces_test.go | 8 ++++++++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cli/templatepresets_test.go b/cli/templatepresets_test.go index 3468dbdf94966..4b324692b8c00 100644 --- a/cli/templatepresets_test.go +++ b/cli/templatepresets_test.go @@ -282,7 +282,7 @@ func TestTemplatePresets(t *testing.T) { func templateWithPresets(presets []*proto.Preset) *echo.Responses { return &echo.Responses{ Parse: echo.ParseComplete, - ProvisionPlan: []*proto.Response{ + ProvisionGraph: []*proto.Response{ { Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ diff --git a/cli/templateversionarchive_test.go b/cli/templateversionarchive_test.go index 02fb72a6b7b74..b26b9dd2af492 100644 --- a/cli/templateversionarchive_test.go +++ b/cli/templateversionarchive_test.go @@ -71,6 +71,7 @@ func TestTemplateVersionsArchive(t *testing.T) { Parse: echo.ParseComplete, ProvisionApply: echo.ApplyFailed, ProvisionPlan: echo.PlanFailed, + ProvisionInit: echo.InitComplete, }, func(request *codersdk.CreateTemplateVersionRequest) { request.TemplateID = template.ID }) diff --git a/coderd/autobuild/lifecycle_executor_test.go b/coderd/autobuild/lifecycle_executor_test.go index 5a902b6f9e1d2..58e48f321a8f8 100644 --- a/coderd/autobuild/lifecycle_executor_test.go +++ b/coderd/autobuild/lifecycle_executor_test.go @@ -1105,8 +1105,10 @@ func TestExecutorFailedWorkspace(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, ProvisionPlan: echo.PlanComplete, ProvisionApply: echo.ApplyFailed, + ProvisionGraph: echo.GraphComplete, }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID, func(ctr *codersdk.CreateTemplateRequest) { ctr.FailureTTLMillis = ptr.Ref[int64](failureTTL.Milliseconds()) diff --git a/coderd/templateversions_test.go b/coderd/templateversions_test.go index 1efbefba81c56..938c202863bd5 100644 --- a/coderd/templateversions_test.go +++ b/coderd/templateversions_test.go @@ -2133,6 +2133,7 @@ func TestTemplateArchiveVersions(t *testing.T) { Parse: echo.ParseComplete, ProvisionPlan: echo.PlanFailed, ProvisionApply: echo.ApplyFailed, + ProvisionInit: echo.InitComplete, }, func(req *codersdk.CreateTemplateVersionRequest) { req.TemplateID = template.ID }) diff --git a/enterprise/coderd/workspaces_test.go b/enterprise/coderd/workspaces_test.go index 98cd233f29401..7ebab011a9a65 100644 --- a/enterprise/coderd/workspaces_test.go +++ b/enterprise/coderd/workspaces_test.go @@ -629,6 +629,8 @@ func TestWorkspaceAutobuild(t *testing.T) { Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, ProvisionApply: echo.ApplyFailed, + ProvisionInit: echo.InitComplete, + ProvisionGraph: echo.GraphComplete, }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID, func(ctr *codersdk.CreateTemplateRequest) { ctr.FailureTTLMillis = ptr.Ref[int64](failureTTL.Milliseconds()) @@ -680,6 +682,8 @@ func TestWorkspaceAutobuild(t *testing.T) { Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, ProvisionApply: echo.ApplyFailed, + ProvisionInit: echo.InitComplete, + ProvisionGraph: echo.GraphComplete, }) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID, func(ctr *codersdk.CreateTemplateRequest) { ctr.FailureTTLMillis = ptr.Ref[int64](failureTTL.Milliseconds()) @@ -1384,6 +1388,8 @@ func TestWorkspaceAutobuild(t *testing.T) { Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, ProvisionApply: echo.ApplyComplete, + ProvisionInit: echo.InitComplete, + ProvisionGraph: echo.GraphComplete, }) coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID) @@ -1397,6 +1403,8 @@ func TestWorkspaceAutobuild(t *testing.T) { Parse: echo.ParseComplete, ProvisionPlan: echo.PlanComplete, ProvisionApply: echo.ApplyFailed, + ProvisionInit: echo.InitComplete, + ProvisionGraph: echo.GraphComplete, }, func(ctvr *codersdk.CreateTemplateVersionRequest) { ctvr.TemplateID = template.ID }) From 07c65a9aa1337a2612be2215f2525d90ef483640 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 26 Nov 2025 14:31:39 -0600 Subject: [PATCH 38/56] more tests --- coderd/workspaces_test.go | 6 ++++-- enterprise/coderd/workspacequota_test.go | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/coderd/workspaces_test.go b/coderd/workspaces_test.go index 5234baeda00b2..232ffd8c3f302 100644 --- a/coderd/workspaces_test.go +++ b/coderd/workspaces_test.go @@ -3392,8 +3392,10 @@ func TestWorkspaceWatcher(t *testing.T) { // Add a new version that will fail. badVersion := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ - Parse: echo.ParseComplete, - ProvisionPlan: echo.PlanComplete, + Parse: echo.ParseComplete, + ProvisionPlan: echo.PlanComplete, + ProvisionInit: echo.InitComplete, + ProvisionGraph: echo.GraphComplete, ProvisionApply: []*proto.Response{{ Type: &proto.Response_Apply{ Apply: &proto.ApplyComplete{ diff --git a/enterprise/coderd/workspacequota_test.go b/enterprise/coderd/workspacequota_test.go index 535a3aff70667..a4f82cdb01bb2 100644 --- a/enterprise/coderd/workspacequota_test.go +++ b/enterprise/coderd/workspacequota_test.go @@ -121,6 +121,13 @@ func TestWorkspaceQuota(t *testing.T) { authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ Parse: echo.ParseComplete, + ProvisionPlan: []*proto.Response{{ + Type: &proto.Response_Plan{ + Plan: &proto.PlanComplete{ + DailyCost: 1, + }, + }, + }}, ProvisionGraph: []*proto.Response{{ Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ From b93321e4c69f17022bf14dba0d64c5c0c9303856 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 10:10:29 -0600 Subject: [PATCH 39/56] more tests --- enterprise/coderd/workspacequota_test.go | 49 +++++++++++++++++++++--- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/enterprise/coderd/workspacequota_test.go b/enterprise/coderd/workspacequota_test.go index a4f82cdb01bb2..8c39a29ada248 100644 --- a/enterprise/coderd/workspacequota_test.go +++ b/enterprise/coderd/workspacequota_test.go @@ -223,7 +223,10 @@ func TestWorkspaceQuota(t *testing.T) { verifyQuota(ctx, t, client, user.OrganizationID.String(), 0, 4) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ - Parse: echo.ParseComplete, + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionPlan: echo.PlanComplete, + ProvisionApply: echo.ApplyComplete, ProvisionPlanMap: map[proto.WorkspaceTransition][]*proto.Response{ proto.WorkspaceTransition_START: planWithCost(2), proto.WorkspaceTransition_STOP: planWithCost(1), @@ -429,7 +432,16 @@ func TestWorkspaceQuota(t *testing.T) { // Create a template with a workspace that costs 1 credit authToken := uuid.NewString() version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ - Parse: echo.ParseComplete, + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionPlan: []*proto.Response{{ + Type: &proto.Response_Plan{ + Plan: &proto.PlanComplete{ + DailyCost: 1, + }, + }, + }}, + ProvisionApply: echo.ApplyComplete, ProvisionGraph: []*proto.Response{{ Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ @@ -465,7 +477,16 @@ func TestWorkspaceQuota(t *testing.T) { // Test with a template that has zero cost - should pass versionZeroCost := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ - Parse: echo.ParseComplete, + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionPlan: []*proto.Response{{ + Type: &proto.Response_Plan{ + Plan: &proto.PlanComplete{ + DailyCost: 0, + }, + }, + }}, + ProvisionApply: echo.ApplyComplete, ProvisionGraph: []*proto.Response{{ Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ @@ -549,7 +570,16 @@ func TestWorkspaceQuota(t *testing.T) { // Create templates for both organizations authToken := uuid.NewString() version1 := coderdtest.CreateTemplateVersion(t, owner, first.OrganizationID, &echo.Responses{ - Parse: echo.ParseComplete, + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionPlan: []*proto.Response{{ + Type: &proto.Response_Plan{ + Plan: &proto.PlanComplete{ + DailyCost: 1, + }, + }, + }}, + ProvisionApply: echo.ApplyComplete, ProvisionGraph: []*proto.Response{{ Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ @@ -573,7 +603,16 @@ func TestWorkspaceQuota(t *testing.T) { template1 := coderdtest.CreateTemplate(t, owner, first.OrganizationID, version1.ID) version2 := coderdtest.CreateTemplateVersion(t, owner, second.ID, &echo.Responses{ - Parse: echo.ParseComplete, + Parse: echo.ParseComplete, + ProvisionInit: echo.InitComplete, + ProvisionPlan: []*proto.Response{{ + Type: &proto.Response_Plan{ + Plan: &proto.PlanComplete{ + DailyCost: 1, + }, + }, + }}, + ProvisionApply: echo.ApplyComplete, ProvisionGraph: []*proto.Response{{ Type: &proto.Response_Graph{ Graph: &proto.GraphComplete{ From 9a6ab44b0a056b3707be552a1297f0da564fc02e Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 11:02:26 -0600 Subject: [PATCH 40/56] more tests --- provisioner/terraform/provision_test.go | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index cb5a7e2eab62e..a8329e9b9c54b 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -13,6 +13,7 @@ import ( "path/filepath" "sort" "strings" + "sync" "testing" "time" @@ -180,7 +181,7 @@ func TestProvision_Cancel(t *testing.T) { // Provisioner requires a plan before an apply, so test cancel with plan. name: "Cancel plan", mode: "plan", - startSequence: []string{"init", "plan_start"}, + startSequence: []string{"init_start", "plan_start"}, wantLog: []string{"interrupt", "exit"}, }, } @@ -202,25 +203,37 @@ func TestProvision_Cancel(t *testing.T) { binaryPath: binPath, }) sess := configure(ctx, t, api, &proto.Config{}) - _ = initDo(t, sess, testutil.CreateTar(t, nil)) - err = sendPlan(sess, proto.WorkspaceTransition_START) + err = sendInit(sess, testutil.CreateTar(t, nil)) require.NoError(t, err) + var planOnce sync.Once + for _, line := range tt.startSequence { LoopStart: msg, err := sess.Recv() require.NoError(t, err) t.Log(msg.Type) + if msg.GetInit() != nil && msg.GetInit().GetError() == "" { + planOnce.Do(func() { + t.Log("Sending terraform plan request") + // Send plan after init + err = sendPlan(sess, proto.WorkspaceTransition_START) + require.NoError(t, err) + }) + continue + } log := msg.GetLog() if log == nil { goto LoopStart } + require.Equal(t, line, log.Output) } + t.Log("Sending the cancel request") err = sess.Send(&proto.Request{ Type: &proto.Request_Cancel{ Cancel: &proto.CancelRequest{}, From 7494a9b97de76933cbd745ee25be90e1e2d493f7 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 11:14:54 -0600 Subject: [PATCH 41/56] more tests --- provisioner/terraform/provision_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index a8329e9b9c54b..5211b832f21ec 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -181,7 +181,7 @@ func TestProvision_Cancel(t *testing.T) { // Provisioner requires a plan before an apply, so test cancel with plan. name: "Cancel plan", mode: "plan", - startSequence: []string{"init_start", "plan_start"}, + startSequence: []string{"init", "plan_start"}, wantLog: []string{"interrupt", "exit"}, }, } @@ -222,7 +222,7 @@ func TestProvision_Cancel(t *testing.T) { err = sendPlan(sess, proto.WorkspaceTransition_START) require.NoError(t, err) }) - continue + goto LoopStart } log := msg.GetLog() From 07c8383dd2333d79b6f82245fe05d821a1df211e Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 12:00:17 -0600 Subject: [PATCH 42/56] fix provisioner test --- provisioner/terraform/provision_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index 5211b832f21ec..ead4f258db7ae 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -281,13 +281,13 @@ func TestProvision_CancelTimeout(t *testing.T) { }) sess := configure(ctx, t, api, &proto.Config{}) - _ = initDo(t, sess, testutil.CreateTar(t, nil)) + initDo(t, sess, testutil.CreateTar(t, nil)) // provisioner requires plan before apply, so test cancel with plan. err = sendPlan(sess, proto.WorkspaceTransition_START) require.NoError(t, err) - for _, line := range []string{"init", "plan_start"} { + for _, line := range []string{"plan_start"} { LoopStart: msg, err := sess.Recv() require.NoError(t, err) From 14ee7f2386ad8fdb7e053c8bf9949967b9926e33 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 12:31:28 -0600 Subject: [PATCH 43/56] fix script envs --- provisioner/terraform/provision_test.go | 5 +++++ provisioner/terraform/testdata/fake_cancel.sh | 2 +- provisioner/terraform/testdata/fake_cancel_hang.sh | 2 +- provisioner/terraform/testdata/fake_text_file_busy.sh | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index ead4f258db7ae..81c5fb250ca86 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -199,8 +199,13 @@ func TestProvision_Cancel(t *testing.T) { require.NoError(t, err) t.Logf("wrote fake terraform script to %s", binPath) + logger := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}). + With(slog.F("source", "provisioner")). + Leveled(slog.LevelDebug) + ctx, api := setupProvisioner(t, &provisionerServeOptions{ binaryPath: binPath, + logger: &logger, }) sess := configure(ctx, t, api, &proto.Config{}) diff --git a/provisioner/terraform/testdata/fake_cancel.sh b/provisioner/terraform/testdata/fake_cancel.sh index 2ea713379cce9..574d25a71d88d 100755 --- a/provisioner/terraform/testdata/fake_cancel.sh +++ b/provisioner/terraform/testdata/fake_cancel.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh VERSION=$1 MODE=$2 diff --git a/provisioner/terraform/testdata/fake_cancel_hang.sh b/provisioner/terraform/testdata/fake_cancel_hang.sh index e8db67f6837cd..d1c6d4955ee1a 100755 --- a/provisioner/terraform/testdata/fake_cancel_hang.sh +++ b/provisioner/terraform/testdata/fake_cancel_hang.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh VERSION=$1 shift 1 diff --git a/provisioner/terraform/testdata/fake_text_file_busy.sh b/provisioner/terraform/testdata/fake_text_file_busy.sh index 6c9cf98f46bbe..7bf9d630540f8 100755 --- a/provisioner/terraform/testdata/fake_text_file_busy.sh +++ b/provisioner/terraform/testdata/fake_text_file_busy.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh VERSION=$1 shift 1 From feb63df2d1be239a77ea695dd32330322118691e Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 12:39:19 -0600 Subject: [PATCH 44/56] fix script envs --- provisioner/terraform/executor.go | 2 +- provisioner/terraform/provision_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/provisioner/terraform/executor.go b/provisioner/terraform/executor.go index a5ea21f4cbc65..346ff6bb14d02 100644 --- a/provisioner/terraform/executor.go +++ b/provisioner/terraform/executor.go @@ -283,7 +283,7 @@ func (e *executor) init(ctx, killCtx context.Context, logr logSink) error { func checksumFileCRC32(ctx context.Context, logger slog.Logger, path string) uint32 { content, err := os.ReadFile(path) if err != nil { - logger.Debug(ctx, "file %s does not exist or can't be read, skip checksum calculation") + logger.Debug(ctx, fmt.Sprintf("file %s does not exist or can't be read, skip checksum calculation", path)) return 0 } return crc32.ChecksumIEEE(content) diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index 81c5fb250ca86..500505a52f643 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -194,7 +194,7 @@ func TestProvision_Cancel(t *testing.T) { binPath := filepath.Join(dir, "terraform") // Example: exec /path/to/terrafork_fake_cancel.sh 1.2.1 apply "$@" - content := fmt.Sprintf("#!/bin/sh\nexec %q %s %s \"$@\"\n", fakeBin, terraform.TerraformVersion.String(), tt.mode) + content := fmt.Sprintf("#!/usr/bin/env sh\nexec %q %s %s \"$@\"\n", fakeBin, terraform.TerraformVersion.String(), tt.mode) err := os.WriteFile(binPath, []byte(content), 0o755) //#nosec require.NoError(t, err) t.Logf("wrote fake terraform script to %s", binPath) From f97820772e6298ad23c1e0a502e8d0e1fd58d943 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 12:47:44 -0600 Subject: [PATCH 45/56] more fixes to provisioning test --- provisioner/terraform/provision_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/provisioner/terraform/provision_test.go b/provisioner/terraform/provision_test.go index 500505a52f643..7236f0e1b60db 100644 --- a/provisioner/terraform/provision_test.go +++ b/provisioner/terraform/provision_test.go @@ -253,10 +253,14 @@ func TestProvision_Cancel(t *testing.T) { if log := msg.GetLog(); log != nil { gotLog = append(gotLog, log.Output) - } - if c := msg.GetPlan(); c != nil { + } else if c := msg.GetPlan(); c != nil { + require.Contains(t, c.Error, "exit status 1") + break + } else if c := msg.GetInit(); c != nil { require.Contains(t, c.Error, "exit status 1") break + } else { + t.Fatalf("unexpected message: %v", msg) } } require.Equal(t, tt.wantLog, gotLog) From 08078c6d99946632d2e209db2a6ac315ae391dda Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 13:25:26 -0600 Subject: [PATCH 46/56] flip asserts --- provisioner/terraform/timings_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/provisioner/terraform/timings_test.go b/provisioner/terraform/timings_test.go index 55c66d0049120..438388d096f91 100644 --- a/provisioner/terraform/timings_test.go +++ b/provisioner/terraform/timings_test.go @@ -123,9 +123,9 @@ func TestTimingsFromProvision(t *testing.T) { for _, ti := range timings { totals[ti.Stage]++ } - require.Equal(t, totals["init"], len(initTimings), "init") - require.Equal(t, totals["plan"], len(planTimings), "plan") - require.Equal(t, totals["apply"], len(applyTimings), "apply") + require.Equal(t, len(initTimings), totals["init"], "init") + require.Equal(t, len(planTimings), totals["plan"], "plan") + require.Equal(t, len(applyTimings), totals["apply"], "apply") // Lastly total require.Len(t, timings, len(initTimings)+len(planTimings)+len(applyTimings)) From bcf9ff65d5e58ef20a257b1de85bae9f7f1b01e5 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 13:33:41 -0600 Subject: [PATCH 47/56] add logs to timing test --- provisioner/terraform/timings_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/provisioner/terraform/timings_test.go b/provisioner/terraform/timings_test.go index 438388d096f91..427a8071795fe 100644 --- a/provisioner/terraform/timings_test.go +++ b/provisioner/terraform/timings_test.go @@ -4,6 +4,8 @@ package terraform_test import ( "context" + "encoding/json" + "fmt" "os" "path/filepath" "strings" @@ -122,11 +124,12 @@ func TestTimingsFromProvision(t *testing.T) { totals := make(map[string]int) for _, ti := range timings { totals[ti.Stage]++ + data, _ := json.Marshal(ti) // for debugging + t.Log(fmt.Sprintf("Timings log :: %s", string(data))) } require.Equal(t, len(initTimings), totals["init"], "init") require.Equal(t, len(planTimings), totals["plan"], "plan") require.Equal(t, len(applyTimings), totals["apply"], "apply") - // Lastly total require.Len(t, timings, len(initTimings)+len(planTimings)+len(applyTimings)) From 336231e0e25b5018bd88130ba665846ee779e674 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 13:56:51 -0600 Subject: [PATCH 48/56] linting --- provisioner/terraform/timings_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/provisioner/terraform/timings_test.go b/provisioner/terraform/timings_test.go index 427a8071795fe..f69d383dd6cc0 100644 --- a/provisioner/terraform/timings_test.go +++ b/provisioner/terraform/timings_test.go @@ -5,7 +5,6 @@ package terraform_test import ( "context" "encoding/json" - "fmt" "os" "path/filepath" "strings" @@ -125,7 +124,7 @@ func TestTimingsFromProvision(t *testing.T) { for _, ti := range timings { totals[ti.Stage]++ data, _ := json.Marshal(ti) // for debugging - t.Log(fmt.Sprintf("Timings log :: %s", string(data))) + t.Logf("Timings log (%s) :: %s", ti.Stage, string(data)) } require.Equal(t, len(initTimings), totals["init"], "init") require.Equal(t, len(planTimings), totals["plan"], "plan") From bee693424f1d2ccbabde9b52e91ee0fbdc21618a Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 14:19:40 -0600 Subject: [PATCH 49/56] fix race condition --- provisioner/terraform/executor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/provisioner/terraform/executor.go b/provisioner/terraform/executor.go index 346ff6bb14d02..be33dbef8c17d 100644 --- a/provisioner/terraform/executor.go +++ b/provisioner/terraform/executor.go @@ -373,6 +373,8 @@ func (e *executor) plan(ctx, killCtx context.Context, env, vars []string, logr l return nil, xerrors.Errorf("convert plan state: %w", err) } + // DoneOut must be completed before we aggregate timings to ensure all logs have been processed. + <-doneOut msg := &proto.PlanComplete{ Timings: e.timings.aggregate(), Plan: planJSON, @@ -559,6 +561,8 @@ func (e *executor) apply( return nil, xerrors.Errorf("read statefile %q: %w", statefilePath, err) } + // DoneOut must be completed before we aggregate timings to ensure all logs have been processed. + <-doneOut agg := e.timings.aggregate() return &proto.ApplyComplete{ State: stateContent, From 9906c0a1274967360c819942dafc5b8fd4cd5693 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 14:53:57 -0600 Subject: [PATCH 50/56] add e2e echos --- site/e2e/helpers.ts | 59 +++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/site/e2e/helpers.ts b/site/e2e/helpers.ts index 5a9d1e2280c75..f01141a9cf5ba 100644 --- a/site/e2e/helpers.ts +++ b/site/e2e/helpers.ts @@ -562,6 +562,33 @@ const emptyPlan = new TextEncoder().encode("{}"); const createTemplateVersionTar = async ( responses: EchoProvisionerResponses = {}, ): Promise => { + if (responses.graph) { + if(!responses.apply) { + responses.apply = responses.graph.map((response) => { + if (response.log) { + return response; + } + return { + apply: { + error: response.graph?.error ?? "", + }, + }; + }); + } + if(!responses.plan) { + responses.plan = responses.graph.map((response) => { + if (response.log) { + return response; + } + return { + plan: { + error: response.graph?.error ?? "", + }, + }; + }); + } + } + if (!responses.init) { responses.init = [ { @@ -591,25 +618,11 @@ const createTemplateVersionTar = async ( ]; } if (!responses.graph) { - responses.graph = responses.apply.map((response) => { - if (response.log) { - return response; + responses.graph = [ + { + graph: {}, } - return { - graph: { - error: response.graph?.error ?? "", - resources: response.graph?.resources ?? [], - parameters: response.graph?.parameters ?? [], - externalAuthProviders: response.graph?.externalAuthProviders ?? [], - timings: response.graph?.timings ?? [], - presets: [], - resourceReplacements: [], - plan: emptyPlan, - moduleFiles: new Uint8Array(), - moduleFilesHash: new Uint8Array(), - }, - }; - }); + ] } const tar = new TarWriter(); @@ -900,6 +913,11 @@ ${options}} } return { + init: [ + { + init: {}, + } + ], parse: [ { parse: {}, @@ -930,6 +948,11 @@ export const echoResponsesWithExternalAuth = ( providers: ExternalAuthProviderResource[], ): EchoProvisionerResponses => { return { + init: [ + { + init: {}, + } + ], parse: [ { parse: {}, From 63fd15fe725c56993c5d60f95baad1a46e405a70 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 15:18:52 -0600 Subject: [PATCH 51/56] add e2e echos --- site/e2e/helpers.ts | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/site/e2e/helpers.ts b/site/e2e/helpers.ts index f01141a9cf5ba..eb9e1e62ccc85 100644 --- a/site/e2e/helpers.ts +++ b/site/e2e/helpers.ts @@ -563,7 +563,7 @@ const createTemplateVersionTar = async ( responses: EchoProvisionerResponses = {}, ): Promise => { if (responses.graph) { - if(!responses.apply) { + if (!responses.apply) { responses.apply = responses.graph.map((response) => { if (response.log) { return response; @@ -575,7 +575,7 @@ const createTemplateVersionTar = async ( }; }); } - if(!responses.plan) { + if (!responses.plan) { responses.plan = responses.graph.map((response) => { if (response.log) { return response; @@ -621,8 +621,8 @@ const createTemplateVersionTar = async ( responses.graph = [ { graph: {}, - } - ] + }, + ]; } const tar = new TarWriter(); @@ -727,17 +727,12 @@ const createTemplateVersionTar = async ( }; responses.apply.forEach((response, index) => { - response.graph = { + response.apply = { error: "", state: new Uint8Array(), - resources: [], - parameters: [], - externalAuthProviders: [], timings: [], - aiTasks: [], - ...response.graph, + ...response.apply, } as ApplyComplete; - response.graph.resources = response.graph.resources?.map(fillResource); tar.addFile( `${index}.apply.protobuf`, @@ -916,7 +911,7 @@ ${options}} init: [ { init: {}, - } + }, ], parse: [ { @@ -951,7 +946,7 @@ export const echoResponsesWithExternalAuth = ( init: [ { init: {}, - } + }, ], parse: [ { From 3d2c05902c02e3f031ad9bdf5d7fa5f0aaa9d9c3 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 15:57:59 -0600 Subject: [PATCH 52/56] e2e changes --- site/e2e/helpers.ts | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/site/e2e/helpers.ts b/site/e2e/helpers.ts index eb9e1e62ccc85..24543b78ede0b 100644 --- a/site/e2e/helpers.ts +++ b/site/e2e/helpers.ts @@ -33,7 +33,9 @@ import { AppSharingLevel, type ExternalAuthProviderResource, type GraphComplete, + type InitComplete, type ParseComplete, + type PlanComplete, type Resource, Response, type RichParameter, @@ -646,6 +648,26 @@ const createTemplateVersionTar = async ( Response.encode(response as Response).finish(), ); }); + responses.init.forEach((response, index) => { + response.init = { + error: "", + ...response.parse, + } as InitComplete; + tar.addFile( + `${index}.init.protobuf`, + Response.encode(response as Response).finish(), + ); + }); + responses.plan.forEach((response, index) => { + response.plan = { + error: "", + ...response.plan, + } as PlanComplete; + tar.addFile( + `${index}.init.protobuf`, + Response.encode(response as Response).finish(), + ); + }); const fillResource = (resource: RecursivePartial) => { if (resource.agents) { @@ -908,14 +930,19 @@ ${options}} } return { + parse: [ + { + parse: {}, + }, + ], init: [ { init: {}, }, ], - parse: [ + plan: [ { - parse: {}, + plan: {}, }, ], graph: [ From 32da8c73e590bf20fb1e3dddde19c82146b8090b Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 16:07:29 -0600 Subject: [PATCH 53/56] init timing arrays --- site/e2e/helpers.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site/e2e/helpers.ts b/site/e2e/helpers.ts index 24543b78ede0b..d3b3f45e892c1 100644 --- a/site/e2e/helpers.ts +++ b/site/e2e/helpers.ts @@ -651,7 +651,8 @@ const createTemplateVersionTar = async ( responses.init.forEach((response, index) => { response.init = { error: "", - ...response.parse, + timings: [], + ...response.init, } as InitComplete; tar.addFile( `${index}.init.protobuf`, @@ -661,6 +662,7 @@ const createTemplateVersionTar = async ( responses.plan.forEach((response, index) => { response.plan = { error: "", + timings: [], ...response.plan, } as PlanComplete; tar.addFile( From e86c6e26edb3194b3ffcdf4a9d2c6ade3eaac48b Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 16:18:41 -0600 Subject: [PATCH 54/56] init timing arrays --- site/e2e/helpers.ts | 9 +++++---- site/e2e/playwright.config.ts | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/site/e2e/helpers.ts b/site/e2e/helpers.ts index d3b3f45e892c1..7ce2136672111 100644 --- a/site/e2e/helpers.ts +++ b/site/e2e/helpers.ts @@ -652,6 +652,9 @@ const createTemplateVersionTar = async ( response.init = { error: "", timings: [], + modules: [], + moduleFiles: new Uint8Array(), + moduleFilesHash: new Uint8Array(), ...response.init, } as InitComplete; tar.addFile( @@ -663,6 +666,8 @@ const createTemplateVersionTar = async ( response.plan = { error: "", timings: [], + plan: emptyPlan, + resourceReplacements: [], ...response.plan, } as PlanComplete; tar.addFile( @@ -770,12 +775,8 @@ const createTemplateVersionTar = async ( parameters: [], externalAuthProviders: [], timings: [], - modules: [], presets: [], resourceReplacements: [], - plan: emptyPlan, - moduleFiles: new Uint8Array(), - moduleFilesHash: new Uint8Array(), aiTasks: [], ...response.graph, } as GraphComplete; diff --git a/site/e2e/playwright.config.ts b/site/e2e/playwright.config.ts index a24ab8e61e833..0a1e94f6b6aec 100644 --- a/site/e2e/playwright.config.ts +++ b/site/e2e/playwright.config.ts @@ -143,6 +143,6 @@ export default defineConfig({ CODER_OIDC_SIGN_IN_TEXT: "Hello", CODER_OIDC_ICON_URL: "/icon/google.svg", }, - reuseExistingServer: false, + reuseExistingServer: true, }, }); From 99e3fd939606fcc9c944b79353275c42a40f2ee0 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 16:45:55 -0600 Subject: [PATCH 55/56] fix serialization --- site/e2e/helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/e2e/helpers.ts b/site/e2e/helpers.ts index 7ce2136672111..5f8500550765b 100644 --- a/site/e2e/helpers.ts +++ b/site/e2e/helpers.ts @@ -671,7 +671,7 @@ const createTemplateVersionTar = async ( ...response.plan, } as PlanComplete; tar.addFile( - `${index}.init.protobuf`, + `${index}.plan.protobuf`, Response.encode(response as Response).finish(), ); }); @@ -783,7 +783,7 @@ const createTemplateVersionTar = async ( response.graph.resources = response.graph.resources?.map(fillResource); tar.addFile( - `${index}.plan.protobuf`, + `${index}.graph.protobuf`, Response.encode(response as Response).finish(), ); }); From 7add31ca0d209cc625df79c9e347a1b4a0c7c1e3 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Dec 2025 16:46:16 -0600 Subject: [PATCH 56/56] revert playwright change --- site/e2e/playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/e2e/playwright.config.ts b/site/e2e/playwright.config.ts index 0a1e94f6b6aec..a24ab8e61e833 100644 --- a/site/e2e/playwright.config.ts +++ b/site/e2e/playwright.config.ts @@ -143,6 +143,6 @@ export default defineConfig({ CODER_OIDC_SIGN_IN_TEXT: "Hello", CODER_OIDC_ICON_URL: "/icon/google.svg", }, - reuseExistingServer: true, + reuseExistingServer: false, }, });