Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: simplify approval template to singleton with flat role array (#17679)
Danny Xu2194490fb2fc
diff --git a/backend/api/v1/issue_service.go b/backend/api/v1/issue_service.goindex 3e250b0e8c..1f476f1e57 100644--- a/backend/api/v1/issue_service.go+++ b/backend/api/v1/issue_service.go@@ -462,7 +462,7 @@ func (s *IssueService) createIssueDatabaseChange(ctx context.Context, request *vissueCreateMessage.Payload = &storepb.Issue{Approval: &storepb.IssuePayloadApproval{ApprovalFindingDone: false,- ApprovalTemplates: nil,+ ApprovalTemplate: nil,Approvers: nil,},Labels: request.Issue.Labels,@@ -552,7 +552,7 @@ func (s *IssueService) createIssueGrantRequest(ctx context.Context, request *v1pGrantRequest: convertedGrantRequest,Approval: &storepb.IssuePayloadApproval{ApprovalFindingDone: false,- ApprovalTemplates: nil,+ ApprovalTemplate: nil,Approvers: nil,},Labels: request.Issue.Labels,@@ -653,7 +653,7 @@ func (s *IssueService) createIssueDatabaseDataExport(ctx context.Context, requesissueCreateMessage.Payload = &storepb.Issue{Approval: &storepb.IssuePayloadApproval{ApprovalFindingDone: false,- ApprovalTemplates: nil,+ ApprovalTemplate: nil,Approvers: nil,},Labels: request.Issue.Labels,@@ -697,17 +697,17 @@ func (s *IssueService) ApproveIssue(ctx context.Context, req *connect.Request[v1if payload.Approval.ApprovalFindingError != "" {return nil, connect.NewError(connect.CodeFailedPrecondition, errors.Errorf("approval template finding failed: %v", payload.Approval.ApprovalFindingError))}- if len(payload.Approval.ApprovalTemplates) != 1 {- return nil, connect.NewError(connect.CodeInternal, errors.Errorf("expecting one approval template but got %v", len(payload.Approval.ApprovalTemplates)))+ if payload.Approval.ApprovalTemplate == nil {+ return nil, connect.NewError(connect.CodeInternal, errors.New("approval template is required"))}- rejectedStep := utils.FindRejectedStep(payload.Approval.ApprovalTemplates[0], payload.Approval.Approvers)- if rejectedStep != nil {+ rejectedRole := utils.FindRejectedRole(payload.Approval.ApprovalTemplate, payload.Approval.Approvers)+ if rejectedRole != "" {return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("cannot approve because the issue has been rejected"))}- step := utils.FindNextPendingStep(payload.Approval.ApprovalTemplates[0], payload.Approval.Approvers)- if step == nil {+ role := utils.FindNextPendingRole(payload.Approval.ApprovalTemplate, payload.Approval.Approvers)+ if role == "" {return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("the issue has been approved"))}@@ -726,7 +726,7 @@ func (s *IssueService) ApproveIssue(ctx context.Context, req *connect.Request[v1return nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to get workspace policy, error: %v", err))}- canApprove, err := isUserReviewer(ctx, s.store, issue, step, user, policy.Policy, workspacePolicy.Policy)+ canApprove, err := isUserReviewer(ctx, s.store, issue, role, user, policy.Policy, workspacePolicy.Policy)if err != nil {return nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to check if principal can approve step, error: %v", err))}@@ -788,11 +788,11 @@ func (s *IssueService) ApproveIssue(ctx context.Context, req *connect.Request[v1}func() {- if len(payload.Approval.ApprovalTemplates) != 1 {+ if payload.Approval.ApprovalTemplate == nil {return}- approvalStep := utils.FindNextPendingStep(payload.Approval.ApprovalTemplates[0], payload.Approval.Approvers)- if approvalStep == nil {+ role := utils.FindNextPendingRole(payload.Approval.ApprovalTemplate, payload.Approval.Approvers)+ if role == "" {return}@@ -803,7 +803,7 @@ func (s *IssueService) ApproveIssue(ctx context.Context, req *connect.Request[v1Issue: webhook.NewIssue(issue),Project: webhook.NewProject(issue.Project),IssueApprovalCreate: &webhook.EventIssueApprovalCreate{- ApprovalStep: approvalStep,+ Role: role,},})}()@@ -900,17 +900,17 @@ func (s *IssueService) RejectIssue(ctx context.Context, req *connect.Request[v1pif payload.Approval.ApprovalFindingError != "" {return nil, connect.NewError(connect.CodeFailedPrecondition, errors.Errorf("approval template finding failed: %v", payload.Approval.ApprovalFindingError))}- if len(payload.Approval.ApprovalTemplates) != 1 {- return nil, connect.NewError(connect.CodeInternal, errors.Errorf("expecting one approval template but got %v", len(payload.Approval.ApprovalTemplates)))+ if payload.Approval.ApprovalTemplate == nil {+ return nil, connect.NewError(connect.CodeInternal, errors.New("approval template is required"))}- rejectedStep := utils.FindRejectedStep(payload.Approval.ApprovalTemplates[0], payload.Approval.Approvers)- if rejectedStep != nil {+ rejectedRole := utils.FindRejectedRole(payload.Approval.ApprovalTemplate, payload.Approval.Approvers)+ if rejectedRole != "" {return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("cannot reject because the issue has been rejected"))}- step := utils.FindNextPendingStep(payload.Approval.ApprovalTemplates[0], payload.Approval.Approvers)- if step == nil {+ role := utils.FindNextPendingRole(payload.Approval.ApprovalTemplate, payload.Approval.Approvers)+ if role == "" {return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("the issue has been approved"))}@@ -929,7 +929,7 @@ func (s *IssueService) RejectIssue(ctx context.Context, req *connect.Request[v1preturn nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to get workspace policy, error: %v", err))}- canApprove, err := isUserReviewer(ctx, s.store, issue, step, user, policy.Policy, workspacePolicy.Policy)+ canApprove, err := isUserReviewer(ctx, s.store, issue, role, user, policy.Policy, workspacePolicy.Policy)if err != nil {return nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to check if principal can reject step, error: %v", err))}@@ -991,12 +991,12 @@ func (s *IssueService) RequestIssue(ctx context.Context, req *connect.Request[v1if payload.Approval.ApprovalFindingError != "" {return nil, connect.NewError(connect.CodeFailedPrecondition, errors.Errorf("approval template finding failed: %v", payload.Approval.ApprovalFindingError))}- if len(payload.Approval.ApprovalTemplates) != 1 {- return nil, connect.NewError(connect.CodeInternal, errors.Errorf("expecting one approval template but got %v", len(payload.Approval.ApprovalTemplates)))+ if payload.Approval.ApprovalTemplate == nil {+ return nil, connect.NewError(connect.CodeInternal, errors.New("approval template is required"))}- rejectedStep := utils.FindRejectedStep(payload.Approval.ApprovalTemplates[0], payload.Approval.Approvers)- if rejectedStep == nil {+ rejectedRole := utils.FindRejectedRole(payload.Approval.ApprovalTemplate, payload.Approval.Approvers)+ if rejectedRole == "" {return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("cannot request issues because the issue is not rejected"))}@@ -1035,11 +1035,11 @@ func (s *IssueService) RequestIssue(ctx context.Context, req *connect.Request[v1}func() {- if len(payload.Approval.ApprovalTemplates) != 1 {+ if payload.Approval.ApprovalTemplate == nil {return}- approvalStep := utils.FindNextPendingStep(payload.Approval.ApprovalTemplates[0], payload.Approval.Approvers)- if approvalStep == nil {+ role := utils.FindNextPendingRole(payload.Approval.ApprovalTemplate, payload.Approval.Approvers)+ if role == "" {return}@@ -1050,7 +1050,7 @@ func (s *IssueService) RequestIssue(ctx context.Context, req *connect.Request[v1Issue: webhook.NewIssue(issue),Project: webhook.NewProject(issue.Project),IssueApprovalCreate: &webhook.EventIssueApprovalCreate{- ApprovalStep: approvalStep,+ Role: role,},})}()@@ -1533,23 +1533,12 @@ func canRequestIssue(issueCreator *store.UserMessage, user *store.UserMessage) breturn issueCreator.ID == user.ID}-func isUserReviewer(ctx context.Context, stores *store.Store, issue *store.IssueMessage, step *storepb.ApprovalStep, user *store.UserMessage, policies ...*storepb.IamPolicy) (bool, error) {- if len(step.Nodes) != 1 {- return false, errors.Errorf("expecting one node but got %v", len(step.Nodes))- }- if step.Type != storepb.ApprovalStep_ANY {- return false, errors.Errorf("expecting ANY step type but got %v", step.Type)- }- node := step.Nodes[0]- if node.Type != storepb.ApprovalNode_ANY_IN_GROUP {- return false, errors.Errorf("expecting ANY_IN_GROUP node type but got %v", node.Type)- }-+func isUserReviewer(ctx context.Context, stores *store.Store, issue *store.IssueMessage, role string, user *store.UserMessage, policies ...*storepb.IamPolicy) (bool, error) {// Check project policy about self approval.if !issue.Project.Setting.AllowSelfApproval && issue.Creator.ID == user.ID {return false, errors.Errorf("creator cannot self approve")}roles := utils.GetUserFormattedRolesMap(ctx, stores, user, policies...)- return roles[node.Role], nil+ return roles[role], nil}diff --git a/backend/api/v1/issue_service_convert.go b/backend/api/v1/issue_service_convert.goindex b20f1cf0e9..573dd970e4 100644--- a/backend/api/v1/issue_service_convert.go+++ b/backend/api/v1/issue_service_convert.go@@ -62,8 +62,8 @@ func (s *IssueService) convertToIssue(ctx context.Context, issue *store.IssueMesapproval := issuePayload.GetApproval()issueV1.RiskLevel = convertToIssueRiskLevel(approval.GetRiskLevel())- for _, template := range approval.GetApprovalTemplates() {- issueV1.ApprovalTemplates = append(issueV1.ApprovalTemplates, convertToApprovalTemplate(template))+ if template := approval.GetApprovalTemplate(); template != nil {+ issueV1.ApprovalTemplate = convertToApprovalTemplate(template)}for _, approver := range approval.GetApprovers() {convertedApprover := &v1pb.Issue_Approver{Status: v1pb.Issue_Approver_Status(approver.GetStatus())}@@ -92,14 +92,14 @@ func computeApprovalStatus(approval *storepb.IssuePayloadApproval) v1pb.Issue_Apreturn v1pb.Issue_ERROR}- // If no approval templates, approval is skipped (not required)- if len(approval.GetApprovalTemplates()) == 0 {+ // If no approval template, approval is skipped (not required)+ if approval.GetApprovalTemplate() == nil {return v1pb.Issue_SKIPPED}- approvalTemplate := approval.GetApprovalTemplates()[0]+ approvalTemplate := approval.GetApprovalTemplate()approvers := approval.GetApprovers()- totalSteps := len(approvalTemplate.GetFlow().GetSteps())+ totalSteps := len(approvalTemplate.GetFlow().GetRoles())// If no approvers are assigned yet, it's pendingif len(approvers) == 0 {@@ -249,28 +249,9 @@ func convertToApprovalTemplate(template *storepb.ApprovalTemplate) *v1pb.Approva}func convertToApprovalFlow(flow *storepb.ApprovalFlow) *v1pb.ApprovalFlow {- convertedFlow := &v1pb.ApprovalFlow{}- for _, step := range flow.Steps {- convertedFlow.Steps = append(convertedFlow.Steps, convertToApprovalStep(step))+ return &v1pb.ApprovalFlow{+ Roles: flow.Roles,}- return convertedFlow-}--func convertToApprovalStep(step *storepb.ApprovalStep) *v1pb.ApprovalStep {- convertedStep := &v1pb.ApprovalStep{- Type: v1pb.ApprovalStep_Type(step.Type),- }- for _, node := range step.Nodes {- convertedStep.Nodes = append(convertedStep.Nodes, convertToApprovalNode(node))- }- return convertedStep-}--func convertToApprovalNode(node *storepb.ApprovalNode) *v1pb.ApprovalNode {- v1node := &v1pb.ApprovalNode{}- v1node.Type = v1pb.ApprovalNode_Type(node.Type)- v1node.Role = node.Role- return v1node}func convertToGrantRequest(ctx context.Context, s *store.Store, v *storepb.GrantRequest) (*v1pb.GrantRequest, error) {diff --git a/backend/api/v1/issue_service_test.go b/backend/api/v1/issue_service_test.godeleted file mode 100644index c84b004db2..0000000000--- a/backend/api/v1/issue_service_test.go+++ /dev/null@@ -1,35 +0,0 @@-package v1--import (- "testing"-- "github.com/stretchr/testify/require"-- "github.com/bytebase/bytebase/backend/common"- storepb "github.com/bytebase/bytebase/backend/generated-go/store"- v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"-)--func TestConvertToApprovalNode(t *testing.T) {- tests := []struct {- node *storepb.ApprovalNode- want *v1pb.ApprovalNode- }{- {- node: &storepb.ApprovalNode{- Type: storepb.ApprovalNode_ANY_IN_GROUP,- Role: common.FormatRole("customRole"),- },- want: &v1pb.ApprovalNode{- Type: v1pb.ApprovalNode_ANY_IN_GROUP,- Role: common.FormatRole("customRole"),- },- },- }-- a := require.New(t)- for _, test := range tests {- got := convertToApprovalNode(test.node)- a.Equal(test.want, got)- }-}diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.goindex d809908713..080a4d8523 100644--- a/backend/api/v1/setting_service.go+++ b/backend/api/v1/setting_service.go@@ -918,16 +918,8 @@ func validateApprovalTemplate(template *v1pb.ApprovalTemplate) error {if template.Flow == nil {return errors.Errorf("approval template cannot be nil")}- if len(template.Flow.Steps) == 0 {- return errors.Errorf("approval template cannot have 0 step")- }- for _, step := range template.Flow.Steps {- if step.Type != v1pb.ApprovalStep_ANY {- return errors.Errorf("invalid approval step type: %v", step.Type)- }- if len(step.Nodes) != 1 {- return errors.Errorf("expect 1 node in approval step, got: %v", len(step.Nodes))- }+ if len(template.Flow.Roles) == 0 {+ return errors.Errorf("approval template cannot have 0 role")}return nil}@@ -1223,38 +1215,9 @@ func convertApprovalFlow(v1Flow *v1pb.ApprovalFlow) *storepb.ApprovalFlow {return nil}- storeFlow := &storepb.ApprovalFlow{}- for _, step := range v1Flow.Steps {- storeFlow.Steps = append(storeFlow.Steps, convertApprovalStep(step))- }- return storeFlow-}--func convertApprovalStep(v1Step *v1pb.ApprovalStep) *storepb.ApprovalStep {- if v1Step == nil {- return nil- }-- storeStep := &storepb.ApprovalStep{- Type: storepb.ApprovalStep_Type(v1Step.Type),+ return &storepb.ApprovalFlow{+ Roles: v1Flow.Roles,}- for _, node := range v1Step.Nodes {- storeStep.Nodes = append(storeStep.Nodes, convertApprovalNode(node))- }- return storeStep-}--func convertApprovalNode(v1Node *v1pb.ApprovalNode) *storepb.ApprovalNode {- if v1Node == nil {- return nil- }-- storeNode := &storepb.ApprovalNode{- Type: storepb.ApprovalNode_Type(v1Node.Type),- Role: v1Node.Role,- }-- return storeNode}func convertAppIMSetting(v1Setting *v1pb.AppIMSetting) *storepb.AppIMSetting {diff --git a/backend/component/webhook/event.go b/backend/component/webhook/event.goindex 3d86f7534d..18c52d502a 100644--- a/backend/component/webhook/event.go+++ b/backend/component/webhook/event.go@@ -74,7 +74,7 @@ type EventIssueUpdate struct {}type EventIssueApprovalCreate struct {- ApprovalStep *storepb.ApprovalStep+ Role string}type EventIssueRolloutReady struct {diff --git a/backend/component/webhook/manager.go b/backend/component/webhook/manager.goindex 52b4612caf..f980911764 100644--- a/backend/component/webhook/manager.go+++ b/backend/component/webhook/manager.go@@ -223,21 +223,14 @@ func (m *Manager) getWebhookContextFromEvent(ctx context.Context, e *Event, even}case common.EventTypeIssueApprovalCreate:- pendingStep := e.IssueApprovalCreate.ApprovalStep+ roleWithPrefix := e.IssueApprovalCreate.Roletitle = "Issue approval needed"titleZh = "工单待审批"- if len(pendingStep.Nodes) != 1 {- slog.Warn("Failed to post webhook event after changing the issue approval node status, pending step nodes length is not 1")- return nil, errors.Errorf("pending step nodes length is not 1, got %v", len(pendingStep.Nodes))- }-- node := pendingStep.Nodes[0]-var usersGetter func(ctx context.Context) ([]*store.UserMessage, error)- role := strings.TrimPrefix(node.Role, "roles/")+ role := strings.TrimPrefix(roleWithPrefix, "roles/")usersGetter = getUsersFromRole(m.store, role, e.Project.ResourceID)users, err := usersGetter(ctx)diff --git a/backend/generated-go/store/approval.pb.go b/backend/generated-go/store/approval.pb.goindex b31e5913fa..90f7623d89 100644--- a/backend/generated-go/store/approval.pb.go+++ b/backend/generated-go/store/approval.pb.go@@ -125,114 +125,12 @@ func (IssuePayloadApproval_Approver_Status) EnumDescriptor() ([]byte, []int) {return file_store_approval_proto_rawDescGZIP(), []int{0, 0, 0}}-// Type of the ApprovalStep-// ALL means every node must be approved to proceed.-// ANY means approving any node will proceed.-type ApprovalStep_Type int32--const (- ApprovalStep_TYPE_UNSPECIFIED ApprovalStep_Type = 0- ApprovalStep_ALL ApprovalStep_Type = 1- ApprovalStep_ANY ApprovalStep_Type = 2-)--// Enum value maps for ApprovalStep_Type.-var (- ApprovalStep_Type_name = map[int32]string{- 0: "TYPE_UNSPECIFIED",- 1: "ALL",- 2: "ANY",- }- ApprovalStep_Type_value = map[string]int32{- "TYPE_UNSPECIFIED": 0,- "ALL": 1,- "ANY": 2,- }-)--func (x ApprovalStep_Type) Enum() *ApprovalStep_Type {- p := new(ApprovalStep_Type)- *p = x- return p-}--func (x ApprovalStep_Type) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (ApprovalStep_Type) Descriptor() protoreflect.EnumDescriptor {- return file_store_approval_proto_enumTypes[2].Descriptor()-}--func (ApprovalStep_Type) Type() protoreflect.EnumType {- return &file_store_approval_proto_enumTypes[2]-}--func (x ApprovalStep_Type) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use ApprovalStep_Type.Descriptor instead.-func (ApprovalStep_Type) EnumDescriptor() ([]byte, []int) {- return file_store_approval_proto_rawDescGZIP(), []int{3, 0}-}--// Type of the ApprovalNode.-// type determines who should approve this node.-// ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.-// See GroupValue below for the predefined user groups.-type ApprovalNode_Type int32--const (- ApprovalNode_TYPE_UNSPECIFIED ApprovalNode_Type = 0- ApprovalNode_ANY_IN_GROUP ApprovalNode_Type = 1-)--// Enum value maps for ApprovalNode_Type.-var (- ApprovalNode_Type_name = map[int32]string{- 0: "TYPE_UNSPECIFIED",- 1: "ANY_IN_GROUP",- }- ApprovalNode_Type_value = map[string]int32{- "TYPE_UNSPECIFIED": 0,- "ANY_IN_GROUP": 1,- }-)--func (x ApprovalNode_Type) Enum() *ApprovalNode_Type {- p := new(ApprovalNode_Type)- *p = x- return p-}--func (x ApprovalNode_Type) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (ApprovalNode_Type) Descriptor() protoreflect.EnumDescriptor {- return file_store_approval_proto_enumTypes[3].Descriptor()-}--func (ApprovalNode_Type) Type() protoreflect.EnumType {- return &file_store_approval_proto_enumTypes[3]-}--func (x ApprovalNode_Type) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use ApprovalNode_Type.Descriptor instead.-func (ApprovalNode_Type) EnumDescriptor() ([]byte, []int) {- return file_store_approval_proto_rawDescGZIP(), []int{4, 0}-}-// IssuePayloadApproval is a part of the payload of an issue.// IssuePayloadApproval records the approval template used and the approval history.type IssuePayloadApproval struct {- state protoimpl.MessageState `protogen:"open.v1"`- ApprovalTemplates []*ApprovalTemplate `protobuf:"bytes,1,rep,name=approval_templates,json=approvalTemplates,proto3" json:"approval_templates,omitempty"`- Approvers []*IssuePayloadApproval_Approver `protobuf:"bytes,2,rep,name=approvers,proto3" json:"approvers,omitempty"`+ state protoimpl.MessageState `protogen:"open.v1"`+ ApprovalTemplate *ApprovalTemplate `protobuf:"bytes,1,opt,name=approval_template,json=approvalTemplate,proto3" json:"approval_template,omitempty"`+ Approvers []*IssuePayloadApproval_Approver `protobuf:"bytes,2,rep,name=approvers,proto3" json:"approvers,omitempty"`// If the value is `false`, it means that the backend is still finding matching approval templates.// If `true`, other fields are available.ApprovalFindingDone bool `protobuf:"varint,3,opt,name=approval_finding_done,json=approvalFindingDone,proto3" json:"approval_finding_done,omitempty"`@@ -272,9 +170,9 @@ func (*IssuePayloadApproval) Descriptor() ([]byte, []int) {return file_store_approval_proto_rawDescGZIP(), []int{0}}-func (x *IssuePayloadApproval) GetApprovalTemplates() []*ApprovalTemplate {+func (x *IssuePayloadApproval) GetApprovalTemplate() *ApprovalTemplate {if x != nil {- return x.ApprovalTemplates+ return x.ApprovalTemplate}return nil}@@ -369,7 +267,7 @@ func (x *ApprovalTemplate) GetDescription() string {type ApprovalFlow struct {state protoimpl.MessageState `protogen:"open.v1"`- Steps []*ApprovalStep `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`+ Roles []string `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -404,117 +302,13 @@ func (*ApprovalFlow) Descriptor() ([]byte, []int) {return file_store_approval_proto_rawDescGZIP(), []int{2}}-func (x *ApprovalFlow) GetSteps() []*ApprovalStep {- if x != nil {- return x.Steps- }- return nil-}--type ApprovalStep struct {- state protoimpl.MessageState `protogen:"open.v1"`- Type ApprovalStep_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.store.ApprovalStep_Type" json:"type,omitempty"`- Nodes []*ApprovalNode `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *ApprovalStep) Reset() {- *x = ApprovalStep{}- mi := &file_store_approval_proto_msgTypes[3]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *ApprovalStep) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*ApprovalStep) ProtoMessage() {}--func (x *ApprovalStep) ProtoReflect() protoreflect.Message {- mi := &file_store_approval_proto_msgTypes[3]+func (x *ApprovalFlow) GetRoles() []string {if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use ApprovalStep.ProtoReflect.Descriptor instead.-func (*ApprovalStep) Descriptor() ([]byte, []int) {- return file_store_approval_proto_rawDescGZIP(), []int{3}-}--func (x *ApprovalStep) GetType() ApprovalStep_Type {- if x != nil {- return x.Type- }- return ApprovalStep_TYPE_UNSPECIFIED-}--func (x *ApprovalStep) GetNodes() []*ApprovalNode {- if x != nil {- return x.Nodes+ return x.Roles}return nil}-type ApprovalNode struct {- state protoimpl.MessageState `protogen:"open.v1"`- Type ApprovalNode_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.store.ApprovalNode_Type" json:"type,omitempty"`- Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *ApprovalNode) Reset() {- *x = ApprovalNode{}- mi := &file_store_approval_proto_msgTypes[4]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *ApprovalNode) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*ApprovalNode) ProtoMessage() {}--func (x *ApprovalNode) ProtoReflect() protoreflect.Message {- mi := &file_store_approval_proto_msgTypes[4]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use ApprovalNode.ProtoReflect.Descriptor instead.-func (*ApprovalNode) Descriptor() ([]byte, []int) {- return file_store_approval_proto_rawDescGZIP(), []int{4}-}--func (x *ApprovalNode) GetType() ApprovalNode_Type {- if x != nil {- return x.Type- }- return ApprovalNode_TYPE_UNSPECIFIED-}--func (x *ApprovalNode) GetRole() string {- if x != nil {- return x.Role- }- return ""-}-type IssuePayloadApproval_Approver struct {state protoimpl.MessageState `protogen:"open.v1"`// The new status.@@ -527,7 +321,7 @@ type IssuePayloadApproval_Approver struct {func (x *IssuePayloadApproval_Approver) Reset() {*x = IssuePayloadApproval_Approver{}- mi := &file_store_approval_proto_msgTypes[5]+ mi := &file_store_approval_proto_msgTypes[3]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -539,7 +333,7 @@ func (x *IssuePayloadApproval_Approver) String() string {func (*IssuePayloadApproval_Approver) ProtoMessage() {}func (x *IssuePayloadApproval_Approver) ProtoReflect() protoreflect.Message {- mi := &file_store_approval_proto_msgTypes[5]+ mi := &file_store_approval_proto_msgTypes[3]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -573,9 +367,9 @@ var File_store_approval_proto protoreflect.FileDescriptorconst file_store_approval_proto_rawDesc = "" +"\n" +- "\x14store/approval.proto\x12\x0ebytebase.store\"\x80\x05\n" +- "\x14IssuePayloadApproval\x12O\n" +- "\x12approval_templates\x18\x01 \x03(\v2 .bytebase.store.ApprovalTemplateR\x11approvalTemplates\x12K\n" ++ "\x14store/approval.proto\x12\x0ebytebase.store\"\xfe\x04\n" ++ "\x14IssuePayloadApproval\x12M\n" ++ "\x11approval_template\x18\x01 \x01(\v2 .bytebase.store.ApprovalTemplateR\x10approvalTemplate\x12K\n" +"\tapprovers\x18\x02 \x03(\v2-.bytebase.store.IssuePayloadApproval.ApproverR\tapprovers\x122\n" +"\x15approval_finding_done\x18\x03 \x01(\bR\x13approvalFindingDone\x124\n" +"\x16approval_finding_error\x18\x04 \x01(\tR\x14approvalFindingError\x12M\n" +@@ -597,22 +391,9 @@ const file_store_approval_proto_rawDesc = "" +"\x10ApprovalTemplate\x120\n" +"\x04flow\x18\x01 \x01(\v2\x1c.bytebase.store.ApprovalFlowR\x04flow\x12\x14\n" +"\x05title\x18\x02 \x01(\tR\x05title\x12 \n" +- "\vdescription\x18\x03 \x01(\tR\vdescription\"B\n" +- "\fApprovalFlow\x122\n" +- "\x05steps\x18\x01 \x03(\v2\x1c.bytebase.store.ApprovalStepR\x05steps\"\xa9\x01\n" +- "\fApprovalStep\x125\n" +- "\x04type\x18\x01 \x01(\x0e2!.bytebase.store.ApprovalStep.TypeR\x04type\x122\n" +- "\x05nodes\x18\x02 \x03(\v2\x1c.bytebase.store.ApprovalNodeR\x05nodes\".\n" +- "\x04Type\x12\x14\n" +- "\x10TYPE_UNSPECIFIED\x10\x00\x12\a\n" +- "\x03ALL\x10\x01\x12\a\n" +- "\x03ANY\x10\x02\"\x89\x01\n" +- "\fApprovalNode\x125\n" +- "\x04type\x18\x01 \x01(\x0e2!.bytebase.store.ApprovalNode.TypeR\x04type\x12\x12\n" +- "\x04role\x18\x02 \x01(\tR\x04role\".\n" +- "\x04Type\x12\x14\n" +- "\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n" +- "\fANY_IN_GROUP\x10\x01B\x14Z\x12generated-go/storeb\x06proto3"+ "\vdescription\x18\x03 \x01(\tR\vdescription\"$\n" ++ "\fApprovalFlow\x12\x14\n" ++ "\x05roles\x18\x01 \x03(\tR\x05rolesB\x14Z\x12generated-go/storeb\x06proto3"var (file_store_approval_proto_rawDescOnce sync.Once@@ -626,35 +407,27 @@ func file_store_approval_proto_rawDescGZIP() []byte {return file_store_approval_proto_rawDescData}-var file_store_approval_proto_enumTypes = make([]protoimpl.EnumInfo, 4)-var file_store_approval_proto_msgTypes = make([]protoimpl.MessageInfo, 6)+var file_store_approval_proto_enumTypes = make([]protoimpl.EnumInfo, 2)+var file_store_approval_proto_msgTypes = make([]protoimpl.MessageInfo, 4)var file_store_approval_proto_goTypes = []any{(IssuePayloadApproval_RiskLevel)(0), // 0: bytebase.store.IssuePayloadApproval.RiskLevel(IssuePayloadApproval_Approver_Status)(0), // 1: bytebase.store.IssuePayloadApproval.Approver.Status- (ApprovalStep_Type)(0), // 2: bytebase.store.ApprovalStep.Type- (ApprovalNode_Type)(0), // 3: bytebase.store.ApprovalNode.Type- (*IssuePayloadApproval)(nil), // 4: bytebase.store.IssuePayloadApproval- (*ApprovalTemplate)(nil), // 5: bytebase.store.ApprovalTemplate- (*ApprovalFlow)(nil), // 6: bytebase.store.ApprovalFlow- (*ApprovalStep)(nil), // 7: bytebase.store.ApprovalStep- (*ApprovalNode)(nil), // 8: bytebase.store.ApprovalNode- (*IssuePayloadApproval_Approver)(nil), // 9: bytebase.store.IssuePayloadApproval.Approver+ (*IssuePayloadApproval)(nil), // 2: bytebase.store.IssuePayloadApproval+ (*ApprovalTemplate)(nil), // 3: bytebase.store.ApprovalTemplate+ (*ApprovalFlow)(nil), // 4: bytebase.store.ApprovalFlow+ (*IssuePayloadApproval_Approver)(nil), // 5: bytebase.store.IssuePayloadApproval.Approver}var file_store_approval_proto_depIdxs = []int32{- 5, // 0: bytebase.store.IssuePayloadApproval.approval_templates:type_name -> bytebase.store.ApprovalTemplate- 9, // 1: bytebase.store.IssuePayloadApproval.approvers:type_name -> bytebase.store.IssuePayloadApproval.Approver+ 3, // 0: bytebase.store.IssuePayloadApproval.approval_template:type_name -> bytebase.store.ApprovalTemplate+ 5, // 1: bytebase.store.IssuePayloadApproval.approvers:type_name -> bytebase.store.IssuePayloadApproval.Approver0, // 2: bytebase.store.IssuePayloadApproval.risk_level:type_name -> bytebase.store.IssuePayloadApproval.RiskLevel- 6, // 3: bytebase.store.ApprovalTemplate.flow:type_name -> bytebase.store.ApprovalFlow- 7, // 4: bytebase.store.ApprovalFlow.steps:type_name -> bytebase.store.ApprovalStep- 2, // 5: bytebase.store.ApprovalStep.type:type_name -> bytebase.store.ApprovalStep.Type- 8, // 6: bytebase.store.ApprovalStep.nodes:type_name -> bytebase.store.ApprovalNode- 3, // 7: bytebase.store.ApprovalNode.type:type_name -> bytebase.store.ApprovalNode.Type- 1, // 8: bytebase.store.IssuePayloadApproval.Approver.status:type_name -> bytebase.store.IssuePayloadApproval.Approver.Status- 9, // [9:9] is the sub-list for method output_type- 9, // [9:9] is the sub-list for method input_type- 9, // [9:9] is the sub-list for extension type_name- 9, // [9:9] is the sub-list for extension extendee- 0, // [0:9] is the sub-list for field type_name+ 4, // 3: bytebase.store.ApprovalTemplate.flow:type_name -> bytebase.store.ApprovalFlow+ 1, // 4: bytebase.store.IssuePayloadApproval.Approver.status:type_name -> bytebase.store.IssuePayloadApproval.Approver.Status+ 5, // [5:5] is the sub-list for method output_type+ 5, // [5:5] is the sub-list for method input_type+ 5, // [5:5] is the sub-list for extension type_name+ 5, // [5:5] is the sub-list for extension extendee+ 0, // [0:5] is the sub-list for field type_name}func init() { file_store_approval_proto_init() }@@ -667,8 +440,8 @@ func file_store_approval_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_approval_proto_rawDesc), len(file_store_approval_proto_rawDesc)),- NumEnums: 4,- NumMessages: 6,+ NumEnums: 2,+ NumMessages: 4,NumExtensions: 0,NumServices: 0,},diff --git a/backend/generated-go/store/approval_equal.pb.go b/backend/generated-go/store/approval_equal.pb.goindex e3239c00c5..95c04d2a67 100644--- a/backend/generated-go/store/approval_equal.pb.go+++ b/backend/generated-go/store/approval_equal.pb.go@@ -26,14 +26,9 @@ func (x *IssuePayloadApproval) Equal(y *IssuePayloadApproval) bool {if x == nil || y == nil {return x == nil && y == nil}- if len(x.ApprovalTemplates) != len(y.ApprovalTemplates) {+ if !x.ApprovalTemplate.Equal(y.ApprovalTemplate) {return false}- for i := 0; i < len(x.ApprovalTemplates); i++ {- if !x.ApprovalTemplates[i].Equal(y.ApprovalTemplates[i]) {- return false- }- }if len(x.Approvers) != len(y.Approvers) {return false}@@ -80,50 +75,13 @@ func (x *ApprovalFlow) Equal(y *ApprovalFlow) bool {if x == nil || y == nil {return x == nil && y == nil}- if len(x.Steps) != len(y.Steps) {- return false- }- for i := 0; i < len(x.Steps); i++ {- if !x.Steps[i].Equal(y.Steps[i]) {- return false- }- }- return true-}--func (x *ApprovalStep) Equal(y *ApprovalStep) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Type != y.Type {- return false- }- if len(x.Nodes) != len(y.Nodes) {+ if len(x.Roles) != len(y.Roles) {return false}- for i := 0; i < len(x.Nodes); i++ {- if !x.Nodes[i].Equal(y.Nodes[i]) {+ for i := 0; i < len(x.Roles); i++ {+ if x.Roles[i] != y.Roles[i] {return false}}return true}--func (x *ApprovalNode) Equal(y *ApprovalNode) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Type != y.Type {- return false- }- if x.Role != y.Role {- return false- }- return true-}diff --git a/backend/generated-go/store/setting.pb.go b/backend/generated-go/store/setting.pb.goindex 87a01aee47..a99d92dd2d 100644--- a/backend/generated-go/store/setting.pb.go+++ b/backend/generated-go/store/setting.pb.go@@ -7,7 +7,6 @@package storeimport (- v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1"expr "google.golang.org/genproto/googleapis/type/expr"protoreflect "google.golang.org/protobuf/reflect/protoreflect"protoimpl "google.golang.org/protobuf/runtime/protoimpl"@@ -1177,9 +1176,8 @@ func (x *EnvironmentSetting) GetEnvironments() []*EnvironmentSetting_Environmenttype WorkspaceApprovalSetting_Rule struct {state protoimpl.MessageState `protogen:"open.v1"`- Expression *v1alpha1.Expr `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"`- Template *ApprovalTemplate `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`- Condition *expr.Expr `protobuf:"bytes,3,opt,name=condition,proto3" json:"condition,omitempty"`+ Template *ApprovalTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"`+ Condition *expr.Expr `protobuf:"bytes,2,opt,name=condition,proto3" json:"condition,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -1214,13 +1212,6 @@ func (*WorkspaceApprovalSetting_Rule) Descriptor() ([]byte, []int) {return file_store_setting_proto_rawDescGZIP(), []int{2, 0}}-func (x *WorkspaceApprovalSetting_Rule) GetExpression() *v1alpha1.Expr {- if x != nil {- return x.Expression- }- return nil-}-func (x *WorkspaceApprovalSetting_Rule) GetTemplate() *ApprovalTemplate {if x != nil {return x.Template@@ -2393,7 +2384,7 @@ var File_store_setting_proto protoreflect.FileDescriptorconst file_store_setting_proto_rawDesc = "" +"\n" +- "\x13store/setting.proto\x12\x0ebytebase.store\x1a%google/api/expr/v1alpha1/syntax.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\x1a\x14store/database.proto\"\xf9\x04\n" ++ "\x13store/setting.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\x1a\x14store/database.proto\"\xf9\x04\n" +"\x17WorkspaceProfileSetting\x12!\n" +"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +@@ -2417,15 +2408,12 @@ const file_store_setting_proto_rawDesc = "" +"\x17ALERT_LEVEL_UNSPECIFIED\x10\x00\x12\x14\n" +"\x10ALERT_LEVEL_INFO\x10\x01\x12\x17\n" +"\x13ALERT_LEVEL_WARNING\x10\x02\x12\x18\n" +- "\x14ALERT_LEVEL_CRITICAL\x10\x03\"\x97\x02\n" ++ "\x14ALERT_LEVEL_CRITICAL\x10\x03\"\xd6\x01\n" +"\x18WorkspaceApprovalSetting\x12C\n" +- "\x05rules\x18\x01 \x03(\v2-.bytebase.store.WorkspaceApprovalSetting.RuleR\x05rules\x1a\xb5\x01\n" +- "\x04Rule\x12>\n" +- "\n" +- "expression\x18\x01 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\n" +- "expression\x12<\n" +- "\btemplate\x18\x02 \x01(\v2 .bytebase.store.ApprovalTemplateR\btemplate\x12/\n" +- "\tcondition\x18\x03 \x01(\v2\x11.google.type.ExprR\tcondition\"\xd0\x06\n" ++ "\x05rules\x18\x01 \x03(\v2-.bytebase.store.WorkspaceApprovalSetting.RuleR\x05rules\x1au\n" ++ "\x04Rule\x12<\n" ++ "\btemplate\x18\x01 \x01(\v2 .bytebase.store.ApprovalTemplateR\btemplate\x12/\n" ++ "\tcondition\x18\x02 \x01(\v2\x11.google.type.ExprR\tcondition\"\xd0\x06\n" +"\x15SchemaTemplateSetting\x12\\\n" +"\x0ffield_templates\x18\x01 \x03(\v23.bytebase.store.SchemaTemplateSetting.FieldTemplateR\x0efieldTemplates\x12S\n" +"\fcolumn_types\x18\x02 \x03(\v20.bytebase.store.SchemaTemplateSetting.ColumnTypeR\vcolumnTypes\x12\\\n" +@@ -2650,14 +2638,13 @@ var file_store_setting_proto_goTypes = []any{(*EnvironmentSetting_Environment)(nil), // 36: bytebase.store.EnvironmentSetting.Environmentnil, // 37: bytebase.store.EnvironmentSetting.Environment.TagsEntry(*durationpb.Duration)(nil), // 38: google.protobuf.Duration- (*v1alpha1.Expr)(nil), // 39: google.api.expr.v1alpha1.Expr- (*ApprovalTemplate)(nil), // 40: bytebase.store.ApprovalTemplate- (*expr.Expr)(nil), // 41: google.type.Expr- (Engine)(0), // 42: bytebase.store.Engine- (*ColumnMetadata)(nil), // 43: bytebase.store.ColumnMetadata- (*ColumnCatalog)(nil), // 44: bytebase.store.ColumnCatalog- (*TableMetadata)(nil), // 45: bytebase.store.TableMetadata- (*TableCatalog)(nil), // 46: bytebase.store.TableCatalog+ (*ApprovalTemplate)(nil), // 39: bytebase.store.ApprovalTemplate+ (*expr.Expr)(nil), // 40: google.type.Expr+ (Engine)(0), // 41: bytebase.store.Engine+ (*ColumnMetadata)(nil), // 42: bytebase.store.ColumnMetadata+ (*ColumnCatalog)(nil), // 43: bytebase.store.ColumnCatalog+ (*TableMetadata)(nil), // 44: bytebase.store.TableMetadata+ (*TableCatalog)(nil), // 45: bytebase.store.TableCatalog}var file_store_setting_proto_depIdxs = []int32{38, // 0: bytebase.store.WorkspaceProfileSetting.token_duration:type_name -> google.protobuf.Duration@@ -2683,28 +2670,27 @@ var file_store_setting_proto_depIdxs = []int32{38, // 20: bytebase.store.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration4, // 21: bytebase.store.AISetting.provider:type_name -> bytebase.store.AISetting.Provider36, // 22: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment- 39, // 23: bytebase.store.WorkspaceApprovalSetting.Rule.expression:type_name -> google.api.expr.v1alpha1.Expr- 40, // 24: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate- 41, // 25: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 42, // 26: bytebase.store.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.store.Engine- 43, // 27: bytebase.store.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.store.ColumnMetadata- 44, // 28: bytebase.store.SchemaTemplateSetting.FieldTemplate.catalog:type_name -> bytebase.store.ColumnCatalog- 42, // 29: bytebase.store.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.store.Engine- 42, // 30: bytebase.store.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.store.Engine- 45, // 31: bytebase.store.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.store.TableMetadata- 46, // 32: bytebase.store.SchemaTemplateSetting.TableTemplate.catalog:type_name -> bytebase.store.TableCatalog- 22, // 33: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level- 24, // 34: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 23, // 35: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification- 11, // 36: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm- 30, // 37: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice- 3, // 38: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType- 37, // 39: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry- 40, // [40:40] is the sub-list for method output_type- 40, // [40:40] is the sub-list for method input_type- 40, // [40:40] is the sub-list for extension type_name- 40, // [40:40] is the sub-list for extension extendee- 0, // [0:40] is the sub-list for field type_name+ 39, // 23: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate+ 40, // 24: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 41, // 25: bytebase.store.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.store.Engine+ 42, // 26: bytebase.store.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.store.ColumnMetadata+ 43, // 27: bytebase.store.SchemaTemplateSetting.FieldTemplate.catalog:type_name -> bytebase.store.ColumnCatalog+ 41, // 28: bytebase.store.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.store.Engine+ 41, // 29: bytebase.store.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.store.Engine+ 44, // 30: bytebase.store.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.store.TableMetadata+ 45, // 31: bytebase.store.SchemaTemplateSetting.TableTemplate.catalog:type_name -> bytebase.store.TableCatalog+ 22, // 32: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level+ 24, // 33: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 23, // 34: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification+ 11, // 35: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm+ 30, // 36: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice+ 3, // 37: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType+ 37, // 38: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry+ 39, // [39:39] is the sub-list for method output_type+ 39, // [39:39] is the sub-list for method input_type+ 39, // [39:39] is the sub-list for extension type_name+ 39, // [39:39] is the sub-list for extension extendee+ 0, // [0:39] is the sub-list for field type_name}func init() { file_store_setting_proto_init() }diff --git a/backend/generated-go/store/setting_equal.pb.go b/backend/generated-go/store/setting_equal.pb.goindex 32f0bdc918..c5d1dd260a 100644--- a/backend/generated-go/store/setting_equal.pb.go+++ b/backend/generated-go/store/setting_equal.pb.go@@ -4,7 +4,6 @@package storeimport (- v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1"expr "google.golang.org/genproto/googleapis/type/expr"proto "google.golang.org/protobuf/proto")@@ -83,11 +82,6 @@ func (x *WorkspaceApprovalSetting_Rule) Equal(y *WorkspaceApprovalSetting_Rule)if x == nil || y == nil {return x == nil && y == nil}- if equal, ok := interface{}(x.Expression).(interface{ Equal(*v1alpha1.Expr) bool }); !ok || !equal.Equal(y.Expression) {- return false- } else if !proto.Equal(x.Expression, y.Expression) {- return false- }if !x.Template.Equal(y.Template) {return false}diff --git a/backend/generated-go/v1/issue_service.pb.go b/backend/generated-go/v1/issue_service.pb.goindex 8fbd9e2980..ef0e0f62da 100644--- a/backend/generated-go/v1/issue_service.pb.go+++ b/backend/generated-go/v1/issue_service.pb.go@@ -295,108 +295,6 @@ func (Issue_Approver_Status) EnumDescriptor() ([]byte, []int) {return file_v1_issue_service_proto_rawDescGZIP(), []int{12, 0, 0}}-// Type of the ApprovalStep-// ALL means every node must be approved to proceed.-// ANY means approving any node will proceed.-type ApprovalStep_Type int32--const (- ApprovalStep_TYPE_UNSPECIFIED ApprovalStep_Type = 0- ApprovalStep_ALL ApprovalStep_Type = 1- ApprovalStep_ANY ApprovalStep_Type = 2-)--// Enum value maps for ApprovalStep_Type.-var (- ApprovalStep_Type_name = map[int32]string{- 0: "TYPE_UNSPECIFIED",- 1: "ALL",- 2: "ANY",- }- ApprovalStep_Type_value = map[string]int32{- "TYPE_UNSPECIFIED": 0,- "ALL": 1,- "ANY": 2,- }-)--func (x ApprovalStep_Type) Enum() *ApprovalStep_Type {- p := new(ApprovalStep_Type)- *p = x- return p-}--func (x ApprovalStep_Type) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (ApprovalStep_Type) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[5].Descriptor()-}--func (ApprovalStep_Type) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[5]-}--func (x ApprovalStep_Type) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use ApprovalStep_Type.Descriptor instead.-func (ApprovalStep_Type) EnumDescriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{16, 0}-}--// Type of the ApprovalNode.-// type determines who should approve this node.-// ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.-// See GroupValue below for the predefined user groups.-type ApprovalNode_Type int32--const (- ApprovalNode_TYPE_UNSPECIFIED ApprovalNode_Type = 0- ApprovalNode_ANY_IN_GROUP ApprovalNode_Type = 1-)--// Enum value maps for ApprovalNode_Type.-var (- ApprovalNode_Type_name = map[int32]string{- 0: "TYPE_UNSPECIFIED",- 1: "ANY_IN_GROUP",- }- ApprovalNode_Type_value = map[string]int32{- "TYPE_UNSPECIFIED": 0,- "ANY_IN_GROUP": 1,- }-)--func (x ApprovalNode_Type) Enum() *ApprovalNode_Type {- p := new(ApprovalNode_Type)- *p = x- return p-}--func (x ApprovalNode_Type) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (ApprovalNode_Type) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[6].Descriptor()-}--func (ApprovalNode_Type) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[6]-}--func (x ApprovalNode_Type) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use ApprovalNode_Type.Descriptor instead.-func (ApprovalNode_Type) EnumDescriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{17, 0}-}-type IssueComment_Approval_Status int32const (@@ -433,11 +331,11 @@ func (x IssueComment_Approval_Status) String() string {}func (IssueComment_Approval_Status) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[7].Descriptor()+ return file_v1_issue_service_proto_enumTypes[5].Descriptor()}func (IssueComment_Approval_Status) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[7]+ return &file_v1_issue_service_proto_enumTypes[5]}func (x IssueComment_Approval_Status) Number() protoreflect.EnumNumber {@@ -446,7 +344,7 @@ func (x IssueComment_Approval_Status) Number() protoreflect.EnumNumber {// Deprecated: Use IssueComment_Approval_Status.Descriptor instead.func (IssueComment_Approval_Status) EnumDescriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{22, 0, 0}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{20, 0, 0}}type IssueComment_TaskUpdate_Status int32@@ -494,11 +392,11 @@ func (x IssueComment_TaskUpdate_Status) String() string {}func (IssueComment_TaskUpdate_Status) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[8].Descriptor()+ return file_v1_issue_service_proto_enumTypes[6].Descriptor()}func (IssueComment_TaskUpdate_Status) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[8]+ return &file_v1_issue_service_proto_enumTypes[6]}func (x IssueComment_TaskUpdate_Status) Number() protoreflect.EnumNumber {@@ -507,7 +405,7 @@ func (x IssueComment_TaskUpdate_Status) Number() protoreflect.EnumNumber {// Deprecated: Use IssueComment_TaskUpdate_Status.Descriptor instead.func (IssueComment_TaskUpdate_Status) EnumDescriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{22, 3, 0}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{20, 3, 0}}type GetIssueRequest struct {@@ -1272,13 +1170,13 @@ type Issue struct {state protoimpl.MessageState `protogen:"open.v1"`// The name of the issue.// Format: projects/{project}/issues/{issue}- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`- Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`- Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`- Type Issue_Type `protobuf:"varint,5,opt,name=type,proto3,enum=bytebase.v1.Issue_Type" json:"type,omitempty"`- Status IssueStatus `protobuf:"varint,6,opt,name=status,proto3,enum=bytebase.v1.IssueStatus" json:"status,omitempty"`- Approvers []*Issue_Approver `protobuf:"bytes,9,rep,name=approvers,proto3" json:"approvers,omitempty"`- ApprovalTemplates []*ApprovalTemplate `protobuf:"bytes,10,rep,name=approval_templates,json=approvalTemplates,proto3" json:"approval_templates,omitempty"`+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`+ Type Issue_Type `protobuf:"varint,5,opt,name=type,proto3,enum=bytebase.v1.Issue_Type" json:"type,omitempty"`+ Status IssueStatus `protobuf:"varint,6,opt,name=status,proto3,enum=bytebase.v1.IssueStatus" json:"status,omitempty"`+ Approvers []*Issue_Approver `protobuf:"bytes,9,rep,name=approvers,proto3" json:"approvers,omitempty"`+ ApprovalTemplate *ApprovalTemplate `protobuf:"bytes,10,opt,name=approval_template,json=approvalTemplate,proto3" json:"approval_template,omitempty"`// Format: users/[email protected]Creator string `protobuf:"bytes,14,opt,name=creator,proto3" json:"creator,omitempty"`CreateTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`@@ -1393,9 +1291,9 @@ func (x *Issue) GetApprovers() []*Issue_Approver {return nil}-func (x *Issue) GetApprovalTemplates() []*ApprovalTemplate {+func (x *Issue) GetApprovalTemplate() *ApprovalTemplate {if x != nil {- return x.ApprovalTemplates+ return x.ApprovalTemplate}return nil}@@ -1619,7 +1517,7 @@ func (x *ApprovalTemplate) GetDescription() string {type ApprovalFlow struct {state protoimpl.MessageState `protogen:"open.v1"`- Steps []*ApprovalStep `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`+ Roles []string `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -1654,117 +1552,13 @@ func (*ApprovalFlow) Descriptor() ([]byte, []int) {return file_v1_issue_service_proto_rawDescGZIP(), []int{15}}-func (x *ApprovalFlow) GetSteps() []*ApprovalStep {+func (x *ApprovalFlow) GetRoles() []string {if x != nil {- return x.Steps+ return x.Roles}return nil}-type ApprovalStep struct {- state protoimpl.MessageState `protogen:"open.v1"`- Type ApprovalStep_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.v1.ApprovalStep_Type" json:"type,omitempty"`- Nodes []*ApprovalNode `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *ApprovalStep) Reset() {- *x = ApprovalStep{}- mi := &file_v1_issue_service_proto_msgTypes[16]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *ApprovalStep) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*ApprovalStep) ProtoMessage() {}--func (x *ApprovalStep) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[16]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use ApprovalStep.ProtoReflect.Descriptor instead.-func (*ApprovalStep) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{16}-}--func (x *ApprovalStep) GetType() ApprovalStep_Type {- if x != nil {- return x.Type- }- return ApprovalStep_TYPE_UNSPECIFIED-}--func (x *ApprovalStep) GetNodes() []*ApprovalNode {- if x != nil {- return x.Nodes- }- return nil-}--type ApprovalNode struct {- state protoimpl.MessageState `protogen:"open.v1"`- Type ApprovalNode_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.v1.ApprovalNode_Type" json:"type,omitempty"`- Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *ApprovalNode) Reset() {- *x = ApprovalNode{}- mi := &file_v1_issue_service_proto_msgTypes[17]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *ApprovalNode) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*ApprovalNode) ProtoMessage() {}--func (x *ApprovalNode) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[17]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use ApprovalNode.ProtoReflect.Descriptor instead.-func (*ApprovalNode) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{17}-}--func (x *ApprovalNode) GetType() ApprovalNode_Type {- if x != nil {- return x.Type- }- return ApprovalNode_TYPE_UNSPECIFIED-}--func (x *ApprovalNode) GetRole() string {- if x != nil {- return x.Role- }- return ""-}-type ListIssueCommentsRequest struct {state protoimpl.MessageState `protogen:"open.v1"`// Format: projects/{projects}/issues/{issue}@@ -1786,7 +1580,7 @@ type ListIssueCommentsRequest struct {func (x *ListIssueCommentsRequest) Reset() {*x = ListIssueCommentsRequest{}- mi := &file_v1_issue_service_proto_msgTypes[18]+ mi := &file_v1_issue_service_proto_msgTypes[16]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1798,7 +1592,7 @@ func (x *ListIssueCommentsRequest) String() string {func (*ListIssueCommentsRequest) ProtoMessage() {}func (x *ListIssueCommentsRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[18]+ mi := &file_v1_issue_service_proto_msgTypes[16]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1811,7 +1605,7 @@ func (x *ListIssueCommentsRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use ListIssueCommentsRequest.ProtoReflect.Descriptor instead.func (*ListIssueCommentsRequest) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{18}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{16}}func (x *ListIssueCommentsRequest) GetParent() string {@@ -1847,7 +1641,7 @@ type ListIssueCommentsResponse struct {func (x *ListIssueCommentsResponse) Reset() {*x = ListIssueCommentsResponse{}- mi := &file_v1_issue_service_proto_msgTypes[19]+ mi := &file_v1_issue_service_proto_msgTypes[17]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1859,7 +1653,7 @@ func (x *ListIssueCommentsResponse) String() string {func (*ListIssueCommentsResponse) ProtoMessage() {}func (x *ListIssueCommentsResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[19]+ mi := &file_v1_issue_service_proto_msgTypes[17]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1872,7 +1666,7 @@ func (x *ListIssueCommentsResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use ListIssueCommentsResponse.ProtoReflect.Descriptor instead.func (*ListIssueCommentsResponse) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{19}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{17}}func (x *ListIssueCommentsResponse) GetIssueComments() []*IssueComment {@@ -1901,7 +1695,7 @@ type CreateIssueCommentRequest struct {func (x *CreateIssueCommentRequest) Reset() {*x = CreateIssueCommentRequest{}- mi := &file_v1_issue_service_proto_msgTypes[20]+ mi := &file_v1_issue_service_proto_msgTypes[18]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1913,7 +1707,7 @@ func (x *CreateIssueCommentRequest) String() string {func (*CreateIssueCommentRequest) ProtoMessage() {}func (x *CreateIssueCommentRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[20]+ mi := &file_v1_issue_service_proto_msgTypes[18]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1926,7 +1720,7 @@ func (x *CreateIssueCommentRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use CreateIssueCommentRequest.ProtoReflect.Descriptor instead.func (*CreateIssueCommentRequest) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{20}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{18}}func (x *CreateIssueCommentRequest) GetParent() string {@@ -1960,7 +1754,7 @@ type UpdateIssueCommentRequest struct {func (x *UpdateIssueCommentRequest) Reset() {*x = UpdateIssueCommentRequest{}- mi := &file_v1_issue_service_proto_msgTypes[21]+ mi := &file_v1_issue_service_proto_msgTypes[19]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1972,7 +1766,7 @@ func (x *UpdateIssueCommentRequest) String() string {func (*UpdateIssueCommentRequest) ProtoMessage() {}func (x *UpdateIssueCommentRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[21]+ mi := &file_v1_issue_service_proto_msgTypes[19]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1985,7 +1779,7 @@ func (x *UpdateIssueCommentRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use UpdateIssueCommentRequest.ProtoReflect.Descriptor instead.func (*UpdateIssueCommentRequest) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{21}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{19}}func (x *UpdateIssueCommentRequest) GetParent() string {@@ -2041,7 +1835,7 @@ type IssueComment struct {func (x *IssueComment) Reset() {*x = IssueComment{}- mi := &file_v1_issue_service_proto_msgTypes[22]+ mi := &file_v1_issue_service_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2053,7 +1847,7 @@ func (x *IssueComment) String() string {func (*IssueComment) ProtoMessage() {}func (x *IssueComment) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[22]+ mi := &file_v1_issue_service_proto_msgTypes[20]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2066,7 +1860,7 @@ func (x *IssueComment) ProtoReflect() protoreflect.Message {// Deprecated: Use IssueComment.ProtoReflect.Descriptor instead.func (*IssueComment) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{22}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{20}}func (x *IssueComment) GetName() string {@@ -2209,7 +2003,7 @@ type Issue_Approver struct {func (x *Issue_Approver) Reset() {*x = Issue_Approver{}- mi := &file_v1_issue_service_proto_msgTypes[23]+ mi := &file_v1_issue_service_proto_msgTypes[21]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2221,7 +2015,7 @@ func (x *Issue_Approver) String() string {func (*Issue_Approver) ProtoMessage() {}func (x *Issue_Approver) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[23]+ mi := &file_v1_issue_service_proto_msgTypes[21]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2260,7 +2054,7 @@ type IssueComment_Approval struct {func (x *IssueComment_Approval) Reset() {*x = IssueComment_Approval{}- mi := &file_v1_issue_service_proto_msgTypes[25]+ mi := &file_v1_issue_service_proto_msgTypes[23]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2272,7 +2066,7 @@ func (x *IssueComment_Approval) String() string {func (*IssueComment_Approval) ProtoMessage() {}func (x *IssueComment_Approval) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[25]+ mi := &file_v1_issue_service_proto_msgTypes[23]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2285,7 +2079,7 @@ func (x *IssueComment_Approval) ProtoReflect() protoreflect.Message {// Deprecated: Use IssueComment_Approval.ProtoReflect.Descriptor instead.func (*IssueComment_Approval) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{22, 0}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{20, 0}}func (x *IssueComment_Approval) GetStatus() IssueComment_Approval_Status {@@ -2311,7 +2105,7 @@ type IssueComment_IssueUpdate struct {func (x *IssueComment_IssueUpdate) Reset() {*x = IssueComment_IssueUpdate{}- mi := &file_v1_issue_service_proto_msgTypes[26]+ mi := &file_v1_issue_service_proto_msgTypes[24]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2323,7 +2117,7 @@ func (x *IssueComment_IssueUpdate) String() string {func (*IssueComment_IssueUpdate) ProtoMessage() {}func (x *IssueComment_IssueUpdate) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[26]+ mi := &file_v1_issue_service_proto_msgTypes[24]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2336,7 +2130,7 @@ func (x *IssueComment_IssueUpdate) ProtoReflect() protoreflect.Message {// Deprecated: Use IssueComment_IssueUpdate.ProtoReflect.Descriptor instead.func (*IssueComment_IssueUpdate) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{22, 1}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{20, 1}}func (x *IssueComment_IssueUpdate) GetFromTitle() string {@@ -2404,7 +2198,7 @@ type IssueComment_StageEnd struct {func (x *IssueComment_StageEnd) Reset() {*x = IssueComment_StageEnd{}- mi := &file_v1_issue_service_proto_msgTypes[27]+ mi := &file_v1_issue_service_proto_msgTypes[25]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2416,7 +2210,7 @@ func (x *IssueComment_StageEnd) String() string {func (*IssueComment_StageEnd) ProtoMessage() {}func (x *IssueComment_StageEnd) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[27]+ mi := &file_v1_issue_service_proto_msgTypes[25]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2429,7 +2223,7 @@ func (x *IssueComment_StageEnd) ProtoReflect() protoreflect.Message {// Deprecated: Use IssueComment_StageEnd.ProtoReflect.Descriptor instead.func (*IssueComment_StageEnd) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{22, 2}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{20, 2}}func (x *IssueComment_StageEnd) GetStage() string {@@ -2453,7 +2247,7 @@ type IssueComment_TaskUpdate struct {func (x *IssueComment_TaskUpdate) Reset() {*x = IssueComment_TaskUpdate{}- mi := &file_v1_issue_service_proto_msgTypes[28]+ mi := &file_v1_issue_service_proto_msgTypes[26]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2465,7 +2259,7 @@ func (x *IssueComment_TaskUpdate) String() string {func (*IssueComment_TaskUpdate) ProtoMessage() {}func (x *IssueComment_TaskUpdate) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[28]+ mi := &file_v1_issue_service_proto_msgTypes[26]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2478,7 +2272,7 @@ func (x *IssueComment_TaskUpdate) ProtoReflect() protoreflect.Message {// Deprecated: Use IssueComment_TaskUpdate.ProtoReflect.Descriptor instead.func (*IssueComment_TaskUpdate) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{22, 3}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{20, 3}}func (x *IssueComment_TaskUpdate) GetTasks() []string {@@ -2522,7 +2316,7 @@ type IssueComment_TaskPriorBackup struct {func (x *IssueComment_TaskPriorBackup) Reset() {*x = IssueComment_TaskPriorBackup{}- mi := &file_v1_issue_service_proto_msgTypes[29]+ mi := &file_v1_issue_service_proto_msgTypes[27]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2534,7 +2328,7 @@ func (x *IssueComment_TaskPriorBackup) String() string {func (*IssueComment_TaskPriorBackup) ProtoMessage() {}func (x *IssueComment_TaskPriorBackup) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[29]+ mi := &file_v1_issue_service_proto_msgTypes[27]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2547,7 +2341,7 @@ func (x *IssueComment_TaskPriorBackup) ProtoReflect() protoreflect.Message {// Deprecated: Use IssueComment_TaskPriorBackup.ProtoReflect.Descriptor instead.func (*IssueComment_TaskPriorBackup) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{22, 4}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{20, 4}}func (x *IssueComment_TaskPriorBackup) GetTask() string {@@ -2595,7 +2389,7 @@ type IssueComment_TaskPriorBackup_Table struct {func (x *IssueComment_TaskPriorBackup_Table) Reset() {*x = IssueComment_TaskPriorBackup_Table{}- mi := &file_v1_issue_service_proto_msgTypes[30]+ mi := &file_v1_issue_service_proto_msgTypes[28]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2607,7 +2401,7 @@ func (x *IssueComment_TaskPriorBackup_Table) String() string {func (*IssueComment_TaskPriorBackup_Table) ProtoMessage() {}func (x *IssueComment_TaskPriorBackup_Table) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[30]+ mi := &file_v1_issue_service_proto_msgTypes[28]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2620,7 +2414,7 @@ func (x *IssueComment_TaskPriorBackup_Table) ProtoReflect() protoreflect.Message// Deprecated: Use IssueComment_TaskPriorBackup_Table.ProtoReflect.Descriptor instead.func (*IssueComment_TaskPriorBackup_Table) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{22, 4, 0}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{20, 4, 0}}func (x *IssueComment_TaskPriorBackup_Table) GetSchema() string {@@ -2695,16 +2489,16 @@ const file_v1_issue_service_proto_rawDesc = "" +"\x13RequestIssueRequest\x12.\n" +"\x04name\x18\x01 \x01(\tB\x1a\xe0A\x02\xfaA\x14\n" +"\x12bytebase.com/IssueR\x04name\x12\x18\n" +- "\acomment\x18\x02 \x01(\tR\acomment\"\x96\f\n" ++ "\acomment\x18\x02 \x01(\tR\acomment\"\x94\f\n" +"\x05Issue\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +"\x05title\x18\x03 \x01(\tR\x05title\x12 \n" +"\vdescription\x18\x04 \x01(\tR\vdescription\x12+\n" +"\x04type\x18\x05 \x01(\x0e2\x17.bytebase.v1.Issue.TypeR\x04type\x120\n" +"\x06status\x18\x06 \x01(\x0e2\x18.bytebase.v1.IssueStatusR\x06status\x129\n" +- "\tapprovers\x18\t \x03(\v2\x1b.bytebase.v1.Issue.ApproverR\tapprovers\x12L\n" +- "\x12approval_templates\x18\n" +- " \x03(\v2\x1d.bytebase.v1.ApprovalTemplateR\x11approvalTemplates\x12\x1d\n" ++ "\tapprovers\x18\t \x03(\v2\x1b.bytebase.v1.Issue.ApproverR\tapprovers\x12J\n" ++ "\x11approval_template\x18\n" ++ " \x01(\v2\x1d.bytebase.v1.ApprovalTemplateR\x10approvalTemplate\x12\x1d\n" +"\acreator\x18\x0e \x01(\tB\x03\xe0A\x03R\acreator\x12@\n" +"\vcreate_time\x18\x0f \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +"createTime\x12@\n" +@@ -2760,22 +2554,9 @@ const file_v1_issue_service_proto_rawDesc = "" +"\x10ApprovalTemplate\x12-\n" +"\x04flow\x18\x01 \x01(\v2\x19.bytebase.v1.ApprovalFlowR\x04flow\x12\x14\n" +"\x05title\x18\x02 \x01(\tR\x05title\x12 \n" +- "\vdescription\x18\x03 \x01(\tR\vdescription\"?\n" +- "\fApprovalFlow\x12/\n" +- "\x05steps\x18\x01 \x03(\v2\x19.bytebase.v1.ApprovalStepR\x05steps\"\xa3\x01\n" +- "\fApprovalStep\x122\n" +- "\x04type\x18\x01 \x01(\x0e2\x1e.bytebase.v1.ApprovalStep.TypeR\x04type\x12/\n" +- "\x05nodes\x18\x02 \x03(\v2\x19.bytebase.v1.ApprovalNodeR\x05nodes\".\n" +- "\x04Type\x12\x14\n" +- "\x10TYPE_UNSPECIFIED\x10\x00\x12\a\n" +- "\x03ALL\x10\x01\x12\a\n" +- "\x03ANY\x10\x02\"\x86\x01\n" +- "\fApprovalNode\x122\n" +- "\x04type\x18\x01 \x01(\x0e2\x1e.bytebase.v1.ApprovalNode.TypeR\x04type\x12\x12\n" +- "\x04role\x18\x02 \x01(\tR\x04role\".\n" +- "\x04Type\x12\x14\n" +- "\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n" +- "\fANY_IN_GROUP\x10\x01\"\x8a\x01\n" ++ "\vdescription\x18\x03 \x01(\tR\vdescription\"$\n" ++ "\fApprovalFlow\x12\x14\n" ++ "\x05roles\x18\x01 \x03(\tR\x05roles\"\x8a\x01\n" +"\x18ListIssueCommentsRequest\x122\n" +"\x06parent\x18\x01 \x01(\tB\x1a\xe0A\x02\xfaA\x14\n" +"\x12bytebase.com/IssueR\x06parent\x12\x1b\n" +@@ -2904,124 +2685,116 @@ func file_v1_issue_service_proto_rawDescGZIP() []byte {return file_v1_issue_service_proto_rawDescData}-var file_v1_issue_service_proto_enumTypes = make([]protoimpl.EnumInfo, 9)-var file_v1_issue_service_proto_msgTypes = make([]protoimpl.MessageInfo, 31)+var file_v1_issue_service_proto_enumTypes = make([]protoimpl.EnumInfo, 7)+var file_v1_issue_service_proto_msgTypes = make([]protoimpl.MessageInfo, 29)var file_v1_issue_service_proto_goTypes = []any{(IssueStatus)(0), // 0: bytebase.v1.IssueStatus(Issue_Type)(0), // 1: bytebase.v1.Issue.Type(Issue_RiskLevel)(0), // 2: bytebase.v1.Issue.RiskLevel(Issue_ApprovalStatus)(0), // 3: bytebase.v1.Issue.ApprovalStatus(Issue_Approver_Status)(0), // 4: bytebase.v1.Issue.Approver.Status- (ApprovalStep_Type)(0), // 5: bytebase.v1.ApprovalStep.Type- (ApprovalNode_Type)(0), // 6: bytebase.v1.ApprovalNode.Type- (IssueComment_Approval_Status)(0), // 7: bytebase.v1.IssueComment.Approval.Status- (IssueComment_TaskUpdate_Status)(0), // 8: bytebase.v1.IssueComment.TaskUpdate.Status- (*GetIssueRequest)(nil), // 9: bytebase.v1.GetIssueRequest- (*CreateIssueRequest)(nil), // 10: bytebase.v1.CreateIssueRequest- (*ListIssuesRequest)(nil), // 11: bytebase.v1.ListIssuesRequest- (*ListIssuesResponse)(nil), // 12: bytebase.v1.ListIssuesResponse- (*SearchIssuesRequest)(nil), // 13: bytebase.v1.SearchIssuesRequest- (*SearchIssuesResponse)(nil), // 14: bytebase.v1.SearchIssuesResponse- (*UpdateIssueRequest)(nil), // 15: bytebase.v1.UpdateIssueRequest- (*BatchUpdateIssuesStatusRequest)(nil), // 16: bytebase.v1.BatchUpdateIssuesStatusRequest- (*BatchUpdateIssuesStatusResponse)(nil), // 17: bytebase.v1.BatchUpdateIssuesStatusResponse- (*ApproveIssueRequest)(nil), // 18: bytebase.v1.ApproveIssueRequest- (*RejectIssueRequest)(nil), // 19: bytebase.v1.RejectIssueRequest- (*RequestIssueRequest)(nil), // 20: bytebase.v1.RequestIssueRequest- (*Issue)(nil), // 21: bytebase.v1.Issue- (*GrantRequest)(nil), // 22: bytebase.v1.GrantRequest- (*ApprovalTemplate)(nil), // 23: bytebase.v1.ApprovalTemplate- (*ApprovalFlow)(nil), // 24: bytebase.v1.ApprovalFlow- (*ApprovalStep)(nil), // 25: bytebase.v1.ApprovalStep- (*ApprovalNode)(nil), // 26: bytebase.v1.ApprovalNode- (*ListIssueCommentsRequest)(nil), // 27: bytebase.v1.ListIssueCommentsRequest- (*ListIssueCommentsResponse)(nil), // 28: bytebase.v1.ListIssueCommentsResponse- (*CreateIssueCommentRequest)(nil), // 29: bytebase.v1.CreateIssueCommentRequest- (*UpdateIssueCommentRequest)(nil), // 30: bytebase.v1.UpdateIssueCommentRequest- (*IssueComment)(nil), // 31: bytebase.v1.IssueComment- (*Issue_Approver)(nil), // 32: bytebase.v1.Issue.Approver- nil, // 33: bytebase.v1.Issue.TaskStatusCountEntry- (*IssueComment_Approval)(nil), // 34: bytebase.v1.IssueComment.Approval- (*IssueComment_IssueUpdate)(nil), // 35: bytebase.v1.IssueComment.IssueUpdate- (*IssueComment_StageEnd)(nil), // 36: bytebase.v1.IssueComment.StageEnd- (*IssueComment_TaskUpdate)(nil), // 37: bytebase.v1.IssueComment.TaskUpdate- (*IssueComment_TaskPriorBackup)(nil), // 38: bytebase.v1.IssueComment.TaskPriorBackup- (*IssueComment_TaskPriorBackup_Table)(nil), // 39: bytebase.v1.IssueComment.TaskPriorBackup.Table- (*fieldmaskpb.FieldMask)(nil), // 40: google.protobuf.FieldMask- (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp- (*expr.Expr)(nil), // 42: google.type.Expr- (*durationpb.Duration)(nil), // 43: google.protobuf.Duration+ (IssueComment_Approval_Status)(0), // 5: bytebase.v1.IssueComment.Approval.Status+ (IssueComment_TaskUpdate_Status)(0), // 6: bytebase.v1.IssueComment.TaskUpdate.Status+ (*GetIssueRequest)(nil), // 7: bytebase.v1.GetIssueRequest+ (*CreateIssueRequest)(nil), // 8: bytebase.v1.CreateIssueRequest+ (*ListIssuesRequest)(nil), // 9: bytebase.v1.ListIssuesRequest+ (*ListIssuesResponse)(nil), // 10: bytebase.v1.ListIssuesResponse+ (*SearchIssuesRequest)(nil), // 11: bytebase.v1.SearchIssuesRequest+ (*SearchIssuesResponse)(nil), // 12: bytebase.v1.SearchIssuesResponse+ (*UpdateIssueRequest)(nil), // 13: bytebase.v1.UpdateIssueRequest+ (*BatchUpdateIssuesStatusRequest)(nil), // 14: bytebase.v1.BatchUpdateIssuesStatusRequest+ (*BatchUpdateIssuesStatusResponse)(nil), // 15: bytebase.v1.BatchUpdateIssuesStatusResponse+ (*ApproveIssueRequest)(nil), // 16: bytebase.v1.ApproveIssueRequest+ (*RejectIssueRequest)(nil), // 17: bytebase.v1.RejectIssueRequest+ (*RequestIssueRequest)(nil), // 18: bytebase.v1.RequestIssueRequest+ (*Issue)(nil), // 19: bytebase.v1.Issue+ (*GrantRequest)(nil), // 20: bytebase.v1.GrantRequest+ (*ApprovalTemplate)(nil), // 21: bytebase.v1.ApprovalTemplate+ (*ApprovalFlow)(nil), // 22: bytebase.v1.ApprovalFlow+ (*ListIssueCommentsRequest)(nil), // 23: bytebase.v1.ListIssueCommentsRequest+ (*ListIssueCommentsResponse)(nil), // 24: bytebase.v1.ListIssueCommentsResponse+ (*CreateIssueCommentRequest)(nil), // 25: bytebase.v1.CreateIssueCommentRequest+ (*UpdateIssueCommentRequest)(nil), // 26: bytebase.v1.UpdateIssueCommentRequest+ (*IssueComment)(nil), // 27: bytebase.v1.IssueComment+ (*Issue_Approver)(nil), // 28: bytebase.v1.Issue.Approver+ nil, // 29: bytebase.v1.Issue.TaskStatusCountEntry+ (*IssueComment_Approval)(nil), // 30: bytebase.v1.IssueComment.Approval+ (*IssueComment_IssueUpdate)(nil), // 31: bytebase.v1.IssueComment.IssueUpdate+ (*IssueComment_StageEnd)(nil), // 32: bytebase.v1.IssueComment.StageEnd+ (*IssueComment_TaskUpdate)(nil), // 33: bytebase.v1.IssueComment.TaskUpdate+ (*IssueComment_TaskPriorBackup)(nil), // 34: bytebase.v1.IssueComment.TaskPriorBackup+ (*IssueComment_TaskPriorBackup_Table)(nil), // 35: bytebase.v1.IssueComment.TaskPriorBackup.Table+ (*fieldmaskpb.FieldMask)(nil), // 36: google.protobuf.FieldMask+ (*timestamppb.Timestamp)(nil), // 37: google.protobuf.Timestamp+ (*expr.Expr)(nil), // 38: google.type.Expr+ (*durationpb.Duration)(nil), // 39: google.protobuf.Duration}var file_v1_issue_service_proto_depIdxs = []int32{- 21, // 0: bytebase.v1.CreateIssueRequest.issue:type_name -> bytebase.v1.Issue- 21, // 1: bytebase.v1.ListIssuesResponse.issues:type_name -> bytebase.v1.Issue- 21, // 2: bytebase.v1.SearchIssuesResponse.issues:type_name -> bytebase.v1.Issue- 21, // 3: bytebase.v1.UpdateIssueRequest.issue:type_name -> bytebase.v1.Issue- 40, // 4: bytebase.v1.UpdateIssueRequest.update_mask:type_name -> google.protobuf.FieldMask+ 19, // 0: bytebase.v1.CreateIssueRequest.issue:type_name -> bytebase.v1.Issue+ 19, // 1: bytebase.v1.ListIssuesResponse.issues:type_name -> bytebase.v1.Issue+ 19, // 2: bytebase.v1.SearchIssuesResponse.issues:type_name -> bytebase.v1.Issue+ 19, // 3: bytebase.v1.UpdateIssueRequest.issue:type_name -> bytebase.v1.Issue+ 36, // 4: bytebase.v1.UpdateIssueRequest.update_mask:type_name -> google.protobuf.FieldMask0, // 5: bytebase.v1.BatchUpdateIssuesStatusRequest.status:type_name -> bytebase.v1.IssueStatus1, // 6: bytebase.v1.Issue.type:type_name -> bytebase.v1.Issue.Type0, // 7: bytebase.v1.Issue.status:type_name -> bytebase.v1.IssueStatus- 32, // 8: bytebase.v1.Issue.approvers:type_name -> bytebase.v1.Issue.Approver- 23, // 9: bytebase.v1.Issue.approval_templates:type_name -> bytebase.v1.ApprovalTemplate- 41, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp- 41, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp- 22, // 12: bytebase.v1.Issue.grant_request:type_name -> bytebase.v1.GrantRequest+ 28, // 8: bytebase.v1.Issue.approvers:type_name -> bytebase.v1.Issue.Approver+ 21, // 9: bytebase.v1.Issue.approval_template:type_name -> bytebase.v1.ApprovalTemplate+ 37, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp+ 37, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp+ 20, // 12: bytebase.v1.Issue.grant_request:type_name -> bytebase.v1.GrantRequest2, // 13: bytebase.v1.Issue.risk_level:type_name -> bytebase.v1.Issue.RiskLevel- 33, // 14: bytebase.v1.Issue.task_status_count:type_name -> bytebase.v1.Issue.TaskStatusCountEntry+ 29, // 14: bytebase.v1.Issue.task_status_count:type_name -> bytebase.v1.Issue.TaskStatusCountEntry3, // 15: bytebase.v1.Issue.approval_status:type_name -> bytebase.v1.Issue.ApprovalStatus- 42, // 16: bytebase.v1.GrantRequest.condition:type_name -> google.type.Expr- 43, // 17: bytebase.v1.GrantRequest.expiration:type_name -> google.protobuf.Duration- 24, // 18: bytebase.v1.ApprovalTemplate.flow:type_name -> bytebase.v1.ApprovalFlow- 25, // 19: bytebase.v1.ApprovalFlow.steps:type_name -> bytebase.v1.ApprovalStep- 5, // 20: bytebase.v1.ApprovalStep.type:type_name -> bytebase.v1.ApprovalStep.Type- 26, // 21: bytebase.v1.ApprovalStep.nodes:type_name -> bytebase.v1.ApprovalNode- 6, // 22: bytebase.v1.ApprovalNode.type:type_name -> bytebase.v1.ApprovalNode.Type- 31, // 23: bytebase.v1.ListIssueCommentsResponse.issue_comments:type_name -> bytebase.v1.IssueComment- 31, // 24: bytebase.v1.CreateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment- 31, // 25: bytebase.v1.UpdateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment- 40, // 26: bytebase.v1.UpdateIssueCommentRequest.update_mask:type_name -> google.protobuf.FieldMask- 41, // 27: bytebase.v1.IssueComment.create_time:type_name -> google.protobuf.Timestamp- 41, // 28: bytebase.v1.IssueComment.update_time:type_name -> google.protobuf.Timestamp- 34, // 29: bytebase.v1.IssueComment.approval:type_name -> bytebase.v1.IssueComment.Approval- 35, // 30: bytebase.v1.IssueComment.issue_update:type_name -> bytebase.v1.IssueComment.IssueUpdate- 36, // 31: bytebase.v1.IssueComment.stage_end:type_name -> bytebase.v1.IssueComment.StageEnd- 37, // 32: bytebase.v1.IssueComment.task_update:type_name -> bytebase.v1.IssueComment.TaskUpdate- 38, // 33: bytebase.v1.IssueComment.task_prior_backup:type_name -> bytebase.v1.IssueComment.TaskPriorBackup- 4, // 34: bytebase.v1.Issue.Approver.status:type_name -> bytebase.v1.Issue.Approver.Status- 7, // 35: bytebase.v1.IssueComment.Approval.status:type_name -> bytebase.v1.IssueComment.Approval.Status- 0, // 36: bytebase.v1.IssueComment.IssueUpdate.from_status:type_name -> bytebase.v1.IssueStatus- 0, // 37: bytebase.v1.IssueComment.IssueUpdate.to_status:type_name -> bytebase.v1.IssueStatus- 8, // 38: bytebase.v1.IssueComment.TaskUpdate.to_status:type_name -> bytebase.v1.IssueComment.TaskUpdate.Status- 39, // 39: bytebase.v1.IssueComment.TaskPriorBackup.tables:type_name -> bytebase.v1.IssueComment.TaskPriorBackup.Table- 9, // 40: bytebase.v1.IssueService.GetIssue:input_type -> bytebase.v1.GetIssueRequest- 10, // 41: bytebase.v1.IssueService.CreateIssue:input_type -> bytebase.v1.CreateIssueRequest- 11, // 42: bytebase.v1.IssueService.ListIssues:input_type -> bytebase.v1.ListIssuesRequest- 13, // 43: bytebase.v1.IssueService.SearchIssues:input_type -> bytebase.v1.SearchIssuesRequest- 15, // 44: bytebase.v1.IssueService.UpdateIssue:input_type -> bytebase.v1.UpdateIssueRequest- 27, // 45: bytebase.v1.IssueService.ListIssueComments:input_type -> bytebase.v1.ListIssueCommentsRequest- 29, // 46: bytebase.v1.IssueService.CreateIssueComment:input_type -> bytebase.v1.CreateIssueCommentRequest- 30, // 47: bytebase.v1.IssueService.UpdateIssueComment:input_type -> bytebase.v1.UpdateIssueCommentRequest- 16, // 48: bytebase.v1.IssueService.BatchUpdateIssuesStatus:input_type -> bytebase.v1.BatchUpdateIssuesStatusRequest- 18, // 49: bytebase.v1.IssueService.ApproveIssue:input_type -> bytebase.v1.ApproveIssueRequest- 19, // 50: bytebase.v1.IssueService.RejectIssue:input_type -> bytebase.v1.RejectIssueRequest- 20, // 51: bytebase.v1.IssueService.RequestIssue:input_type -> bytebase.v1.RequestIssueRequest- 21, // 52: bytebase.v1.IssueService.GetIssue:output_type -> bytebase.v1.Issue- 21, // 53: bytebase.v1.IssueService.CreateIssue:output_type -> bytebase.v1.Issue- 12, // 54: bytebase.v1.IssueService.ListIssues:output_type -> bytebase.v1.ListIssuesResponse- 14, // 55: bytebase.v1.IssueService.SearchIssues:output_type -> bytebase.v1.SearchIssuesResponse- 21, // 56: bytebase.v1.IssueService.UpdateIssue:output_type -> bytebase.v1.Issue- 28, // 57: bytebase.v1.IssueService.ListIssueComments:output_type -> bytebase.v1.ListIssueCommentsResponse- 31, // 58: bytebase.v1.IssueService.CreateIssueComment:output_type -> bytebase.v1.IssueComment- 31, // 59: bytebase.v1.IssueService.UpdateIssueComment:output_type -> bytebase.v1.IssueComment- 17, // 60: bytebase.v1.IssueService.BatchUpdateIssuesStatus:output_type -> bytebase.v1.BatchUpdateIssuesStatusResponse- 21, // 61: bytebase.v1.IssueService.ApproveIssue:output_type -> bytebase.v1.Issue- 21, // 62: bytebase.v1.IssueService.RejectIssue:output_type -> bytebase.v1.Issue- 21, // 63: bytebase.v1.IssueService.RequestIssue:output_type -> bytebase.v1.Issue- 52, // [52:64] is the sub-list for method output_type- 40, // [40:52] is the sub-list for method input_type- 40, // [40:40] is the sub-list for extension type_name- 40, // [40:40] is the sub-list for extension extendee- 0, // [0:40] is the sub-list for field type_name+ 38, // 16: bytebase.v1.GrantRequest.condition:type_name -> google.type.Expr+ 39, // 17: bytebase.v1.GrantRequest.expiration:type_name -> google.protobuf.Duration+ 22, // 18: bytebase.v1.ApprovalTemplate.flow:type_name -> bytebase.v1.ApprovalFlow+ 27, // 19: bytebase.v1.ListIssueCommentsResponse.issue_comments:type_name -> bytebase.v1.IssueComment+ 27, // 20: bytebase.v1.CreateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment+ 27, // 21: bytebase.v1.UpdateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment+ 36, // 22: bytebase.v1.UpdateIssueCommentRequest.update_mask:type_name -> google.protobuf.FieldMask+ 37, // 23: bytebase.v1.IssueComment.create_time:type_name -> google.protobuf.Timestamp+ 37, // 24: bytebase.v1.IssueComment.update_time:type_name -> google.protobuf.Timestamp+ 30, // 25: bytebase.v1.IssueComment.approval:type_name -> bytebase.v1.IssueComment.Approval+ 31, // 26: bytebase.v1.IssueComment.issue_update:type_name -> bytebase.v1.IssueComment.IssueUpdate+ 32, // 27: bytebase.v1.IssueComment.stage_end:type_name -> bytebase.v1.IssueComment.StageEnd+ 33, // 28: bytebase.v1.IssueComment.task_update:type_name -> bytebase.v1.IssueComment.TaskUpdate+ 34, // 29: bytebase.v1.IssueComment.task_prior_backup:type_name -> bytebase.v1.IssueComment.TaskPriorBackup+ 4, // 30: bytebase.v1.Issue.Approver.status:type_name -> bytebase.v1.Issue.Approver.Status+ 5, // 31: bytebase.v1.IssueComment.Approval.status:type_name -> bytebase.v1.IssueComment.Approval.Status+ 0, // 32: bytebase.v1.IssueComment.IssueUpdate.from_status:type_name -> bytebase.v1.IssueStatus+ 0, // 33: bytebase.v1.IssueComment.IssueUpdate.to_status:type_name -> bytebase.v1.IssueStatus+ 6, // 34: bytebase.v1.IssueComment.TaskUpdate.to_status:type_name -> bytebase.v1.IssueComment.TaskUpdate.Status+ 35, // 35: bytebase.v1.IssueComment.TaskPriorBackup.tables:type_name -> bytebase.v1.IssueComment.TaskPriorBackup.Table+ 7, // 36: bytebase.v1.IssueService.GetIssue:input_type -> bytebase.v1.GetIssueRequest+ 8, // 37: bytebase.v1.IssueService.CreateIssue:input_type -> bytebase.v1.CreateIssueRequest+ 9, // 38: bytebase.v1.IssueService.ListIssues:input_type -> bytebase.v1.ListIssuesRequest+ 11, // 39: bytebase.v1.IssueService.SearchIssues:input_type -> bytebase.v1.SearchIssuesRequest+ 13, // 40: bytebase.v1.IssueService.UpdateIssue:input_type -> bytebase.v1.UpdateIssueRequest+ 23, // 41: bytebase.v1.IssueService.ListIssueComments:input_type -> bytebase.v1.ListIssueCommentsRequest+ 25, // 42: bytebase.v1.IssueService.CreateIssueComment:input_type -> bytebase.v1.CreateIssueCommentRequest+ 26, // 43: bytebase.v1.IssueService.UpdateIssueComment:input_type -> bytebase.v1.UpdateIssueCommentRequest+ 14, // 44: bytebase.v1.IssueService.BatchUpdateIssuesStatus:input_type -> bytebase.v1.BatchUpdateIssuesStatusRequest+ 16, // 45: bytebase.v1.IssueService.ApproveIssue:input_type -> bytebase.v1.ApproveIssueRequest+ 17, // 46: bytebase.v1.IssueService.RejectIssue:input_type -> bytebase.v1.RejectIssueRequest+ 18, // 47: bytebase.v1.IssueService.RequestIssue:input_type -> bytebase.v1.RequestIssueRequest+ 19, // 48: bytebase.v1.IssueService.GetIssue:output_type -> bytebase.v1.Issue+ 19, // 49: bytebase.v1.IssueService.CreateIssue:output_type -> bytebase.v1.Issue+ 10, // 50: bytebase.v1.IssueService.ListIssues:output_type -> bytebase.v1.ListIssuesResponse+ 12, // 51: bytebase.v1.IssueService.SearchIssues:output_type -> bytebase.v1.SearchIssuesResponse+ 19, // 52: bytebase.v1.IssueService.UpdateIssue:output_type -> bytebase.v1.Issue+ 24, // 53: bytebase.v1.IssueService.ListIssueComments:output_type -> bytebase.v1.ListIssueCommentsResponse+ 27, // 54: bytebase.v1.IssueService.CreateIssueComment:output_type -> bytebase.v1.IssueComment+ 27, // 55: bytebase.v1.IssueService.UpdateIssueComment:output_type -> bytebase.v1.IssueComment+ 15, // 56: bytebase.v1.IssueService.BatchUpdateIssuesStatus:output_type -> bytebase.v1.BatchUpdateIssuesStatusResponse+ 19, // 57: bytebase.v1.IssueService.ApproveIssue:output_type -> bytebase.v1.Issue+ 19, // 58: bytebase.v1.IssueService.RejectIssue:output_type -> bytebase.v1.Issue+ 19, // 59: bytebase.v1.IssueService.RequestIssue:output_type -> bytebase.v1.Issue+ 48, // [48:60] is the sub-list for method output_type+ 36, // [36:48] is the sub-list for method input_type+ 36, // [36:36] is the sub-list for extension type_name+ 36, // [36:36] is the sub-list for extension extendee+ 0, // [0:36] is the sub-list for field type_name}func init() { file_v1_issue_service_proto_init() }@@ -3030,23 +2803,23 @@ func file_v1_issue_service_proto_init() {return}file_v1_annotation_proto_init()- file_v1_issue_service_proto_msgTypes[22].OneofWrappers = []any{+ file_v1_issue_service_proto_msgTypes[20].OneofWrappers = []any{(*IssueComment_Approval_)(nil),(*IssueComment_IssueUpdate_)(nil),(*IssueComment_StageEnd_)(nil),(*IssueComment_TaskUpdate_)(nil),(*IssueComment_TaskPriorBackup_)(nil),}+ file_v1_issue_service_proto_msgTypes[24].OneofWrappers = []any{}file_v1_issue_service_proto_msgTypes[26].OneofWrappers = []any{}- file_v1_issue_service_proto_msgTypes[28].OneofWrappers = []any{}- file_v1_issue_service_proto_msgTypes[29].OneofWrappers = []any{}+ file_v1_issue_service_proto_msgTypes[27].OneofWrappers = []any{}type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_issue_service_proto_rawDesc), len(file_v1_issue_service_proto_rawDesc)),- NumEnums: 9,- NumMessages: 31,+ NumEnums: 7,+ NumMessages: 29,NumExtensions: 0,NumServices: 1,},diff --git a/backend/generated-go/v1/issue_service_equal.pb.go b/backend/generated-go/v1/issue_service_equal.pb.goindex 4abc639503..2a7815893b 100644--- a/backend/generated-go/v1/issue_service_equal.pb.go+++ b/backend/generated-go/v1/issue_service_equal.pb.go@@ -287,14 +287,9 @@ func (x *Issue) Equal(y *Issue) bool {return false}}- if len(x.ApprovalTemplates) != len(y.ApprovalTemplates) {+ if !x.ApprovalTemplate.Equal(y.ApprovalTemplate) {return false}- for i := 0; i < len(x.ApprovalTemplates); i++ {- if !x.ApprovalTemplates[i].Equal(y.ApprovalTemplates[i]) {- return false- }- }if x.Creator != y.Creator {return false}@@ -403,54 +398,17 @@ func (x *ApprovalFlow) Equal(y *ApprovalFlow) bool {if x == nil || y == nil {return x == nil && y == nil}- if len(x.Steps) != len(y.Steps) {+ if len(x.Roles) != len(y.Roles) {return false}- for i := 0; i < len(x.Steps); i++ {- if !x.Steps[i].Equal(y.Steps[i]) {+ for i := 0; i < len(x.Roles); i++ {+ if x.Roles[i] != y.Roles[i] {return false}}return true}-func (x *ApprovalStep) Equal(y *ApprovalStep) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Type != y.Type {- return false- }- if len(x.Nodes) != len(y.Nodes) {- return false- }- for i := 0; i < len(x.Nodes); i++ {- if !x.Nodes[i].Equal(y.Nodes[i]) {- return false- }- }- return true-}--func (x *ApprovalNode) Equal(y *ApprovalNode) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Type != y.Type {- return false- }- if x.Role != y.Role {- return false- }- return true-}-func (x *ListIssueCommentsRequest) Equal(y *ListIssueCommentsRequest) bool {if x == y {return truediff --git a/backend/generated-go/v1/setting_service.pb.go b/backend/generated-go/v1/setting_service.pb.goindex 16f8c70ff6..ad927bc385 100644--- a/backend/generated-go/v1/setting_service.pb.go+++ b/backend/generated-go/v1/setting_service.pb.go@@ -2056,7 +2056,7 @@ func (x *AppIMSetting_DingTalk) GetRobotCode() string {type WorkspaceApprovalSetting_Rule struct {state protoimpl.MessageState `protogen:"open.v1"`- Template *ApprovalTemplate `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`+ Template *ApprovalTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"`// The condition that is associated with the rule.// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec//@@ -2066,7 +2066,7 @@ type WorkspaceApprovalSetting_Rule struct {//// For examples:// (source == "DML" && level == 200) || (source == "DDL" && level == 300)- Condition *expr.Expr `protobuf:"bytes,3,opt,name=condition,proto3" json:"condition,omitempty"`+ Condition *expr.Expr `protobuf:"bytes,2,opt,name=condition,proto3" json:"condition,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -3090,8 +3090,8 @@ const file_v1_setting_service_proto_rawDesc = "" +"\x18WorkspaceApprovalSetting\x12@\n" +"\x05rules\x18\x01 \x03(\v2*.bytebase.v1.WorkspaceApprovalSetting.RuleR\x05rules\x1ar\n" +"\x04Rule\x129\n" +- "\btemplate\x18\x02 \x01(\v2\x1d.bytebase.v1.ApprovalTemplateR\btemplate\x12/\n" +- "\tcondition\x18\x03 \x01(\v2\x11.google.type.ExprR\tcondition\"\xb2\x06\n" ++ "\btemplate\x18\x01 \x01(\v2\x1d.bytebase.v1.ApprovalTemplateR\btemplate\x12/\n" ++ "\tcondition\x18\x02 \x01(\v2\x11.google.type.ExprR\tcondition\"\xb2\x06\n" +"\x15SchemaTemplateSetting\x12Y\n" +"\x0ffield_templates\x18\x01 \x03(\v20.bytebase.v1.SchemaTemplateSetting.FieldTemplateR\x0efieldTemplates\x12P\n" +"\fcolumn_types\x18\x02 \x03(\v2-.bytebase.v1.SchemaTemplateSetting.ColumnTypeR\vcolumnTypes\x12Y\n" +diff --git a/backend/migrator/migration/3.11/0008##migrate_approval_flow.sql b/backend/migrator/migration/3.11/0008##migrate_approval_flow.sqlnew file mode 100644index 0000000000..17e0982caf--- /dev/null+++ b/backend/migrator/migration/3.11/0008##migrate_approval_flow.sql@@ -0,0 +1,126 @@+-- Migrate approval flow structure from nested ApprovalStep/ApprovalNode to flat roles array+--+-- This migration updates approval templates stored in the database to use the new flattened structure.+--+-- Old structure:+-- ApprovalFlow {+-- repeated ApprovalStep steps+-- }+-- ApprovalStep {+-- Type type+-- repeated ApprovalNode nodes+-- }+-- ApprovalNode {+-- Type type+-- string role+-- }+--+-- New structure:+-- ApprovalFlow {+-- repeated string roles+-- }+--+-- The migration extracts roles from the nested steps[].nodes[].role path and creates a flat roles[] array.+--+-- Affected data:+-- 1. setting table: WorkspaceApprovalSetting stored as text (JSON)+-- 2. issue table: Issue.payload JSONB containing approvalTemplates+--+-- Note: Since protojson.Marshal produces camelCased keys, we work with:+-- - "approvalTemplate" instead of "approval_template" (changed from array to singleton)+-- - "flow.steps" and "flow.nodes" in the old structure+-- - "flow.roles" in the new structure++-- Update workspace approval settings in the setting table+-- The setting.value is stored as text containing JSON+UPDATE setting+SET value = (+ SELECT jsonb_build_object(+ 'rules',+ (+ SELECT jsonb_agg(+ jsonb_build_object(+ 'condition', rule->'condition',+ 'template', jsonb_build_object(+ 'title', rule->'template'->'title',+ 'description', rule->'template'->'description',+ 'flow', jsonb_build_object(+ 'roles',+ COALESCE(+ (+ -- Extract all roles from steps[].nodes[].role+ SELECT jsonb_agg(node->>'role')+ FROM jsonb_array_elements(rule->'template'->'flow'->'steps') AS step,+ jsonb_array_elements(step->'nodes') AS node+ WHERE node->>'role' IS NOT NULL+ ),+ '[]'::jsonb+ )+ )+ )+ )+ )+ FROM jsonb_array_elements((value::jsonb)->'rules') AS rule+ )+ )::text+)+WHERE name = 'WORKSPACE_APPROVAL'+ AND value::jsonb->'rules' IS NOT NULL+ AND EXISTS (+ SELECT 1+ FROM jsonb_array_elements((value::jsonb)->'rules') AS rule+ WHERE rule->'template'->'flow'->'steps' IS NOT NULL+ );++-- Update issue approval template in the issue table+-- The issue.payload JSONB column contains approval.approvalTemplates (array)+-- Migrate to approval.approvalTemplate (singleton)+UPDATE issue+SET payload = jsonb_set(+ payload,+ '{approval}',+ (+ SELECT jsonb_set(+ (payload->'approval')::jsonb - 'approvalTemplates',+ '{approvalTemplate}',+ jsonb_strip_nulls(+ jsonb_build_object(+ 'title', (payload->'approval'->'approvalTemplates'->0)->'title',+ 'description', (payload->'approval'->'approvalTemplates'->0)->'description',+ 'flow', jsonb_build_object(+ 'roles',+ COALESCE(+ (+ -- Extract all roles from steps[].nodes[].role+ SELECT jsonb_agg(node->>'role')+ FROM jsonb_array_elements((payload->'approval'->'approvalTemplates'->0)->'flow'->'steps') AS step,+ jsonb_array_elements(step->'nodes') AS node+ WHERE node->>'role' IS NOT NULL+ ),+ '[]'::jsonb+ )+ )+ )+ )+ )+ )+)+WHERE payload->'approval'->'approvalTemplates' IS NOT NULL+ AND jsonb_array_length(payload->'approval'->'approvalTemplates') > 0+ AND (payload->'approval'->'approvalTemplates'->0)->'flow'->'steps' IS NOT NULL;++-- Clean up: Remove orphaned approvalTemplates field from issues that weren't migrated+-- (e.g., empty arrays, malformed data)+UPDATE issue+SET payload = jsonb_set(+ payload,+ '{approval}',+ (payload->'approval')::jsonb - 'approvalTemplates'+)+WHERE payload->'approval' ? 'approvalTemplates'+ AND NOT payload->'approval' ? 'approvalTemplate'+ AND (+ jsonb_array_length(payload->'approval'->'approvalTemplates') = 0+ OR (payload->'approval'->'approvalTemplates'->0) IS NULL+ OR (payload->'approval'->'approvalTemplates'->0)->'flow' IS NULL+ );diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex c1f7c6ccea..8a1aee942b 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -12,7 +12,7 @@ import (func TestLatestVersion(t *testing.T) {files, err := getSortedVersionedFiles()require.NoError(t, err)- require.Equal(t, semver.MustParse("3.11.7"), *files[len(files)-1].version)+ require.Equal(t, semver.MustParse("3.11.8"), *files[len(files)-1].version)}func TestVersionUnique(t *testing.T) {diff --git a/backend/runner/approval/runner.go b/backend/runner/approval/runner.goindex 941f78b95a..98b6b9ae9f 100644--- a/backend/runner/approval/runner.go+++ b/backend/runner/approval/runner.go@@ -187,12 +187,9 @@ func (r *Runner) findApprovalTemplateForIssue(ctx context.Context, issue *store.payload.Approval = &storepb.IssuePayloadApproval{ApprovalFindingDone: true,RiskLevel: riskLevel,- ApprovalTemplates: nil,+ ApprovalTemplate: approvalTemplate,Approvers: nil,}- if approvalTemplate != nil {- payload.Approval.ApprovalTemplates = []*storepb.ApprovalTemplate{approvalTemplate}- }newApprovers, err := utils.HandleIncomingApprovalSteps(payload.Approval)if err != nil {@@ -212,7 +209,7 @@ func (r *Runner) findApprovalTemplateForIssue(ctx context.Context, issue *store.}if err := func() error {- if len(payload.Approval.ApprovalTemplates) != 0 {+ if payload.Approval.ApprovalTemplate != nil {return nil}if issue.PipelineUID == nil {@@ -252,11 +249,11 @@ func (r *Runner) findApprovalTemplateForIssue(ctx context.Context, issue *store.}func() {- if len(payload.Approval.ApprovalTemplates) != 1 {+ if payload.Approval.ApprovalTemplate == nil {return}- approvalStep := utils.FindNextPendingStep(payload.Approval.ApprovalTemplates[0], payload.Approval.Approvers)- if approvalStep == nil {+ role := utils.FindNextPendingRole(payload.Approval.ApprovalTemplate, payload.Approval.Approvers)+ if role == "" {return}r.webhookManager.CreateEvent(ctx, &webhook.Event{@@ -266,7 +263,7 @@ func (r *Runner) findApprovalTemplateForIssue(ctx context.Context, issue *store.Issue: webhook.NewIssue(issue),Project: webhook.NewProject(issue.Project),IssueApprovalCreate: &webhook.EventIssueApprovalCreate{- ApprovalStep: approvalStep,+ Role: role,},})}()diff --git a/backend/utils/utils.go b/backend/utils/utils.goindex af013b185f..9a5029b7b1 100644--- a/backend/utils/utils.go+++ b/backend/utils/utils.go@@ -31,29 +31,29 @@ func DataSourceFromInstanceWithType(instance *store.InstanceMessage, dataSourceTreturn nil}-// FindNextPendingStep finds the next pending step in the approval flow.-func FindNextPendingStep(template *storepb.ApprovalTemplate, approvers []*storepb.IssuePayloadApproval_Approver) *storepb.ApprovalStep {+// FindNextPendingRole finds the next pending role in the approval flow.+func FindNextPendingRole(template *storepb.ApprovalTemplate, approvers []*storepb.IssuePayloadApproval_Approver) string {// We can do the finding like this for now because we are presuming that- // one step is approved by one approver.+ // one role is approved by one approver.// and the approver status is either// APPROVED or REJECTED.- if len(approvers) >= len(template.Flow.Steps) {- return nil+ if len(approvers) >= len(template.Flow.Roles) {+ return ""}- return template.Flow.Steps[len(approvers)]+ return template.Flow.Roles[len(approvers)]}-// FindRejectedStep finds the rejected step in the approval flow.-func FindRejectedStep(template *storepb.ApprovalTemplate, approvers []*storepb.IssuePayloadApproval_Approver) *storepb.ApprovalStep {+// FindRejectedRole finds the rejected role in the approval flow.+func FindRejectedRole(template *storepb.ApprovalTemplate, approvers []*storepb.IssuePayloadApproval_Approver) string {for i, approver := range approvers {- if i >= len(template.Flow.Steps) {- return nil+ if i >= len(template.Flow.Roles) {+ return ""}if approver.Status == storepb.IssuePayloadApproval_Approver_REJECTED {- return template.Flow.Steps[i]+ return template.Flow.Roles[i]}}- return nil+ return ""}// CheckApprovalApproved checks if the approval is approved.@@ -64,13 +64,10 @@ func CheckApprovalApproved(approval *storepb.IssuePayloadApproval) (bool, error)if approval.ApprovalFindingError != "" {return false, nil}- if len(approval.ApprovalTemplates) == 0 {+ if approval.ApprovalTemplate == nil {return true, nil}- if len(approval.ApprovalTemplates) != 1 {- return false, errors.Errorf("expecting one approval template but got %d", len(approval.ApprovalTemplates))- }- return FindRejectedStep(approval.ApprovalTemplates[0], approval.Approvers) == nil && FindNextPendingStep(approval.ApprovalTemplates[0], approval.Approvers) == nil, nil+ return FindRejectedRole(approval.ApprovalTemplate, approval.Approvers) == "" && FindNextPendingRole(approval.ApprovalTemplate, approval.Approvers) == "", nil}// CheckIssueApproved checks if the issue is approved.@@ -81,22 +78,16 @@ func CheckIssueApproved(issue *store.IssueMessage) (bool, error) {// HandleIncomingApprovalSteps handles incoming approval steps.// - Blocks approval steps if no user can approve the step.func HandleIncomingApprovalSteps(approval *storepb.IssuePayloadApproval) ([]*storepb.IssuePayloadApproval_Approver, error) {- if len(approval.ApprovalTemplates) == 0 {+ if approval.ApprovalTemplate == nil {return nil, nil}var approvers []*storepb.IssuePayloadApproval_Approver- step := FindNextPendingStep(approval.ApprovalTemplates[0], approval.Approvers)- if step == nil {+ role := FindNextPendingRole(approval.ApprovalTemplate, approval.Approvers)+ if role == "" {return nil, nil}- if len(step.Nodes) != 1 {- return nil, errors.Errorf("expecting one node but got %v", len(step.Nodes))- }- if step.Type != storepb.ApprovalStep_ANY {- return nil, errors.Errorf("expecting ANY step type but got %v", step.Type)- }return approvers, nil}diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vueindex 024da57b81..546dbbb32b 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue@@ -66,7 +66,7 @@ const columns = computed((): DataTableColumn<LocalApprovalRule>[] => {class="!rounded !w-[var(--n-height)] !p-0"onClick={() => (state.viewFlow = rule.template.flow)}>- {rule.template.flow?.steps.length}+ {rule.template.flow?.roles.length}</NButton>),},diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vueindex 8c19be928a..251fe13148 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue@@ -21,7 +21,7 @@</template><script lang="tsx" setup>-import { create } from "@bufbuild/protobuf";+/* eslint-disable vue/no-mutating-props */import {ArrowUpIcon,ArrowDownIcon,@@ -35,17 +35,8 @@ import { useI18n } from "vue-i18n";import { RoleSelect } from "@/components/v2";import { SpinnerButton } from "@/components/v2/Form";import { PresetRoleType } from "@/types";-import type {- ApprovalFlow,- ApprovalStep,-} from "@/types/proto-es/v1/issue_service_pb";-import {- ApprovalNode_Type,- ApprovalStep_Type,- ApprovalNodeSchema,- ApprovalStepSchema,-} from "@/types/proto-es/v1/issue_service_pb";-import { approvalNodeText } from "@/utils";+import type { ApprovalFlow } from "@/types/proto-es/v1/issue_service_pb";+import { displayRoleTitle } from "@/utils";import { useCustomApprovalContext } from "../context";const props = defineProps<{@@ -62,110 +53,100 @@ const { t } = useI18n();const context = useCustomApprovalContext();const { allowAdmin } = context;-const columns = computed((): DataTableColumn<ApprovalStep>[] => {- const cols: DataTableColumn<ApprovalStep>[] = [- {- title: t("custom-approval.approval-flow.node.order"),- key: "order",- width: 80,- align: "center",- render: (_, index) => index + 1,- },- {- title: t("custom-approval.approval-flow.node.approver"),- key: "approver",- minWidth: 200,- resizable: true,- render: (step) => {- if (props.editable) {- return (- <RoleSelect- suffix=""- value={step.nodes[0]?.role}- style="width: 80%"- onUpdate:value={(val: string | string[]) => {- const role = Array.isArray(val) ? val[0] : val;- step.nodes[0] = create(ApprovalNodeSchema, {- type: ApprovalNode_Type.ANY_IN_GROUP,- role: role,- });- emit("update");- }}- />- );- }- return approvalNodeText(step.nodes[0]);+const columns = computed(+ (): DataTableColumn<{ role: string; index: number }>[] => {+ const cols: DataTableColumn<{ role: string; index: number }>[] = [+ {+ title: t("custom-approval.approval-flow.node.order"),+ key: "order",+ width: 80,+ align: "center",+ render: (_, index) => index + 1,+ },+ {+ title: t("custom-approval.approval-flow.node.approver"),+ key: "approver",+ minWidth: 200,+ resizable: true,+ render: (stepData) => {+ if (props.editable) {+ return (+ <RoleSelect+ suffix=""+ value={stepData.role}+ style="width: 80%"+ onUpdate:value={(val: string | string[]) => {+ const role = Array.isArray(val) ? val[0] : val;+ props.flow.roles[stepData.index] = role;+ emit("update");+ }}+ />+ );+ }+ return displayRoleTitle(stepData.role);+ },},- },- ];+ ];- if (props.editable) {- cols.push({- title: t("common.operations"),- key: "operations",- render: (step, index) => (- <div class="flex gap-x-1">- <NButton- disabled={index === 0 || !allowAdmin.value}- size="tiny"- onClick={() => reorder(step, index, -1)}- >- <ArrowUpIcon class={"w-4"} />- </NButton>- <NButton- disabled={index === steps.value.length - 1 || !allowAdmin.value}- size="tiny"- onClick={() => reorder(step, index, 1)}- >- <ArrowDownIcon class={"w-4"} />- </NButton>- {allowAdmin.value && (- <SpinnerButton+ if (props.editable) {+ cols.push({+ title: t("common.operations"),+ key: "operations",+ render: (stepData, index) => (+ <div class="flex gap-x-1">+ <NButton+ disabled={index === 0 || !allowAdmin.value}size="tiny"- tooltip={t("custom-approval.approval-flow.node.delete")}- onConfirm={() => removeStep(step, index)}+ onClick={() => reorder(stepData, -1)}>- <TrashIcon class={"w-3"} />- </SpinnerButton>- )}- </div>- ),- });- }+ <ArrowUpIcon class={"w-4"} />+ </NButton>+ <NButton+ disabled={index === steps.value.length - 1 || !allowAdmin.value}+ size="tiny"+ onClick={() => reorder(stepData, 1)}+ >+ <ArrowDownIcon class={"w-4"} />+ </NButton>+ {allowAdmin.value && (+ <SpinnerButton+ size="tiny"+ tooltip={t("custom-approval.approval-flow.node.delete")}+ onConfirm={() => removeStep(stepData)}+ >+ <TrashIcon class={"w-3"} />+ </SpinnerButton>+ )}+ </div>+ ),+ });+ }- return cols;-});+ return cols;+ }+);const steps = computed(() => {- return props.flow.steps;+ return props.flow.roles.map((role, index) => ({ role, index }));});-const reorder = (step: ApprovalStep, index: number, offset: -1 | 1) => {+const reorder = (stepData: { role: string; index: number }, offset: -1 | 1) => {+ const index = stepData.index;const target = index + offset;- if (target < 0 || target >= steps.value.length) return;- const tmp = steps.value[index];- steps.value[index] = steps.value[target];- steps.value[target] = tmp;+ if (target < 0 || target >= props.flow.roles.length) return;+ const tmp = props.flow.roles[index];+ props.flow.roles[index] = props.flow.roles[target];+ props.flow.roles[target] = tmp;emit("update");};const addStep = () => {- steps.value.push(- create(ApprovalStepSchema, {- type: ApprovalStep_Type.ANY,- nodes: [- create(ApprovalNodeSchema, {- type: ApprovalNode_Type.ANY_IN_GROUP,- role: PresetRoleType.WORKSPACE_ADMIN,- }),- ],- })- );+ props.flow.roles.push(PresetRoleType.WORKSPACE_ADMIN);emit("update");};-const removeStep = async (step: ApprovalStep, index: number) => {- steps.value.splice(index, 1);+const removeStep = async (stepData: { role: string; index: number }) => {+ props.flow.roles.splice(stepData.index, 1);emit("update");};</script>diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.ts b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.tsindex 1163e58421..83e4c47040 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.ts+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.ts@@ -8,7 +8,7 @@ export const emptyLocalApprovalRule = (): LocalApprovalRule => {uid: uuidv4(),template: createProto(ApprovalTemplateSchema, {flow: {- steps: [],+ roles: [],},}),};diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.ts b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.tsindex 775e4aded3..a2481c4f28 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.ts+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/validate.ts@@ -2,34 +2,13 @@ import type {ApprovalFlow,ApprovalTemplate,} from "@/types/proto-es/v1/issue_service_pb";-import {- ApprovalNode_Type,- ApprovalStep_Type,-} from "@/types/proto-es/v1/issue_service_pb";const validateApprovalFlow = (flow: ApprovalFlow) => {- const SupportedStepTypes = new Set([- ApprovalStep_Type.ALL,- ApprovalStep_Type.ANY,- ]);-- if (flow.steps.length === 0) {+ if (flow.roles.length === 0) {return false;}- return flow.steps.every((step) => {- const { type, nodes } = step;- if (!SupportedStepTypes.has(type)) {- return false;- }- return nodes.every((node) => {- const { type, role } = node;- if (type !== ApprovalNode_Type.ANY_IN_GROUP) {- return false;- }- return !!role;- });- });+ return flow.roles.every((role) => !!role);};export const validateApprovalTemplate = (diff --git a/frontend/src/components/IssueV1/components/CurrentApproverV1.vue b/frontend/src/components/IssueV1/components/CurrentApproverV1.vueindex 4234f8ff5f..c2f599bd1f 100644--- a/frontend/src/components/IssueV1/components/CurrentApproverV1.vue+++ b/frontend/src/components/IssueV1/components/CurrentApproverV1.vue@@ -97,15 +97,15 @@ const currentApprover = computedAsync(() => {return undefined;}- const { approvalTemplates, approvers } = props.issue;- if (approvalTemplates.length === 0) return undefined;+ const { approvalTemplate, approvers } = props.issue;+ if (!approvalTemplate) return undefined;- const currentStepIndex = approvers.length;- const steps = approvalTemplates[0].flow?.steps || [];- const step = steps[currentStepIndex];- if (!step) return undefined;+ const currentRoleIndex = approvers.length;+ const roles = approvalTemplate.flow?.roles || [];+ const role = roles[currentRoleIndex];+ if (!role) return undefined;- const candidates = candidatesOfApprovalStepV1(props.issue, step);+ const candidates = candidatesOfApprovalStepV1(props.issue, role);const currentUserName = `${userNamePrefix}${me.value.email}`;// Show currentUser if currentUser is one of the valid approver candidates.diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/ReviewActionButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/ReviewActionButton.vueindex f51351c494..fcc20743f7 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/ReviewActionButton.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/ReviewActionButton.vue@@ -35,7 +35,6 @@ import {} from "@/store";import type { ComposedIssue } from "@/types";import {- ApprovalNode_Type,Issue_ApprovalStatus,Issue_Approver_Status,IssueStatus,@@ -62,28 +61,26 @@ const errors = computed(() => {t("issue.error.you-are-not-allowed-to-perform-this-action"),];- const { approvalTemplates, approvers } = issue.value;- if (approvalTemplates.length === 0) return errors;+ const { approvalTemplate, approvers } = issue.value;+ if (!approvalTemplate) return errors;const rejectedIndex = approvers.findIndex((ap) => ap.status === Issue_Approver_Status.REJECTED);- const currentStepIndex =+ const currentRoleIndex =rejectedIndex >= 0 ? rejectedIndex : approvers.length;- const steps = approvalTemplates[0].flow?.steps ?? [];- const step = steps[currentStepIndex];- if (!step) return errors;-- for (const node of step.nodes) {- if (node.type === ApprovalNode_Type.ANY_IN_GROUP && node.role) {- const roleTitle = displayRoleTitle(node.role);- if (roleTitle) {- errors.push({- error: roleTitle,- indent: 1,- });- }+ const roles = approvalTemplate.flow?.roles ?? [];+ const role = roles[currentRoleIndex];+ if (!role) return errors;++ if (role) {+ const roleTitle = displayRoleTitle(role);+ if (roleTitle) {+ errors.push({+ error: roleTitle,+ indent: 1,+ });}}@@ -110,20 +107,20 @@ const allowUserToApplyReviewAction = (return me.value.email === extractUserId(issue.creator);}- const { approvalTemplates, approvers } = issue;- if (approvalTemplates.length === 0) return false;+ const { approvalTemplate, approvers } = issue;+ if (!approvalTemplate) return false;const rejectedIndex = approvers.findIndex((ap) => ap.status === Issue_Approver_Status.REJECTED);- const currentStepIndex =+ const currentRoleIndex =rejectedIndex >= 0 ? rejectedIndex : approvers.length;- const steps = approvalTemplates[0].flow?.steps ?? [];- const step = steps[currentStepIndex];- if (!step) return false;+ const roles = approvalTemplate.flow?.roles ?? [];+ const role = roles[currentRoleIndex];+ if (!role) return false;- const candidates = candidatesOfApprovalStepV1(issue, step);+ const candidates = candidatesOfApprovalStepV1(issue, role);return isUserIncludedInList(me.value.email, candidates);};</script>diff --git a/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vueindex c037b536f8..d3fa89bf9d 100644--- a/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue+++ b/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue@@ -312,10 +312,10 @@ const issueApprovalStatus = computed(() => {}const currentIssue = issue.value;- const approvalTemplate = head(currentIssue.approvalTemplates);+ const approvalTemplate = currentIssue.approvalTemplate;// Check if issue has approval template- if (!approvalTemplate || (approvalTemplate.flow?.steps || []).length === 0) {+ if (!approvalTemplate || (approvalTemplate.flow?.roles || []).length === 0) {return { isApproved: true, hasIssue: true };}@@ -333,11 +333,7 @@ const issueApprovalStatus = computed(() => {(app) => app.status === Issue_Approver_Status.APPROVED).length;- const requiredApprovalsCount =- approvalTemplate.flow?.steps?.reduce(- (count, step) => count + step.nodes.length,- 0- ) || 0;+ const requiredApprovalsCount = approvalTemplate.flow?.roles?.length || 0;const isApproved = approvedCount >= requiredApprovalsCount;diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vueindex 15a6f405ca..202b4a3966 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue@@ -43,7 +43,6 @@<script setup lang="ts">import { create } from "@bufbuild/protobuf";-import { head } from "lodash-es";import { useDialog } from "naive-ui";import { computed, nextTick, ref } from "vue";import { useI18n } from "vue-i18n";@@ -237,7 +236,7 @@ const availableActions = computed(() => {!rolloutReady) {const issueCreator = extractUserId(issueValue.creator);- const { approvers, approvalTemplates } = issueValue;+ const { approvers, approvalTemplate } = issueValue;// Check if issue has been rejectedconst hasRejection = approvers.some(@@ -249,19 +248,19 @@ const availableActions = computed(() => {actions.push("ISSUE_REVIEW_RE_REQUEST");} else {// Check if user can approve/reject- const steps = head(approvalTemplates)?.flow?.steps ?? [];- if (steps.length > 0) {+ const roles = approvalTemplate?.flow?.roles ?? [];+ if (roles.length > 0) {const rejectedIndex = approvers.findIndex((ap) => ap.status === Issue_Approver_Status.REJECTED);- const currentStepIndex =+ const currentRoleIndex =rejectedIndex >= 0 ? rejectedIndex : approvers.length;- const currentStep = steps[currentStepIndex];+ const currentRole = roles[currentRoleIndex];- if (currentStep) {+ if (currentRole) {const candidates = candidatesOfApprovalStepV1(issueValue,- currentStep+ currentRole);if (isUserIncludedInList(currentUserEmail, candidates)) {if (hasRejection) {diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueReviewActionPanel.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueReviewActionPanel.vueindex 5ad7c5b2d2..731e100096 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueReviewActionPanel.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueReviewActionPanel.vue@@ -79,7 +79,6 @@<script setup lang="ts">import { create } from "@bufbuild/protobuf";-import { head } from "lodash-es";import { NButton, NCheckbox, NInput, NTooltip } from "naive-ui";import { computed, nextTick, reactive, ref } from "vue";import { useI18n } from "vue-i18n";@@ -259,12 +258,12 @@ const handleConfirm = async () => {// For ISSUE_REVIEW_APPROVE, check if this is the last approval neededif (action === "ISSUE_REVIEW_APPROVE") {- const { approvalTemplates, approvers } = issue.value;- const steps = head(approvalTemplates)?.flow?.steps ?? [];+ const { approvalTemplate, approvers } = issue.value;+ const roles = approvalTemplate?.flow?.roles ?? [];// Check if this approval will complete the review processconst isLastApproval =- steps.length > 0 && approvers.length + 1 >= steps.length;+ roles.length > 0 && approvers.length + 1 >= roles.length;if (rollout.value && isLastApproval) {// Rollout exists, redirect to rollout pagediff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vueindex 5f6f1aaf16..3ab460f819 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue@@ -74,12 +74,11 @@ const emit = defineEmits<{}>();const approvalTemplate = computed(() => {- const templates = props.issue.approvalTemplates || [];- return templates.length > 0 ? templates[0] : undefined;+ return props.issue.approvalTemplate;});const approvalSteps = computed(() => {- return approvalTemplate.value?.flow?.steps || [];+ return approvalTemplate.value?.flow?.roles || [];});const retrying = ref(false);diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vueindex ab1758552f..1c9a6a972d 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vue@@ -85,10 +85,8 @@ import {import { userNamePrefix } from "@/store/modules/v1/common";import { SYSTEM_BOT_EMAIL, groupBindingPrefix, PresetRoleType } from "@/types";import { State } from "@/types/proto-es/v1/common_pb";-import { ApprovalNode_Type } from "@/types/proto-es/v1/issue_service_pb";import { Issue_Approver_Status } from "@/types/proto-es/v1/issue_service_pb";import type {- ApprovalStep,Issue,Issue_Approver,} from "@/types/proto-es/v1/issue_service_pb";@@ -98,7 +96,7 @@ import ApprovalUserView from "./ApprovalUserView.vue";import PotentialApprovers from "./PotentialApprovers.vue";const props = defineProps<{- step: ApprovalStep;+ step: string;stepIndex: number;stepNumber: number;issue: Issue;@@ -172,9 +170,9 @@ const iconClass = computed(() => {});const roleName = computed((): string => {- // Get role name from the first node in the step- if (props.step.nodes?.[0]?.role) {- const role = props.step.nodes[0].role;+ // Get role name from the step (which is now a role string)+ if (props.step) {+ const role = props.step;if (role === PresetRoleType.PROJECT_OWNER) {return t("role.project-owner.self");} else if (role === PresetRoleType.WORKSPACE_DBA) {@@ -187,15 +185,7 @@ const roleName = computed((): string => {});const stepRoles = computed(() => {- const roles = [];- for (const node of props.step.nodes) {- if (node.type !== ApprovalNode_Type.ANY_IN_GROUP) continue;-- const role = node.role;- if (!role) continue;- roles.push(role);- }- return roles;+ return [props.step].filter((role) => !!role);});watchEffect(async () => {diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vueindex c8bded5088..5fd6d93451 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue@@ -1,9 +1,6 @@<template><div class="w-full flex flex-col p-4 gap-4">- <IssueStatusSection- v-if="issue.approvalTemplates.length > 0"- :issue="issue"- />+ <IssueStatusSection v-if="issue.approvalTemplate" :issue="issue" /><ApprovalFlowSection :issue="issue" />diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue b/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vueindex 12b3597cfa..df8a47d5f4 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue@@ -302,7 +302,7 @@import { create } from "@bufbuild/protobuf";import { TimestampSchema } from "@bufbuild/protobuf/wkt";import dayjs from "dayjs";-import { flatten, head } from "lodash-es";+import { flatten } from "lodash-es";import {NAlert,NButton,@@ -394,10 +394,10 @@ const issueApprovalStatus = computed(() => {}const currentIssue = issue.value;- const approvalTemplate = head(currentIssue.approvalTemplates);+ const approvalTemplate = currentIssue.approvalTemplate;// Check if issue has approval template- if (!approvalTemplate || (approvalTemplate.flow?.steps || []).length === 0) {+ if (!approvalTemplate || (approvalTemplate.flow?.roles || []).length === 0) {return { rolloutReady: true, hasIssue: true };}diff --git a/frontend/src/store/modules/v1/issue.ts b/frontend/src/store/modules/v1/issue.tsindex e70b11404d..575da556f2 100644--- a/frontend/src/store/modules/v1/issue.ts+++ b/frontend/src/store/modules/v1/issue.ts@@ -15,10 +15,9 @@ import {SearchIssuesRequestSchema,UpdateIssueRequestSchema,} from "@/types/proto-es/v1/issue_service_pb";-import type { ApprovalStep, Issue } from "@/types/proto-es/v1/issue_service_pb";+import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {IssueStatus,- ApprovalNode_Type,Issue_ApprovalStatus,} from "@/types/proto-es/v1/issue_service_pb";import {@@ -140,28 +139,17 @@ export const useIssueV1Store = defineStore("issue_v1", () => {// candidatesOfApprovalStepV1 return user name list in users/{email} format.// The list could includs users/ALL_USERS_USER_EMAIL-export const candidatesOfApprovalStepV1 = (- issue: Issue,- step: ApprovalStep-) => {+export const candidatesOfApprovalStepV1 = (issue: Issue, role: string) => {const project = useProjectV1Store().getProjectByName(`${projectNamePrefix}${extractProjectResourceName(issue.name)}`);- const candidates = step.nodes.flatMap((node) => {- const { type, role } = node;- if (type !== ApprovalNode_Type.ANY_IN_GROUP) return [];-- const candidatesForRoles = (role: string) => {- const projectIamPolicyStore = useProjectIamPolicyStore();- const iamPolicy = projectIamPolicyStore.getProjectIamPolicy(project.name);- const memberMap = memberMapToRolesInProjectIAM(iamPolicy, role);- return [...memberMap.keys()];- };- if (role) {- return candidatesForRoles(role);- }- return [];- });+ const candidatesForRoles = (role: string) => {+ const projectIamPolicyStore = useProjectIamPolicyStore();+ const iamPolicy = projectIamPolicyStore.getProjectIamPolicy(project.name);+ const memberMap = memberMapToRolesInProjectIAM(iamPolicy, role);+ return [...memberMap.keys()];+ };+ const candidates = role ? candidatesForRoles(role) : [];return uniq(candidates.filter((user) => {diff --git a/frontend/src/types/proto-es/v1/issue_service_pb.d.ts b/frontend/src/types/proto-es/v1/issue_service_pb.d.tsindex 43627d9302..049056259c 100644--- a/frontend/src/types/proto-es/v1/issue_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/issue_service_pb.d.ts@@ -442,9 +442,9 @@ export declare type Issue = Message<"bytebase.v1.Issue"> & {approvers: Issue_Approver[];/**- * @generated from field: repeated bytebase.v1.ApprovalTemplate approval_templates = 10;+ * @generated from field: bytebase.v1.ApprovalTemplate approval_template = 10;*/- approvalTemplates: ApprovalTemplate[];+ approvalTemplate?: ApprovalTemplate;/*** Format: users/[email protected]@@ -776,9 +776,9 @@ export declare const ApprovalTemplateSchema: GenMessage<ApprovalTemplate>;*/export declare type ApprovalFlow = Message<"bytebase.v1.ApprovalFlow"> & {/**- * @generated from field: repeated bytebase.v1.ApprovalStep steps = 1;+ * @generated from field: repeated string roles = 1;*/- steps: ApprovalStep[];+ roles: string[];};/**@@ -787,102 +787,6 @@ export declare type ApprovalFlow = Message<"bytebase.v1.ApprovalFlow"> & {*/export declare const ApprovalFlowSchema: GenMessage<ApprovalFlow>;-/**- * @generated from message bytebase.v1.ApprovalStep- */-export declare type ApprovalStep = Message<"bytebase.v1.ApprovalStep"> & {- /**- * @generated from field: bytebase.v1.ApprovalStep.Type type = 1;- */- type: ApprovalStep_Type;-- /**- * @generated from field: repeated bytebase.v1.ApprovalNode nodes = 2;- */- nodes: ApprovalNode[];-};--/**- * Describes the message bytebase.v1.ApprovalStep.- * Use `create(ApprovalStepSchema)` to create a new message.- */-export declare const ApprovalStepSchema: GenMessage<ApprovalStep>;--/**- * Type of the ApprovalStep- * ALL means every node must be approved to proceed.- * ANY means approving any node will proceed.- *- * @generated from enum bytebase.v1.ApprovalStep.Type- */-export enum ApprovalStep_Type {- /**- * @generated from enum value: TYPE_UNSPECIFIED = 0;- */- TYPE_UNSPECIFIED = 0,-- /**- * @generated from enum value: ALL = 1;- */- ALL = 1,-- /**- * @generated from enum value: ANY = 2;- */- ANY = 2,-}--/**- * Describes the enum bytebase.v1.ApprovalStep.Type.- */-export declare const ApprovalStep_TypeSchema: GenEnum<ApprovalStep_Type>;--/**- * @generated from message bytebase.v1.ApprovalNode- */-export declare type ApprovalNode = Message<"bytebase.v1.ApprovalNode"> & {- /**- * @generated from field: bytebase.v1.ApprovalNode.Type type = 1;- */- type: ApprovalNode_Type;-- /**- * @generated from field: string role = 2;- */- role: string;-};--/**- * Describes the message bytebase.v1.ApprovalNode.- * Use `create(ApprovalNodeSchema)` to create a new message.- */-export declare const ApprovalNodeSchema: GenMessage<ApprovalNode>;--/**- * Type of the ApprovalNode.- * type determines who should approve this node.- * ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.- * See GroupValue below for the predefined user groups.- *- * @generated from enum bytebase.v1.ApprovalNode.Type- */-export enum ApprovalNode_Type {- /**- * @generated from enum value: TYPE_UNSPECIFIED = 0;- */- TYPE_UNSPECIFIED = 0,-- /**- * @generated from enum value: ANY_IN_GROUP = 1;- */- ANY_IN_GROUP = 1,-}--/**- * Describes the enum bytebase.v1.ApprovalNode.Type.- */-export declare const ApprovalNode_TypeSchema: GenEnum<ApprovalNode_Type>;-/*** @generated from message bytebase.v1.ListIssueCommentsRequest*/diff --git a/frontend/src/types/proto-es/v1/issue_service_pb.js b/frontend/src/types/proto-es/v1/issue_service_pb.jsindex 9cc85cf0a4..990f356325 100644--- a/frontend/src/types/proto-es/v1/issue_service_pb.js+++ b/frontend/src/types/proto-es/v1/issue_service_pb.js@@ -15,7 +15,7 @@ import { file_v1_annotation } from "./annotation_pb";* Describes the file v1/issue_service.proto.*/export const file_v1_issue_service = /*@__PURE__*/- fileDesc("ChZ2MS9pc3N1ZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJKCg9HZXRJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDQoFZm9yY2UYAiABKAgiagoSQ3JlYXRlSXNzdWVSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBImCgVpc3N1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLklzc3VlQgPgQQIihwEKEUxpc3RJc3N1ZXNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkiUQoSTGlzdElzc3Vlc1Jlc3BvbnNlEiIKBmlzc3VlcxgBIAMoCzISLmJ5dGViYXNlLnYxLklzc3VlEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSJwChNTZWFyY2hJc3N1ZXNSZXF1ZXN0EhMKBnBhcmVudBgBIAEoCUID4EECEhEKCXBhZ2Vfc2l6ZRgCIAEoBRISCgpwYWdlX3Rva2VuGAMgASgJEg4KBmZpbHRlchgEIAEoCRINCgVxdWVyeRgFIAEoCSJTChRTZWFyY2hJc3N1ZXNSZXNwb25zZRIiCgZpc3N1ZXMYASADKAsyEi5ieXRlYmFzZS52MS5Jc3N1ZRIXCg9uZXh0X3BhZ2VfdG9rZW4YAiABKAkioAEKEl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qMAGC0+STAis6ASoiJi92MS97bmFtZT1wcm9qZWN0cy8qL2lzc3Vlcy8qfTphcHByb3ZlEnwKC1JlamVjdElzc3VlEh8uYnl0ZWJhc2UudjEuUmVqZWN0SXNzdWVSZXF1ZXN0GhIuYnl0ZWJhc2UudjEuSXNzdWUiOJDqMAKY6jABgtPkkwIqOgEqIiUvdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKn06cmVqZWN0En8KDFJlcXVlc3RJc3N1ZRIgLmJ5dGViYXNlLnYxLlJlcXVlc3RJc3N1ZVJlcXVlc3QaEi5ieXRlYmFzZS52MS5Jc3N1ZSI5kOowApjqMAGC0+STAis6ASoiJi92MS97bmFtZT1wcm9qZWN0cy8qL2lzc3Vlcy8qfTpyZXF1ZXN0QjZaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_google_type_expr, file_v1_annotation]);+ fileDesc("ChZ2MS9pc3N1ZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJKCg9HZXRJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDQoFZm9yY2UYAiABKAgiagoSQ3JlYXRlSXNzdWVSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBImCgVpc3N1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLklzc3VlQgPgQQIihwEKEUxpc3RJc3N1ZXNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0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DqMAKY6jABgtPkkwIrOgEqIiYvdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKn06YXBwcm92ZRJ8CgtSZWplY3RJc3N1ZRIfLmJ5dGViYXNlLnYxLlJlamVjdElzc3VlUmVxdWVzdBoSLmJ5dGViYXNlLnYxLklzc3VlIjiQ6jACmOowAYLT5JMCKjoBKiIlL3YxL3tuYW1lPXByb2plY3RzLyovaXNzdWVzLyp9OnJlamVjdBJ/CgxSZXF1ZXN0SXNzdWUSIC5ieXRlYmFzZS52MS5SZXF1ZXN0SXNzdWVSZXF1ZXN0GhIuYnl0ZWJhc2UudjEuSXNzdWUiOZDqMAKY6jABgtPkkwIrOgEqIiYvdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKn06cmVxdWVzdEI2WjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_google_type_expr, file_v1_annotation]);/*** Describes the message bytebase.v1.GetIssueRequest.@@ -184,100 +184,53 @@ export const ApprovalTemplateSchema = /*@__PURE__*/export const ApprovalFlowSchema = /*@__PURE__*/messageDesc(file_v1_issue_service, 15);-/**- * Describes the message bytebase.v1.ApprovalStep.- * Use `create(ApprovalStepSchema)` to create a new message.- */-export const ApprovalStepSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 16);--/**- * Describes the enum bytebase.v1.ApprovalStep.Type.- */-export const ApprovalStep_TypeSchema = /*@__PURE__*/- enumDesc(file_v1_issue_service, 16, 0);--/**- * Type of the ApprovalStep- * ALL means every node must be approved to proceed.- * ANY means approving any node will proceed.- *- * @generated from enum bytebase.v1.ApprovalStep.Type- */-export const ApprovalStep_Type = /*@__PURE__*/- tsEnum(ApprovalStep_TypeSchema);--/**- * Describes the message bytebase.v1.ApprovalNode.- * Use `create(ApprovalNodeSchema)` to create a new message.- */-export const ApprovalNodeSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 17);--/**- * Describes the enum bytebase.v1.ApprovalNode.Type.- */-export const ApprovalNode_TypeSchema = /*@__PURE__*/- enumDesc(file_v1_issue_service, 17, 0);--/**- * Type of the ApprovalNode.- * type determines who should approve this node.- * ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.- * See GroupValue below for the predefined user groups.- *- * @generated from enum bytebase.v1.ApprovalNode.Type- */-export const ApprovalNode_Type = /*@__PURE__*/- tsEnum(ApprovalNode_TypeSchema);-/*** Describes the message bytebase.v1.ListIssueCommentsRequest.* Use `create(ListIssueCommentsRequestSchema)` to create a new message.*/export const ListIssueCommentsRequestSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 18);+ messageDesc(file_v1_issue_service, 16);/*** Describes the message bytebase.v1.ListIssueCommentsResponse.* Use `create(ListIssueCommentsResponseSchema)` to create a new message.*/export const ListIssueCommentsResponseSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 19);+ messageDesc(file_v1_issue_service, 17);/*** Describes the message bytebase.v1.CreateIssueCommentRequest.* Use `create(CreateIssueCommentRequestSchema)` to create a new message.*/export const CreateIssueCommentRequestSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 20);+ messageDesc(file_v1_issue_service, 18);/*** Describes the message bytebase.v1.UpdateIssueCommentRequest.* Use `create(UpdateIssueCommentRequestSchema)` to create a new message.*/export const UpdateIssueCommentRequestSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 21);+ messageDesc(file_v1_issue_service, 19);/*** Describes the message bytebase.v1.IssueComment.* Use `create(IssueCommentSchema)` to create a new message.*/export const IssueCommentSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 22);+ messageDesc(file_v1_issue_service, 20);/*** Describes the message bytebase.v1.IssueComment.Approval.* Use `create(IssueComment_ApprovalSchema)` to create a new message.*/export const IssueComment_ApprovalSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 22, 0);+ messageDesc(file_v1_issue_service, 20, 0);/*** Describes the enum bytebase.v1.IssueComment.Approval.Status.*/export const IssueComment_Approval_StatusSchema = /*@__PURE__*/- enumDesc(file_v1_issue_service, 22, 0, 0);+ enumDesc(file_v1_issue_service, 20, 0, 0);/*** @generated from enum bytebase.v1.IssueComment.Approval.Status@@ -290,27 +243,27 @@ export const IssueComment_Approval_Status = /*@__PURE__*/* Use `create(IssueComment_IssueUpdateSchema)` to create a new message.*/export const IssueComment_IssueUpdateSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 22, 1);+ messageDesc(file_v1_issue_service, 20, 1);/*** Describes the message bytebase.v1.IssueComment.StageEnd.* Use `create(IssueComment_StageEndSchema)` to create a new message.*/export const IssueComment_StageEndSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 22, 2);+ messageDesc(file_v1_issue_service, 20, 2);/*** Describes the message bytebase.v1.IssueComment.TaskUpdate.* Use `create(IssueComment_TaskUpdateSchema)` to create a new message.*/export const IssueComment_TaskUpdateSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 22, 3);+ messageDesc(file_v1_issue_service, 20, 3);/*** Describes the enum bytebase.v1.IssueComment.TaskUpdate.Status.*/export const IssueComment_TaskUpdate_StatusSchema = /*@__PURE__*/- enumDesc(file_v1_issue_service, 22, 3, 0);+ enumDesc(file_v1_issue_service, 20, 3, 0);/*** @generated from enum bytebase.v1.IssueComment.TaskUpdate.Status@@ -323,14 +276,14 @@ export const IssueComment_TaskUpdate_Status = /*@__PURE__*/* Use `create(IssueComment_TaskPriorBackupSchema)` to create a new message.*/export const IssueComment_TaskPriorBackupSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 22, 4);+ messageDesc(file_v1_issue_service, 20, 4);/*** Describes the message bytebase.v1.IssueComment.TaskPriorBackup.Table.* Use `create(IssueComment_TaskPriorBackup_TableSchema)` to create a new message.*/export const IssueComment_TaskPriorBackup_TableSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 22, 4, 0);+ messageDesc(file_v1_issue_service, 20, 4, 0);/*** Describes the enum bytebase.v1.IssueStatus.diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts b/frontend/src/types/proto-es/v1/setting_service_pb.d.tsindex 9362ec934e..042c3bdbd5 100644--- a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/setting_service_pb.d.ts@@ -711,7 +711,7 @@ export declare const WorkspaceApprovalSettingSchema: GenMessage<WorkspaceApprova*/export declare type WorkspaceApprovalSetting_Rule = Message<"bytebase.v1.WorkspaceApprovalSetting.Rule"> & {/**- * @generated from field: bytebase.v1.ApprovalTemplate template = 2;+ * @generated from field: bytebase.v1.ApprovalTemplate template = 1;*/template?: ApprovalTemplate;@@ -726,7 +726,7 @@ export declare type WorkspaceApprovalSetting_Rule = Message<"bytebase.v1.Workspa* For examples:* (source == "DML" && level == 200) || (source == "DDL" && level == 300)*- * @generated from field: google.type.Expr condition = 3;+ * @generated from field: google.type.Expr condition = 2;*/condition?: Expr;};diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.js b/frontend/src/types/proto-es/v1/setting_service_pb.jsindex 2a5c0243ec..f5dc33e751 100644--- a/frontend/src/types/proto-es/v1/setting_service_pb.js+++ b/frontend/src/types/proto-es/v1/setting_service_pb.js@@ -19,7 +19,7 @@ import { file_v1_issue_service } from "./issue_service_pb";* Describes the file v1/setting_service.proto.*/export const file_v1_setting_service = /*@__PURE__*/- fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjwKE0xpc3RTZXR0aW5nc1JlcXVlc3QSEQoJcGFnZV9zaXplGAEgASgFEhIKCnBhZ2VfdG9rZW4YAiABKAkiVwoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nEhcKD25leHRfcGFnZV90b2tlbh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uYnl0ZWJhc2UudjEuU2V0dGluZyJJiuowD2JiLnNldHRpbmdzLnNldJDqMAGY6jABgtPkkwIoOgdzZXR0aW5nMh0vdjEve3NldHRpbmcubmFtZT1zZXR0aW5ncy8qfUI2WjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_database_catalog_service, file_v1_database_service, file_v1_issue_service]);+ fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjwKE0xpc3RTZXR0aW5nc1JlcXVlc3QSEQoJcGFnZV9zaXplGAEgASgFEhIKCnBhZ2VfdG9rZW4YAiABKAkiVwoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSI/ChFHZXRTZXR0aW5nUmVxdWVzdBIqCgRuYW1lGAEgASgJQhzgQQL6QRYKFGJ5dGViYXNlLmNvbS9TZXR0aW5nIjsKEkdldFNldHRpbmdSZXNwb25zZRIlCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZyKhAQoUVXBkYXRlU2V0dGluZ1JlcXVlc3QSKgoHc2V0dGluZxgBIAEoCzIULmJ5dGViYXNlLnYxLlNldHRpbmdCA+BBAhIVCg12YWxpZGF0ZV9vbmx5GAIgASgIEhUKDWFsbG93X21pc3NpbmcYAyABKAgSLwoLdXBkYXRlX21hc2sYBCABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrItUDCgdTZXR0aW5nEgwKBG5hbWUYASABKAkSIQoFdmFsdWUYAiABKAsyEi5ieXRlYmFzZS52MS5WYWx1ZSLjAg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JEg0KBXZhbHVlGAIgASgJOgI4ASpUChJEYXRhYmFzZUNoYW5nZU1vZGUSJAogREFUQUJBU0VfQ0hBTkdFX01PREVfVU5TUEVDSUZJRUQQABIMCghQSVBFTElORRABEgoKBkVESVRPUhACMq4DCg5TZXR0aW5nU2VydmljZRKEAQoMTGlzdFNldHRpbmdzEiAuYnl0ZWJhc2UudjEuTGlzdFNldHRpbmdzUmVxdWVzdBohLmJ5dGViYXNlLnYxLkxpc3RTZXR0aW5nc1Jlc3BvbnNlIi/aQQCK6jAQYmIuc2V0dGluZ3MubGlzdJDqMAGC0+STAg4SDC92MS9zZXR0aW5ncxJ/CgpHZXRTZXR0aW5nEh4uYnl0ZWJhc2UudjEuR2V0U2V0dGluZ1JlcXVlc3QaFC5ieXRlYmFzZS52MS5TZXR0aW5nIjvaQQRuYW1liuowD2JiLnNldHRpbmdzLmdldJDqMAGC0+STAhcSFS92MS97bmFtZT1zZXR0aW5ncy8qfRKTAQoNVXBkYXRlU2V0dGluZxIhLmJ5dGViYXNlLnYxLlVwZGF0ZVNldHRpbmdSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuU2V0dGluZyJJiuowD2JiLnNldHRpbmdzLnNldJDqMAGY6jABgtPkkwIoOgdzZXR0aW5nMh0vdjEve3NldHRpbmcubmFtZT1zZXR0aW5ncy8qfUI2WjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_database_catalog_service, file_v1_database_service, file_v1_issue_service]);/*** Describes the message bytebase.v1.ListSettingsRequest.diff --git a/frontend/src/utils/v1/advanced-search/issue/ui-filter.ts b/frontend/src/utils/v1/advanced-search/issue/ui-filter.tsindex 8bc3643111..4371b2b27e 100644--- a/frontend/src/utils/v1/advanced-search/issue/ui-filter.ts+++ b/frontend/src/utils/v1/advanced-search/issue/ui-filter.ts@@ -32,15 +32,15 @@ export const filterIssueByApprover = (return false;}- const { approvalTemplates, approvers } = issue;- if (approvalTemplates.length === 0) return false;+ const { approvalTemplate, approvers } = issue;+ if (!approvalTemplate) return false;- const currentStepIndex = approvers.length;- const steps = approvalTemplates[0].flow?.steps || [];- const step = steps[currentStepIndex];- if (!step) return false;+ const currentRoleIndex = approvers.length;+ const roles = approvalTemplate.flow?.roles || [];+ const role = roles[currentRoleIndex];+ if (!role) return false;- const candidates = candidatesOfApprovalStepV1(issue, step);+ const candidates = candidatesOfApprovalStepV1(issue, role);// We support "approver:{email}" by now// Planning to support "approver:[{email_1}, {email_2}, ...]" anddiff --git a/frontend/src/utils/workspaceApprovalSetting.ts b/frontend/src/utils/workspaceApprovalSetting.tsindex 71b2ea1087..6b493236f4 100644--- a/frontend/src/utils/workspaceApprovalSetting.ts+++ b/frontend/src/utils/workspaceApprovalSetting.ts@@ -18,29 +18,13 @@ import type { Expr as CELExpr } from "@/types/proto-es/google/api/expr/v1alpha1/import { ExprSchema as CELExprSchema } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";import type { Expr as _Expr } from "@/types/proto-es/google/type/expr_pb";import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";-import type {- ApprovalNode as _ApprovalNode,- ApprovalStep as _ApprovalStep,-} from "@/types/proto-es/v1/issue_service_pb";-import {- ApprovalNode_Type as _ApprovalNode_Type,- ApprovalStep_Type as _ApprovalStep_Type,-} from "@/types/proto-es/v1/issue_service_pb";-import {- ApprovalNode_Type as ProtoEsApprovalNode_Type,- ApprovalStep_Type as ProtoEsApprovalStep_Type,-} from "@/types/proto-es/v1/issue_service_pb";import type {ApprovalTemplate as _ProtoEsApprovalTemplate,ApprovalFlow as _ProtoEsApprovalFlow,- ApprovalStep as _ProtoEsApprovalStep,- ApprovalNode as _ProtoEsApprovalNode,} from "@/types/proto-es/v1/issue_service_pb";import {ApprovalTemplateSchema as _ProtoEsApprovalTemplateSchema,ApprovalFlowSchema as _ProtoEsApprovalFlowSchema,- ApprovalStepSchema as ProtoEsApprovalStepSchema,- ApprovalNodeSchema as ProtoEsApprovalNodeSchema,} from "@/types/proto-es/v1/issue_service_pb";import { Risk_Source } from "@/types/proto-es/v1/risk_service_pb";import type {@@ -61,14 +45,6 @@ export const approvalNodeRoleText = (role: string) => {return displayRoleTitle(role);};-export const approvalNodeText = (node: _ProtoEsApprovalNode): string => {- const { role } = node;- if (role) {- return approvalNodeRoleText(role);- }- return "";-};-/*A WorkspaceApprovalSetting is a list of ApprovalRule = {expr,@@ -324,17 +300,7 @@ export const seedWorkspaceApprovalSetting = () => {title,description,flow: {- steps: roles.map((role) =>- createProto(ProtoEsApprovalStepSchema, {- type: ProtoEsApprovalStep_Type.ANY,- nodes: [- createProto(ProtoEsApprovalNodeSchema, {- type: ProtoEsApprovalNode_Type.ANY_IN_GROUP,- role,- }),- ],- })- ),+ roles,},},});diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 760d4eece5..4fc7f3459f 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -8452,35 +8452,10 @@ components:ApprovalFlow:type: objectproperties:- steps:- type: array- items:- $ref: '#/components/schemas/ApprovalStep'- ApprovalNode:- type: object- properties:- type:- enum:- - TYPE_UNSPECIFIED- - ANY_IN_GROUP- type: string- format: enum- role:- type: string- ApprovalStep:- type: object- properties:- type:- enum:- - TYPE_UNSPECIFIED- - ALL- - ANY- type: string- format: enum- nodes:+ roles:type: arrayitems:- $ref: '#/components/schemas/ApprovalNode'+ type: stringApprovalTemplate:type: objectproperties:@@ -11005,10 +10980,8 @@ components:IssuePayloadApproval:type: objectproperties:- approvalTemplates:- type: array- items:- $ref: '#/components/schemas/ApprovalTemplate'+ approvalTemplate:+ $ref: '#/components/schemas/ApprovalTemplate'approvers:type: arrayitems:@@ -14706,8 +14679,6 @@ components:WorkspaceApprovalSetting_Rule:type: objectproperties:- expression:- $ref: '#/components/schemas/Expr'template:$ref: '#/components/schemas/ApprovalTemplate'condition:diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 1360369238..368f0af82b 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -20,14 +20,10 @@- [store/approval.proto](#store_approval-proto)- [ApprovalFlow](#bytebase-store-ApprovalFlow)- - [ApprovalNode](#bytebase-store-ApprovalNode)- - [ApprovalStep](#bytebase-store-ApprovalStep)- [ApprovalTemplate](#bytebase-store-ApprovalTemplate)- [IssuePayloadApproval](#bytebase-store-IssuePayloadApproval)- [IssuePayloadApproval.Approver](#bytebase-store-IssuePayloadApproval-Approver)- - [ApprovalNode.Type](#bytebase-store-ApprovalNode-Type)- - [ApprovalStep.Type](#bytebase-store-ApprovalStep-Type)- [IssuePayloadApproval.Approver.Status](#bytebase-store-IssuePayloadApproval-Approver-Status)- [IssuePayloadApproval.RiskLevel](#bytebase-store-IssuePayloadApproval-RiskLevel)@@ -564,39 +560,7 @@ offset.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| steps | [ApprovalStep](#bytebase-store-ApprovalStep) | repeated | |-------<a name="bytebase-store-ApprovalNode"></a>--### ApprovalNode----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| type | [ApprovalNode.Type](#bytebase-store-ApprovalNode-Type) | | |-| role | [string](#string) | | |-------<a name="bytebase-store-ApprovalStep"></a>--### ApprovalStep----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| type | [ApprovalStep.Type](#bytebase-store-ApprovalStep-Type) | | |-| nodes | [ApprovalNode](#bytebase-store-ApprovalNode) | repeated | |+| roles | [string](#string) | repeated | |@@ -629,7 +593,7 @@ IssuePayloadApproval records the approval template used and the approval history| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| approval_templates | [ApprovalTemplate](#bytebase-store-ApprovalTemplate) | repeated | |+| approval_template | [ApprovalTemplate](#bytebase-store-ApprovalTemplate) | | || approvers | [IssuePayloadApproval.Approver](#bytebase-store-IssuePayloadApproval-Approver) | repeated | || approval_finding_done | [bool](#bool) | | If the value is `false`, it means that the backend is still finding matching approval templates. If `true`, other fields are available. || approval_finding_error | [string](#string) | | |@@ -658,36 +622,6 @@ IssuePayloadApproval records the approval template used and the approval history-<a name="bytebase-store-ApprovalNode-Type"></a>--### ApprovalNode.Type-Type of the ApprovalNode.-type determines who should approve this node.-ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.-See GroupValue below for the predefined user groups.--| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| ANY_IN_GROUP | 1 | |----<a name="bytebase-store-ApprovalStep-Type"></a>--### ApprovalStep.Type-Type of the ApprovalStep-ALL means every node must be approved to proceed.-ANY means approving any node will proceed.--| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| ALL | 1 | |-| ANY | 2 | |---<a name="bytebase-store-IssuePayloadApproval-Approver-Status"></a>### IssuePayloadApproval.Approver.Status@@ -4696,7 +4630,6 @@ QueryDataPolicy is the policy configuration for querying data.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| expression | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | | || template | [ApprovalTemplate](#bytebase-store-ApprovalTemplate) | | || condition | [google.type.Expr](#google-type-Expr) | | |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 7ba2475e3b..5fb227bab5 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -240,14 +240,6 @@<a href="#bytebase.store.ApprovalFlow"><span class="badge">M</span>ApprovalFlow</a></li>- <li>- <a href="#bytebase.store.ApprovalNode"><span class="badge">M</span>ApprovalNode</a>- </li>-- <li>- <a href="#bytebase.store.ApprovalStep"><span class="badge">M</span>ApprovalStep</a>- </li>-<li><a href="#bytebase.store.ApprovalTemplate"><span class="badge">M</span>ApprovalTemplate</a></li>@@ -261,14 +253,6 @@</li>- <li>- <a href="#bytebase.store.ApprovalNode.Type"><span class="badge">E</span>ApprovalNode.Type</a>- </li>-- <li>- <a href="#bytebase.store.ApprovalStep.Type"><span class="badge">E</span>ApprovalStep.Type</a>- </li>-<li><a href="#bytebase.store.IssuePayloadApproval.Approver.Status"><span class="badge">E</span>IssuePayloadApproval.Approver.Status</a></li>@@ -2100,70 +2084,8 @@ TODO: use range instead. </p></td><tbody><tr>- <td>steps</td>- <td><a href="#bytebase.store.ApprovalStep">ApprovalStep</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.store.ApprovalNode">ApprovalNode</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>type</td>- <td><a href="#bytebase.store.ApprovalNode.Type">ApprovalNode.Type</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>role</td>+ <td>roles</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.store.ApprovalStep">ApprovalStep</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>type</td>- <td><a href="#bytebase.store.ApprovalStep.Type">ApprovalStep.Type</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>nodes</td>- <td><a href="#bytebase.store.ApprovalNode">ApprovalNode</a></td><td>repeated</td><td><p> </p></td></tr>@@ -2224,9 +2146,9 @@ TODO: use range instead. </p></td><tbody><tr>- <td>approval_templates</td>+ <td>approval_template</td><td><a href="#bytebase.store.ApprovalTemplate">ApprovalTemplate</a></td>- <td>repeated</td>+ <td></td><td><p> </p></td></tr>@@ -2299,58 +2221,6 @@ If `true`, other fields are available. </p></td>- <h3 id="bytebase.store.ApprovalNode.Type">ApprovalNode.Type</h3>- <p>Type of the ApprovalNode.</p><p>type determines who should approve this node.</p><p>ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.</p><p>See GroupValue below for the predefined user groups.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>ANY_IN_GROUP</td>- <td>1</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.store.ApprovalStep.Type">ApprovalStep.Type</h3>- <p>Type of the ApprovalStep</p><p>ALL means every node must be approved to proceed.</p><p>ANY means approving any node will proceed.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>ALL</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>ANY</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-<h3 id="bytebase.store.IssuePayloadApproval.Approver.Status">IssuePayloadApproval.Approver.Status</h3><p></p><table class="enum-table">@@ -12275,13 +12145,6 @@ are /[a-z][0-9]-/. </p></td></thead><tbody>- <tr>- <td>expression</td>- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>- <td></td>- <td><p> </p></td>- </tr>-<tr><td>template</td><td><a href="#bytebase.store.ApprovalTemplate">ApprovalTemplate</a></td>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 36d0477152..bf5a17bef8 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -171,8 +171,6 @@- [v1/issue_service.proto](#v1_issue_service-proto)- [ApprovalFlow](#bytebase-v1-ApprovalFlow)- - [ApprovalNode](#bytebase-v1-ApprovalNode)- - [ApprovalStep](#bytebase-v1-ApprovalStep)- [ApprovalTemplate](#bytebase-v1-ApprovalTemplate)- [ApproveIssueRequest](#bytebase-v1-ApproveIssueRequest)- [BatchUpdateIssuesStatusRequest](#bytebase-v1-BatchUpdateIssuesStatusRequest)@@ -202,8 +200,6 @@- [UpdateIssueCommentRequest](#bytebase-v1-UpdateIssueCommentRequest)- [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest)- - [ApprovalNode.Type](#bytebase-v1-ApprovalNode-Type)- - [ApprovalStep.Type](#bytebase-v1-ApprovalStep-Type)- [Issue.ApprovalStatus](#bytebase-v1-Issue-ApprovalStatus)- [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status)- [Issue.RiskLevel](#bytebase-v1-Issue-RiskLevel)@@ -3393,39 +3389,7 @@ LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| steps | [ApprovalStep](#bytebase-v1-ApprovalStep) | repeated | |-------<a name="bytebase-v1-ApprovalNode"></a>--### ApprovalNode----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| type | [ApprovalNode.Type](#bytebase-v1-ApprovalNode-Type) | | |-| role | [string](#string) | | |-------<a name="bytebase-v1-ApprovalStep"></a>--### ApprovalStep----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| type | [ApprovalStep.Type](#bytebase-v1-ApprovalStep-Type) | | |-| nodes | [ApprovalNode](#bytebase-v1-ApprovalNode) | repeated | |+| roles | [string](#string) | repeated | |@@ -3573,7 +3537,7 @@ LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)| type | [Issue.Type](#bytebase-v1-Issue-Type) | | || status | [IssueStatus](#bytebase-v1-IssueStatus) | | || approvers | [Issue.Approver](#bytebase-v1-Issue-Approver) | repeated | |-| approval_templates | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | repeated | |+| approval_template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | || creator | [string](#string) | | Format: users/[email protected] || create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | || update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |@@ -3938,36 +3902,6 @@ The issue's `name` field is used to identify the issue to update. Format: pr-<a name="bytebase-v1-ApprovalNode-Type"></a>--### ApprovalNode.Type-Type of the ApprovalNode.-type determines who should approve this node.-ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.-See GroupValue below for the predefined user groups.--| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| ANY_IN_GROUP | 1 | |----<a name="bytebase-v1-ApprovalStep-Type"></a>--### ApprovalStep.Type-Type of the ApprovalStep-ALL means every node must be approved to proceed.-ANY means approving any node will proceed.--| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| ALL | 1 | |-| ANY | 2 | |---<a name="bytebase-v1-Issue-ApprovalStatus"></a>### Issue.ApprovalStatusdiff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 7d0554029f..524a38ce58 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -828,14 +828,6 @@<a href="#bytebase.v1.ApprovalFlow"><span class="badge">M</span>ApprovalFlow</a></li>- <li>- <a href="#bytebase.v1.ApprovalNode"><span class="badge">M</span>ApprovalNode</a>- </li>-- <li>- <a href="#bytebase.v1.ApprovalStep"><span class="badge">M</span>ApprovalStep</a>- </li>-<li><a href="#bytebase.v1.ApprovalTemplate"><span class="badge">M</span>ApprovalTemplate</a></li>@@ -949,14 +941,6 @@</li>- <li>- <a href="#bytebase.v1.ApprovalNode.Type"><span class="badge">E</span>ApprovalNode.Type</a>- </li>-- <li>- <a href="#bytebase.v1.ApprovalStep.Type"><span class="badge">E</span>ApprovalStep.Type</a>- </li>-<li><a href="#bytebase.v1.Issue.ApprovalStatus"><span class="badge">E</span>Issue.ApprovalStatus</a></li>@@ -10429,70 +10413,8 @@ The API will default to the BASIC view.</p></td><tbody><tr>- <td>steps</td>- <td><a href="#bytebase.v1.ApprovalStep">ApprovalStep</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ApprovalNode">ApprovalNode</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.ApprovalNode.Type">ApprovalNode.Type</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>role</td>+ <td>roles</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ApprovalStep">ApprovalStep</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.ApprovalStep.Type">ApprovalStep.Type</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>nodes</td>- <td><a href="#bytebase.v1.ApprovalNode">ApprovalNode</a></td><td>repeated</td><td><p> </p></td></tr>@@ -10827,9 +10749,9 @@ Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>approval_templates</td>+ <td>approval_template</td><td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>- <td>repeated</td>+ <td></td><td><p> </p></td></tr>@@ -11785,58 +11707,6 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.ApprovalNode.Type">ApprovalNode.Type</h3>- <p>Type of the ApprovalNode.</p><p>type determines who should approve this node.</p><p>ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.</p><p>See GroupValue below for the predefined user groups.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>ANY_IN_GROUP</td>- <td>1</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.ApprovalStep.Type">ApprovalStep.Type</h3>- <p>Type of the ApprovalStep</p><p>ALL means every node must be approved to proceed.</p><p>ANY means approving any node will proceed.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>ALL</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>ANY</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-<h3 id="bytebase.v1.Issue.ApprovalStatus">Issue.ApprovalStatus</h3><p></p><table class="enum-table">diff --git a/proto/store/store/approval.proto b/proto/store/store/approval.protoindex 74aa2ffb45..ac61a2c9cd 100644--- a/proto/store/store/approval.proto+++ b/proto/store/store/approval.proto@@ -21,7 +21,7 @@ message IssuePayloadApproval {int32 principal_id = 2;}- repeated ApprovalTemplate approval_templates = 1;+ ApprovalTemplate approval_template = 1;repeated Approver approvers = 2;// If the value is `false`, it means that the backend is still finding matching approval templates.@@ -46,33 +46,5 @@ message ApprovalTemplate {}message ApprovalFlow {- repeated ApprovalStep steps = 1;-}--message ApprovalStep {- // Type of the ApprovalStep- // ALL means every node must be approved to proceed.- // ANY means approving any node will proceed.- enum Type {- TYPE_UNSPECIFIED = 0;- ALL = 1;- ANY = 2;- }- Type type = 1;-- repeated ApprovalNode nodes = 2;-}--message ApprovalNode {- // Type of the ApprovalNode.- // type determines who should approve this node.- // ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.- // See GroupValue below for the predefined user groups.- enum Type {- TYPE_UNSPECIFIED = 0;- ANY_IN_GROUP = 1;- }- Type type = 1;-- string role = 2;+ repeated string roles = 1;}diff --git a/proto/store/store/setting.proto b/proto/store/store/setting.protoindex d21bdac885..c461365996 100644--- a/proto/store/store/setting.proto+++ b/proto/store/store/setting.proto@@ -2,7 +2,6 @@ syntax = "proto3";package bytebase.store;-import "google/api/expr/v1alpha1/syntax.proto";import "google/protobuf/duration.proto";import "google/type/expr.proto";import "store/approval.proto";@@ -89,9 +88,8 @@ message Announcement {message WorkspaceApprovalSetting {message Rule {- google.api.expr.v1alpha1.Expr expression = 1;- ApprovalTemplate template = 2;- google.type.Expr condition = 3;+ ApprovalTemplate template = 1;+ google.type.Expr condition = 2;}repeated Rule rules = 1;}diff --git a/proto/v1/v1/issue_service.proto b/proto/v1/v1/issue_service.protoindex c9576e0122..b5b2669439 100644--- a/proto/v1/v1/issue_service.proto+++ b/proto/v1/v1/issue_service.proto@@ -373,7 +373,7 @@ message Issue {}repeated Approver approvers = 9;- repeated ApprovalTemplate approval_templates = 10;+ ApprovalTemplate approval_template = 10;reserved 11, 12;@@ -468,35 +468,7 @@ message ApprovalTemplate {}message ApprovalFlow {- repeated ApprovalStep steps = 1;-}--message ApprovalStep {- // Type of the ApprovalStep- // ALL means every node must be approved to proceed.- // ANY means approving any node will proceed.- enum Type {- TYPE_UNSPECIFIED = 0;- ALL = 1;- ANY = 2;- }- Type type = 1;-- repeated ApprovalNode nodes = 2;-}--message ApprovalNode {- // Type of the ApprovalNode.- // type determines who should approve this node.- // ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.- // See GroupValue below for the predefined user groups.- enum Type {- TYPE_UNSPECIFIED = 0;- ANY_IN_GROUP = 1;- }- Type type = 1;-- string role = 2;+ repeated string roles = 1;}message ListIssueCommentsRequest {diff --git a/proto/v1/v1/setting_service.proto b/proto/v1/v1/setting_service.protoindex b8d96958a5..2edddd55ea 100644--- a/proto/v1/v1/setting_service.proto+++ b/proto/v1/v1/setting_service.proto@@ -252,7 +252,7 @@ message Announcement {message WorkspaceApprovalSetting {message Rule {- ApprovalTemplate template = 2;+ ApprovalTemplate template = 1;// The condition that is associated with the rule.// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec//@@ -262,7 +262,7 @@ message WorkspaceApprovalSetting {//// For examples:// (source == "DML" && level == 200) || (source == "DDL" && level == 300)- google.type.Expr condition = 3;+ google.type.Expr condition = 2;}repeated Rule rules = 1;}