From d3d13c94c9d166fcaf60989a28e8646766e16da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilson=20J=C3=BAnior?= Date: Fri, 27 Sep 2024 10:43:06 -0300 Subject: [PATCH 1/3] Change protobuf to exchange the team name --- pkg/build/grpc_build_v1/build_service.pb.go | 220 ++++++++++-------- pkg/build/grpc_build_v1/build_service.proto | 8 +- .../grpc_build_v1/build_service_grpc.pb.go | 14 +- 3 files changed, 132 insertions(+), 110 deletions(-) diff --git a/pkg/build/grpc_build_v1/build_service.pb.go b/pkg/build/grpc_build_v1/build_service.pb.go index ef4fe15..0bbb654 100644 --- a/pkg/build/grpc_build_v1/build_service.pb.go +++ b/pkg/build/grpc_build_v1/build_service.pb.go @@ -4,8 +4,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v5.27.3 +// protoc-gen-go v1.34.2 +// protoc v5.28.2 // source: pkg/build/grpc_build_v1/build_service.proto package grpc_build_v1 @@ -327,6 +327,8 @@ type TsuruApp struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // EnvVars are the enviroment variables set on app. EnvVars map[string]string `protobuf:"bytes,3,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Team is the Tsuru team name, optional just for compatibility with old tsuru-api versions. + Team *string `protobuf:"bytes,4,opt,name=team,proto3,oneof" json:"team,omitempty"` } func (x *TsuruApp) Reset() { @@ -375,6 +377,13 @@ func (x *TsuruApp) GetEnvVars() map[string]string { return nil } +func (x *TsuruApp) GetTeam() string { + if x != nil && x.Team != nil { + return *x.Team + } + return "" +} + type TsuruJob struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -384,6 +393,8 @@ type TsuruJob struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // EnvVars are the enviroment variables set on the job. EnvVars map[string]string `protobuf:"bytes,3,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Team is the Tsuru team name, optional just for compatibility with old tsuru-api versions. + Team *string `protobuf:"bytes,4,opt,name=team,proto3,oneof" json:"team,omitempty"` } func (x *TsuruJob) Reset() { @@ -432,6 +443,13 @@ func (x *TsuruJob) GetEnvVars() map[string]string { return nil } +func (x *TsuruJob) GetTeam() string { + if x != nil && x.Team != nil { + return *x.Team + } + return "" +} + type TsuruPlatform struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -713,97 +731,101 @@ var file_pkg_build_grpc_build_v1_build_service_proto_rawDesc = []byte{ 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x75, 0x72, 0x75, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x73, 0x75, 0x72, 0x75, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x9b, 0x01, 0x0a, 0x08, 0x54, + 0x69, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xbd, 0x01, 0x0a, 0x08, 0x54, 0x73, 0x75, 0x72, 0x75, 0x41, 0x70, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x75, 0x72, 0x75, 0x41, 0x70, 0x70, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, - 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 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, 0x9b, 0x01, 0x0a, 0x08, 0x54, 0x73, 0x75, - 0x72, 0x75, 0x4a, 0x6f, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x65, 0x6e, 0x76, - 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x75, 0x72, - 0x75, 0x4a, 0x6f, 0x62, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, - 0x76, 0x56, 0x61, 0x72, 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, 0x23, 0x0a, 0x0d, 0x54, 0x73, 0x75, 0x72, 0x75, 0x50, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x54, 0x0a, 0x0b, 0x50, - 0x75, 0x73, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, - 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x10, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, - 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x12, 0x23, 0x0a, 0x0d, - 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, - 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x44, - 0x69, 0x72, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x54, 0x73, 0x75, 0x72, 0x75, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x63, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x63, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x74, 0x73, 0x75, 0x72, 0x75, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x75, 0x72, 0x75, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x46, 0x0a, - 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x5f, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0xac, 0x04, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4b, - 0x69, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, - 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, - 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x4f, 0x55, - 0x52, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x2c, 0x0a, 0x28, - 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, - 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, - 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, - 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, - 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, - 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, - 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, - 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, - 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x49, - 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, - 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, - 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, - 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, - 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, - 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, - 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x57, 0x49, - 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, - 0x47, 0x45, 0x10, 0x05, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, - 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x57, 0x49, 0x54, 0x48, - 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, - 0x06, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, - 0x4a, 0x4f, 0x42, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, - 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, - 0x07, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, - 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, - 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, - 0x07, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, - 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, - 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x08, - 0x1a, 0x02, 0x10, 0x01, 0x32, 0x4f, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x46, 0x0a, - 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x73, 0x75, 0x72, 0x75, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x17, 0x0a, 0x04, + 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, + 0x61, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 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, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x22, 0xbd, 0x01, 0x0a, 0x08, 0x54, + 0x73, 0x75, 0x72, 0x75, 0x4a, 0x6f, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x65, + 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, + 0x75, 0x72, 0x75, 0x4a, 0x6f, 0x62, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x17, 0x0a, 0x04, + 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, + 0x61, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 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, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x23, 0x0a, 0x0d, 0x54, 0x73, + 0x75, 0x72, 0x75, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x54, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, + 0x63, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, + 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, + 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, + 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, + 0x5f, 0x64, 0x69, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, + 0x69, 0x6e, 0x67, 0x44, 0x69, 0x72, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x54, 0x73, 0x75, 0x72, 0x75, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x63, 0x66, 0x69, + 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x63, 0x66, 0x69, + 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x75, 0x72, 0x75, 0x5f, 0x79, 0x61, 0x6d, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x75, 0x72, 0x75, 0x59, 0x61, 0x6d, + 0x6c, 0x12, 0x46, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0xac, 0x04, 0x0a, 0x09, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x49, 0x4c, 0x44, + 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, + 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, + 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, + 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, + 0x50, 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, + 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x2d, + 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, + 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, + 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x2e, 0x0a, + 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, + 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, + 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x2c, 0x0a, + 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, + 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, + 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2d, 0x0a, 0x29, 0x42, + 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, + 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, + 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, + 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, + 0x4d, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, + 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x05, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x49, 0x4c, + 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, + 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, + 0x49, 0x4c, 0x45, 0x10, 0x06, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, + 0x49, 0x4e, 0x44, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x57, + 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, + 0x41, 0x47, 0x45, 0x10, 0x07, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, + 0x49, 0x4e, 0x44, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, + 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, + 0x41, 0x47, 0x45, 0x10, 0x07, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, + 0x49, 0x4e, 0x44, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, + 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, + 0x4c, 0x45, 0x10, 0x08, 0x1a, 0x02, 0x10, 0x01, 0x32, 0x4f, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x12, 0x46, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x73, 0x75, 0x72, 0x75, 0x2f, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -820,7 +842,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP() []byte { var file_pkg_build_grpc_build_v1_build_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_pkg_build_grpc_build_v1_build_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_pkg_build_grpc_build_v1_build_service_proto_goTypes = []interface{}{ +var file_pkg_build_grpc_build_v1_build_service_proto_goTypes = []any{ (BuildKind)(0), // 0: grpc_build_v1.BuildKind (*BuildRequest)(nil), // 1: grpc_build_v1.BuildRequest (*BuildResponse)(nil), // 2: grpc_build_v1.BuildResponse @@ -858,7 +880,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*BuildRequest); i { case 0: return &v.state @@ -870,7 +892,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { return nil } } - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*BuildResponse); i { case 0: return &v.state @@ -882,7 +904,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { return nil } } - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TsuruApp); i { case 0: return &v.state @@ -894,7 +916,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { return nil } } - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TsuruJob); i { case 0: return &v.state @@ -906,7 +928,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { return nil } } - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*TsuruPlatform); i { case 0: return &v.state @@ -918,7 +940,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { return nil } } - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*PushOptions); i { case 0: return &v.state @@ -930,7 +952,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { return nil } } - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ContainerImageConfig); i { case 0: return &v.state @@ -942,7 +964,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { return nil } } - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*TsuruConfig); i { case 0: return &v.state @@ -955,10 +977,12 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { } } } - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[1].OneofWrappers = []any{ (*BuildResponse_Output)(nil), (*BuildResponse_TsuruConfig)(nil), } + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[2].OneofWrappers = []any{} + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/pkg/build/grpc_build_v1/build_service.proto b/pkg/build/grpc_build_v1/build_service.proto index 7259763..a6fb66e 100644 --- a/pkg/build/grpc_build_v1/build_service.proto +++ b/pkg/build/grpc_build_v1/build_service.proto @@ -73,7 +73,7 @@ enum BuildKind { BUILD_KIND_JOB_CREATE_WITH_CONTAINER_IMAGE = 7; // tsuru job create ... -i registry.example.com/tsuru/my-job:latest BUILD_KIND_JOB_DEPLOY_WITH_CONTAINER_IMAGE = 7; // tsuru job deploy ... -i registry.example.com/tsuru/my-job:latest - BUILD_KIND_JOB_DEPLOY_WITH_CONTAINER_FILE = 8; // tsuru job deploy ... --dockerfile Dockerfile + BUILD_KIND_JOB_DEPLOY_WITH_CONTAINER_FILE = 8; // tsuru job deploy ... --dockerfile Dockerfile } message BuildResponse { @@ -90,6 +90,9 @@ message TsuruApp { string name = 1; // EnvVars are the enviroment variables set on app. map env_vars = 3; + + // Team is the Tsuru team name, optional just for compatibility with old tsuru-api versions. + optional string team = 4; } message TsuruJob { @@ -97,6 +100,9 @@ message TsuruJob { string name = 1; // EnvVars are the enviroment variables set on the job. map env_vars = 3; + + // Team is the Tsuru team name, optional just for compatibility with old tsuru-api versions. + optional string team = 4; } message TsuruPlatform { diff --git a/pkg/build/grpc_build_v1/build_service_grpc.pb.go b/pkg/build/grpc_build_v1/build_service_grpc.pb.go index ceaeb50..a263b57 100644 --- a/pkg/build/grpc_build_v1/build_service_grpc.pb.go +++ b/pkg/build/grpc_build_v1/build_service_grpc.pb.go @@ -1,11 +1,7 @@ -// Copyright 2024 tsuru authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v5.27.3 +// - protoc-gen-go-grpc v1.2.0 +// - protoc v5.28.2 // source: pkg/build/grpc_build_v1/build_service.proto package grpc_build_v1 @@ -22,10 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Build_Build_FullMethodName = "/grpc_build_v1.Build/Build" -) - // BuildClient is the client API for Build service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -43,7 +35,7 @@ func NewBuildClient(cc grpc.ClientConnInterface) BuildClient { } func (c *buildClient) Build(ctx context.Context, in *BuildRequest, opts ...grpc.CallOption) (Build_BuildClient, error) { - stream, err := c.cc.NewStream(ctx, &Build_ServiceDesc.Streams[0], Build_Build_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &Build_ServiceDesc.Streams[0], "/grpc_build_v1.Build/Build", opts...) if err != nil { return nil, err } From 82b566e339a79fabad2ffd4d3349aa0352859e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilson=20J=C3=BAnior?= Date: Fri, 27 Sep 2024 16:33:01 -0300 Subject: [PATCH 2/3] refact: create a module to do autodiscovery of buildkit pods --- main.go | 3 +- .../k8s.go} | 78 +++++++++++++------ pkg/build/buildkit/build.go | 29 +++---- pkg/build/metadata/metadata.go | 1 + 4 files changed, 66 insertions(+), 45 deletions(-) rename pkg/build/buildkit/{k8s_autodiscovery.go => autodiscovery/k8s.go} (76%) diff --git a/main.go b/main.go index 3ad9e24..12ea0b3 100644 --- a/main.go +++ b/main.go @@ -25,6 +25,7 @@ import ( "github.com/tsuru/deploy-agent/pkg/build" "github.com/tsuru/deploy-agent/pkg/build/buildkit" + "github.com/tsuru/deploy-agent/pkg/build/buildkit/autodiscovery" buildpb "github.com/tsuru/deploy-agent/pkg/build/grpc_build_v1" "github.com/tsuru/deploy-agent/pkg/health" "github.com/tsuru/deploy-agent/pkg/repository" @@ -181,7 +182,7 @@ func newBuildKit() (*buildkit.BuildKit, error) { return nil, err } - kdopts := buildkit.KubernertesDiscoveryOptions{ + kdopts := autodiscovery.KubernertesDiscoveryOptions{ Timeout: cfg.BuildKitAutoDiscoveryTimeout, PodSelector: cfg.BuildKitAutoDiscoveryKubernetesPodSelector, Namespace: cfg.BuildKitAutoDiscoveryKubernetesNamespace, diff --git a/pkg/build/buildkit/k8s_autodiscovery.go b/pkg/build/buildkit/autodiscovery/k8s.go similarity index 76% rename from pkg/build/buildkit/k8s_autodiscovery.go rename to pkg/build/buildkit/autodiscovery/k8s.go index 71b6199..6d2260f 100644 --- a/pkg/build/buildkit/k8s_autodiscovery.go +++ b/pkg/build/buildkit/autodiscovery/k8s.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package buildkit +package autodiscovery import ( "context" @@ -32,7 +32,7 @@ import ( ) var ( - noopFunc = func() {} + noopCleaner = func() {} tsuruAppGVR = schema.GroupVersionResource{ Group: "tsuru.io", @@ -41,20 +41,32 @@ var ( } ) -type k8sDiscoverer struct { - cs *kubernetes.Clientset - dcs dynamic.Interface +type KubernertesDiscoveryOptions struct { + PodSelector string + Namespace string + LeasePrefix string + Statefulset string + Port int + UseSameNamespaceAsApp bool + SetTsuruAppLabel bool + ScaleGracefulPeriod time.Duration + Timeout time.Duration } -func (d *k8sDiscoverer) Discover(ctx context.Context, opts KubernertesDiscoveryOptions, req *pb.BuildRequest, w io.Writer) (*client.Client, func(), error) { +type K8sDiscoverer struct { + KubernetesInterface kubernetes.Interface + DynamicInterface dynamic.Interface +} + +func (d *K8sDiscoverer) Discover(ctx context.Context, opts KubernertesDiscoveryOptions, req *pb.BuildRequest, w io.Writer) (*client.Client, func(), error) { if req.App == nil { - return nil, noopFunc, fmt.Errorf("there's only support for discovering BuildKit pods from Tsuru apps") + return nil, noopCleaner, fmt.Errorf("there's only support for discovering BuildKit pods from Tsuru apps") } - return d.discoverBuildKitClientFromApp(ctx, opts, req.App.Name, w) + return d.discoverBuildKitClientFromApp(ctx, opts, req.App, w) } -func (d *k8sDiscoverer) discoverBuildKitClientFromApp(ctx context.Context, opts KubernertesDiscoveryOptions, app string, w io.Writer) (*client.Client, func(), error) { +func (d *K8sDiscoverer) discoverBuildKitClientFromApp(ctx context.Context, opts KubernertesDiscoveryOptions, app *pb.TsuruApp, w io.Writer) (*client.Client, func(), error) { leaderCtx, leaderCancel := context.WithCancel(ctx) cfns := []func(){ func() { @@ -63,7 +75,7 @@ func (d *k8sDiscoverer) discoverBuildKitClientFromApp(ctx context.Context, opts }, } - pod, err := d.discoverBuildKitPod(leaderCtx, opts, app, w) + pod, err := d.discoverBuildKitPod(leaderCtx, opts, app.Name, w) if err != nil { return nil, cleanUps(cfns...), err } @@ -71,14 +83,14 @@ func (d *k8sDiscoverer) discoverBuildKitClientFromApp(ctx context.Context, opts if opts.SetTsuruAppLabel { klog.V(4).Infoln("Setting Tsuru app labels in the pod", pod.Name) - err = setTsuruAppLabelOnBuildKitPod(ctx, d.cs, pod.Name, pod.Namespace, app) + err = setTsuruAppLabelOnBuildKitPod(ctx, d.KubernetesInterface, pod.Name, pod.Namespace, app) if err != nil { return nil, cleanUps(cfns...), fmt.Errorf("failed to set Tsuru app labels on BuildKit's pod: %w", err) } cfns = append(cfns, func() { klog.V(4).Infoln("Removing Tsuru app labels in the pod", pod.Name) - nerr := unsetTsuruAppLabelOnBuildKitPod(ctx, d.cs, pod.Name, pod.Namespace) + nerr := unsetTsuruAppLabelOnBuildKitPod(ctx, d.KubernetesInterface, pod.Name, pod.Namespace) if nerr != nil { klog.Errorf("failed to unset Tsuru app labels: %s", nerr) } @@ -102,7 +114,7 @@ func (d *k8sDiscoverer) discoverBuildKitClientFromApp(ctx context.Context, opts return c, cleanUps(cfns...), nil } -func (d *k8sDiscoverer) discoverBuildKitPod(ctx context.Context, opts KubernertesDiscoveryOptions, app string, w io.Writer) (*corev1.Pod, error) { +func (d *K8sDiscoverer) discoverBuildKitPod(ctx context.Context, opts KubernertesDiscoveryOptions, app string, w io.Writer) (*corev1.Pod, error) { deadlineCtx, deadlineCancel := context.WithCancel(ctx) defer deadlineCancel() @@ -121,7 +133,7 @@ func (d *k8sDiscoverer) discoverBuildKitPod(ctx context.Context, opts Kubernerte defer watchCancel() // watch cancellation must happen before than closing the pods channel go func() { - nerr := watchBuildKitPods(watchCtx, d.cs, opts, ns, pods, w) + nerr := watchBuildKitPods(watchCtx, d.KubernetesInterface, opts, ns, pods, w) if nerr != nil { errCh <- nerr } @@ -141,7 +153,7 @@ func (d *k8sDiscoverer) discoverBuildKitPod(ctx context.Context, opts Kubernerte leaseCtx, leaseCancel := context.WithCancel(ctx) leaseCancelByPod[pod.Name] = leaseCancel - go acquireLeaseForPod(leaseCtx, d.cs, selected, pod, errCh, opts) + go acquireLeaseForPod(leaseCtx, d.KubernetesInterface, selected, pod, errCh, opts) } }() @@ -175,14 +187,14 @@ func (d *k8sDiscoverer) discoverBuildKitPod(ctx context.Context, opts Kubernerte return pod, nil } -func (d *k8sDiscoverer) buildkitPodNamespace(ctx context.Context, opts KubernertesDiscoveryOptions, app string) (string, error) { +func (d *K8sDiscoverer) buildkitPodNamespace(ctx context.Context, opts KubernertesDiscoveryOptions, app string) (string, error) { if !opts.UseSameNamespaceAsApp { return opts.Namespace, nil } klog.V(4).Infof("Discovering the namespace where app %s is running on...", app) - tsuruApp, err := d.dcs.Resource(tsuruAppGVR).Namespace(metadata.TsuruAppNamespace).Get(ctx, app, metav1.GetOptions{}) + tsuruApp, err := d.DynamicInterface.Resource(tsuruAppGVR).Namespace(metadata.TsuruAppNamespace).Get(ctx, app, metav1.GetOptions{}) if err != nil { return "", err } @@ -202,7 +214,7 @@ func (d *k8sDiscoverer) buildkitPodNamespace(ctx context.Context, opts Kubernert return ns, nil } -func watchBuildKitPods(ctx context.Context, cs *kubernetes.Clientset, opts KubernertesDiscoveryOptions, ns string, pods chan<- *corev1.Pod, writer io.Writer) error { +func watchBuildKitPods(ctx context.Context, cs kubernetes.Interface, opts KubernertesDiscoveryOptions, ns string, pods chan<- *corev1.Pod, writer io.Writer) error { if opts.Statefulset != "" { scaleErr := scaler.MayUpscale(ctx, cs, ns, opts.Statefulset, writer) if scaleErr != nil { @@ -230,6 +242,8 @@ func watchBuildKitPods(ctx context.Context, cs *kubernetes.Clientset, opts Kuber continue } + fmt.Println("****", e.Object) + pod := e.Object.(*corev1.Pod) if isPodReady(pod) { pods <- pod @@ -240,7 +254,7 @@ func watchBuildKitPods(ctx context.Context, cs *kubernetes.Clientset, opts Kuber } } -func acquireLeaseForPod(ctx context.Context, cs *kubernetes.Clientset, ch chan<- *corev1.Pod, pod *corev1.Pod, errCh chan<- error, opts KubernertesDiscoveryOptions) { +func acquireLeaseForPod(ctx context.Context, cs kubernetes.Interface, ch chan<- *corev1.Pod, pod *corev1.Pod, errCh chan<- error, opts KubernertesDiscoveryOptions) { podname := os.Getenv("POD_NAME") if podname == "" { hostname, err := os.Hostname() @@ -280,19 +294,19 @@ func acquireLeaseForPod(ctx context.Context, cs *kubernetes.Clientset, ch chan<- klog.V(4).Infof("Received context cancelation: %s/%s", pod.Namespace, pod.Name) } }, - OnStoppedLeading: noopFunc, + OnStoppedLeading: func() {}, }, }) klog.V(4).Infof("Shutting off the lease for %s/%s pod", pod.Namespace, pod.Name) } -func setTsuruAppLabelOnBuildKitPod(ctx context.Context, cs *kubernetes.Clientset, pod, ns, app string) error { - patch, err := json.Marshal([]any{ +func setTsuruAppLabelOnBuildKitPod(ctx context.Context, cs kubernetes.Interface, pod, ns string, app *pb.TsuruApp) error { + changes := []any{ map[string]any{ "op": "replace", "path": fmt.Sprintf("/metadata/labels/%s", normalizeAppLabelForJSONPatch(metadata.TsuruAppNameLabelKey)), - "value": app, + "value": app.Name, }, map[string]any{ "op": "replace", @@ -309,7 +323,17 @@ func setTsuruAppLabelOnBuildKitPod(ctx context.Context, cs *kubernetes.Clientset "path": fmt.Sprintf("/metadata/annotations/%s", normalizeAppLabelForJSONPatch(metadata.DeployAgentLastBuildStartingLabelKey)), "value": strconv.FormatInt(time.Now().Unix(), 10), }, - }) + } + + if app.Team != nil { + changes = append(changes, map[string]any{ + "op": "replace", + "path": fmt.Sprintf("/metadata/labels/%s", normalizeAppLabelForJSONPatch(metadata.TsuruAppTeamLabelKey)), + "value": *app.Team, + }) + } + + patch, err := json.Marshal(changes) if err != nil { return err } @@ -318,12 +342,16 @@ func setTsuruAppLabelOnBuildKitPod(ctx context.Context, cs *kubernetes.Clientset return err } -func unsetTsuruAppLabelOnBuildKitPod(ctx context.Context, cs *kubernetes.Clientset, pod, ns string) error { +func unsetTsuruAppLabelOnBuildKitPod(ctx context.Context, cs kubernetes.Interface, pod, ns string) error { patch, err := json.Marshal([]any{ map[string]any{ "op": "remove", "path": fmt.Sprintf("/metadata/labels/%s", normalizeAppLabelForJSONPatch(metadata.TsuruAppNameLabelKey)), }, + map[string]any{ + "op": "remove", + "path": fmt.Sprintf("/metadata/labels/%s", normalizeAppLabelForJSONPatch(metadata.TsuruAppTeamLabelKey)), + }, map[string]any{ "op": "remove", "path": fmt.Sprintf("/metadata/labels/%s", normalizeAppLabelForJSONPatch(metadata.TsuruIsBuildLabelKey)), diff --git a/pkg/build/buildkit/build.go b/pkg/build/buildkit/build.go index 0391557..f6c8dde 100644 --- a/pkg/build/buildkit/build.go +++ b/pkg/build/buildkit/build.go @@ -38,6 +38,7 @@ import ( "k8s.io/client-go/kubernetes" "github.com/tsuru/deploy-agent/pkg/build" + "github.com/tsuru/deploy-agent/pkg/build/buildkit/autodiscovery" "github.com/tsuru/deploy-agent/pkg/build/buildkit/scaler" pb "github.com/tsuru/deploy-agent/pkg/build/grpc_build_v1" repo "github.com/tsuru/deploy-agent/pkg/repository" @@ -56,7 +57,7 @@ type BuildKit struct { cli *client.Client k8s *kubernetes.Clientset dk8s dynamic.Interface - kdopts *KubernertesDiscoveryOptions + kdopts *autodiscovery.KubernertesDiscoveryOptions opts BuildKitOptions m sync.RWMutex } @@ -65,19 +66,7 @@ func NewBuildKit(c *client.Client, opts BuildKitOptions) *BuildKit { return &BuildKit{cli: c, opts: opts} } -type KubernertesDiscoveryOptions struct { - PodSelector string - Namespace string - LeasePrefix string - Statefulset string - Port int - UseSameNamespaceAsApp bool - SetTsuruAppLabel bool - ScaleGracefulPeriod time.Duration - Timeout time.Duration -} - -func (b *BuildKit) WithKubernetesDiscovery(cs *kubernetes.Clientset, dcs dynamic.Interface, opts KubernertesDiscoveryOptions) *BuildKit { +func (b *BuildKit) WithKubernetesDiscovery(cs *kubernetes.Clientset, dcs dynamic.Interface, opts autodiscovery.KubernertesDiscoveryOptions) *BuildKit { b.k8s = cs b.dk8s = dcs b.kdopts = &opts @@ -597,16 +586,18 @@ func callBuildKitToExtractTsuruConfigs(ctx context.Context, c *client.Client, lo return tc, nil } -func (b *BuildKit) client(ctx context.Context, req *pb.BuildRequest, w io.Writer) (*client.Client, func(), error) { +type clientCleanUp func() + +func (b *BuildKit) client(ctx context.Context, req *pb.BuildRequest, w io.Writer) (*client.Client, clientCleanUp, error) { isBuildForApp := strings.HasPrefix(pb.BuildKind_name[int32(req.Kind)], "BUILD_KIND_APP_") if isBuildForApp && b.opts.DiscoverBuildKitClientForApp { - d := &k8sDiscoverer{ - cs: b.k8s, - dcs: b.dk8s, + d := &autodiscovery.K8sDiscoverer{ + KubernetesInterface: b.k8s, + DynamicInterface: b.dk8s, } return d.Discover(ctx, *b.kdopts, req, w) } - return b.cli, noopFunc, nil + return b.cli, func() {}, nil } diff --git a/pkg/build/metadata/metadata.go b/pkg/build/metadata/metadata.go index 61e08e6..50c63b8 100644 --- a/pkg/build/metadata/metadata.go +++ b/pkg/build/metadata/metadata.go @@ -11,5 +11,6 @@ const ( TsuruAppNamespace = "tsuru" TsuruAppNameLabelKey = "tsuru.io/app-name" + TsuruAppTeamLabelKey = "tsuru.io/app-team" TsuruIsBuildLabelKey = "tsuru.io/is-build" ) From 78f27e5ea5fc7b69061f64cf2722948c7b2992d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilson=20J=C3=BAnior?= Date: Fri, 27 Sep 2024 16:59:50 -0300 Subject: [PATCH 3/3] Add tests --- pkg/build/buildkit/autodiscovery/k8s.go | 6 +- pkg/build/buildkit/autodiscovery/k8s_test.go | 96 +++++++++ pkg/build/grpc_build_v1/build_service.pb.go | 192 +++++++++--------- pkg/build/grpc_build_v1/build_service.proto | 4 +- .../grpc_build_v1/build_service_grpc.pb.go | 4 + 5 files changed, 198 insertions(+), 104 deletions(-) create mode 100644 pkg/build/buildkit/autodiscovery/k8s_test.go diff --git a/pkg/build/buildkit/autodiscovery/k8s.go b/pkg/build/buildkit/autodiscovery/k8s.go index 6d2260f..1bef2ee 100644 --- a/pkg/build/buildkit/autodiscovery/k8s.go +++ b/pkg/build/buildkit/autodiscovery/k8s.go @@ -242,8 +242,6 @@ func watchBuildKitPods(ctx context.Context, cs kubernetes.Interface, opts Kubern continue } - fmt.Println("****", e.Object) - pod := e.Object.(*corev1.Pod) if isPodReady(pod) { pods <- pod @@ -325,11 +323,11 @@ func setTsuruAppLabelOnBuildKitPod(ctx context.Context, cs kubernetes.Interface, }, } - if app.Team != nil { + if app.Team != "" { changes = append(changes, map[string]any{ "op": "replace", "path": fmt.Sprintf("/metadata/labels/%s", normalizeAppLabelForJSONPatch(metadata.TsuruAppTeamLabelKey)), - "value": *app.Team, + "value": app.Team, }) } diff --git a/pkg/build/buildkit/autodiscovery/k8s_test.go b/pkg/build/buildkit/autodiscovery/k8s_test.go new file mode 100644 index 0000000..fdcf877 --- /dev/null +++ b/pkg/build/buildkit/autodiscovery/k8s_test.go @@ -0,0 +1,96 @@ +// Copyright 2024 tsuru authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package autodiscovery + +import ( + "context" + "os" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/tsuru/deploy-agent/pkg/build/grpc_build_v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + fakeDynamic "k8s.io/client-go/dynamic/fake" + "k8s.io/client-go/kubernetes/fake" + kuberntesTesting "k8s.io/client-go/testing" +) + +func TestK8sDiscoverer_Discover(t *testing.T) { + buildKitPod := &corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-app", + Namespace: "tsuru", + Labels: map[string]string{ + "app": "test-app", + }, + Annotations: map[string]string{ + "foo": "bar", + }, + }, + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + PodIP: "127.0.0.1", + Conditions: []corev1.PodCondition{ + { + Type: corev1.PodReady, + Status: corev1.ConditionTrue, + }, + }, + }, + } + fakeClient := fake.NewSimpleClientset(buildKitPod) + + fakeClient.PrependWatchReactor("*", func(action kuberntesTesting.Action) (handled bool, ret watch.Interface, err error) { + watcher := watch.NewFake() + + go func() { + time.Sleep(time.Millisecond * 100) + watcher.Add(buildKitPod) + }() + return true, watcher, nil + }) + + fakeDynamicClient := fakeDynamic.NewSimpleDynamicClient(runtime.NewScheme()) + + discoverer := K8sDiscoverer{ + KubernetesInterface: fakeClient, + DynamicInterface: fakeDynamicClient, + } + + _, _, err := discoverer.Discover( + context.TODO(), + KubernertesDiscoveryOptions{ + PodSelector: "app=test-app", + Namespace: "tsuru", + Timeout: time.Second * 2, + SetTsuruAppLabel: true, + }, + &grpc_build_v1.BuildRequest{ + App: &grpc_build_v1.TsuruApp{ + Name: "test-app", + Team: "test-team", + }, + }, + os.Stdout, + ) + assert.NoError(t, err) + + existingPod, err := fakeClient.CoreV1().Pods("tsuru").Get(context.TODO(), "test-app", metav1.GetOptions{}) + assert.NoError(t, err) + + assert.Equal(t, map[string]string{ + "app": "test-app", + "tsuru.io/app-name": "test-app", + "tsuru.io/app-team": "test-team", + "tsuru.io/is-build": "true", + }, existingPod.Labels) + + assert.Equal(t, "", existingPod.Annotations["deploy-agent.tsuru.io/last-build-ending-time"]) + assert.NotEqual(t, "", existingPod.Annotations["deploy-agent.tsuru.io/last-build-starting-time"]) +} diff --git a/pkg/build/grpc_build_v1/build_service.pb.go b/pkg/build/grpc_build_v1/build_service.pb.go index 0bbb654..bbb1ed7 100644 --- a/pkg/build/grpc_build_v1/build_service.pb.go +++ b/pkg/build/grpc_build_v1/build_service.pb.go @@ -328,7 +328,7 @@ type TsuruApp struct { // EnvVars are the enviroment variables set on app. EnvVars map[string]string `protobuf:"bytes,3,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Team is the Tsuru team name, optional just for compatibility with old tsuru-api versions. - Team *string `protobuf:"bytes,4,opt,name=team,proto3,oneof" json:"team,omitempty"` + Team string `protobuf:"bytes,4,opt,name=team,proto3" json:"team,omitempty"` } func (x *TsuruApp) Reset() { @@ -378,8 +378,8 @@ func (x *TsuruApp) GetEnvVars() map[string]string { } func (x *TsuruApp) GetTeam() string { - if x != nil && x.Team != nil { - return *x.Team + if x != nil { + return x.Team } return "" } @@ -394,7 +394,7 @@ type TsuruJob struct { // EnvVars are the enviroment variables set on the job. EnvVars map[string]string `protobuf:"bytes,3,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Team is the Tsuru team name, optional just for compatibility with old tsuru-api versions. - Team *string `protobuf:"bytes,4,opt,name=team,proto3,oneof" json:"team,omitempty"` + Team string `protobuf:"bytes,4,opt,name=team,proto3" json:"team,omitempty"` } func (x *TsuruJob) Reset() { @@ -444,8 +444,8 @@ func (x *TsuruJob) GetEnvVars() map[string]string { } func (x *TsuruJob) GetTeam() string { - if x != nil && x.Team != nil { - return *x.Team + if x != nil { + return x.Team } return "" } @@ -731,101 +731,99 @@ var file_pkg_build_grpc_build_v1_build_service_proto_rawDesc = []byte{ 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x75, 0x72, 0x75, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x73, 0x75, 0x72, 0x75, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xbd, 0x01, 0x0a, 0x08, 0x54, + 0x69, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xaf, 0x01, 0x0a, 0x08, 0x54, 0x73, 0x75, 0x72, 0x75, 0x41, 0x70, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x75, 0x72, 0x75, 0x41, 0x70, 0x70, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x17, 0x0a, 0x04, - 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, - 0x61, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 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, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x22, 0xbd, 0x01, 0x0a, 0x08, 0x54, - 0x73, 0x75, 0x72, 0x75, 0x4a, 0x6f, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x65, - 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, - 0x75, 0x72, 0x75, 0x4a, 0x6f, 0x62, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x17, 0x0a, 0x04, - 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, - 0x61, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 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, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x23, 0x0a, 0x0d, 0x54, 0x73, - 0x75, 0x72, 0x75, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x54, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, - 0x63, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, - 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, - 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, - 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, - 0x5f, 0x64, 0x69, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, - 0x69, 0x6e, 0x67, 0x44, 0x69, 0x72, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x54, 0x73, 0x75, 0x72, 0x75, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x63, 0x66, 0x69, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x63, 0x66, 0x69, - 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x75, 0x72, 0x75, 0x5f, 0x79, 0x61, 0x6d, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x75, 0x72, 0x75, 0x59, 0x61, 0x6d, - 0x6c, 0x12, 0x46, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0xac, 0x04, 0x0a, 0x09, 0x42, 0x75, - 0x69, 0x6c, 0x64, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x49, 0x4c, 0x44, - 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, - 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, - 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, - 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, - 0x50, 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x2d, - 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, - 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, - 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x2e, 0x0a, - 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, - 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, - 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x2c, 0x0a, - 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, - 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, - 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2d, 0x0a, 0x29, 0x42, - 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, - 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, - 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, - 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, - 0x4d, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, - 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x05, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x49, 0x4c, - 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, - 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, - 0x49, 0x4c, 0x45, 0x10, 0x06, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, - 0x49, 0x4e, 0x44, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x57, - 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, - 0x41, 0x47, 0x45, 0x10, 0x07, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, - 0x49, 0x4e, 0x44, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, - 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, - 0x41, 0x47, 0x45, 0x10, 0x07, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, - 0x49, 0x4e, 0x44, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, - 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, - 0x4c, 0x45, 0x10, 0x08, 0x1a, 0x02, 0x10, 0x01, 0x32, 0x4f, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x12, 0x46, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x73, 0x75, 0x72, 0x75, 0x2f, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, + 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 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, 0xaf, 0x01, 0x0a, + 0x08, 0x54, 0x73, 0x75, 0x72, 0x75, 0x4a, 0x6f, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, + 0x08, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, + 0x54, 0x73, 0x75, 0x72, 0x75, 0x4a, 0x6f, 0x62, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, + 0x61, 0x6d, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 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, 0x23, + 0x0a, 0x0d, 0x54, 0x73, 0x75, 0x72, 0x75, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x54, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, + 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x03, 0x63, 0x6d, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, + 0x6f, 0x73, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, + 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x72, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x54, + 0x73, 0x75, 0x72, 0x75, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x63, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x63, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x75, 0x72, 0x75, 0x5f, + 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x75, 0x72, + 0x75, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x46, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0xac, 0x04, + 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x16, 0x42, + 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x49, 0x4c, 0x44, + 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, + 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, + 0x41, 0x44, 0x10, 0x01, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, + 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, + 0x54, 0x48, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, + 0x10, 0x01, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, + 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, + 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, + 0x02, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, + 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, + 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, + 0x02, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, + 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, + 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, + 0x2d, 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, + 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, + 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2c, + 0x0a, 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, + 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, + 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x05, 0x12, 0x2b, 0x0a, 0x27, + 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, + 0x4f, 0x52, 0x4d, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, + 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x06, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, + 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x45, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, + 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x07, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, + 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x50, 0x4c, + 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, + 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x07, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, 0x49, + 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x50, 0x4c, + 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, + 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x08, 0x1a, 0x02, 0x10, 0x01, 0x32, 0x4f, 0x0a, 0x05, + 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x46, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1b, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, + 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x37, 0x5a, + 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x73, 0x75, 0x72, + 0x75, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -981,8 +979,6 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { (*BuildResponse_Output)(nil), (*BuildResponse_TsuruConfig)(nil), } - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[2].OneofWrappers = []any{} - file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/pkg/build/grpc_build_v1/build_service.proto b/pkg/build/grpc_build_v1/build_service.proto index a6fb66e..1c66daa 100644 --- a/pkg/build/grpc_build_v1/build_service.proto +++ b/pkg/build/grpc_build_v1/build_service.proto @@ -92,7 +92,7 @@ message TsuruApp { map env_vars = 3; // Team is the Tsuru team name, optional just for compatibility with old tsuru-api versions. - optional string team = 4; + string team = 4; } message TsuruJob { @@ -102,7 +102,7 @@ message TsuruJob { map env_vars = 3; // Team is the Tsuru team name, optional just for compatibility with old tsuru-api versions. - optional string team = 4; + string team = 4; } message TsuruPlatform { diff --git a/pkg/build/grpc_build_v1/build_service_grpc.pb.go b/pkg/build/grpc_build_v1/build_service_grpc.pb.go index a263b57..fb5532a 100644 --- a/pkg/build/grpc_build_v1/build_service_grpc.pb.go +++ b/pkg/build/grpc_build_v1/build_service_grpc.pb.go @@ -1,3 +1,7 @@ +// Copyright 2024 tsuru authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0