From f1a0ce44143cc55ee55c65dcaa2382551d12bf20 Mon Sep 17 00:00:00 2001 From: ambition <39669748+Ambition9186@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:25:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=88=97=E8=A1=A8=E6=96=B0=E5=A2=9E=E2=80=9C=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E6=AC=A1=E6=8B=89=E5=8F=96=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=80=97=E6=97=B6=E2=80=9D=E5=AD=97=E6=AE=B5=20(#3526)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/20240914104733_modif_client.go | 66 +++++++ bcs-services/bcs-bscp/pkg/dal/dao/client.go | 2 +- .../bcs-bscp/pkg/dal/gen/clients.gen.go | 6 +- bcs-services/bcs-bscp/pkg/dal/table/client.go | 3 +- .../pkg/protocol/core/client/client.pb.go | 186 +++++++++--------- .../pkg/protocol/core/client/client.proto | 1 + .../pkg/protocol/core/client/convert.go | 2 + bcs-services/bcs-bscp/pkg/sf-share/convert.go | 1 + 8 files changed, 176 insertions(+), 91 deletions(-) create mode 100644 bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240914104733_modif_client.go diff --git a/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240914104733_modif_client.go b/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240914104733_modif_client.go new file mode 100644 index 0000000000..064d1d37f5 --- /dev/null +++ b/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240914104733_modif_client.go @@ -0,0 +1,66 @@ +/* + * Tencent is pleased to support the open source community by making Blueking Container Service available. + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Licensed under the MIT License (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * http://opensource.org/licenses/MIT + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ + +package migrations + +import ( + "gorm.io/gorm" + + "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrator" +) + +func init() { + // add current migration to migrator + migrator.GetMigrator().AddMigration(&migrator.Migration{ + Version: "20240914104733", + Name: "20240914104733_modif_client", + Mode: migrator.GormMode, + Up: mig20240914104733Up, + Down: mig20240914104733Down, + }) +} + +// mig20240914104733Up for up migration +func mig20240914104733Up(tx *gorm.DB) error { + + // Clients : clients + type Clients struct { + TotalSeconds float64 `gorm:"column:total_seconds;type:double unsigned;default:0;NOT NULL"` + } + + // Clients add new column + if !tx.Migrator().HasColumn(&Clients{}, "total_seconds") { + if err := tx.Migrator().AddColumn(&Clients{}, "total_seconds"); err != nil { + return err + } + } + + return nil +} + +// mig20240914104733Down for down migration +func mig20240914104733Down(tx *gorm.DB) error { + + // Clients : clients + type Clients struct { + TotalSeconds float64 `gorm:"column:total_seconds;type:double unsigned;default:0;NOT NULL"` + } + + // Clients drop column + if tx.Migrator().HasColumn(&Clients{}, "total_seconds") { + if err := tx.Migrator().DropColumn(&Clients{}, "total_seconds"); err != nil { + return err + } + } + + return nil +} diff --git a/bcs-services/bcs-bscp/pkg/dal/dao/client.go b/bcs-services/bcs-bscp/pkg/dal/dao/client.go index 4338e42939..3296ff6a18 100644 --- a/bcs-services/bcs-bscp/pkg/dal/dao/client.go +++ b/bcs-services/bcs-bscp/pkg/dal/dao/client.go @@ -826,7 +826,7 @@ func (dao *clientDao) UpsertVersionChange(kit *kit.Kit, tx *gen.QueryTx, data [] "current_release_id", "target_release_id", "specific_failed_reason", "release_change_status", "release_change_failed_reason", "failed_detail_reason", "cpu_usage", "cpu_max_usage", "cpu_min_usage", "cpu_avg_usage", - "memory_usage", "memory_max_usage", "memory_min_usage", "memory_avg_usage", + "memory_usage", "memory_max_usage", "memory_min_usage", "memory_avg_usage", "total_seconds", }), }).CreateInBatches(data, 500) } diff --git a/bcs-services/bcs-bscp/pkg/dal/gen/clients.gen.go b/bcs-services/bcs-bscp/pkg/dal/gen/clients.gen.go index 5f524a87af..36f76a51c4 100644 --- a/bcs-services/bcs-bscp/pkg/dal/gen/clients.gen.go +++ b/bcs-services/bcs-bscp/pkg/dal/gen/clients.gen.go @@ -53,6 +53,7 @@ func newClient(db *gorm.DB, opts ...gen.DOOption) client { _client.ReleaseChangeFailedReason = field.NewString(tableName, "release_change_failed_reason") _client.SpecificFailedReason = field.NewString(tableName, "specific_failed_reason") _client.FailedDetailReason = field.NewString(tableName, "failed_detail_reason") + _client.TotalSeconds = field.NewFloat64(tableName, "total_seconds") _client.fillFieldMap() @@ -89,6 +90,7 @@ type client struct { ReleaseChangeFailedReason field.String SpecificFailedReason field.String FailedDetailReason field.String + TotalSeconds field.Float64 fieldMap map[string]field.Expr } @@ -131,6 +133,7 @@ func (c *client) updateTableName(table string) *client { c.ReleaseChangeFailedReason = field.NewString(table, "release_change_failed_reason") c.SpecificFailedReason = field.NewString(table, "specific_failed_reason") c.FailedDetailReason = field.NewString(table, "failed_detail_reason") + c.TotalSeconds = field.NewFloat64(table, "total_seconds") c.fillFieldMap() @@ -155,7 +158,7 @@ func (c *client) GetFieldByName(fieldName string) (field.OrderExpr, bool) { } func (c *client) fillFieldMap() { - c.fieldMap = make(map[string]field.Expr, 26) + c.fieldMap = make(map[string]field.Expr, 27) c.fieldMap["id"] = c.ID c.fieldMap["uid"] = c.UID c.fieldMap["biz_id"] = c.BizID @@ -182,6 +185,7 @@ func (c *client) fillFieldMap() { c.fieldMap["release_change_failed_reason"] = c.ReleaseChangeFailedReason c.fieldMap["specific_failed_reason"] = c.SpecificFailedReason c.fieldMap["failed_detail_reason"] = c.FailedDetailReason + c.fieldMap["total_seconds"] = c.TotalSeconds } func (c client) clone(db *gorm.DB) client { diff --git a/bcs-services/bcs-bscp/pkg/dal/table/client.go b/bcs-services/bcs-bscp/pkg/dal/table/client.go index e5e38f6f2f..02dd460da8 100644 --- a/bcs-services/bcs-bscp/pkg/dal/table/client.go +++ b/bcs-services/bcs-bscp/pkg/dal/table/client.go @@ -39,9 +39,10 @@ type ClientSpec struct { CurrentReleaseID uint32 `gorm:"column:current_release_id" json:"current_release_id"` TargetReleaseID uint32 `gorm:"column:target_release_id" json:"target_release_id"` ReleaseChangeStatus Status `gorm:"column:release_change_status" json:"release_change_status"` - ReleaseChangeFailedReason string `gorm:"column:release_change_failed_reason" json:"release_change_failed_reason"` // nolint + ReleaseChangeFailedReason string `gorm:"column:release_change_failed_reason" json:"release_change_failed_reason"` SpecificFailedReason string `gorm:"column:specific_failed_reason" json:"specific_failed_reason"` FailedDetailReason string `gorm:"column:failed_detail_reason" json:"failed_detail_reason"` + TotalSeconds float64 `gorm:"column:total_seconds" json:"total_seconds"` } // ClientAttachment is a client attachment diff --git a/bcs-services/bcs-bscp/pkg/protocol/core/client/client.pb.go b/bcs-services/bcs-bscp/pkg/protocol/core/client/client.pb.go index b2c55ff54d..2007c45c75 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/core/client/client.pb.go +++ b/bcs-services/bcs-bscp/pkg/protocol/core/client/client.pb.go @@ -117,6 +117,7 @@ type ClientSpec struct { CurrentReleaseName string `protobuf:"bytes,15,opt,name=current_release_name,json=currentReleaseName,proto3" json:"current_release_name,omitempty"` SpecificFailedReason string `protobuf:"bytes,16,opt,name=specific_failed_reason,json=specificFailedReason,proto3" json:"specific_failed_reason,omitempty"` TargetReleaseName string `protobuf:"bytes,17,opt,name=target_release_name,json=targetReleaseName,proto3" json:"target_release_name,omitempty"` + TotalSeconds float64 `protobuf:"fixed64,18,opt,name=total_seconds,json=totalSeconds,proto3" json:"total_seconds,omitempty"` } func (x *ClientSpec) Reset() { @@ -270,6 +271,13 @@ func (x *ClientSpec) GetTargetReleaseName() string { return "" } +func (x *ClientSpec) GetTotalSeconds() float64 { + if x != nil { + return x.TotalSeconds + } + return 0 +} + // ClientAttachment source resource reference: pkg/dal/table/client.go type ClientAttachment struct { state protoimpl.MessageState @@ -712,7 +720,7 @@ var file_client_proto_rawDesc = []byte{ 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xa8, 0x06, 0x0a, 0x0a, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xcd, 0x06, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, @@ -763,93 +771,95 @@ var file_client_proto_rawDesc = []byte{ 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x65, 0x61, - 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x10, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, - 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x69, - 0x7a, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0xba, 0x02, 0x0a, 0x0e, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x08, 0x63, 0x70, 0x75, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x63, 0x70, - 0x75, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x0b, 0x63, 0x70, 0x75, 0x4d, 0x61, 0x78, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, - 0x0a, 0x0d, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x63, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x55, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x63, 0x70, 0x75, 0x5f, 0x61, 0x76, 0x67, 0x5f, 0x75, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x63, 0x70, 0x75, 0x41, 0x76, - 0x67, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, - 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x65, 0x6d, - 0x6f, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4d, 0x61, 0x78, 0x55, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6d, 0x69, - 0x6e, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6d, - 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4d, 0x69, 0x6e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, - 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x61, 0x76, 0x67, 0x5f, 0x75, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x41, - 0x76, 0x67, 0x55, 0x73, 0x61, 0x67, 0x65, 0x22, 0x9c, 0x04, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, - 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, - 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x6c, 0x65, 0x61, - 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, - 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x6e, 0x6c, - 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0c, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, - 0x0a, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x75, 0x6c, 0x6c, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x5f, 0x70, 0x75, 0x6c, 0x6c, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x64, 0x50, - 0x75, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0xc6, 0x02, 0x0a, 0x0f, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, - 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, - 0x64, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x12, 0x2e, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, - 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x6c, - 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x75, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x69, 0x73, 0x5f, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x0c, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, - 0x65, 0x79, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x52, 0x0b, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x42, - 0x5b, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x65, - 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x4b, 0x69, 0x6e, 0x67, 0x2f, 0x62, 0x6b, - 0x2d, 0x62, 0x63, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x62, 0x73, 0x63, 0x70, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x3b, 0x70, 0x62, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x52, 0x0a, 0x10, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, + 0xba, 0x02, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x63, 0x70, 0x75, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x22, 0x0a, 0x0d, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x63, 0x70, 0x75, 0x4d, 0x61, 0x78, 0x55, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x75, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x63, 0x70, 0x75, 0x4d, + 0x69, 0x6e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x63, 0x70, 0x75, 0x5f, 0x61, + 0x76, 0x67, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, + 0x63, 0x70, 0x75, 0x41, 0x76, 0x67, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, + 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, + 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, + 0x4d, 0x61, 0x78, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x6f, + 0x72, 0x79, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4d, 0x69, 0x6e, 0x55, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x61, 0x76, 0x67, + 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x41, 0x76, 0x67, 0x55, 0x73, 0x61, 0x67, 0x65, 0x22, 0x9c, 0x04, 0x0a, + 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x30, 0x0a, + 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x2e, 0x0a, 0x13, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x32, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, + 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x50, 0x75, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x5f, + 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x65, 0x6e, 0x64, 0x50, 0x75, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0xc6, 0x02, 0x0a, 0x0f, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x36, 0x0a, + 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x70, 0x62, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x2e, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, + 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x75, 0x6c, 0x6c, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x44, 0x75, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x0c, 0x66, 0x6f, 0x72, 0x65, + 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, + 0x4b, 0x65, 0x79, 0x73, 0x42, 0x5b, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x4b, 0x69, + 0x6e, 0x67, 0x2f, 0x62, 0x6b, 0x2d, 0x62, 0x63, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x62, 0x73, 0x63, 0x70, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3b, 0x70, 0x62, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/bcs-services/bcs-bscp/pkg/protocol/core/client/client.proto b/bcs-services/bcs-bscp/pkg/protocol/core/client/client.proto index ad28bed75b..51bb63d162 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/core/client/client.proto +++ b/bcs-services/bcs-bscp/pkg/protocol/core/client/client.proto @@ -34,6 +34,7 @@ message ClientSpec { string current_release_name = 15; string specific_failed_reason = 16; string target_release_name = 17; + double total_seconds = 18; } // ClientAttachment source resource reference: pkg/dal/table/client.go diff --git a/bcs-services/bcs-bscp/pkg/protocol/core/client/convert.go b/bcs-services/bcs-bscp/pkg/protocol/core/client/convert.go index 45ce917a1f..71fb9621de 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/core/client/convert.go +++ b/bcs-services/bcs-bscp/pkg/protocol/core/client/convert.go @@ -54,6 +54,7 @@ func (c *ClientSpec) ClientSpec() *table.ClientSpec { ReleaseChangeFailedReason: c.ReleaseChangeFailedReason, FailedDetailReason: c.FailedDetailReason, SpecificFailedReason: c.SpecificFailedReason, + TotalSeconds: c.TotalSeconds, } } @@ -88,6 +89,7 @@ func PbClientSpec(spec *table.ClientSpec) *ClientSpec { //nolint:revive FailedDetailReason: spec.FailedDetailReason, ClientType: string(spec.ClientType), SpecificFailedReason: spec.SpecificFailedReason, + TotalSeconds: spec.TotalSeconds, } } diff --git a/bcs-services/bcs-bscp/pkg/sf-share/convert.go b/bcs-services/bcs-bscp/pkg/sf-share/convert.go index 69a15f4554..21a693aecf 100644 --- a/bcs-services/bcs-bscp/pkg/sf-share/convert.go +++ b/bcs-services/bcs-bscp/pkg/sf-share/convert.go @@ -54,6 +54,7 @@ func (v *VersionChangePayload) PbClientMetric() (*pbclient.Client, error) { ReleaseChangeFailedReason: v.Application.FailedReason.String(), FailedDetailReason: v.Application.FailedDetailReason, SpecificFailedReason: v.Application.SpecificFailedReason.String(), + TotalSeconds: v.Application.TotalSeconds, }, Attachment: &pbclient.ClientAttachment{ Uid: v.Application.Uid,