Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(proto): add the review rule policy and review metadata for SQL Review V2
rebeliceb204c5a65a48
diff --git a/backend/api/v1/audit_redact_inventory_test.go b/backend/api/v1/audit_redact_inventory_test.goindex 958e4ac7da..5ff848f49f 100644--- a/backend/api/v1/audit_redact_inventory_test.go+++ b/backend/api/v1/audit_redact_inventory_test.go@@ -576,6 +576,7 @@ var auditRecordedFields = []string{"bytebase.v1.IssueComment.IssueUpdate.to_description","bytebase.v1.IssueComment.IssueUpdate.to_labels","bytebase.v1.IssueComment.IssueUpdate.to_title",+ "bytebase.v1.IssueComment.ReviewMetadata.targets","bytebase.v1.IssueComment.comment","bytebase.v1.IssueComment.creator","bytebase.v1.IssueComment.name",diff --git a/backend/generated-go/store/issue_comment.pb.go b/backend/generated-go/store/issue_comment.pb.goindex c30fcedb46..a3bcabb934 100644--- a/backend/generated-go/store/issue_comment.pb.go+++ b/backend/generated-go/store/issue_comment.pb.go@@ -21,6 +21,63 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))+type IssueCommentPayload_ReviewMetadata_Priority int32++const (+ // Blocks like any other open thread.+ IssueCommentPayload_ReviewMetadata_PRIORITY_UNSPECIFIED IssueCommentPayload_ReviewMetadata_Priority = 0+ // The SQL is wrong and must change. Resolving without changing the SQL+ // is a claim of false positive.+ IssueCommentPayload_ReviewMetadata_P0 IssueCommentPayload_ReviewMetadata_Priority = 1+ // Dangerous but legitimate; a person must accept it.+ IssueCommentPayload_ReviewMetadata_P1 IssueCommentPayload_ReviewMetadata_Priority = 2+ // Advisory. Posted without thread state, so it never blocks.+ IssueCommentPayload_ReviewMetadata_P2 IssueCommentPayload_ReviewMetadata_Priority = 3+)++// Enum value maps for IssueCommentPayload_ReviewMetadata_Priority.+var (+ IssueCommentPayload_ReviewMetadata_Priority_name = map[int32]string{+ 0: "PRIORITY_UNSPECIFIED",+ 1: "P0",+ 2: "P1",+ 3: "P2",+ }+ IssueCommentPayload_ReviewMetadata_Priority_value = map[string]int32{+ "PRIORITY_UNSPECIFIED": 0,+ "P0": 1,+ "P1": 2,+ "P2": 3,+ }+)++func (x IssueCommentPayload_ReviewMetadata_Priority) Enum() *IssueCommentPayload_ReviewMetadata_Priority {+ p := new(IssueCommentPayload_ReviewMetadata_Priority)+ *p = x+ return p+}++func (x IssueCommentPayload_ReviewMetadata_Priority) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (IssueCommentPayload_ReviewMetadata_Priority) Descriptor() protoreflect.EnumDescriptor {+ return file_store_issue_comment_proto_enumTypes[0].Descriptor()+}++func (IssueCommentPayload_ReviewMetadata_Priority) Type() protoreflect.EnumType {+ return &file_store_issue_comment_proto_enumTypes[0]+}++func (x IssueCommentPayload_ReviewMetadata_Priority) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use IssueCommentPayload_ReviewMetadata_Priority.Descriptor instead.+func (IssueCommentPayload_ReviewMetadata_Priority) EnumDescriptor() ([]byte, []int) {+ return file_store_issue_comment_proto_rawDescGZIP(), []int{0, 4, 0}+}+type IssueCommentPayload struct {state protoimpl.MessageState `protogen:"open.v1"`Comment string `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"`@@ -34,8 +91,13 @@ type IssueCommentPayload struct {// The statement context an inline comment references. Set at creation and// immutable afterward; never set together with an event.StatementAnchor *IssueCommentPayload_StatementAnchor `protobuf:"bytes,9,opt,name=statement_anchor,json=statementAnchor,proto3" json:"statement_anchor,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache+ // Present on review results only, beside the text and never together with+ // an event. Written by the review executor; CreateIssueComment rejects it.+ // The anchor is statement_anchor; a result without one addresses the whole+ // change.+ ReviewMetadata *IssueCommentPayload_ReviewMetadata `protobuf:"bytes,10,opt,name=review_metadata,json=reviewMetadata,proto3" json:"review_metadata,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache}func (x *IssueCommentPayload) Reset() {@@ -125,6 +187,13 @@ func (x *IssueCommentPayload) GetStatementAnchor() *IssueCommentPayload_Statemenreturn nil}+func (x *IssueCommentPayload) GetReviewMetadata() *IssueCommentPayload_ReviewMetadata {+ if x != nil {+ return x.ReviewMetadata+ }+ return nil+}+type isIssueCommentPayload_Event interface {isIssueCommentPayload_Event()}@@ -390,6 +459,88 @@ func (x *IssueCommentPayload_PlanUpdate) GetToSpecs() []*PlanConfig_Spec {return nil}+// ReviewMetadata is what a review result carries beyond its text: which+// reviewer posted it, what it was judged against, its priority, and the+// databases it applies to. Results from the same reviewer are superseded+// together: when a run completes, it resolves every OPEN root of its type+// and deletes every P2 of its type, in the transaction that posts the new+// results.+type IssueCommentPayload_ReviewMetadata struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The reviewer slot that posted the result, same value domain as+ // review_run.type: "RULE" or "GUIDELINE".+ Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`+ // The rule judged against. Set if and only if type is "RULE".+ Rule ReviewRule_Type `protobuf:"varint,2,opt,name=rule,proto3,enum=bytebase.store.ReviewRule_Type" json:"rule,omitempty"`+ // A result merged across databases carries the highest priority among+ // them.+ Priority IssueCommentPayload_ReviewMetadata_Priority `protobuf:"varint,3,opt,name=priority,proto3,enum=bytebase.store.IssueCommentPayload_ReviewMetadata_Priority" json:"priority,omitempty"`+ // Every database the result applies to, sorted. Always complete; the+ // renderer collapses it when it equals the spec's target set.+ // Format: instances/{instance}/databases/{database}+ Targets []string `protobuf:"bytes,4,rep,name=targets,proto3" json:"targets,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *IssueCommentPayload_ReviewMetadata) Reset() {+ *x = IssueCommentPayload_ReviewMetadata{}+ mi := &file_store_issue_comment_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *IssueCommentPayload_ReviewMetadata) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*IssueCommentPayload_ReviewMetadata) ProtoMessage() {}++func (x *IssueCommentPayload_ReviewMetadata) ProtoReflect() protoreflect.Message {+ mi := &file_store_issue_comment_proto_msgTypes[5]+ 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 IssueCommentPayload_ReviewMetadata.ProtoReflect.Descriptor instead.+func (*IssueCommentPayload_ReviewMetadata) Descriptor() ([]byte, []int) {+ return file_store_issue_comment_proto_rawDescGZIP(), []int{0, 4}+}++func (x *IssueCommentPayload_ReviewMetadata) GetType() string {+ if x != nil {+ return x.Type+ }+ return ""+}++func (x *IssueCommentPayload_ReviewMetadata) GetRule() ReviewRule_Type {+ if x != nil {+ return x.Rule+ }+ return ReviewRule_TYPE_UNSPECIFIED+}++func (x *IssueCommentPayload_ReviewMetadata) GetPriority() IssueCommentPayload_ReviewMetadata_Priority {+ if x != nil {+ return x.Priority+ }+ return IssueCommentPayload_ReviewMetadata_PRIORITY_UNSPECIFIED+}++func (x *IssueCommentPayload_ReviewMetadata) GetTargets() []string {+ if x != nil {+ return x.Targets+ }+ return nil+}+// StatementAnchor records the anchored statement revision and range.// The SQL excerpt and current/changed/unavailable state are computed on// read against the anchored sheet and the current plan, not stored.@@ -414,7 +565,7 @@ type IssueCommentPayload_StatementAnchor struct {func (x *IssueCommentPayload_StatementAnchor) Reset() {*x = IssueCommentPayload_StatementAnchor{}- mi := &file_store_issue_comment_proto_msgTypes[5]+ mi := &file_store_issue_comment_proto_msgTypes[6]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -426,7 +577,7 @@ func (x *IssueCommentPayload_StatementAnchor) String() string {func (*IssueCommentPayload_StatementAnchor) ProtoMessage() {}func (x *IssueCommentPayload_StatementAnchor) ProtoReflect() protoreflect.Message {- mi := &file_store_issue_comment_proto_msgTypes[5]+ mi := &file_store_issue_comment_proto_msgTypes[6]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -439,7 +590,7 @@ func (x *IssueCommentPayload_StatementAnchor) ProtoReflect() protoreflect.Messag// Deprecated: Use IssueCommentPayload_StatementAnchor.ProtoReflect.Descriptor instead.func (*IssueCommentPayload_StatementAnchor) Descriptor() ([]byte, []int) {- return file_store_issue_comment_proto_rawDescGZIP(), []int{0, 4}+ return file_store_issue_comment_proto_rawDescGZIP(), []int{0, 5}}func (x *IssueCommentPayload_StatementAnchor) GetSpecId() string {@@ -474,7 +625,7 @@ var File_store_issue_comment_proto protoreflect.FileDescriptorconst file_store_issue_comment_proto_rawDesc = "" +"\n" +- "\x19store/issue_comment.proto\x12\x0ebytebase.store\x1a\x14store/approval.proto\x1a\x12store/common.proto\x1a\x11store/issue.proto\x1a\x10store/plan.proto\"\x93\v\n" ++ "\x19store/issue_comment.proto\x12\x0ebytebase.store\x1a\x14store/approval.proto\x1a\x12store/common.proto\x1a\x11store/issue.proto\x1a\x10store/plan.proto\x1a\x17store/review_rule.proto\"\xfd\r\n" +"\x13IssueCommentPayload\x12\x18\n" +"\acomment\x18\x01 \x01(\tR\acomment\x12J\n" +"\bapproval\x18\x02 \x01(\v2,.bytebase.store.IssueCommentPayload.ApprovalH\x00R\bapproval\x12T\n" +@@ -482,7 +633,9 @@ const file_store_issue_comment_proto_rawDesc = "" +"\vplan_update\x18\a \x01(\v2..bytebase.store.IssueCommentPayload.PlanUpdateH\x00R\n" +"planUpdate\x12c\n" +"\x11review_submission\x18\b \x01(\v24.bytebase.store.IssueCommentPayload.ReviewSubmissionH\x00R\x10reviewSubmission\x12^\n" +- "\x10statement_anchor\x18\t \x01(\v23.bytebase.store.IssueCommentPayload.StatementAnchorR\x0fstatementAnchor\x1aX\n" ++ "\x10statement_anchor\x18\t \x01(\v23.bytebase.store.IssueCommentPayload.StatementAnchorR\x0fstatementAnchor\x12[\n" ++ "\x0freview_metadata\x18\n" ++ " \x01(\v22.bytebase.store.IssueCommentPayload.ReviewMetadataR\x0ereviewMetadata\x1aX\n" +"\bApproval\x12L\n" +"\x06status\x18\x01 \x01(\x0e24.bytebase.store.IssuePayloadApproval.Approver.StatusR\x06status\x1a\xd1\x03\n" +"\vIssueUpdate\x12\"\n" +@@ -509,7 +662,17 @@ const file_store_issue_comment_proto_rawDesc = "" +"PlanUpdate\x12>\n" +"\n" +"from_specs\x18\x01 \x03(\v2\x1f.bytebase.store.PlanConfig.SpecR\tfromSpecs\x12:\n" +- "\bto_specs\x18\x02 \x03(\v2\x1f.bytebase.store.PlanConfig.SpecR\atoSpecs\x1a\xcb\x01\n" ++ "\bto_specs\x18\x02 \x03(\v2\x1f.bytebase.store.PlanConfig.SpecR\atoSpecs\x1a\x8a\x02\n" ++ "\x0eReviewMetadata\x12\x12\n" ++ "\x04type\x18\x01 \x01(\tR\x04type\x123\n" ++ "\x04rule\x18\x02 \x01(\x0e2\x1f.bytebase.store.ReviewRule.TypeR\x04rule\x12W\n" ++ "\bpriority\x18\x03 \x01(\x0e2;.bytebase.store.IssueCommentPayload.ReviewMetadata.PriorityR\bpriority\x12\x18\n" ++ "\atargets\x18\x04 \x03(\tR\atargets\"<\n" ++ "\bPriority\x12\x18\n" ++ "\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\n" ++ "\x02P0\x10\x01\x12\x06\n" ++ "\x02P1\x10\x02\x12\x06\n" ++ "\x02P2\x10\x03\x1a\xcb\x01\n" +"\x0fStatementAnchor\x12\x17\n" +"\aspec_id\x18\x01 \x01(\tR\x06specId\x12!\n" +"\fsheet_sha256\x18\x02 \x01(\tR\vsheetSha256\x12?\n" +@@ -530,37 +693,44 @@ func file_store_issue_comment_proto_rawDescGZIP() []byte {return file_store_issue_comment_proto_rawDescData}-var file_store_issue_comment_proto_msgTypes = make([]protoimpl.MessageInfo, 6)+var file_store_issue_comment_proto_enumTypes = make([]protoimpl.EnumInfo, 1)+var file_store_issue_comment_proto_msgTypes = make([]protoimpl.MessageInfo, 7)var file_store_issue_comment_proto_goTypes = []any{- (*IssueCommentPayload)(nil), // 0: bytebase.store.IssueCommentPayload- (*IssueCommentPayload_Approval)(nil), // 1: bytebase.store.IssueCommentPayload.Approval- (*IssueCommentPayload_IssueUpdate)(nil), // 2: bytebase.store.IssueCommentPayload.IssueUpdate- (*IssueCommentPayload_ReviewSubmission)(nil), // 3: bytebase.store.IssueCommentPayload.ReviewSubmission- (*IssueCommentPayload_PlanUpdate)(nil), // 4: bytebase.store.IssueCommentPayload.PlanUpdate- (*IssueCommentPayload_StatementAnchor)(nil), // 5: bytebase.store.IssueCommentPayload.StatementAnchor- (IssuePayloadApproval_Approver_Status)(0), // 6: bytebase.store.IssuePayloadApproval.Approver.Status- (Issue_Status)(0), // 7: bytebase.store.Issue.Status- (*PlanConfig_Spec)(nil), // 8: bytebase.store.PlanConfig.Spec- (*Position)(nil), // 9: bytebase.store.Position+ (IssueCommentPayload_ReviewMetadata_Priority)(0), // 0: bytebase.store.IssueCommentPayload.ReviewMetadata.Priority+ (*IssueCommentPayload)(nil), // 1: bytebase.store.IssueCommentPayload+ (*IssueCommentPayload_Approval)(nil), // 2: bytebase.store.IssueCommentPayload.Approval+ (*IssueCommentPayload_IssueUpdate)(nil), // 3: bytebase.store.IssueCommentPayload.IssueUpdate+ (*IssueCommentPayload_ReviewSubmission)(nil), // 4: bytebase.store.IssueCommentPayload.ReviewSubmission+ (*IssueCommentPayload_PlanUpdate)(nil), // 5: bytebase.store.IssueCommentPayload.PlanUpdate+ (*IssueCommentPayload_ReviewMetadata)(nil), // 6: bytebase.store.IssueCommentPayload.ReviewMetadata+ (*IssueCommentPayload_StatementAnchor)(nil), // 7: bytebase.store.IssueCommentPayload.StatementAnchor+ (IssuePayloadApproval_Approver_Status)(0), // 8: bytebase.store.IssuePayloadApproval.Approver.Status+ (Issue_Status)(0), // 9: bytebase.store.Issue.Status+ (*PlanConfig_Spec)(nil), // 10: bytebase.store.PlanConfig.Spec+ (ReviewRule_Type)(0), // 11: bytebase.store.ReviewRule.Type+ (*Position)(nil), // 12: bytebase.store.Position}var file_store_issue_comment_proto_depIdxs = []int32{- 1, // 0: bytebase.store.IssueCommentPayload.approval:type_name -> bytebase.store.IssueCommentPayload.Approval- 2, // 1: bytebase.store.IssueCommentPayload.issue_update:type_name -> bytebase.store.IssueCommentPayload.IssueUpdate- 4, // 2: bytebase.store.IssueCommentPayload.plan_update:type_name -> bytebase.store.IssueCommentPayload.PlanUpdate- 3, // 3: bytebase.store.IssueCommentPayload.review_submission:type_name -> bytebase.store.IssueCommentPayload.ReviewSubmission- 5, // 4: bytebase.store.IssueCommentPayload.statement_anchor:type_name -> bytebase.store.IssueCommentPayload.StatementAnchor- 6, // 5: bytebase.store.IssueCommentPayload.Approval.status:type_name -> bytebase.store.IssuePayloadApproval.Approver.Status- 7, // 6: bytebase.store.IssueCommentPayload.IssueUpdate.from_status:type_name -> bytebase.store.Issue.Status- 7, // 7: bytebase.store.IssueCommentPayload.IssueUpdate.to_status:type_name -> bytebase.store.Issue.Status- 8, // 8: bytebase.store.IssueCommentPayload.PlanUpdate.from_specs:type_name -> bytebase.store.PlanConfig.Spec- 8, // 9: bytebase.store.IssueCommentPayload.PlanUpdate.to_specs:type_name -> bytebase.store.PlanConfig.Spec- 9, // 10: bytebase.store.IssueCommentPayload.StatementAnchor.start_position:type_name -> bytebase.store.Position- 9, // 11: bytebase.store.IssueCommentPayload.StatementAnchor.end_position:type_name -> bytebase.store.Position- 12, // [12:12] is the sub-list for method output_type- 12, // [12:12] is the sub-list for method input_type- 12, // [12:12] is the sub-list for extension type_name- 12, // [12:12] is the sub-list for extension extendee- 0, // [0:12] is the sub-list for field type_name+ 2, // 0: bytebase.store.IssueCommentPayload.approval:type_name -> bytebase.store.IssueCommentPayload.Approval+ 3, // 1: bytebase.store.IssueCommentPayload.issue_update:type_name -> bytebase.store.IssueCommentPayload.IssueUpdate+ 5, // 2: bytebase.store.IssueCommentPayload.plan_update:type_name -> bytebase.store.IssueCommentPayload.PlanUpdate+ 4, // 3: bytebase.store.IssueCommentPayload.review_submission:type_name -> bytebase.store.IssueCommentPayload.ReviewSubmission+ 7, // 4: bytebase.store.IssueCommentPayload.statement_anchor:type_name -> bytebase.store.IssueCommentPayload.StatementAnchor+ 6, // 5: bytebase.store.IssueCommentPayload.review_metadata:type_name -> bytebase.store.IssueCommentPayload.ReviewMetadata+ 8, // 6: bytebase.store.IssueCommentPayload.Approval.status:type_name -> bytebase.store.IssuePayloadApproval.Approver.Status+ 9, // 7: bytebase.store.IssueCommentPayload.IssueUpdate.from_status:type_name -> bytebase.store.Issue.Status+ 9, // 8: bytebase.store.IssueCommentPayload.IssueUpdate.to_status:type_name -> bytebase.store.Issue.Status+ 10, // 9: bytebase.store.IssueCommentPayload.PlanUpdate.from_specs:type_name -> bytebase.store.PlanConfig.Spec+ 10, // 10: bytebase.store.IssueCommentPayload.PlanUpdate.to_specs:type_name -> bytebase.store.PlanConfig.Spec+ 11, // 11: bytebase.store.IssueCommentPayload.ReviewMetadata.rule:type_name -> bytebase.store.ReviewRule.Type+ 0, // 12: bytebase.store.IssueCommentPayload.ReviewMetadata.priority:type_name -> bytebase.store.IssueCommentPayload.ReviewMetadata.Priority+ 12, // 13: bytebase.store.IssueCommentPayload.StatementAnchor.start_position:type_name -> bytebase.store.Position+ 12, // 14: bytebase.store.IssueCommentPayload.StatementAnchor.end_position:type_name -> bytebase.store.Position+ 15, // [15:15] is the sub-list for method output_type+ 15, // [15:15] is the sub-list for method input_type+ 15, // [15:15] is the sub-list for extension type_name+ 15, // [15:15] is the sub-list for extension extendee+ 0, // [0:15] is the sub-list for field type_name}func init() { file_store_issue_comment_proto_init() }@@ -572,6 +742,7 @@ func file_store_issue_comment_proto_init() {file_store_common_proto_init()file_store_issue_proto_init()file_store_plan_proto_init()+ file_store_review_rule_proto_init()file_store_issue_comment_proto_msgTypes[0].OneofWrappers = []any{(*IssueCommentPayload_Approval_)(nil),(*IssueCommentPayload_IssueUpdate_)(nil),@@ -584,13 +755,14 @@ func file_store_issue_comment_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_issue_comment_proto_rawDesc), len(file_store_issue_comment_proto_rawDesc)),- NumEnums: 0,- NumMessages: 6,+ NumEnums: 1,+ NumMessages: 7,NumExtensions: 0,NumServices: 0,},GoTypes: file_store_issue_comment_proto_goTypes,DependencyIndexes: file_store_issue_comment_proto_depIdxs,+ EnumInfos: file_store_issue_comment_proto_enumTypes,MessageInfos: file_store_issue_comment_proto_msgTypes,}.Build()File_store_issue_comment_proto = out.Filediff --git a/backend/generated-go/store/issue_comment_equal.pb.go b/backend/generated-go/store/issue_comment_equal.pb.goindex ae1dbfdc8c..1c8c94499e 100644--- a/backend/generated-go/store/issue_comment_equal.pb.go+++ b/backend/generated-go/store/issue_comment_equal.pb.go@@ -96,6 +96,33 @@ func (x *IssueCommentPayload_PlanUpdate) Equal(y *IssueCommentPayload_PlanUpdatereturn true}+func (x *IssueCommentPayload_ReviewMetadata) Equal(y *IssueCommentPayload_ReviewMetadata) 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.Rule != y.Rule {+ return false+ }+ if x.Priority != y.Priority {+ return false+ }+ if len(x.Targets) != len(y.Targets) {+ return false+ }+ for i := 0; i < len(x.Targets); i++ {+ if x.Targets[i] != y.Targets[i] {+ return false+ }+ }+ return true+}+func (x *IssueCommentPayload_StatementAnchor) Equal(y *IssueCommentPayload_StatementAnchor) bool {if x == y {return true@@ -143,5 +170,8 @@ func (x *IssueCommentPayload) Equal(y *IssueCommentPayload) bool {if !x.StatementAnchor.Equal(y.StatementAnchor) {return false}+ if !x.ReviewMetadata.Equal(y.ReviewMetadata) {+ return false+ }return true}diff --git a/backend/generated-go/store/policy.pb.go b/backend/generated-go/store/policy.pb.goindex 6e1aaec027..b0554d7990 100644--- a/backend/generated-go/store/policy.pb.go+++ b/backend/generated-go/store/policy.pb.go@@ -32,6 +32,7 @@ const (Policy_MASKING_RULE Policy_Type = 4Policy_IAM Policy_Type = 5Policy_TAG Policy_Type = 6+ Policy_REVIEW_RULE Policy_Type = 7)// Enum value maps for Policy_Type.@@ -44,6 +45,7 @@ var (4: "MASKING_RULE",5: "IAM",6: "TAG",+ 7: "REVIEW_RULE",}Policy_Type_value = map[string]int32{"TYPE_UNSPECIFIED": 0,@@ -53,6 +55,7 @@ var ("MASKING_RULE": 4,"IAM": 5,"TAG": 6,+ "REVIEW_RULE": 7,})@@ -171,6 +174,54 @@ func (*Policy) Descriptor() ([]byte, []int) {return file_store_policy_proto_rawDescGZIP(), []int{0}}+// ReviewRulePolicy is the standard review rule switch.+// Project: the rules on there; absent policy means every rule.+// Workspace: the rules on in every project, which projects cannot switch+// off; absent policy means none. The effective set is the union.+type ReviewRulePolicy struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Rules []ReviewRule_Type `protobuf:"varint,1,rep,packed,name=rules,proto3,enum=bytebase.store.ReviewRule_Type" json:"rules,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ReviewRulePolicy) Reset() {+ *x = ReviewRulePolicy{}+ mi := &file_store_policy_proto_msgTypes[1]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ReviewRulePolicy) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ReviewRulePolicy) ProtoMessage() {}++func (x *ReviewRulePolicy) ProtoReflect() protoreflect.Message {+ mi := &file_store_policy_proto_msgTypes[1]+ 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 ReviewRulePolicy.ProtoReflect.Descriptor instead.+func (*ReviewRulePolicy) Descriptor() ([]byte, []int) {+ return file_store_policy_proto_rawDescGZIP(), []int{1}+}++func (x *ReviewRulePolicy) GetRules() []ReviewRule_Type {+ if x != nil {+ return x.Rules+ }+ return nil+}+type RolloutPolicy struct {state protoimpl.MessageState `protogen:"open.v1"`Automatic bool `protobuf:"varint,1,opt,name=automatic,proto3" json:"automatic,omitempty"`@@ -181,7 +232,7 @@ type RolloutPolicy struct {func (x *RolloutPolicy) Reset() {*x = RolloutPolicy{}- mi := &file_store_policy_proto_msgTypes[1]+ mi := &file_store_policy_proto_msgTypes[2]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -193,7 +244,7 @@ func (x *RolloutPolicy) String() string {func (*RolloutPolicy) ProtoMessage() {}func (x *RolloutPolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[1]+ mi := &file_store_policy_proto_msgTypes[2]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -206,7 +257,7 @@ func (x *RolloutPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use RolloutPolicy.ProtoReflect.Descriptor instead.func (*RolloutPolicy) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{1}+ return file_store_policy_proto_rawDescGZIP(), []int{2}}func (x *RolloutPolicy) GetAutomatic() bool {@@ -233,7 +284,7 @@ type MaskingExemptionPolicy struct {func (x *MaskingExemptionPolicy) Reset() {*x = MaskingExemptionPolicy{}- mi := &file_store_policy_proto_msgTypes[2]+ mi := &file_store_policy_proto_msgTypes[3]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -245,7 +296,7 @@ func (x *MaskingExemptionPolicy) String() string {func (*MaskingExemptionPolicy) ProtoMessage() {}func (x *MaskingExemptionPolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[2]+ mi := &file_store_policy_proto_msgTypes[3]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -258,7 +309,7 @@ func (x *MaskingExemptionPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use MaskingExemptionPolicy.ProtoReflect.Descriptor instead.func (*MaskingExemptionPolicy) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{2}+ return file_store_policy_proto_rawDescGZIP(), []int{3}}func (x *MaskingExemptionPolicy) GetExemptions() []*MaskingExemptionPolicy_Exemption {@@ -277,7 +328,7 @@ type MaskingRulePolicy struct {func (x *MaskingRulePolicy) Reset() {*x = MaskingRulePolicy{}- mi := &file_store_policy_proto_msgTypes[3]+ mi := &file_store_policy_proto_msgTypes[4]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -289,7 +340,7 @@ func (x *MaskingRulePolicy) String() string {func (*MaskingRulePolicy) ProtoMessage() {}func (x *MaskingRulePolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[3]+ mi := &file_store_policy_proto_msgTypes[4]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -302,7 +353,7 @@ func (x *MaskingRulePolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use MaskingRulePolicy.ProtoReflect.Descriptor instead.func (*MaskingRulePolicy) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{3}+ return file_store_policy_proto_rawDescGZIP(), []int{4}}func (x *MaskingRulePolicy) GetRules() []*MaskingRulePolicy_MaskingRule {@@ -323,7 +374,7 @@ type TagPolicy struct {func (x *TagPolicy) Reset() {*x = TagPolicy{}- mi := &file_store_policy_proto_msgTypes[4]+ mi := &file_store_policy_proto_msgTypes[5]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -335,7 +386,7 @@ func (x *TagPolicy) String() string {func (*TagPolicy) ProtoMessage() {}func (x *TagPolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[4]+ mi := &file_store_policy_proto_msgTypes[5]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -348,7 +399,7 @@ func (x *TagPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use TagPolicy.ProtoReflect.Descriptor instead.func (*TagPolicy) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{4}+ return file_store_policy_proto_rawDescGZIP(), []int{5}}func (x *TagPolicy) GetTags() map[string]string {@@ -377,7 +428,7 @@ type Binding struct {func (x *Binding) Reset() {*x = Binding{}- mi := &file_store_policy_proto_msgTypes[5]+ mi := &file_store_policy_proto_msgTypes[6]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -389,7 +440,7 @@ func (x *Binding) String() string {func (*Binding) ProtoMessage() {}func (x *Binding) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[5]+ mi := &file_store_policy_proto_msgTypes[6]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -402,7 +453,7 @@ func (x *Binding) ProtoReflect() protoreflect.Message {// Deprecated: Use Binding.ProtoReflect.Descriptor instead.func (*Binding) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{5}+ return file_store_policy_proto_rawDescGZIP(), []int{6}}func (x *Binding) GetRole() string {@@ -437,7 +488,7 @@ type IamPolicy struct {func (x *IamPolicy) Reset() {*x = IamPolicy{}- mi := &file_store_policy_proto_msgTypes[6]+ mi := &file_store_policy_proto_msgTypes[7]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -449,7 +500,7 @@ func (x *IamPolicy) String() string {func (*IamPolicy) ProtoMessage() {}func (x *IamPolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[6]+ mi := &file_store_policy_proto_msgTypes[7]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -462,7 +513,7 @@ func (x *IamPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use IamPolicy.ProtoReflect.Descriptor instead.func (*IamPolicy) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{6}+ return file_store_policy_proto_rawDescGZIP(), []int{7}}func (x *IamPolicy) GetBindings() []*Binding {@@ -500,7 +551,7 @@ type QueryDataPolicy struct {func (x *QueryDataPolicy) Reset() {*x = QueryDataPolicy{}- mi := &file_store_policy_proto_msgTypes[7]+ mi := &file_store_policy_proto_msgTypes[8]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -512,7 +563,7 @@ func (x *QueryDataPolicy) String() string {func (*QueryDataPolicy) ProtoMessage() {}func (x *QueryDataPolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[7]+ mi := &file_store_policy_proto_msgTypes[8]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -525,7 +576,7 @@ func (x *QueryDataPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use QueryDataPolicy.ProtoReflect.Descriptor instead.func (*QueryDataPolicy) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{7}+ return file_store_policy_proto_rawDescGZIP(), []int{8}}func (x *QueryDataPolicy) GetDisableExport() bool {@@ -599,7 +650,7 @@ type MaskingExemptionPolicy_Exemption struct {func (x *MaskingExemptionPolicy_Exemption) Reset() {*x = MaskingExemptionPolicy_Exemption{}- mi := &file_store_policy_proto_msgTypes[8]+ mi := &file_store_policy_proto_msgTypes[9]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -611,7 +662,7 @@ func (x *MaskingExemptionPolicy_Exemption) String() string {func (*MaskingExemptionPolicy_Exemption) ProtoMessage() {}func (x *MaskingExemptionPolicy_Exemption) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[8]+ mi := &file_store_policy_proto_msgTypes[9]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -624,7 +675,7 @@ func (x *MaskingExemptionPolicy_Exemption) ProtoReflect() protoreflect.Message {// Deprecated: Use MaskingExemptionPolicy_Exemption.ProtoReflect.Descriptor instead.func (*MaskingExemptionPolicy_Exemption) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{2, 0}+ return file_store_policy_proto_rawDescGZIP(), []int{3, 0}}func (x *MaskingExemptionPolicy_Exemption) GetMembers() []string {@@ -653,7 +704,7 @@ type MaskingRulePolicy_MaskingRule struct {func (x *MaskingRulePolicy_MaskingRule) Reset() {*x = MaskingRulePolicy_MaskingRule{}- mi := &file_store_policy_proto_msgTypes[9]+ mi := &file_store_policy_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -665,7 +716,7 @@ func (x *MaskingRulePolicy_MaskingRule) String() string {func (*MaskingRulePolicy_MaskingRule) ProtoMessage() {}func (x *MaskingRulePolicy_MaskingRule) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[9]+ mi := &file_store_policy_proto_msgTypes[10]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -678,7 +729,7 @@ func (x *MaskingRulePolicy_MaskingRule) ProtoReflect() protoreflect.Message {// Deprecated: Use MaskingRulePolicy_MaskingRule.ProtoReflect.Descriptor instead.func (*MaskingRulePolicy_MaskingRule) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{3, 0}+ return file_store_policy_proto_rawDescGZIP(), []int{4, 0}}func (x *MaskingRulePolicy_MaskingRule) GetId() string {@@ -706,8 +757,8 @@ var File_store_policy_proto protoreflect.FileDescriptorconst file_store_policy_proto_rawDesc = "" +"\n" +- "\x12store/policy.proto\x12\x0ebytebase.store\x1a\x16google/type/expr.proto\"\xd1\x01\n" +- "\x06Policy\"t\n" ++ "\x12store/policy.proto\x12\x0ebytebase.store\x1a\x16google/type/expr.proto\x1a\x17store/review_rule.proto\"\xe3\x01\n" ++ "\x06Policy\"\x85\x01\n" +"\x04Type\x12\x14\n" +"\x10TYPE_UNSPECIFIED\x10\x00\x12\v\n" +"\aROLLOUT\x10\x01\x12\x15\n" +@@ -716,12 +767,15 @@ const file_store_policy_proto_rawDesc = "" +"QUERY_DATA\x10\x03\x12\x10\n" +"\fMASKING_RULE\x10\x04\x12\a\n" +"\x03IAM\x10\x05\x12\a\n" +- "\x03TAG\x10\x06\"Q\n" ++ "\x03TAG\x10\x06\x12\x0f\n" ++ "\vREVIEW_RULE\x10\a\"Q\n" +"\bResource\x12\x18\n" +"\x14RESOURCE_UNSPECIFIED\x10\x00\x12\r\n" +"\tWORKSPACE\x10\x01\x12\x0f\n" +"\vENVIRONMENT\x10\x02\x12\v\n" +- "\aPROJECT\x10\x03\"C\n" ++ "\aPROJECT\x10\x03\"I\n" ++ "\x10ReviewRulePolicy\x125\n" ++ "\x05rules\x18\x01 \x03(\x0e2\x1f.bytebase.store.ReviewRule.TypeR\x05rules\"C\n" +"\rRolloutPolicy\x12\x1c\n" +"\tautomatic\x18\x01 \x01(\bR\tautomatic\x12\x14\n" +"\x05roles\x18\x02 \x03(\tR\x05roles\"\xc2\x01\n" +@@ -771,36 +825,39 @@ func file_store_policy_proto_rawDescGZIP() []byte {}var file_store_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 2)-var file_store_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 11)+var file_store_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 12)var file_store_policy_proto_goTypes = []any{(Policy_Type)(0), // 0: bytebase.store.Policy.Type(Policy_Resource)(0), // 1: bytebase.store.Policy.Resource(*Policy)(nil), // 2: bytebase.store.Policy- (*RolloutPolicy)(nil), // 3: bytebase.store.RolloutPolicy- (*MaskingExemptionPolicy)(nil), // 4: bytebase.store.MaskingExemptionPolicy- (*MaskingRulePolicy)(nil), // 5: bytebase.store.MaskingRulePolicy- (*TagPolicy)(nil), // 6: bytebase.store.TagPolicy- (*Binding)(nil), // 7: bytebase.store.Binding- (*IamPolicy)(nil), // 8: bytebase.store.IamPolicy- (*QueryDataPolicy)(nil), // 9: bytebase.store.QueryDataPolicy- (*MaskingExemptionPolicy_Exemption)(nil), // 10: bytebase.store.MaskingExemptionPolicy.Exemption- (*MaskingRulePolicy_MaskingRule)(nil), // 11: bytebase.store.MaskingRulePolicy.MaskingRule- nil, // 12: bytebase.store.TagPolicy.TagsEntry- (*expr.Expr)(nil), // 13: google.type.Expr+ (*ReviewRulePolicy)(nil), // 3: bytebase.store.ReviewRulePolicy+ (*RolloutPolicy)(nil), // 4: bytebase.store.RolloutPolicy+ (*MaskingExemptionPolicy)(nil), // 5: bytebase.store.MaskingExemptionPolicy+ (*MaskingRulePolicy)(nil), // 6: bytebase.store.MaskingRulePolicy+ (*TagPolicy)(nil), // 7: bytebase.store.TagPolicy+ (*Binding)(nil), // 8: bytebase.store.Binding+ (*IamPolicy)(nil), // 9: bytebase.store.IamPolicy+ (*QueryDataPolicy)(nil), // 10: bytebase.store.QueryDataPolicy+ (*MaskingExemptionPolicy_Exemption)(nil), // 11: bytebase.store.MaskingExemptionPolicy.Exemption+ (*MaskingRulePolicy_MaskingRule)(nil), // 12: bytebase.store.MaskingRulePolicy.MaskingRule+ nil, // 13: bytebase.store.TagPolicy.TagsEntry+ (ReviewRule_Type)(0), // 14: bytebase.store.ReviewRule.Type+ (*expr.Expr)(nil), // 15: google.type.Expr}var file_store_policy_proto_depIdxs = []int32{- 10, // 0: bytebase.store.MaskingExemptionPolicy.exemptions:type_name -> bytebase.store.MaskingExemptionPolicy.Exemption- 11, // 1: bytebase.store.MaskingRulePolicy.rules:type_name -> bytebase.store.MaskingRulePolicy.MaskingRule- 12, // 2: bytebase.store.TagPolicy.tags:type_name -> bytebase.store.TagPolicy.TagsEntry- 13, // 3: bytebase.store.Binding.condition:type_name -> google.type.Expr- 7, // 4: bytebase.store.IamPolicy.bindings:type_name -> bytebase.store.Binding- 13, // 5: bytebase.store.MaskingExemptionPolicy.Exemption.condition:type_name -> google.type.Expr- 13, // 6: bytebase.store.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr- 7, // [7:7] is the sub-list for method output_type- 7, // [7:7] is the sub-list for method input_type- 7, // [7:7] is the sub-list for extension type_name- 7, // [7:7] is the sub-list for extension extendee- 0, // [0:7] is the sub-list for field type_name+ 14, // 0: bytebase.store.ReviewRulePolicy.rules:type_name -> bytebase.store.ReviewRule.Type+ 11, // 1: bytebase.store.MaskingExemptionPolicy.exemptions:type_name -> bytebase.store.MaskingExemptionPolicy.Exemption+ 12, // 2: bytebase.store.MaskingRulePolicy.rules:type_name -> bytebase.store.MaskingRulePolicy.MaskingRule+ 13, // 3: bytebase.store.TagPolicy.tags:type_name -> bytebase.store.TagPolicy.TagsEntry+ 15, // 4: bytebase.store.Binding.condition:type_name -> google.type.Expr+ 8, // 5: bytebase.store.IamPolicy.bindings:type_name -> bytebase.store.Binding+ 15, // 6: bytebase.store.MaskingExemptionPolicy.Exemption.condition:type_name -> google.type.Expr+ 15, // 7: bytebase.store.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr+ 8, // [8:8] is the sub-list for method output_type+ 8, // [8:8] is the sub-list for method input_type+ 8, // [8:8] is the sub-list for extension type_name+ 8, // [8:8] is the sub-list for extension extendee+ 0, // [0:8] is the sub-list for field type_name}func init() { file_store_policy_proto_init() }@@ -808,13 +865,14 @@ func file_store_policy_proto_init() {if File_store_policy_proto != nil {return}+ file_store_review_rule_proto_init()type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_policy_proto_rawDesc), len(file_store_policy_proto_rawDesc)),NumEnums: 2,- NumMessages: 11,+ NumMessages: 12,NumExtensions: 0,NumServices: 0,},diff --git a/backend/generated-go/store/policy_equal.pb.go b/backend/generated-go/store/policy_equal.pb.goindex 0fa5d6bea8..c5ecfaceec 100644--- a/backend/generated-go/store/policy_equal.pb.go+++ b/backend/generated-go/store/policy_equal.pb.go@@ -18,6 +18,24 @@ func (x *Policy) Equal(y *Policy) bool {return true}+func (x *ReviewRulePolicy) Equal(y *ReviewRulePolicy) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if len(x.Rules) != len(y.Rules) {+ return false+ }+ for i := 0; i < len(x.Rules); i++ {+ if x.Rules[i] != y.Rules[i] {+ return false+ }+ }+ return true+}+func (x *RolloutPolicy) Equal(y *RolloutPolicy) bool {if x == y {return truediff --git a/backend/generated-go/store/review_rule.pb.go b/backend/generated-go/store/review_rule.pb.gonew file mode 100644index 0000000000..ed989e37da--- /dev/null+++ b/backend/generated-go/store/review_rule.pb.go@@ -0,0 +1,216 @@+// Code generated by protoc-gen-go. DO NOT EDIT.+// versions:+// protoc-gen-go v1.36.12+// protoc (unknown)+// source: store/review_rule.proto++package store++import (+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"+ reflect "reflect"+ sync "sync"+ unsafe "unsafe"+)++const (+ // Verify that this generated code is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)+ // Verify that runtime/protoimpl is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)+)++type ReviewRule_Type int32++const (+ ReviewRule_TYPE_UNSPECIFIED ReviewRule_Type = 0+ ReviewRule_SYNTAX ReviewRule_Type = 1+ ReviewRule_WALK_THROUGH ReviewRule_Type = 2+ ReviewRule_ONLINE_MIGRATION ReviewRule_Type = 3+ ReviewRule_PRIOR_BACKUP ReviewRule_Type = 4+ ReviewRule_REQUIRE_IS_NULL ReviewRule_Type = 5+ ReviewRule_REQUIRE_WHERE ReviewRule_Type = 6+ ReviewRule_DISALLOW_DROP_OBJECT ReviewRule_Type = 7+ ReviewRule_DISALLOW_TRUNCATE ReviewRule_Type = 8+ ReviewRule_DISALLOW_DROP_CONSTRAINT ReviewRule_Type = 9+ ReviewRule_DISALLOW_RENAME ReviewRule_Type = 10+ ReviewRule_REQUIRE_PRIMARY_KEY ReviewRule_Type = 11+)++// Enum value maps for ReviewRule_Type.+var (+ ReviewRule_Type_name = map[int32]string{+ 0: "TYPE_UNSPECIFIED",+ 1: "SYNTAX",+ 2: "WALK_THROUGH",+ 3: "ONLINE_MIGRATION",+ 4: "PRIOR_BACKUP",+ 5: "REQUIRE_IS_NULL",+ 6: "REQUIRE_WHERE",+ 7: "DISALLOW_DROP_OBJECT",+ 8: "DISALLOW_TRUNCATE",+ 9: "DISALLOW_DROP_CONSTRAINT",+ 10: "DISALLOW_RENAME",+ 11: "REQUIRE_PRIMARY_KEY",+ }+ ReviewRule_Type_value = map[string]int32{+ "TYPE_UNSPECIFIED": 0,+ "SYNTAX": 1,+ "WALK_THROUGH": 2,+ "ONLINE_MIGRATION": 3,+ "PRIOR_BACKUP": 4,+ "REQUIRE_IS_NULL": 5,+ "REQUIRE_WHERE": 6,+ "DISALLOW_DROP_OBJECT": 7,+ "DISALLOW_TRUNCATE": 8,+ "DISALLOW_DROP_CONSTRAINT": 9,+ "DISALLOW_RENAME": 10,+ "REQUIRE_PRIMARY_KEY": 11,+ }+)++func (x ReviewRule_Type) Enum() *ReviewRule_Type {+ p := new(ReviewRule_Type)+ *p = x+ return p+}++func (x ReviewRule_Type) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (ReviewRule_Type) Descriptor() protoreflect.EnumDescriptor {+ return file_store_review_rule_proto_enumTypes[0].Descriptor()+}++func (ReviewRule_Type) Type() protoreflect.EnumType {+ return &file_store_review_rule_proto_enumTypes[0]+}++func (x ReviewRule_Type) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use ReviewRule_Type.Descriptor instead.+func (ReviewRule_Type) EnumDescriptor() ([]byte, []int) {+ return file_store_review_rule_proto_rawDescGZIP(), []int{0, 0}+}++// ReviewRule mirrors bytebase.v1.ReviewRule. The values are shared by+// ReviewRulePolicy and IssueCommentPayload.ReviewMetadata.+//+// A value is never removed, only marked deprecated: both payloads are jsonb,+// protojson stores the enum name, and the store's unmarshaler discards an+// unknown name into TYPE_UNSPECIFIED, which would blank the rule on every+// stored comment that used it.+type ReviewRule struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ReviewRule) Reset() {+ *x = ReviewRule{}+ mi := &file_store_review_rule_proto_msgTypes[0]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ReviewRule) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ReviewRule) ProtoMessage() {}++func (x *ReviewRule) ProtoReflect() protoreflect.Message {+ mi := &file_store_review_rule_proto_msgTypes[0]+ 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 ReviewRule.ProtoReflect.Descriptor instead.+func (*ReviewRule) Descriptor() ([]byte, []int) {+ return file_store_review_rule_proto_rawDescGZIP(), []int{0}+}++var File_store_review_rule_proto protoreflect.FileDescriptor++const file_store_review_rule_proto_rawDesc = "" ++ "\n" ++ "\x17store/review_rule.proto\x12\x0ebytebase.store\"\x96\x02\n" ++ "\n" ++ "ReviewRule\"\x87\x02\n" ++ "\x04Type\x12\x14\n" ++ "\x10TYPE_UNSPECIFIED\x10\x00\x12\n" ++ "\n" ++ "\x06SYNTAX\x10\x01\x12\x10\n" ++ "\fWALK_THROUGH\x10\x02\x12\x14\n" ++ "\x10ONLINE_MIGRATION\x10\x03\x12\x10\n" ++ "\fPRIOR_BACKUP\x10\x04\x12\x13\n" ++ "\x0fREQUIRE_IS_NULL\x10\x05\x12\x11\n" ++ "\rREQUIRE_WHERE\x10\x06\x12\x18\n" ++ "\x14DISALLOW_DROP_OBJECT\x10\a\x12\x15\n" ++ "\x11DISALLOW_TRUNCATE\x10\b\x12\x1c\n" ++ "\x18DISALLOW_DROP_CONSTRAINT\x10\t\x12\x13\n" ++ "\x0fDISALLOW_RENAME\x10\n" ++ "\x12\x17\n" ++ "\x13REQUIRE_PRIMARY_KEY\x10\vB\x92\x01\n" ++ "\x12com.bytebase.storeB\x0fReviewRuleProtoP\x01Z\x12generated-go/store\xa2\x02\x03BSX\xaa\x02\x0eBytebase.Store\xca\x02\x0eBytebase\\Store\xe2\x02\x1aBytebase\\Store\\GPBMetadata\xea\x02\x0fBytebase::Storeb\x06proto3"++var (+ file_store_review_rule_proto_rawDescOnce sync.Once+ file_store_review_rule_proto_rawDescData []byte+)++func file_store_review_rule_proto_rawDescGZIP() []byte {+ file_store_review_rule_proto_rawDescOnce.Do(func() {+ file_store_review_rule_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_review_rule_proto_rawDesc), len(file_store_review_rule_proto_rawDesc)))+ })+ return file_store_review_rule_proto_rawDescData+}++var file_store_review_rule_proto_enumTypes = make([]protoimpl.EnumInfo, 1)+var file_store_review_rule_proto_msgTypes = make([]protoimpl.MessageInfo, 1)+var file_store_review_rule_proto_goTypes = []any{+ (ReviewRule_Type)(0), // 0: bytebase.store.ReviewRule.Type+ (*ReviewRule)(nil), // 1: bytebase.store.ReviewRule+}+var file_store_review_rule_proto_depIdxs = []int32{+ 0, // [0:0] is the sub-list for method output_type+ 0, // [0:0] is the sub-list for method input_type+ 0, // [0:0] is the sub-list for extension type_name+ 0, // [0:0] is the sub-list for extension extendee+ 0, // [0:0] is the sub-list for field type_name+}++func init() { file_store_review_rule_proto_init() }+func file_store_review_rule_proto_init() {+ if File_store_review_rule_proto != nil {+ return+ }+ type x struct{}+ out := protoimpl.TypeBuilder{+ File: protoimpl.DescBuilder{+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_review_rule_proto_rawDesc), len(file_store_review_rule_proto_rawDesc)),+ NumEnums: 1,+ NumMessages: 1,+ NumExtensions: 0,+ NumServices: 0,+ },+ GoTypes: file_store_review_rule_proto_goTypes,+ DependencyIndexes: file_store_review_rule_proto_depIdxs,+ EnumInfos: file_store_review_rule_proto_enumTypes,+ MessageInfos: file_store_review_rule_proto_msgTypes,+ }.Build()+ File_store_review_rule_proto = out.File+ file_store_review_rule_proto_goTypes = nil+ file_store_review_rule_proto_depIdxs = nil+}diff --git a/backend/generated-go/store/review_rule_equal.pb.go b/backend/generated-go/store/review_rule_equal.pb.gonew file mode 100644index 0000000000..0d754b308c--- /dev/null+++ b/backend/generated-go/store/review_rule_equal.pb.go@@ -0,0 +1,14 @@+// Code generated by protoc-gen-equal-go. DO NOT EDIT.+// source: store/review_rule.proto++package store++func (x *ReviewRule) Equal(y *ReviewRule) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ return true+}diff --git a/backend/generated-go/v1/issue_service.pb.go b/backend/generated-go/v1/issue_service.pb.goindex a972654bf7..dfb64f7f3f 100644--- a/backend/generated-go/v1/issue_service.pb.go+++ b/backend/generated-go/v1/issue_service.pb.go@@ -190,6 +190,62 @@ func (IssueComment_ThreadState) EnumDescriptor() ([]byte, []int) {return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 0}}+type IssueComment_ReviewMetadata_Priority int32++const (+ // Blocks like any other open thread.+ IssueComment_ReviewMetadata_PRIORITY_UNSPECIFIED IssueComment_ReviewMetadata_Priority = 0+ // The SQL is wrong and must change.+ IssueComment_ReviewMetadata_P0 IssueComment_ReviewMetadata_Priority = 1+ // Dangerous but legitimate; a person must accept it.+ IssueComment_ReviewMetadata_P1 IssueComment_ReviewMetadata_Priority = 2+ // Advisory. Posted without thread state, so it never blocks.+ IssueComment_ReviewMetadata_P2 IssueComment_ReviewMetadata_Priority = 3+)++// Enum value maps for IssueComment_ReviewMetadata_Priority.+var (+ IssueComment_ReviewMetadata_Priority_name = map[int32]string{+ 0: "PRIORITY_UNSPECIFIED",+ 1: "P0",+ 2: "P1",+ 3: "P2",+ }+ IssueComment_ReviewMetadata_Priority_value = map[string]int32{+ "PRIORITY_UNSPECIFIED": 0,+ "P0": 1,+ "P1": 2,+ "P2": 3,+ }+)++func (x IssueComment_ReviewMetadata_Priority) Enum() *IssueComment_ReviewMetadata_Priority {+ p := new(IssueComment_ReviewMetadata_Priority)+ *p = x+ return p+}++func (x IssueComment_ReviewMetadata_Priority) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (IssueComment_ReviewMetadata_Priority) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_issue_service_proto_enumTypes[3].Descriptor()+}++func (IssueComment_ReviewMetadata_Priority) Type() protoreflect.EnumType {+ return &file_v1_issue_service_proto_enumTypes[3]+}++func (x IssueComment_ReviewMetadata_Priority) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use IssueComment_ReviewMetadata_Priority.Descriptor instead.+func (IssueComment_ReviewMetadata_Priority) EnumDescriptor() ([]byte, []int) {+ return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 0, 0}+}+// Approval status values.type IssueComment_Approval_Status int32@@ -231,11 +287,11 @@ func (x IssueComment_Approval_Status) String() string {}func (IssueComment_Approval_Status) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[3].Descriptor()+ return file_v1_issue_service_proto_enumTypes[4].Descriptor()}func (IssueComment_Approval_Status) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[3]+ return &file_v1_issue_service_proto_enumTypes[4]}func (x IssueComment_Approval_Status) Number() protoreflect.EnumNumber {@@ -244,7 +300,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{21, 0, 0}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 1, 0}}type ReviewRun_Type int32@@ -282,11 +338,11 @@ func (x ReviewRun_Type) String() string {}func (ReviewRun_Type) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[4].Descriptor()+ return file_v1_issue_service_proto_enumTypes[5].Descriptor()}func (ReviewRun_Type) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[4]+ return &file_v1_issue_service_proto_enumTypes[5]}func (x ReviewRun_Type) Number() protoreflect.EnumNumber {@@ -344,11 +400,11 @@ func (x ReviewRun_Status) String() string {}func (ReviewRun_Status) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[5].Descriptor()+ return file_v1_issue_service_proto_enumTypes[6].Descriptor()}func (ReviewRun_Status) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[5]+ return &file_v1_issue_service_proto_enumTypes[6]}func (x ReviewRun_Status) Number() protoreflect.EnumNumber {@@ -1867,6 +1923,9 @@ type IssueComment struct {// the root's spec and sheet_sha256; it may narrow the range.// Cannot be set on events. Immutable after creation.StatementAnchor *StatementAnchor `protobuf:"bytes,16,opt,name=statement_anchor,json=statementAnchor,proto3" json:"statement_anchor,omitempty"`+ // Present on review results, the comments the review executor posts.+ // Never accepted on create or update.+ ReviewMetadata *IssueComment_ReviewMetadata `protobuf:"bytes,17,opt,name=review_metadata,json=reviewMetadata,proto3" json:"review_metadata,omitempty"`// The event associated with this comment.//// Types that are valid to be assigned to Event:@@ -1973,6 +2032,13 @@ func (x *IssueComment) GetStatementAnchor() *StatementAnchor {return nil}+func (x *IssueComment) GetReviewMetadata() *IssueComment_ReviewMetadata {+ if x != nil {+ return x.ReviewMetadata+ }+ return nil+}+func (x *IssueComment) GetEvent() isIssueComment_Event {if x != nil {return x.Event@@ -2318,6 +2384,79 @@ func (x *Issue_Approver) GetPrincipal() string {return ""}+// What a review result carries beyond its text.+type IssueComment_ReviewMetadata struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The reviewer that posted the result.+ Type ReviewRun_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.v1.ReviewRun_Type" json:"type,omitempty"`+ // The rule judged against. Set if and only if type is RULE.+ Rule ReviewRule_Type `protobuf:"varint,2,opt,name=rule,proto3,enum=bytebase.v1.ReviewRule_Type" json:"rule,omitempty"`+ Priority IssueComment_ReviewMetadata_Priority `protobuf:"varint,3,opt,name=priority,proto3,enum=bytebase.v1.IssueComment_ReviewMetadata_Priority" json:"priority,omitempty"`+ // Every database the result applies to, sorted.+ // Format: instances/{instance}/databases/{database}+ Targets []string `protobuf:"bytes,4,rep,name=targets,proto3" json:"targets,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *IssueComment_ReviewMetadata) Reset() {+ *x = IssueComment_ReviewMetadata{}+ mi := &file_v1_issue_service_proto_msgTypes[26]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *IssueComment_ReviewMetadata) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*IssueComment_ReviewMetadata) ProtoMessage() {}++func (x *IssueComment_ReviewMetadata) ProtoReflect() protoreflect.Message {+ mi := &file_v1_issue_service_proto_msgTypes[26]+ 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 IssueComment_ReviewMetadata.ProtoReflect.Descriptor instead.+func (*IssueComment_ReviewMetadata) Descriptor() ([]byte, []int) {+ return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 0}+}++func (x *IssueComment_ReviewMetadata) GetType() ReviewRun_Type {+ if x != nil {+ return x.Type+ }+ return ReviewRun_TYPE_UNSPECIFIED+}++func (x *IssueComment_ReviewMetadata) GetRule() ReviewRule_Type {+ if x != nil {+ return x.Rule+ }+ return ReviewRule_TYPE_UNSPECIFIED+}++func (x *IssueComment_ReviewMetadata) GetPriority() IssueComment_ReviewMetadata_Priority {+ if x != nil {+ return x.Priority+ }+ return IssueComment_ReviewMetadata_PRIORITY_UNSPECIFIED+}++func (x *IssueComment_ReviewMetadata) GetTargets() []string {+ if x != nil {+ return x.Targets+ }+ return nil+}+// Approval event information.type IssueComment_Approval struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -2329,7 +2468,7 @@ type IssueComment_Approval struct {func (x *IssueComment_Approval) Reset() {*x = IssueComment_Approval{}- mi := &file_v1_issue_service_proto_msgTypes[26]+ mi := &file_v1_issue_service_proto_msgTypes[27]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2341,7 +2480,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[26]+ mi := &file_v1_issue_service_proto_msgTypes[27]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2354,7 +2493,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{21, 0}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 1}}func (x *IssueComment_Approval) GetStatus() IssueComment_Approval_Status {@@ -2381,7 +2520,7 @@ type IssueComment_IssueUpdate struct {func (x *IssueComment_IssueUpdate) Reset() {*x = IssueComment_IssueUpdate{}- mi := &file_v1_issue_service_proto_msgTypes[27]+ mi := &file_v1_issue_service_proto_msgTypes[28]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2393,7 +2532,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[27]+ mi := &file_v1_issue_service_proto_msgTypes[28]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2406,7 +2545,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{21, 1}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 2}}func (x *IssueComment_IssueUpdate) GetFromTitle() string {@@ -2474,7 +2613,7 @@ type IssueComment_ReviewSubmission struct {func (x *IssueComment_ReviewSubmission) Reset() {*x = IssueComment_ReviewSubmission{}- mi := &file_v1_issue_service_proto_msgTypes[28]+ mi := &file_v1_issue_service_proto_msgTypes[29]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2486,7 +2625,7 @@ func (x *IssueComment_ReviewSubmission) String() string {func (*IssueComment_ReviewSubmission) ProtoMessage() {}func (x *IssueComment_ReviewSubmission) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[28]+ mi := &file_v1_issue_service_proto_msgTypes[29]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2499,7 +2638,7 @@ func (x *IssueComment_ReviewSubmission) ProtoReflect() protoreflect.Message {// Deprecated: Use IssueComment_ReviewSubmission.ProtoReflect.Descriptor instead.func (*IssueComment_ReviewSubmission) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 2}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 3}}// Plan update event information (snapshot of plan.config.specs before@@ -2514,7 +2653,7 @@ type IssueComment_PlanUpdate struct {func (x *IssueComment_PlanUpdate) Reset() {*x = IssueComment_PlanUpdate{}- mi := &file_v1_issue_service_proto_msgTypes[29]+ mi := &file_v1_issue_service_proto_msgTypes[30]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2526,7 +2665,7 @@ func (x *IssueComment_PlanUpdate) String() string {func (*IssueComment_PlanUpdate) ProtoMessage() {}func (x *IssueComment_PlanUpdate) ProtoReflect() protoreflect.Message {- mi := &file_v1_issue_service_proto_msgTypes[29]+ mi := &file_v1_issue_service_proto_msgTypes[30]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2539,7 +2678,7 @@ func (x *IssueComment_PlanUpdate) ProtoReflect() protoreflect.Message {// Deprecated: Use IssueComment_PlanUpdate.ProtoReflect.Descriptor instead.func (*IssueComment_PlanUpdate) Descriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 3}+ return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 4}}func (x *IssueComment_PlanUpdate) GetFromSpecs() []*Plan_Spec {@@ -2560,7 +2699,7 @@ var File_v1_issue_service_proto protoreflect.FileDescriptorconst file_v1_issue_service_proto_rawDesc = "" +"\n" +- "\x16v1/issue_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x15v1/plan_service.proto\"W\n" ++ "\x16v1/issue_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x15v1/plan_service.proto\x1a\x14v1/review_rule.proto\"W\n" +"\x0fGetIssueRequest\x12.\n" +"\x04name\x18\x01 \x01(\tB\x1a\xe0A\x02\xfaA\x14\n" +"\x12bytebase.com/IssueR\x04name\x12\x14\n" +@@ -2692,7 +2831,7 @@ const file_v1_issue_service_proto_rawDesc = "" +"\rissue_comment\x18\x02 \x01(\v2\x19.bytebase.v1.IssueCommentR\fissueComment\x12@\n" +"\vupdate_mask\x18\x03 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x02R\n" +"updateMask\x12#\n" +- "\rallow_missing\x18\x04 \x01(\bR\fallowMissing\"\xd2\f\n" ++ "\rallow_missing\x18\x04 \x01(\bR\fallowMissing\"\xc7\x0f\n" +"\fIssueComment\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12#\n" +"\acomment\x18\x02 \x01(\tB\t\xbaH\x06r\x04\x18\x80\x80\x04R\acomment\x12\x18\n" +@@ -2704,12 +2843,23 @@ const file_v1_issue_service_proto_rawDesc = "" +"\acreator\x18\x06 \x01(\tB\x03\xe0A\x03R\acreator\x12\x1c\n" +"\x04root\x18\x0e \x01(\tB\x03\xe0A\x05H\x01R\x04root\x88\x01\x01\x12M\n" +"\fthread_state\x18\x0f \x01(\x0e2%.bytebase.v1.IssueComment.ThreadStateH\x02R\vthreadState\x88\x01\x01\x12L\n" +- "\x10statement_anchor\x18\x10 \x01(\v2\x1c.bytebase.v1.StatementAnchorB\x03\xe0A\x05R\x0fstatementAnchor\x12@\n" ++ "\x10statement_anchor\x18\x10 \x01(\v2\x1c.bytebase.v1.StatementAnchorB\x03\xe0A\x05R\x0fstatementAnchor\x12V\n" ++ "\x0freview_metadata\x18\x11 \x01(\v2(.bytebase.v1.IssueComment.ReviewMetadataB\x03\xe0A\x03R\x0ereviewMetadata\x12@\n" +"\bapproval\x18\a \x01(\v2\".bytebase.v1.IssueComment.ApprovalH\x00R\bapproval\x12J\n" +"\fissue_update\x18\b \x01(\v2%.bytebase.v1.IssueComment.IssueUpdateH\x00R\vissueUpdate\x12G\n" +"\vplan_update\x18\f \x01(\v2$.bytebase.v1.IssueComment.PlanUpdateH\x00R\n" +"planUpdate\x12Y\n" +- "\x11review_submission\x18\r \x01(\v2*.bytebase.v1.IssueComment.ReviewSubmissionH\x00R\x10reviewSubmission\x1a\x98\x01\n" ++ "\x11review_submission\x18\r \x01(\v2*.bytebase.v1.IssueComment.ReviewSubmissionH\x00R\x10reviewSubmission\x1a\x9a\x02\n" ++ "\x0eReviewMetadata\x12/\n" ++ "\x04type\x18\x01 \x01(\x0e2\x1b.bytebase.v1.ReviewRun.TypeR\x04type\x120\n" ++ "\x04rule\x18\x02 \x01(\x0e2\x1c.bytebase.v1.ReviewRule.TypeR\x04rule\x12M\n" ++ "\bpriority\x18\x03 \x01(\x0e21.bytebase.v1.IssueComment.ReviewMetadata.PriorityR\bpriority\x12\x18\n" ++ "\atargets\x18\x04 \x03(\tR\atargets\"<\n" ++ "\bPriority\x12\x18\n" ++ "\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\n" ++ "\x02P0\x10\x01\x12\x06\n" ++ "\x02P1\x10\x02\x12\x06\n" ++ "\x02P2\x10\x03\x1a\x98\x01\n" +"\bApproval\x12A\n" +"\x06status\x18\x01 \x01(\x0e2).bytebase.v1.IssueComment.Approval.StatusR\x06status\"I\n" +"\x06Status\x12\x16\n" +@@ -2807,131 +2957,138 @@ 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, 6)-var file_v1_issue_service_proto_msgTypes = make([]protoimpl.MessageInfo, 30)+var file_v1_issue_service_proto_enumTypes = make([]protoimpl.EnumInfo, 7)+var file_v1_issue_service_proto_msgTypes = make([]protoimpl.MessageInfo, 31)var file_v1_issue_service_proto_goTypes = []any{- (Issue_Type)(0), // 0: bytebase.v1.Issue.Type- (Issue_Approver_Status)(0), // 1: bytebase.v1.Issue.Approver.Status- (IssueComment_ThreadState)(0), // 2: bytebase.v1.IssueComment.ThreadState- (IssueComment_Approval_Status)(0), // 3: bytebase.v1.IssueComment.Approval.Status- (ReviewRun_Type)(0), // 4: bytebase.v1.ReviewRun.Type- (ReviewRun_Status)(0), // 5: bytebase.v1.ReviewRun.Status- (*GetIssueRequest)(nil), // 6: bytebase.v1.GetIssueRequest- (*CreateIssueRequest)(nil), // 7: bytebase.v1.CreateIssueRequest- (*ListIssuesRequest)(nil), // 8: bytebase.v1.ListIssuesRequest- (*ListIssuesResponse)(nil), // 9: bytebase.v1.ListIssuesResponse- (*SearchIssuesRequest)(nil), // 10: bytebase.v1.SearchIssuesRequest- (*SearchIssuesResponse)(nil), // 11: bytebase.v1.SearchIssuesResponse- (*UpdateIssueRequest)(nil), // 12: bytebase.v1.UpdateIssueRequest- (*BatchUpdateIssuesStatusRequest)(nil), // 13: bytebase.v1.BatchUpdateIssuesStatusRequest- (*BatchUpdateIssuesStatusResponse)(nil), // 14: bytebase.v1.BatchUpdateIssuesStatusResponse- (*ApproveIssueRequest)(nil), // 15: bytebase.v1.ApproveIssueRequest- (*RejectIssueRequest)(nil), // 16: bytebase.v1.RejectIssueRequest- (*RequestIssueRequest)(nil), // 17: bytebase.v1.RequestIssueRequest- (*RetryIssueApprovalRequest)(nil), // 18: bytebase.v1.RetryIssueApprovalRequest- (*Issue)(nil), // 19: bytebase.v1.Issue- (*RoleGrant)(nil), // 20: bytebase.v1.RoleGrant- (*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- (*StatementAnchor)(nil), // 28: bytebase.v1.StatementAnchor- (*ReviewRun)(nil), // 29: bytebase.v1.ReviewRun- (*RunReviewRequest)(nil), // 30: bytebase.v1.RunReviewRequest- (*Issue_Approver)(nil), // 31: bytebase.v1.Issue.Approver- (*IssueComment_Approval)(nil), // 32: bytebase.v1.IssueComment.Approval- (*IssueComment_IssueUpdate)(nil), // 33: bytebase.v1.IssueComment.IssueUpdate- (*IssueComment_ReviewSubmission)(nil), // 34: bytebase.v1.IssueComment.ReviewSubmission- (*IssueComment_PlanUpdate)(nil), // 35: bytebase.v1.IssueComment.PlanUpdate- (*fieldmaskpb.FieldMask)(nil), // 36: google.protobuf.FieldMask- (IssueStatus)(0), // 37: bytebase.v1.IssueStatus- (*timestamppb.Timestamp)(nil), // 38: google.protobuf.Timestamp- (RiskLevel)(0), // 39: bytebase.v1.RiskLevel- (ApprovalStatus)(0), // 40: bytebase.v1.ApprovalStatus- (*expr.Expr)(nil), // 41: google.type.Expr- (*durationpb.Duration)(nil), // 42: google.protobuf.Duration- (*Position)(nil), // 43: bytebase.v1.Position- (*Plan_Spec)(nil), // 44: bytebase.v1.Plan.Spec+ (Issue_Type)(0), // 0: bytebase.v1.Issue.Type+ (Issue_Approver_Status)(0), // 1: bytebase.v1.Issue.Approver.Status+ (IssueComment_ThreadState)(0), // 2: bytebase.v1.IssueComment.ThreadState+ (IssueComment_ReviewMetadata_Priority)(0), // 3: bytebase.v1.IssueComment.ReviewMetadata.Priority+ (IssueComment_Approval_Status)(0), // 4: bytebase.v1.IssueComment.Approval.Status+ (ReviewRun_Type)(0), // 5: bytebase.v1.ReviewRun.Type+ (ReviewRun_Status)(0), // 6: bytebase.v1.ReviewRun.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+ (*RetryIssueApprovalRequest)(nil), // 19: bytebase.v1.RetryIssueApprovalRequest+ (*Issue)(nil), // 20: bytebase.v1.Issue+ (*RoleGrant)(nil), // 21: bytebase.v1.RoleGrant+ (*ApprovalTemplate)(nil), // 22: bytebase.v1.ApprovalTemplate+ (*ApprovalFlow)(nil), // 23: bytebase.v1.ApprovalFlow+ (*ListIssueCommentsRequest)(nil), // 24: bytebase.v1.ListIssueCommentsRequest+ (*ListIssueCommentsResponse)(nil), // 25: bytebase.v1.ListIssueCommentsResponse+ (*CreateIssueCommentRequest)(nil), // 26: bytebase.v1.CreateIssueCommentRequest+ (*UpdateIssueCommentRequest)(nil), // 27: bytebase.v1.UpdateIssueCommentRequest+ (*IssueComment)(nil), // 28: bytebase.v1.IssueComment+ (*StatementAnchor)(nil), // 29: bytebase.v1.StatementAnchor+ (*ReviewRun)(nil), // 30: bytebase.v1.ReviewRun+ (*RunReviewRequest)(nil), // 31: bytebase.v1.RunReviewRequest+ (*Issue_Approver)(nil), // 32: bytebase.v1.Issue.Approver+ (*IssueComment_ReviewMetadata)(nil), // 33: bytebase.v1.IssueComment.ReviewMetadata+ (*IssueComment_Approval)(nil), // 34: bytebase.v1.IssueComment.Approval+ (*IssueComment_IssueUpdate)(nil), // 35: bytebase.v1.IssueComment.IssueUpdate+ (*IssueComment_ReviewSubmission)(nil), // 36: bytebase.v1.IssueComment.ReviewSubmission+ (*IssueComment_PlanUpdate)(nil), // 37: bytebase.v1.IssueComment.PlanUpdate+ (*fieldmaskpb.FieldMask)(nil), // 38: google.protobuf.FieldMask+ (IssueStatus)(0), // 39: bytebase.v1.IssueStatus+ (*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp+ (RiskLevel)(0), // 41: bytebase.v1.RiskLevel+ (ApprovalStatus)(0), // 42: bytebase.v1.ApprovalStatus+ (*expr.Expr)(nil), // 43: google.type.Expr+ (*durationpb.Duration)(nil), // 44: google.protobuf.Duration+ (*Position)(nil), // 45: bytebase.v1.Position+ (ReviewRule_Type)(0), // 46: bytebase.v1.ReviewRule.Type+ (*Plan_Spec)(nil), // 47: bytebase.v1.Plan.Spec}var file_v1_issue_service_proto_depIdxs = []int32{- 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.FieldMask- 37, // 5: bytebase.v1.BatchUpdateIssuesStatusRequest.status:type_name -> bytebase.v1.IssueStatus+ 20, // 0: bytebase.v1.CreateIssueRequest.issue:type_name -> bytebase.v1.Issue+ 20, // 1: bytebase.v1.ListIssuesResponse.issues:type_name -> bytebase.v1.Issue+ 20, // 2: bytebase.v1.SearchIssuesResponse.issues:type_name -> bytebase.v1.Issue+ 20, // 3: bytebase.v1.UpdateIssueRequest.issue:type_name -> bytebase.v1.Issue+ 38, // 4: bytebase.v1.UpdateIssueRequest.update_mask:type_name -> google.protobuf.FieldMask+ 39, // 5: bytebase.v1.BatchUpdateIssuesStatusRequest.status:type_name -> bytebase.v1.IssueStatus0, // 6: bytebase.v1.Issue.type:type_name -> bytebase.v1.Issue.Type- 37, // 7: bytebase.v1.Issue.status:type_name -> bytebase.v1.IssueStatus- 31, // 8: bytebase.v1.Issue.approvers:type_name -> bytebase.v1.Issue.Approver- 21, // 9: bytebase.v1.Issue.approval_template:type_name -> bytebase.v1.ApprovalTemplate- 38, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp- 38, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp- 20, // 12: bytebase.v1.Issue.role_grant:type_name -> bytebase.v1.RoleGrant- 39, // 13: bytebase.v1.Issue.risk_level:type_name -> bytebase.v1.RiskLevel- 40, // 14: bytebase.v1.Issue.approval_status:type_name -> bytebase.v1.ApprovalStatus- 41, // 15: bytebase.v1.RoleGrant.condition:type_name -> google.type.Expr- 42, // 16: bytebase.v1.RoleGrant.expiration:type_name -> google.protobuf.Duration- 22, // 17: bytebase.v1.ApprovalTemplate.flow:type_name -> bytebase.v1.ApprovalFlow- 27, // 18: bytebase.v1.ListIssueCommentsResponse.issue_comments:type_name -> bytebase.v1.IssueComment- 27, // 19: bytebase.v1.CreateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment- 27, // 20: bytebase.v1.UpdateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment- 36, // 21: bytebase.v1.UpdateIssueCommentRequest.update_mask:type_name -> google.protobuf.FieldMask- 38, // 22: bytebase.v1.IssueComment.create_time:type_name -> google.protobuf.Timestamp- 38, // 23: bytebase.v1.IssueComment.update_time:type_name -> google.protobuf.Timestamp+ 39, // 7: bytebase.v1.Issue.status:type_name -> bytebase.v1.IssueStatus+ 32, // 8: bytebase.v1.Issue.approvers:type_name -> bytebase.v1.Issue.Approver+ 22, // 9: bytebase.v1.Issue.approval_template:type_name -> bytebase.v1.ApprovalTemplate+ 40, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp+ 40, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp+ 21, // 12: bytebase.v1.Issue.role_grant:type_name -> bytebase.v1.RoleGrant+ 41, // 13: bytebase.v1.Issue.risk_level:type_name -> bytebase.v1.RiskLevel+ 42, // 14: bytebase.v1.Issue.approval_status:type_name -> bytebase.v1.ApprovalStatus+ 43, // 15: bytebase.v1.RoleGrant.condition:type_name -> google.type.Expr+ 44, // 16: bytebase.v1.RoleGrant.expiration:type_name -> google.protobuf.Duration+ 23, // 17: bytebase.v1.ApprovalTemplate.flow:type_name -> bytebase.v1.ApprovalFlow+ 28, // 18: bytebase.v1.ListIssueCommentsResponse.issue_comments:type_name -> bytebase.v1.IssueComment+ 28, // 19: bytebase.v1.CreateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment+ 28, // 20: bytebase.v1.UpdateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment+ 38, // 21: bytebase.v1.UpdateIssueCommentRequest.update_mask:type_name -> google.protobuf.FieldMask+ 40, // 22: bytebase.v1.IssueComment.create_time:type_name -> google.protobuf.Timestamp+ 40, // 23: bytebase.v1.IssueComment.update_time:type_name -> google.protobuf.Timestamp2, // 24: bytebase.v1.IssueComment.thread_state:type_name -> bytebase.v1.IssueComment.ThreadState- 28, // 25: bytebase.v1.IssueComment.statement_anchor:type_name -> bytebase.v1.StatementAnchor- 32, // 26: bytebase.v1.IssueComment.approval:type_name -> bytebase.v1.IssueComment.Approval- 33, // 27: bytebase.v1.IssueComment.issue_update:type_name -> bytebase.v1.IssueComment.IssueUpdate- 35, // 28: bytebase.v1.IssueComment.plan_update:type_name -> bytebase.v1.IssueComment.PlanUpdate- 34, // 29: bytebase.v1.IssueComment.review_submission:type_name -> bytebase.v1.IssueComment.ReviewSubmission- 43, // 30: bytebase.v1.StatementAnchor.start_position:type_name -> bytebase.v1.Position- 43, // 31: bytebase.v1.StatementAnchor.end_position:type_name -> bytebase.v1.Position- 4, // 32: bytebase.v1.ReviewRun.type:type_name -> bytebase.v1.ReviewRun.Type- 5, // 33: bytebase.v1.ReviewRun.status:type_name -> bytebase.v1.ReviewRun.Status- 38, // 34: bytebase.v1.ReviewRun.create_time:type_name -> google.protobuf.Timestamp- 38, // 35: bytebase.v1.ReviewRun.end_time:type_name -> google.protobuf.Timestamp- 1, // 36: bytebase.v1.Issue.Approver.status:type_name -> bytebase.v1.Issue.Approver.Status- 3, // 37: bytebase.v1.IssueComment.Approval.status:type_name -> bytebase.v1.IssueComment.Approval.Status- 37, // 38: bytebase.v1.IssueComment.IssueUpdate.from_status:type_name -> bytebase.v1.IssueStatus- 37, // 39: bytebase.v1.IssueComment.IssueUpdate.to_status:type_name -> bytebase.v1.IssueStatus- 44, // 40: bytebase.v1.IssueComment.PlanUpdate.from_specs:type_name -> bytebase.v1.Plan.Spec- 44, // 41: bytebase.v1.IssueComment.PlanUpdate.to_specs:type_name -> bytebase.v1.Plan.Spec- 6, // 42: bytebase.v1.IssueService.GetIssue:input_type -> bytebase.v1.GetIssueRequest- 7, // 43: bytebase.v1.IssueService.CreateIssue:input_type -> bytebase.v1.CreateIssueRequest- 8, // 44: bytebase.v1.IssueService.ListIssues:input_type -> bytebase.v1.ListIssuesRequest- 10, // 45: bytebase.v1.IssueService.SearchIssues:input_type -> bytebase.v1.SearchIssuesRequest- 12, // 46: bytebase.v1.IssueService.UpdateIssue:input_type -> bytebase.v1.UpdateIssueRequest- 23, // 47: bytebase.v1.IssueService.ListIssueComments:input_type -> bytebase.v1.ListIssueCommentsRequest- 25, // 48: bytebase.v1.IssueService.CreateIssueComment:input_type -> bytebase.v1.CreateIssueCommentRequest- 26, // 49: bytebase.v1.IssueService.UpdateIssueComment:input_type -> bytebase.v1.UpdateIssueCommentRequest- 13, // 50: bytebase.v1.IssueService.BatchUpdateIssuesStatus:input_type -> bytebase.v1.BatchUpdateIssuesStatusRequest- 15, // 51: bytebase.v1.IssueService.ApproveIssue:input_type -> bytebase.v1.ApproveIssueRequest- 16, // 52: bytebase.v1.IssueService.RejectIssue:input_type -> bytebase.v1.RejectIssueRequest- 17, // 53: bytebase.v1.IssueService.RequestIssue:input_type -> bytebase.v1.RequestIssueRequest- 18, // 54: bytebase.v1.IssueService.RetryIssueApproval:input_type -> bytebase.v1.RetryIssueApprovalRequest- 30, // 55: bytebase.v1.IssueService.RunReview:input_type -> bytebase.v1.RunReviewRequest- 19, // 56: bytebase.v1.IssueService.GetIssue:output_type -> bytebase.v1.Issue- 19, // 57: bytebase.v1.IssueService.CreateIssue:output_type -> bytebase.v1.Issue- 9, // 58: bytebase.v1.IssueService.ListIssues:output_type -> bytebase.v1.ListIssuesResponse- 11, // 59: bytebase.v1.IssueService.SearchIssues:output_type -> bytebase.v1.SearchIssuesResponse- 19, // 60: bytebase.v1.IssueService.UpdateIssue:output_type -> bytebase.v1.Issue- 24, // 61: bytebase.v1.IssueService.ListIssueComments:output_type -> bytebase.v1.ListIssueCommentsResponse- 27, // 62: bytebase.v1.IssueService.CreateIssueComment:output_type -> bytebase.v1.IssueComment- 27, // 63: bytebase.v1.IssueService.UpdateIssueComment:output_type -> bytebase.v1.IssueComment- 14, // 64: bytebase.v1.IssueService.BatchUpdateIssuesStatus:output_type -> bytebase.v1.BatchUpdateIssuesStatusResponse- 19, // 65: bytebase.v1.IssueService.ApproveIssue:output_type -> bytebase.v1.Issue- 19, // 66: bytebase.v1.IssueService.RejectIssue:output_type -> bytebase.v1.Issue- 19, // 67: bytebase.v1.IssueService.RequestIssue:output_type -> bytebase.v1.Issue- 19, // 68: bytebase.v1.IssueService.RetryIssueApproval:output_type -> bytebase.v1.Issue- 29, // 69: bytebase.v1.IssueService.RunReview:output_type -> bytebase.v1.ReviewRun- 56, // [56:70] is the sub-list for method output_type- 42, // [42:56] is the sub-list for method input_type- 42, // [42:42] is the sub-list for extension type_name- 42, // [42:42] is the sub-list for extension extendee- 0, // [0:42] is the sub-list for field type_name+ 29, // 25: bytebase.v1.IssueComment.statement_anchor:type_name -> bytebase.v1.StatementAnchor+ 33, // 26: bytebase.v1.IssueComment.review_metadata:type_name -> bytebase.v1.IssueComment.ReviewMetadata+ 34, // 27: bytebase.v1.IssueComment.approval:type_name -> bytebase.v1.IssueComment.Approval+ 35, // 28: bytebase.v1.IssueComment.issue_update:type_name -> bytebase.v1.IssueComment.IssueUpdate+ 37, // 29: bytebase.v1.IssueComment.plan_update:type_name -> bytebase.v1.IssueComment.PlanUpdate+ 36, // 30: bytebase.v1.IssueComment.review_submission:type_name -> bytebase.v1.IssueComment.ReviewSubmission+ 45, // 31: bytebase.v1.StatementAnchor.start_position:type_name -> bytebase.v1.Position+ 45, // 32: bytebase.v1.StatementAnchor.end_position:type_name -> bytebase.v1.Position+ 5, // 33: bytebase.v1.ReviewRun.type:type_name -> bytebase.v1.ReviewRun.Type+ 6, // 34: bytebase.v1.ReviewRun.status:type_name -> bytebase.v1.ReviewRun.Status+ 40, // 35: bytebase.v1.ReviewRun.create_time:type_name -> google.protobuf.Timestamp+ 40, // 36: bytebase.v1.ReviewRun.end_time:type_name -> google.protobuf.Timestamp+ 1, // 37: bytebase.v1.Issue.Approver.status:type_name -> bytebase.v1.Issue.Approver.Status+ 5, // 38: bytebase.v1.IssueComment.ReviewMetadata.type:type_name -> bytebase.v1.ReviewRun.Type+ 46, // 39: bytebase.v1.IssueComment.ReviewMetadata.rule:type_name -> bytebase.v1.ReviewRule.Type+ 3, // 40: bytebase.v1.IssueComment.ReviewMetadata.priority:type_name -> bytebase.v1.IssueComment.ReviewMetadata.Priority+ 4, // 41: bytebase.v1.IssueComment.Approval.status:type_name -> bytebase.v1.IssueComment.Approval.Status+ 39, // 42: bytebase.v1.IssueComment.IssueUpdate.from_status:type_name -> bytebase.v1.IssueStatus+ 39, // 43: bytebase.v1.IssueComment.IssueUpdate.to_status:type_name -> bytebase.v1.IssueStatus+ 47, // 44: bytebase.v1.IssueComment.PlanUpdate.from_specs:type_name -> bytebase.v1.Plan.Spec+ 47, // 45: bytebase.v1.IssueComment.PlanUpdate.to_specs:type_name -> bytebase.v1.Plan.Spec+ 7, // 46: bytebase.v1.IssueService.GetIssue:input_type -> bytebase.v1.GetIssueRequest+ 8, // 47: bytebase.v1.IssueService.CreateIssue:input_type -> bytebase.v1.CreateIssueRequest+ 9, // 48: bytebase.v1.IssueService.ListIssues:input_type -> bytebase.v1.ListIssuesRequest+ 11, // 49: bytebase.v1.IssueService.SearchIssues:input_type -> bytebase.v1.SearchIssuesRequest+ 13, // 50: bytebase.v1.IssueService.UpdateIssue:input_type -> bytebase.v1.UpdateIssueRequest+ 24, // 51: bytebase.v1.IssueService.ListIssueComments:input_type -> bytebase.v1.ListIssueCommentsRequest+ 26, // 52: bytebase.v1.IssueService.CreateIssueComment:input_type -> bytebase.v1.CreateIssueCommentRequest+ 27, // 53: bytebase.v1.IssueService.UpdateIssueComment:input_type -> bytebase.v1.UpdateIssueCommentRequest+ 14, // 54: bytebase.v1.IssueService.BatchUpdateIssuesStatus:input_type -> bytebase.v1.BatchUpdateIssuesStatusRequest+ 16, // 55: bytebase.v1.IssueService.ApproveIssue:input_type -> bytebase.v1.ApproveIssueRequest+ 17, // 56: bytebase.v1.IssueService.RejectIssue:input_type -> bytebase.v1.RejectIssueRequest+ 18, // 57: bytebase.v1.IssueService.RequestIssue:input_type -> bytebase.v1.RequestIssueRequest+ 19, // 58: bytebase.v1.IssueService.RetryIssueApproval:input_type -> bytebase.v1.RetryIssueApprovalRequest+ 31, // 59: bytebase.v1.IssueService.RunReview:input_type -> bytebase.v1.RunReviewRequest+ 20, // 60: bytebase.v1.IssueService.GetIssue:output_type -> bytebase.v1.Issue+ 20, // 61: bytebase.v1.IssueService.CreateIssue:output_type -> bytebase.v1.Issue+ 10, // 62: bytebase.v1.IssueService.ListIssues:output_type -> bytebase.v1.ListIssuesResponse+ 12, // 63: bytebase.v1.IssueService.SearchIssues:output_type -> bytebase.v1.SearchIssuesResponse+ 20, // 64: bytebase.v1.IssueService.UpdateIssue:output_type -> bytebase.v1.Issue+ 25, // 65: bytebase.v1.IssueService.ListIssueComments:output_type -> bytebase.v1.ListIssueCommentsResponse+ 28, // 66: bytebase.v1.IssueService.CreateIssueComment:output_type -> bytebase.v1.IssueComment+ 28, // 67: bytebase.v1.IssueService.UpdateIssueComment:output_type -> bytebase.v1.IssueComment+ 15, // 68: bytebase.v1.IssueService.BatchUpdateIssuesStatus:output_type -> bytebase.v1.BatchUpdateIssuesStatusResponse+ 20, // 69: bytebase.v1.IssueService.ApproveIssue:output_type -> bytebase.v1.Issue+ 20, // 70: bytebase.v1.IssueService.RejectIssue:output_type -> bytebase.v1.Issue+ 20, // 71: bytebase.v1.IssueService.RequestIssue:output_type -> bytebase.v1.Issue+ 20, // 72: bytebase.v1.IssueService.RetryIssueApproval:output_type -> bytebase.v1.Issue+ 30, // 73: bytebase.v1.IssueService.RunReview:output_type -> bytebase.v1.ReviewRun+ 60, // [60:74] is the sub-list for method output_type+ 46, // [46:60] is the sub-list for method input_type+ 46, // [46:46] is the sub-list for extension type_name+ 46, // [46:46] is the sub-list for extension extendee+ 0, // [0:46] is the sub-list for field type_name}func init() { file_v1_issue_service_proto_init() }@@ -2942,20 +3099,21 @@ func file_v1_issue_service_proto_init() {file_v1_annotation_proto_init()file_v1_common_proto_init()file_v1_plan_service_proto_init()+ file_v1_review_rule_proto_init()file_v1_issue_service_proto_msgTypes[21].OneofWrappers = []any{(*IssueComment_Approval_)(nil),(*IssueComment_IssueUpdate_)(nil),(*IssueComment_PlanUpdate_)(nil),(*IssueComment_ReviewSubmission_)(nil),}- file_v1_issue_service_proto_msgTypes[27].OneofWrappers = []any{}+ file_v1_issue_service_proto_msgTypes[28].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: 6,- NumMessages: 30,+ NumEnums: 7,+ NumMessages: 31,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 2600dcef04..d9c17234b0 100644--- a/backend/generated-go/v1/issue_service_equal.pb.go+++ b/backend/generated-go/v1/issue_service_equal.pb.go@@ -493,6 +493,33 @@ func (x *UpdateIssueCommentRequest) Equal(y *UpdateIssueCommentRequest) bool {return true}+func (x *IssueComment_ReviewMetadata) Equal(y *IssueComment_ReviewMetadata) 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.Rule != y.Rule {+ return false+ }+ if x.Priority != y.Priority {+ return false+ }+ if len(x.Targets) != len(y.Targets) {+ return false+ }+ for i := 0; i < len(x.Targets); i++ {+ if x.Targets[i] != y.Targets[i] {+ return false+ }+ }+ return true+}+func (x *IssueComment_Approval) Equal(y *IssueComment_Approval) bool {if x == y {return true@@ -620,6 +647,9 @@ func (x *IssueComment) Equal(y *IssueComment) bool {if !x.StatementAnchor.Equal(y.StatementAnchor) {return false}+ if !x.ReviewMetadata.Equal(y.ReviewMetadata) {+ return false+ }if !x.GetApproval().Equal(y.GetApproval()) {return false}diff --git a/backend/generated-go/v1/org_policy_service.pb.go b/backend/generated-go/v1/org_policy_service.pb.goindex 17b11b9a59..2470bd39ca 100644--- a/backend/generated-go/v1/org_policy_service.pb.go+++ b/backend/generated-go/v1/org_policy_service.pb.go@@ -41,6 +41,8 @@ const (PolicyType_TAG PolicyType = 4// Query data access policy.PolicyType_DATA_QUERY PolicyType = 6+ // Standard review rule switch. Allowed on WORKSPACE and PROJECT.+ PolicyType_REVIEW_RULE PolicyType = 7)// Enum value maps for PolicyType.@@ -52,6 +54,7 @@ var (3: "ROLLOUT_POLICY",4: "TAG",6: "DATA_QUERY",+ 7: "REVIEW_RULE",}PolicyType_value = map[string]int32{"POLICY_TYPE_UNSPECIFIED": 0,@@ -60,6 +63,7 @@ var ("ROLLOUT_POLICY": 3,"TAG": 4,"DATA_QUERY": 6,+ "REVIEW_RULE": 7,})@@ -504,6 +508,7 @@ type Policy struct {// *Policy_MaskingExemptionPolicy// *Policy_TagPolicy// *Policy_QueryDataPolicy+ // *Policy_ReviewRulePolicyPolicy isPolicy_Policy `protobuf_oneof:"policy"`// Whether the policy is enforced.Enforce bool `protobuf:"varint,10,opt,name=enforce,proto3" json:"enforce,omitempty"`@@ -616,6 +621,15 @@ func (x *Policy) GetQueryDataPolicy() *QueryDataPolicy {return nil}+func (x *Policy) GetReviewRulePolicy() *ReviewRulePolicy {+ if x != nil {+ if x, ok := x.Policy.(*Policy_ReviewRulePolicy); ok {+ return x.ReviewRulePolicy+ }+ }+ return nil+}+func (x *Policy) GetEnforce() bool {if x != nil {return x.Enforce@@ -654,6 +668,10 @@ type Policy_QueryDataPolicy struct {QueryDataPolicy *QueryDataPolicy `protobuf:"bytes,9,opt,name=query_data_policy,json=queryDataPolicy,proto3,oneof"`}+type Policy_ReviewRulePolicy struct {+ ReviewRulePolicy *ReviewRulePolicy `protobuf:"bytes,12,opt,name=review_rule_policy,json=reviewRulePolicy,proto3,oneof"`+}+func (*Policy_RolloutPolicy) isPolicy_Policy() {}func (*Policy_MaskingRulePolicy) isPolicy_Policy() {}@@ -664,6 +682,63 @@ func (*Policy_TagPolicy) isPolicy_Policy() {}func (*Policy_QueryDataPolicy) isPolicy_Policy() {}+func (*Policy_ReviewRulePolicy) isPolicy_Policy() {}++// Standard review rule policy: the rules switched on, at two levels.+//+// On a project it is the project's switch: the rules on there. Absent policy+// means every rule. On the workspace it is a lock: the rules on in every+// project, which projects cannot switch off. Absent policy means none. The+// effective set for a project is the union of the two.+//+// A saved project list is explicit, so a rule added to the standard set in a+// later release is appended to every saved project policy by a data+// migration in that release.+type ReviewRulePolicy struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The rules switched on. Unknown or unspecified values are rejected.+ Rules []ReviewRule_Type `protobuf:"varint,1,rep,packed,name=rules,proto3,enum=bytebase.v1.ReviewRule_Type" json:"rules,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ReviewRulePolicy) Reset() {+ *x = ReviewRulePolicy{}+ mi := &file_v1_org_policy_service_proto_msgTypes[7]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ReviewRulePolicy) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ReviewRulePolicy) ProtoMessage() {}++func (x *ReviewRulePolicy) ProtoReflect() protoreflect.Message {+ mi := &file_v1_org_policy_service_proto_msgTypes[7]+ 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 ReviewRulePolicy.ProtoReflect.Descriptor instead.+func (*ReviewRulePolicy) Descriptor() ([]byte, []int) {+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{7}+}++func (x *ReviewRulePolicy) GetRules() []ReviewRule_Type {+ if x != nil {+ return x.Rules+ }+ return nil+}+// Rollout policy configuration.type RolloutPolicy struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -677,7 +752,7 @@ type RolloutPolicy struct {func (x *RolloutPolicy) Reset() {*x = RolloutPolicy{}- mi := &file_v1_org_policy_service_proto_msgTypes[7]+ mi := &file_v1_org_policy_service_proto_msgTypes[8]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -689,7 +764,7 @@ func (x *RolloutPolicy) String() string {func (*RolloutPolicy) ProtoMessage() {}func (x *RolloutPolicy) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[7]+ mi := &file_v1_org_policy_service_proto_msgTypes[8]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -702,7 +777,7 @@ func (x *RolloutPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use RolloutPolicy.ProtoReflect.Descriptor instead.func (*RolloutPolicy) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{7}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{8}}func (x *RolloutPolicy) GetAutomatic() bool {@@ -745,7 +820,7 @@ type QueryDataPolicy struct {func (x *QueryDataPolicy) Reset() {*x = QueryDataPolicy{}- mi := &file_v1_org_policy_service_proto_msgTypes[8]+ mi := &file_v1_org_policy_service_proto_msgTypes[9]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -757,7 +832,7 @@ func (x *QueryDataPolicy) String() string {func (*QueryDataPolicy) ProtoMessage() {}func (x *QueryDataPolicy) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[8]+ mi := &file_v1_org_policy_service_proto_msgTypes[9]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -770,7 +845,7 @@ func (x *QueryDataPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use QueryDataPolicy.ProtoReflect.Descriptor instead.func (*QueryDataPolicy) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{8}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{9}}func (x *QueryDataPolicy) GetMaximumResultRows() int32 {@@ -811,7 +886,7 @@ type MaskingExemptionPolicy struct {func (x *MaskingExemptionPolicy) Reset() {*x = MaskingExemptionPolicy{}- mi := &file_v1_org_policy_service_proto_msgTypes[9]+ mi := &file_v1_org_policy_service_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -823,7 +898,7 @@ func (x *MaskingExemptionPolicy) String() string {func (*MaskingExemptionPolicy) ProtoMessage() {}func (x *MaskingExemptionPolicy) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[9]+ mi := &file_v1_org_policy_service_proto_msgTypes[10]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -836,7 +911,7 @@ func (x *MaskingExemptionPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use MaskingExemptionPolicy.ProtoReflect.Descriptor instead.func (*MaskingExemptionPolicy) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{9}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10}}func (x *MaskingExemptionPolicy) GetExemptions() []*MaskingExemptionPolicy_Exemption {@@ -857,7 +932,7 @@ type MaskingRulePolicy struct {func (x *MaskingRulePolicy) Reset() {*x = MaskingRulePolicy{}- mi := &file_v1_org_policy_service_proto_msgTypes[10]+ mi := &file_v1_org_policy_service_proto_msgTypes[11]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -869,7 +944,7 @@ func (x *MaskingRulePolicy) String() string {func (*MaskingRulePolicy) ProtoMessage() {}func (x *MaskingRulePolicy) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[10]+ mi := &file_v1_org_policy_service_proto_msgTypes[11]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -882,7 +957,7 @@ func (x *MaskingRulePolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use MaskingRulePolicy.ProtoReflect.Descriptor instead.func (*MaskingRulePolicy) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{11}}func (x *MaskingRulePolicy) GetRules() []*MaskingRulePolicy_MaskingRule {@@ -904,7 +979,7 @@ type TagPolicy struct {func (x *TagPolicy) Reset() {*x = TagPolicy{}- mi := &file_v1_org_policy_service_proto_msgTypes[11]+ mi := &file_v1_org_policy_service_proto_msgTypes[12]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -916,7 +991,7 @@ func (x *TagPolicy) String() string {func (*TagPolicy) ProtoMessage() {}func (x *TagPolicy) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[11]+ mi := &file_v1_org_policy_service_proto_msgTypes[12]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -929,7 +1004,7 @@ func (x *TagPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use TagPolicy.ProtoReflect.Descriptor instead.func (*TagPolicy) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{11}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{12}}func (x *TagPolicy) GetTags() map[string]string {@@ -970,7 +1045,7 @@ type MaskingExemptionPolicy_Exemption struct {func (x *MaskingExemptionPolicy_Exemption) Reset() {*x = MaskingExemptionPolicy_Exemption{}- mi := &file_v1_org_policy_service_proto_msgTypes[12]+ mi := &file_v1_org_policy_service_proto_msgTypes[13]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -982,7 +1057,7 @@ func (x *MaskingExemptionPolicy_Exemption) String() string {func (*MaskingExemptionPolicy_Exemption) ProtoMessage() {}func (x *MaskingExemptionPolicy_Exemption) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[12]+ mi := &file_v1_org_policy_service_proto_msgTypes[13]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -995,7 +1070,7 @@ func (x *MaskingExemptionPolicy_Exemption) ProtoReflect() protoreflect.Message {// Deprecated: Use MaskingExemptionPolicy_Exemption.ProtoReflect.Descriptor instead.func (*MaskingExemptionPolicy_Exemption) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{9, 0}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10, 0}}func (x *MaskingExemptionPolicy_Exemption) GetMembers() []string {@@ -1050,7 +1125,7 @@ type MaskingRulePolicy_MaskingRule struct {func (x *MaskingRulePolicy_MaskingRule) Reset() {*x = MaskingRulePolicy_MaskingRule{}- mi := &file_v1_org_policy_service_proto_msgTypes[13]+ mi := &file_v1_org_policy_service_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1062,7 +1137,7 @@ func (x *MaskingRulePolicy_MaskingRule) String() string {func (*MaskingRulePolicy_MaskingRule) ProtoMessage() {}func (x *MaskingRulePolicy_MaskingRule) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[13]+ mi := &file_v1_org_policy_service_proto_msgTypes[14]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1075,7 +1150,7 @@ func (x *MaskingRulePolicy_MaskingRule) ProtoReflect() protoreflect.Message {// Deprecated: Use MaskingRulePolicy_MaskingRule.ProtoReflect.Descriptor instead.func (*MaskingRulePolicy_MaskingRule) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10, 0}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{11, 0}}func (x *MaskingRulePolicy_MaskingRule) GetId() string {@@ -1103,7 +1178,7 @@ var File_v1_org_policy_service_proto protoreflect.FileDescriptorconst file_v1_org_policy_service_proto_rawDesc = "" +"\n" +- "\x1bv1/org_policy_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\"\xa9\x01\n" ++ "\x1bv1/org_policy_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\x1a\x14v1/review_rule.proto\"\xa9\x01\n" +"\x13CreatePolicyRequest\x123\n" +"\x06parent\x18\x01 \x01(\tB\x1b\xe0A\x02\xfaA\x15\x12\x13bytebase.com/PolicyR\x06parent\x120\n" +"\x06policy\x18\x02 \x01(\v2\x13.bytebase.v1.PolicyB\x03\xe0A\x02R\x06policy\x12+\n" +@@ -1126,7 +1201,7 @@ const file_v1_org_policy_service_proto_rawDesc = "" +"\fshow_deleted\x18\x03 \x01(\bR\vshowDeletedB\x0e\n" +"\f_policy_type\"G\n" +"\x14ListPoliciesResponse\x12/\n" +- "\bpolicies\x18\x01 \x03(\v2\x13.bytebase.v1.PolicyR\bpolicies\"\x85\x06\n" ++ "\bpolicies\x18\x01 \x03(\v2\x13.bytebase.v1.PolicyR\bpolicies\"\xd4\x06\n" +"\x06Policy\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12.\n" +"\x13inherit_from_parent\x18\x02 \x01(\bR\x11inheritFromParent\x12+\n" +@@ -1136,12 +1211,15 @@ const file_v1_org_policy_service_proto_rawDesc = "" +"\x18masking_exemption_policy\x18\x06 \x01(\v2#.bytebase.v1.MaskingExemptionPolicyH\x00R\x16maskingExemptionPolicy\x127\n" +"\n" +"tag_policy\x18\a \x01(\v2\x16.bytebase.v1.TagPolicyH\x00R\ttagPolicy\x12J\n" +- "\x11query_data_policy\x18\t \x01(\v2\x1c.bytebase.v1.QueryDataPolicyH\x00R\x0fqueryDataPolicy\x12\x18\n" ++ "\x11query_data_policy\x18\t \x01(\v2\x1c.bytebase.v1.QueryDataPolicyH\x00R\x0fqueryDataPolicy\x12M\n" ++ "\x12review_rule_policy\x18\f \x01(\v2\x1d.bytebase.v1.ReviewRulePolicyH\x00R\x10reviewRulePolicy\x12\x18\n" +"\aenforce\x18\n" +" \x01(\bR\aenforce\x12I\n" +"\rresource_type\x18\v \x01(\x0e2\x1f.bytebase.v1.PolicyResourceTypeB\x03\xe0A\x03R\fresourceType:\x97\x01\xeaA\x93\x01\n" +"\x13bytebase.com/Policy\x12(workspaces/{workspace}/policies/{policy}\x12$projects/{project}/policies/{policy}\x12,environments/{environment}/policies/{policy}B\b\n" +- "\x06policyJ\x04\b\b\x10\t\"C\n" ++ "\x06policyJ\x04\b\b\x10\t\"F\n" ++ "\x10ReviewRulePolicy\x122\n" ++ "\x05rules\x18\x01 \x03(\x0e2\x1c.bytebase.v1.ReviewRule.TypeR\x05rules\"C\n" +"\rRolloutPolicy\x12\x1c\n" +"\tautomatic\x18\x01 \x01(\bR\tautomatic\x12\x14\n" +"\x05roles\x18\x02 \x03(\tR\x05roles\"\xcb\x01\n" +@@ -1167,7 +1245,7 @@ const file_v1_org_policy_service_proto_rawDesc = "" +"\x04tags\x18\x01 \x03(\v2 .bytebase.v1.TagPolicy.TagsEntryR\x04tags\x1a7\n" +"\tTagsEntry\x12\x10\n" +"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01*\x85\x01\n" ++ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01*\x96\x01\n" +"\n" +"PolicyType\x12\x1b\n" +"\x17POLICY_TYPE_UNSPECIFIED\x10\x00\x12\x10\n" +@@ -1176,7 +1254,8 @@ const file_v1_org_policy_service_proto_rawDesc = "" +"\x0eROLLOUT_POLICY\x10\x03\x12\a\n" +"\x03TAG\x10\x04\x12\x0e\n" +"\n" +- "DATA_QUERY\x10\x06\"\x04\b\x05\x10\x05*`\n" ++ "DATA_QUERY\x10\x06\x12\x0f\n" ++ "\vREVIEW_RULE\x10\a\"\x04\b\x05\x10\x05*`\n" +"\x12PolicyResourceType\x12\x1d\n" +"\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\r\n" +"\tWORKSPACE\x10\x01\x12\x0f\n" +@@ -1204,7 +1283,7 @@ func file_v1_org_policy_service_proto_rawDescGZIP() []byte {}var file_v1_org_policy_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)-var file_v1_org_policy_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15)+var file_v1_org_policy_service_proto_msgTypes = make([]protoimpl.MessageInfo, 16)var file_v1_org_policy_service_proto_goTypes = []any{(PolicyType)(0), // 0: bytebase.v1.PolicyType(PolicyResourceType)(0), // 1: bytebase.v1.PolicyResourceType@@ -1215,52 +1294,56 @@ var file_v1_org_policy_service_proto_goTypes = []any{(*ListPoliciesRequest)(nil), // 6: bytebase.v1.ListPoliciesRequest(*ListPoliciesResponse)(nil), // 7: bytebase.v1.ListPoliciesResponse(*Policy)(nil), // 8: bytebase.v1.Policy- (*RolloutPolicy)(nil), // 9: bytebase.v1.RolloutPolicy- (*QueryDataPolicy)(nil), // 10: bytebase.v1.QueryDataPolicy- (*MaskingExemptionPolicy)(nil), // 11: bytebase.v1.MaskingExemptionPolicy- (*MaskingRulePolicy)(nil), // 12: bytebase.v1.MaskingRulePolicy- (*TagPolicy)(nil), // 13: bytebase.v1.TagPolicy- (*MaskingExemptionPolicy_Exemption)(nil), // 14: bytebase.v1.MaskingExemptionPolicy.Exemption- (*MaskingRulePolicy_MaskingRule)(nil), // 15: bytebase.v1.MaskingRulePolicy.MaskingRule- nil, // 16: bytebase.v1.TagPolicy.TagsEntry- (*fieldmaskpb.FieldMask)(nil), // 17: google.protobuf.FieldMask- (*expr.Expr)(nil), // 18: google.type.Expr- (*emptypb.Empty)(nil), // 19: google.protobuf.Empty+ (*ReviewRulePolicy)(nil), // 9: bytebase.v1.ReviewRulePolicy+ (*RolloutPolicy)(nil), // 10: bytebase.v1.RolloutPolicy+ (*QueryDataPolicy)(nil), // 11: bytebase.v1.QueryDataPolicy+ (*MaskingExemptionPolicy)(nil), // 12: bytebase.v1.MaskingExemptionPolicy+ (*MaskingRulePolicy)(nil), // 13: bytebase.v1.MaskingRulePolicy+ (*TagPolicy)(nil), // 14: bytebase.v1.TagPolicy+ (*MaskingExemptionPolicy_Exemption)(nil), // 15: bytebase.v1.MaskingExemptionPolicy.Exemption+ (*MaskingRulePolicy_MaskingRule)(nil), // 16: bytebase.v1.MaskingRulePolicy.MaskingRule+ nil, // 17: bytebase.v1.TagPolicy.TagsEntry+ (*fieldmaskpb.FieldMask)(nil), // 18: google.protobuf.FieldMask+ (ReviewRule_Type)(0), // 19: bytebase.v1.ReviewRule.Type+ (*expr.Expr)(nil), // 20: google.type.Expr+ (*emptypb.Empty)(nil), // 21: google.protobuf.Empty}var file_v1_org_policy_service_proto_depIdxs = []int32{8, // 0: bytebase.v1.CreatePolicyRequest.policy:type_name -> bytebase.v1.Policy0, // 1: bytebase.v1.CreatePolicyRequest.type:type_name -> bytebase.v1.PolicyType8, // 2: bytebase.v1.UpdatePolicyRequest.policy:type_name -> bytebase.v1.Policy- 17, // 3: bytebase.v1.UpdatePolicyRequest.update_mask:type_name -> google.protobuf.FieldMask+ 18, // 3: bytebase.v1.UpdatePolicyRequest.update_mask:type_name -> google.protobuf.FieldMask0, // 4: bytebase.v1.ListPoliciesRequest.policy_type:type_name -> bytebase.v1.PolicyType8, // 5: bytebase.v1.ListPoliciesResponse.policies:type_name -> bytebase.v1.Policy0, // 6: bytebase.v1.Policy.type:type_name -> bytebase.v1.PolicyType- 9, // 7: bytebase.v1.Policy.rollout_policy:type_name -> bytebase.v1.RolloutPolicy- 12, // 8: bytebase.v1.Policy.masking_rule_policy:type_name -> bytebase.v1.MaskingRulePolicy- 11, // 9: bytebase.v1.Policy.masking_exemption_policy:type_name -> bytebase.v1.MaskingExemptionPolicy- 13, // 10: bytebase.v1.Policy.tag_policy:type_name -> bytebase.v1.TagPolicy- 10, // 11: bytebase.v1.Policy.query_data_policy:type_name -> bytebase.v1.QueryDataPolicy- 1, // 12: bytebase.v1.Policy.resource_type:type_name -> bytebase.v1.PolicyResourceType- 14, // 13: bytebase.v1.MaskingExemptionPolicy.exemptions:type_name -> bytebase.v1.MaskingExemptionPolicy.Exemption- 15, // 14: bytebase.v1.MaskingRulePolicy.rules:type_name -> bytebase.v1.MaskingRulePolicy.MaskingRule- 16, // 15: bytebase.v1.TagPolicy.tags:type_name -> bytebase.v1.TagPolicy.TagsEntry- 18, // 16: bytebase.v1.MaskingExemptionPolicy.Exemption.condition:type_name -> google.type.Expr- 18, // 17: bytebase.v1.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr- 5, // 18: bytebase.v1.OrgPolicyService.GetPolicy:input_type -> bytebase.v1.GetPolicyRequest- 6, // 19: bytebase.v1.OrgPolicyService.ListPolicies:input_type -> bytebase.v1.ListPoliciesRequest- 2, // 20: bytebase.v1.OrgPolicyService.CreatePolicy:input_type -> bytebase.v1.CreatePolicyRequest- 3, // 21: bytebase.v1.OrgPolicyService.UpdatePolicy:input_type -> bytebase.v1.UpdatePolicyRequest- 4, // 22: bytebase.v1.OrgPolicyService.DeletePolicy:input_type -> bytebase.v1.DeletePolicyRequest- 8, // 23: bytebase.v1.OrgPolicyService.GetPolicy:output_type -> bytebase.v1.Policy- 7, // 24: bytebase.v1.OrgPolicyService.ListPolicies:output_type -> bytebase.v1.ListPoliciesResponse- 8, // 25: bytebase.v1.OrgPolicyService.CreatePolicy:output_type -> bytebase.v1.Policy- 8, // 26: bytebase.v1.OrgPolicyService.UpdatePolicy:output_type -> bytebase.v1.Policy- 19, // 27: bytebase.v1.OrgPolicyService.DeletePolicy:output_type -> google.protobuf.Empty- 23, // [23:28] is the sub-list for method output_type- 18, // [18:23] is the sub-list for method input_type- 18, // [18:18] is the sub-list for extension type_name- 18, // [18:18] is the sub-list for extension extendee- 0, // [0:18] is the sub-list for field type_name+ 10, // 7: bytebase.v1.Policy.rollout_policy:type_name -> bytebase.v1.RolloutPolicy+ 13, // 8: bytebase.v1.Policy.masking_rule_policy:type_name -> bytebase.v1.MaskingRulePolicy+ 12, // 9: bytebase.v1.Policy.masking_exemption_policy:type_name -> bytebase.v1.MaskingExemptionPolicy+ 14, // 10: bytebase.v1.Policy.tag_policy:type_name -> bytebase.v1.TagPolicy+ 11, // 11: bytebase.v1.Policy.query_data_policy:type_name -> bytebase.v1.QueryDataPolicy+ 9, // 12: bytebase.v1.Policy.review_rule_policy:type_name -> bytebase.v1.ReviewRulePolicy+ 1, // 13: bytebase.v1.Policy.resource_type:type_name -> bytebase.v1.PolicyResourceType+ 19, // 14: bytebase.v1.ReviewRulePolicy.rules:type_name -> bytebase.v1.ReviewRule.Type+ 15, // 15: bytebase.v1.MaskingExemptionPolicy.exemptions:type_name -> bytebase.v1.MaskingExemptionPolicy.Exemption+ 16, // 16: bytebase.v1.MaskingRulePolicy.rules:type_name -> bytebase.v1.MaskingRulePolicy.MaskingRule+ 17, // 17: bytebase.v1.TagPolicy.tags:type_name -> bytebase.v1.TagPolicy.TagsEntry+ 20, // 18: bytebase.v1.MaskingExemptionPolicy.Exemption.condition:type_name -> google.type.Expr+ 20, // 19: bytebase.v1.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr+ 5, // 20: bytebase.v1.OrgPolicyService.GetPolicy:input_type -> bytebase.v1.GetPolicyRequest+ 6, // 21: bytebase.v1.OrgPolicyService.ListPolicies:input_type -> bytebase.v1.ListPoliciesRequest+ 2, // 22: bytebase.v1.OrgPolicyService.CreatePolicy:input_type -> bytebase.v1.CreatePolicyRequest+ 3, // 23: bytebase.v1.OrgPolicyService.UpdatePolicy:input_type -> bytebase.v1.UpdatePolicyRequest+ 4, // 24: bytebase.v1.OrgPolicyService.DeletePolicy:input_type -> bytebase.v1.DeletePolicyRequest+ 8, // 25: bytebase.v1.OrgPolicyService.GetPolicy:output_type -> bytebase.v1.Policy+ 7, // 26: bytebase.v1.OrgPolicyService.ListPolicies:output_type -> bytebase.v1.ListPoliciesResponse+ 8, // 27: bytebase.v1.OrgPolicyService.CreatePolicy:output_type -> bytebase.v1.Policy+ 8, // 28: bytebase.v1.OrgPolicyService.UpdatePolicy:output_type -> bytebase.v1.Policy+ 21, // 29: bytebase.v1.OrgPolicyService.DeletePolicy:output_type -> google.protobuf.Empty+ 25, // [25:30] is the sub-list for method output_type+ 20, // [20:25] is the sub-list for method input_type+ 20, // [20:20] is the sub-list for extension type_name+ 20, // [20:20] is the sub-list for extension extendee+ 0, // [0:20] is the sub-list for field type_name}func init() { file_v1_org_policy_service_proto_init() }@@ -1269,6 +1352,7 @@ func file_v1_org_policy_service_proto_init() {return}file_v1_annotation_proto_init()+ file_v1_review_rule_proto_init()file_v1_org_policy_service_proto_msgTypes[4].OneofWrappers = []any{}file_v1_org_policy_service_proto_msgTypes[6].OneofWrappers = []any{(*Policy_RolloutPolicy)(nil),@@ -1276,6 +1360,7 @@ func file_v1_org_policy_service_proto_init() {(*Policy_MaskingExemptionPolicy)(nil),(*Policy_TagPolicy)(nil),(*Policy_QueryDataPolicy)(nil),+ (*Policy_ReviewRulePolicy)(nil),}type x struct{}out := protoimpl.TypeBuilder{@@ -1283,7 +1368,7 @@ func file_v1_org_policy_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_org_policy_service_proto_rawDesc), len(file_v1_org_policy_service_proto_rawDesc)),NumEnums: 2,- NumMessages: 15,+ NumMessages: 16,NumExtensions: 0,NumServices: 1,},diff --git a/backend/generated-go/v1/org_policy_service_equal.pb.go b/backend/generated-go/v1/org_policy_service_equal.pb.goindex 1c7369fb67..62fb144cf2 100644--- a/backend/generated-go/v1/org_policy_service_equal.pb.go+++ b/backend/generated-go/v1/org_policy_service_equal.pb.go@@ -145,6 +145,9 @@ func (x *Policy) Equal(y *Policy) bool {if !x.GetQueryDataPolicy().Equal(y.GetQueryDataPolicy()) {return false}+ if !x.GetReviewRulePolicy().Equal(y.GetReviewRulePolicy()) {+ return false+ }if x.Enforce != y.Enforce {return false}@@ -154,6 +157,24 @@ func (x *Policy) Equal(y *Policy) bool {return true}+func (x *ReviewRulePolicy) Equal(y *ReviewRulePolicy) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if len(x.Rules) != len(y.Rules) {+ return false+ }+ for i := 0; i < len(x.Rules); i++ {+ if x.Rules[i] != y.Rules[i] {+ return false+ }+ }+ return true+}+func (x *RolloutPolicy) Equal(y *RolloutPolicy) bool {if x == y {return truediff --git a/backend/generated-go/v1/review_rule.pb.go b/backend/generated-go/v1/review_rule.pb.gonew file mode 100644index 0000000000..70ff6b22b9--- /dev/null+++ b/backend/generated-go/v1/review_rule.pb.go@@ -0,0 +1,233 @@+// Code generated by protoc-gen-go. DO NOT EDIT.+// versions:+// protoc-gen-go v1.36.12+// protoc (unknown)+// source: v1/review_rule.proto++package v1++import (+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"+ reflect "reflect"+ sync "sync"+ unsafe "unsafe"+)++const (+ // Verify that this generated code is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)+ // Verify that runtime/protoimpl is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)+)++type ReviewRule_Type int32++const (+ ReviewRule_TYPE_UNSPECIFIED ReviewRule_Type = 0+ // P0: the statements do not parse for the target engine.+ ReviewRule_SYNTAX ReviewRule_Type = 1+ // P0: applying the statements to the synced schema fails: a missing+ // table or column, a duplicate object, or an invalid reference.+ ReviewRule_WALK_THROUGH ReviewRule_Type = 2+ // P0: the change requests online migration but is not eligible.+ ReviewRule_ONLINE_MIGRATION ReviewRule_Type = 3+ // P0: the change enables prior backup but the backup cannot be taken.+ ReviewRule_PRIOR_BACKUP ReviewRule_Type = 4+ // P0: = NULL or <> NULL in a predicate, which is always false. Test for+ // NULL with IS NULL or IS NOT NULL.+ ReviewRule_REQUIRE_IS_NULL ReviewRule_Type = 5+ // P1: UPDATE or DELETE without WHERE.+ ReviewRule_REQUIRE_WHERE ReviewRule_Type = 6+ // P1: DROP TABLE, COLUMN, SCHEMA, or DATABASE.+ ReviewRule_DISALLOW_DROP_OBJECT ReviewRule_Type = 7+ // P1: TRUNCATE.+ ReviewRule_DISALLOW_TRUNCATE ReviewRule_Type = 8+ // P1: dropping a PRIMARY KEY, FOREIGN KEY, UNIQUE, or CHECK constraint.+ ReviewRule_DISALLOW_DROP_CONSTRAINT ReviewRule_Type = 9+ // P1: renaming a table or column.+ ReviewRule_DISALLOW_RENAME ReviewRule_Type = 10+ // P1: a table still has no primary key at the end of the change.+ ReviewRule_REQUIRE_PRIMARY_KEY ReviewRule_Type = 11+)++// Enum value maps for ReviewRule_Type.+var (+ ReviewRule_Type_name = map[int32]string{+ 0: "TYPE_UNSPECIFIED",+ 1: "SYNTAX",+ 2: "WALK_THROUGH",+ 3: "ONLINE_MIGRATION",+ 4: "PRIOR_BACKUP",+ 5: "REQUIRE_IS_NULL",+ 6: "REQUIRE_WHERE",+ 7: "DISALLOW_DROP_OBJECT",+ 8: "DISALLOW_TRUNCATE",+ 9: "DISALLOW_DROP_CONSTRAINT",+ 10: "DISALLOW_RENAME",+ 11: "REQUIRE_PRIMARY_KEY",+ }+ ReviewRule_Type_value = map[string]int32{+ "TYPE_UNSPECIFIED": 0,+ "SYNTAX": 1,+ "WALK_THROUGH": 2,+ "ONLINE_MIGRATION": 3,+ "PRIOR_BACKUP": 4,+ "REQUIRE_IS_NULL": 5,+ "REQUIRE_WHERE": 6,+ "DISALLOW_DROP_OBJECT": 7,+ "DISALLOW_TRUNCATE": 8,+ "DISALLOW_DROP_CONSTRAINT": 9,+ "DISALLOW_RENAME": 10,+ "REQUIRE_PRIMARY_KEY": 11,+ }+)++func (x ReviewRule_Type) Enum() *ReviewRule_Type {+ p := new(ReviewRule_Type)+ *p = x+ return p+}++func (x ReviewRule_Type) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (ReviewRule_Type) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_review_rule_proto_enumTypes[0].Descriptor()+}++func (ReviewRule_Type) Type() protoreflect.EnumType {+ return &file_v1_review_rule_proto_enumTypes[0]+}++func (x ReviewRule_Type) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use ReviewRule_Type.Descriptor instead.+func (ReviewRule_Type) EnumDescriptor() ([]byte, []int) {+ return file_v1_review_rule_proto_rawDescGZIP(), []int{0, 0}+}++// ReviewRule holds the standard review rule set. The rules are fixed: every+// project gets them without configuration, and the only setting is a switch+// (see ReviewRulePolicy).+//+// A rule id names what the rule examines. An execution check is named for+// what it checks; a rule about the SQL itself carries REQUIRE or DISALLOW so+// the id says which way it cuts. DISALLOW on a P1 rule means the operation+// needs a person's acceptance, not that it is forbidden.+//+// The enum is nested so its values stay flat: bytebase.v1 already has+// top-level TRUNCATE and RENAME values.+type ReviewRule struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ReviewRule) Reset() {+ *x = ReviewRule{}+ mi := &file_v1_review_rule_proto_msgTypes[0]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ReviewRule) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ReviewRule) ProtoMessage() {}++func (x *ReviewRule) ProtoReflect() protoreflect.Message {+ mi := &file_v1_review_rule_proto_msgTypes[0]+ 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 ReviewRule.ProtoReflect.Descriptor instead.+func (*ReviewRule) Descriptor() ([]byte, []int) {+ return file_v1_review_rule_proto_rawDescGZIP(), []int{0}+}++var File_v1_review_rule_proto protoreflect.FileDescriptor++const file_v1_review_rule_proto_rawDesc = "" ++ "\n" ++ "\x14v1/review_rule.proto\x12\vbytebase.v1\"\x96\x02\n" ++ "\n" ++ "ReviewRule\"\x87\x02\n" ++ "\x04Type\x12\x14\n" ++ "\x10TYPE_UNSPECIFIED\x10\x00\x12\n" ++ "\n" ++ "\x06SYNTAX\x10\x01\x12\x10\n" ++ "\fWALK_THROUGH\x10\x02\x12\x14\n" ++ "\x10ONLINE_MIGRATION\x10\x03\x12\x10\n" ++ "\fPRIOR_BACKUP\x10\x04\x12\x13\n" ++ "\x0fREQUIRE_IS_NULL\x10\x05\x12\x11\n" ++ "\rREQUIRE_WHERE\x10\x06\x12\x18\n" ++ "\x14DISALLOW_DROP_OBJECT\x10\a\x12\x15\n" ++ "\x11DISALLOW_TRUNCATE\x10\b\x12\x1c\n" ++ "\x18DISALLOW_DROP_CONSTRAINT\x10\t\x12\x13\n" ++ "\x0fDISALLOW_RENAME\x10\n" ++ "\x12\x17\n" ++ "\x13REQUIRE_PRIMARY_KEY\x10\vB\xa5\x01\n" ++ "\x0fcom.bytebase.v1B\x0fReviewRuleProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"++var (+ file_v1_review_rule_proto_rawDescOnce sync.Once+ file_v1_review_rule_proto_rawDescData []byte+)++func file_v1_review_rule_proto_rawDescGZIP() []byte {+ file_v1_review_rule_proto_rawDescOnce.Do(func() {+ file_v1_review_rule_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_v1_review_rule_proto_rawDesc), len(file_v1_review_rule_proto_rawDesc)))+ })+ return file_v1_review_rule_proto_rawDescData+}++var file_v1_review_rule_proto_enumTypes = make([]protoimpl.EnumInfo, 1)+var file_v1_review_rule_proto_msgTypes = make([]protoimpl.MessageInfo, 1)+var file_v1_review_rule_proto_goTypes = []any{+ (ReviewRule_Type)(0), // 0: bytebase.v1.ReviewRule.Type+ (*ReviewRule)(nil), // 1: bytebase.v1.ReviewRule+}+var file_v1_review_rule_proto_depIdxs = []int32{+ 0, // [0:0] is the sub-list for method output_type+ 0, // [0:0] is the sub-list for method input_type+ 0, // [0:0] is the sub-list for extension type_name+ 0, // [0:0] is the sub-list for extension extendee+ 0, // [0:0] is the sub-list for field type_name+}++func init() { file_v1_review_rule_proto_init() }+func file_v1_review_rule_proto_init() {+ if File_v1_review_rule_proto != nil {+ return+ }+ type x struct{}+ out := protoimpl.TypeBuilder{+ File: protoimpl.DescBuilder{+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_review_rule_proto_rawDesc), len(file_v1_review_rule_proto_rawDesc)),+ NumEnums: 1,+ NumMessages: 1,+ NumExtensions: 0,+ NumServices: 0,+ },+ GoTypes: file_v1_review_rule_proto_goTypes,+ DependencyIndexes: file_v1_review_rule_proto_depIdxs,+ EnumInfos: file_v1_review_rule_proto_enumTypes,+ MessageInfos: file_v1_review_rule_proto_msgTypes,+ }.Build()+ File_v1_review_rule_proto = out.File+ file_v1_review_rule_proto_goTypes = nil+ file_v1_review_rule_proto_depIdxs = nil+}diff --git a/backend/generated-go/v1/review_rule_equal.pb.go b/backend/generated-go/v1/review_rule_equal.pb.gonew file mode 100644index 0000000000..928b97862d--- /dev/null+++ b/backend/generated-go/v1/review_rule_equal.pb.go@@ -0,0 +1,14 @@+// Code generated by protoc-gen-equal-go. DO NOT EDIT.+// source: v1/review_rule.proto++package v1++func (x *ReviewRule) Equal(y *ReviewRule) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ return true+}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 15542fdb82..e8ec4b9c00 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@@ -7,6 +7,7 @@ import type { Message } from "@bufbuild/protobuf";import type { Duration, FieldMask, Timestamp } from "@bufbuild/protobuf/wkt";import type { ApprovalStatus, IssueStatus, Position, RiskLevel } from "./common_pb";import type { Expr } from "../google/type/expr_pb";+import type { ReviewRule_Type } from "./review_rule_pb";import type { Plan_Spec } from "./plan_service_pb";/**@@ -1004,6 +1005,14 @@ export declare type IssueComment = Message<"bytebase.v1.IssueComment"> & {*/statementAnchor?: StatementAnchor | undefined;+ /**+ * Present on review results, the comments the review executor posts.+ * Never accepted on create or update.+ *+ * @generated from field: bytebase.v1.IssueComment.ReviewMetadata review_metadata = 17;+ */+ reviewMetadata?: IssueComment_ReviewMetadata | undefined;+/*** The event associated with this comment.*@@ -1050,6 +1059,84 @@ export declare type IssueComment = Message<"bytebase.v1.IssueComment"> & {*/export declare const IssueCommentSchema: GenMessage<IssueComment>;+/**+ * What a review result carries beyond its text.+ *+ * @generated from message bytebase.v1.IssueComment.ReviewMetadata+ */+export declare type IssueComment_ReviewMetadata = Message<"bytebase.v1.IssueComment.ReviewMetadata"> & {+ /**+ * The reviewer that posted the result.+ *+ * @generated from field: bytebase.v1.ReviewRun.Type type = 1;+ */+ type: ReviewRun_Type;++ /**+ * The rule judged against. Set if and only if type is RULE.+ *+ * @generated from field: bytebase.v1.ReviewRule.Type rule = 2;+ */+ rule: ReviewRule_Type;++ /**+ * @generated from field: bytebase.v1.IssueComment.ReviewMetadata.Priority priority = 3;+ */+ priority: IssueComment_ReviewMetadata_Priority;++ /**+ * Every database the result applies to, sorted.+ * Format: instances/{instance}/databases/{database}+ *+ * @generated from field: repeated string targets = 4;+ */+ targets: string[];+};++/**+ * Describes the message bytebase.v1.IssueComment.ReviewMetadata.+ * Use `create(IssueComment_ReviewMetadataSchema)` to create a new message.+ */+export declare const IssueComment_ReviewMetadataSchema: GenMessage<IssueComment_ReviewMetadata>;++/**+ * @generated from enum bytebase.v1.IssueComment.ReviewMetadata.Priority+ */+export enum IssueComment_ReviewMetadata_Priority {+ /**+ * Blocks like any other open thread.+ *+ * @generated from enum value: PRIORITY_UNSPECIFIED = 0;+ */+ PRIORITY_UNSPECIFIED = 0,++ /**+ * The SQL is wrong and must change.+ *+ * @generated from enum value: P0 = 1;+ */+ P0 = 1,++ /**+ * Dangerous but legitimate; a person must accept it.+ *+ * @generated from enum value: P1 = 2;+ */+ P1 = 2,++ /**+ * Advisory. Posted without thread state, so it never blocks.+ *+ * @generated from enum value: P2 = 3;+ */+ P2 = 3,+}++/**+ * Describes the enum bytebase.v1.IssueComment.ReviewMetadata.Priority.+ */+export declare const IssueComment_ReviewMetadata_PrioritySchema: GenEnum<IssueComment_ReviewMetadata_Priority>;+/*** Approval event information.*diff --git a/frontend/src/types/proto-es/v1/issue_service_pb.js b/frontend/src/types/proto-es/v1/issue_service_pb.jsindex e1043b927b..4d10179ac4 100644--- a/frontend/src/types/proto-es/v1/issue_service_pb.js+++ b/frontend/src/types/proto-es/v1/issue_service_pb.js@@ -13,12 +13,13 @@ import { file_google_type_expr } from "../google/type/expr_pb";import { file_v1_annotation } from "./annotation_pb";import { file_v1_common } from "./common_pb";import { file_v1_plan_service } from "./plan_service_pb";+import { file_v1_review_rule } from "./review_rule_pb";/*** Describes the file v1/issue_service.proto.*/export const file_v1_issue_service = /*@__PURE__*/- fileDesc("ChZ2MS9pc3N1ZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJKCg9HZXRJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDQoFZm9yY2UYAiABKAgiagoSQ3JlYXRlSXNzdWVSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBImCgVpc3N1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLklzc3VlQgPgQQIimQEKEUxpc3RJc3N1ZXNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkSEAoIb3JkZXJfYnkYBiABKAkiUQoSTGlzdElzc3Vlc1Jlc3BvbnNlEiIKBmlzc3VlcxgBIAMoCzISLmJ5dGViYXNlLnYxLklzc3VlEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSKCAQoTU2VhcmNoSXNzdWVzUmVxdWVzdBITCgZwYXJlbnQYASABKAlCA+BBAhIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkSEAoIb3JkZXJfYnkYBiABKAkiUwoUU2VhcmNoSXNzdWVzUmVzcG9uc2USIgoGaXNzdWVzGAEgAygLMhIuYn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EuUmVqZWN0SXNzdWVSZXF1ZXN0GhIuYnl0ZWJhc2UudjEuSXNzdWUiQJDqMAKY6jABoOowA6jqMAiC0+STAio6ASoiJS92MS97bmFtZT1wcm9qZWN0cy8qL2lzc3Vlcy8qfTpyZWplY3QSgwEKDFJlcXVlc3RJc3N1ZRIgLmJ5dGViYXNlLnYxLlJlcXVlc3RJc3N1ZVJlcXVlc3QaEi5ieXRlYmFzZS52MS5Jc3N1ZSI9kOowApjqMAGg6jACgtPkkwIrOgEqIiYvdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKn06cmVxdWVzdBKZAQoSUmV0cnlJc3N1ZUFwcHJvdmFsEiYuYnl0ZWJhc2UudjEuUmV0cnlJc3N1ZUFwcHJvdmFsUmVxdWVzdBoSLmJ5dGViYXNlLnYxLklzc3VlIkeQ6jACmOowAaDqMAOo6jAIgtPkkwIxOgEqIiwvdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKn06cmV0cnlBcHByb3ZhbBKmAQoJUnVuUmV2aWV3Eh0uYnl0ZWJhc2UudjEuUnVuUmV2aWV3UmVxdWVzdBoWLmJ5dGViYXNlLnYxLlJldmlld1J1biJi2kEEbmFtZYrqMBFiYi5yZXZpZXdSdW5zLnJ1bpDqMAGY6jABoOowAoLT5JMCNDoBKiIvL3YxL3tuYW1lPXByb2plY3RzLyovaXNzdWVzLyovcmV2aWV3UnVucy8qfTpydW5CpwEKD2NvbS5ieXRlYmFzZS52MUIRSXNzdWVTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, 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, file_v1_common, file_v1_plan_service]);+ fileDesc("ChZ2MS9pc3N1ZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJKCg9HZXRJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDQoFZm9yY2UYAiABKAgiagoSQ3JlYXRlSXNzdWVSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBImCgVpc3N1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLklzc3VlQgPgQQIimQEKEUxpc3RJc3N1ZXNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkSEAoIb3JkZXJfYnkYBiABKAkiUQoSTGlzdElzc3Vlc1Jlc3BvbnNlEiIKBmlzc3VlcxgBIAMoCzISLmJ5dGViYXNlLnYxLklzc3VlEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSKCAQoTU2VhcmNoSXNzdWVzUmVxdWVzdBITCgZwYXJlbnQYASABKAlCA+BBAhIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkSEAoIb3JkZXJfYnkYBiABKAkiUwoUU2VhcmNoSXNzdWVzUmVzcG9uc2USIgoGaXNzdWVzGAEgAygLMhIuYnl0ZWJhc2UudjEuSXNzdWUSFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIqABChJVcGRhdGVJc3N1ZVJlcXVlc3QSPQoFaXNzdWUYASABKAsyEi5ieXRlYmFzZS52MS5Jc3N1ZUIa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c3N1ZVNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, 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, file_v1_common, file_v1_plan_service, file_v1_review_rule]);/*** Describes the message bytebase.v1.GetIssueRequest.@@ -209,18 +210,37 @@ export const UpdateIssueCommentRequestSchema = /*@__PURE__*/export const IssueCommentSchema = /*@__PURE__*/messageDesc(file_v1_issue_service, 21);+/**+ * Describes the message bytebase.v1.IssueComment.ReviewMetadata.+ * Use `create(IssueComment_ReviewMetadataSchema)` to create a new message.+ */+export const IssueComment_ReviewMetadataSchema = /*@__PURE__*/+ messageDesc(file_v1_issue_service, 21, 0);++/**+ * Describes the enum bytebase.v1.IssueComment.ReviewMetadata.Priority.+ */+export const IssueComment_ReviewMetadata_PrioritySchema = /*@__PURE__*/+ enumDesc(file_v1_issue_service, 21, 0, 0);++/**+ * @generated from enum bytebase.v1.IssueComment.ReviewMetadata.Priority+ */+export const IssueComment_ReviewMetadata_Priority = /*@__PURE__*/+ tsEnum(IssueComment_ReviewMetadata_PrioritySchema);+/*** 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, 21, 0);+ messageDesc(file_v1_issue_service, 21, 1);/*** Describes the enum bytebase.v1.IssueComment.Approval.Status.*/export const IssueComment_Approval_StatusSchema = /*@__PURE__*/- enumDesc(file_v1_issue_service, 21, 0, 0);+ enumDesc(file_v1_issue_service, 21, 1, 0);/*** Approval status values.@@ -235,21 +255,21 @@ 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, 21, 1);+ messageDesc(file_v1_issue_service, 21, 2);/*** Describes the message bytebase.v1.IssueComment.ReviewSubmission.* Use `create(IssueComment_ReviewSubmissionSchema)` to create a new message.*/export const IssueComment_ReviewSubmissionSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 21, 2);+ messageDesc(file_v1_issue_service, 21, 3);/*** Describes the message bytebase.v1.IssueComment.PlanUpdate.* Use `create(IssueComment_PlanUpdateSchema)` to create a new message.*/export const IssueComment_PlanUpdateSchema = /*@__PURE__*/- messageDesc(file_v1_issue_service, 21, 3);+ messageDesc(file_v1_issue_service, 21, 4);/*** Describes the enum bytebase.v1.IssueComment.ThreadState.diff --git a/frontend/src/types/proto-es/v1/org_policy_service_pb.d.ts b/frontend/src/types/proto-es/v1/org_policy_service_pb.d.tsindex 376ec985fe..3256243e42 100644--- a/frontend/src/types/proto-es/v1/org_policy_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/org_policy_service_pb.d.ts@@ -5,6 +5,7 @@import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";import type { Message } from "@bufbuild/protobuf";import type { EmptySchema, FieldMask } from "@bufbuild/protobuf/wkt";+import type { ReviewRule_Type } from "./review_rule_pb";import type { Expr } from "../google/type/expr_pb";/**@@ -238,6 +239,12 @@ export declare type Policy = Message<"bytebase.v1.Policy"> & {*/value: QueryDataPolicy;case: "queryDataPolicy";+ } | {+ /**+ * @generated from field: bytebase.v1.ReviewRulePolicy review_rule_policy = 12;+ */+ value: ReviewRulePolicy;+ case: "reviewRulePolicy";} | { case: undefined; value?: undefined };/**@@ -261,6 +268,35 @@ export declare type Policy = Message<"bytebase.v1.Policy"> & {*/export declare const PolicySchema: GenMessage<Policy>;+/**+ * Standard review rule policy: the rules switched on, at two levels.+ *+ * On a project it is the project's switch: the rules on there. Absent policy+ * means every rule. On the workspace it is a lock: the rules on in every+ * project, which projects cannot switch off. Absent policy means none. The+ * effective set for a project is the union of the two.+ *+ * A saved project list is explicit, so a rule added to the standard set in a+ * later release is appended to every saved project policy by a data+ * migration in that release.+ *+ * @generated from message bytebase.v1.ReviewRulePolicy+ */+export declare type ReviewRulePolicy = Message<"bytebase.v1.ReviewRulePolicy"> & {+ /**+ * The rules switched on. Unknown or unspecified values are rejected.+ *+ * @generated from field: repeated bytebase.v1.ReviewRule.Type rules = 1;+ */+ rules: ReviewRule_Type[];+};++/**+ * Describes the message bytebase.v1.ReviewRulePolicy.+ * Use `create(ReviewRulePolicySchema)` to create a new message.+ */+export declare const ReviewRulePolicySchema: GenMessage<ReviewRulePolicy>;+/*** Rollout policy configuration.*@@ -545,6 +581,13 @@ export enum PolicyType {* @generated from enum value: DATA_QUERY = 6;*/DATA_QUERY = 6,++ /**+ * Standard review rule switch. Allowed on WORKSPACE and PROJECT.+ *+ * @generated from enum value: REVIEW_RULE = 7;+ */+ REVIEW_RULE = 7,}/**diff --git a/frontend/src/types/proto-es/v1/org_policy_service_pb.js b/frontend/src/types/proto-es/v1/org_policy_service_pb.jsindex d24defa7c9..4a3c17cacf 100644--- a/frontend/src/types/proto-es/v1/org_policy_service_pb.js+++ b/frontend/src/types/proto-es/v1/org_policy_service_pb.js@@ -10,12 +10,13 @@ import { file_google_api_resource } from "../google/api/resource_pb";import { file_google_protobuf_empty, file_google_protobuf_field_mask } from "@bufbuild/protobuf/wkt";import { file_google_type_expr } from "../google/type/expr_pb";import { file_v1_annotation } from "./annotation_pb";+import { file_v1_review_rule } from "./review_rule_pb";/*** Describes the file v1/org_policy_service.proto.*/export const file_v1_org_policy_service = /*@__PURE__*/- fileDesc("Cht2MS9vcmdfcG9saWN5X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIpMBChNDcmVhdGVQb2xpY3lSZX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MAGg6jAEqOowCYLT5JMCcFoiKiAvdjEve25hbWU9cHJvamVjdHMvKi9wb2xpY2llcy8qfVomKiQvdjEve25hbWU9ZW52aXJvbm1lbnRzLyovcG9saWNpZXMvKn0qIi92MS97bmFtZT13b3Jrc3BhY2VzLyovcG9saWNpZXMvKn1CqwEKD2NvbS5ieXRlYmFzZS52MUIVT3JnUG9saWN5U2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation]);+ fileDesc("Cht2MS9vcmdfcG9saWN5X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIpMBChNDcmVhdGVQb2xpY3lSZXF1ZXN0EisKBnBhcmVudBgBIAEoCUIb4EEC+kEVEhNieXRlYmFzZS5jb20vUG9saWN5EigKBnBvbGljeRgCIAEoCzITLmJ5dGViYXNlLnYxLlBvbGljeUID4EECEiUKBHR5cGUYAyABKA4yFy5ieXRlYmFzZS52MS5Qb2xpY3lUeXBlIocBChNVcGRhdGVQb2xpY3lSZXF1ZXN0EigKBnBvbGljeRgBIAEoCzITLmJ5dGViYXNlLnYxLlBvbGljeUID4EECEi8KC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzaxIVCg1hbGxvd19taXNzaW5nGAMgASgIIkAKE0RlbGV0ZVBvbGljeVJlcXVlc3QSKQoEbmFtZRgBIAEoCUIb4EEC+kEVChNieXRlYmFzZS5jb20vUG9saWN5Ij0KEEdldFBvbGljeVJlcXVlc3QSKQoEbmFtZ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XRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_review_rule]);/*** Describes the message bytebase.v1.CreatePolicyRequest.@@ -66,54 +67,61 @@ export const ListPoliciesResponseSchema = /*@__PURE__*/export const PolicySchema = /*@__PURE__*/messageDesc(file_v1_org_policy_service, 6);+/**+ * Describes the message bytebase.v1.ReviewRulePolicy.+ * Use `create(ReviewRulePolicySchema)` to create a new message.+ */+export const ReviewRulePolicySchema = /*@__PURE__*/+ messageDesc(file_v1_org_policy_service, 7);+/*** Describes the message bytebase.v1.RolloutPolicy.* Use `create(RolloutPolicySchema)` to create a new message.*/export const RolloutPolicySchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 7);+ messageDesc(file_v1_org_policy_service, 8);/*** Describes the message bytebase.v1.QueryDataPolicy.* Use `create(QueryDataPolicySchema)` to create a new message.*/export const QueryDataPolicySchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 8);+ messageDesc(file_v1_org_policy_service, 9);/*** Describes the message bytebase.v1.MaskingExemptionPolicy.* Use `create(MaskingExemptionPolicySchema)` to create a new message.*/export const MaskingExemptionPolicySchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 9);+ messageDesc(file_v1_org_policy_service, 10);/*** Describes the message bytebase.v1.MaskingExemptionPolicy.Exemption.* Use `create(MaskingExemptionPolicy_ExemptionSchema)` to create a new message.*/export const MaskingExemptionPolicy_ExemptionSchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 9, 0);+ messageDesc(file_v1_org_policy_service, 10, 0);/*** Describes the message bytebase.v1.MaskingRulePolicy.* Use `create(MaskingRulePolicySchema)` to create a new message.*/export const MaskingRulePolicySchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 10);+ messageDesc(file_v1_org_policy_service, 11);/*** Describes the message bytebase.v1.MaskingRulePolicy.MaskingRule.* Use `create(MaskingRulePolicy_MaskingRuleSchema)` to create a new message.*/export const MaskingRulePolicy_MaskingRuleSchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 10, 0);+ messageDesc(file_v1_org_policy_service, 11, 0);/*** Describes the message bytebase.v1.TagPolicy.* Use `create(TagPolicySchema)` to create a new message.*/export const TagPolicySchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 11);+ messageDesc(file_v1_org_policy_service, 12);/*** Describes the enum bytebase.v1.PolicyType.diff --git a/frontend/src/types/proto-es/v1/review_rule_pb.d.ts b/frontend/src/types/proto-es/v1/review_rule_pb.d.tsnew file mode 100644index 0000000000..09015877bf--- /dev/null+++ b/frontend/src/types/proto-es/v1/review_rule_pb.d.ts@@ -0,0 +1,130 @@+// @generated by protoc-gen-es v2.12.0+// @generated from file v1/review_rule.proto (package bytebase.v1, syntax proto3)+/* eslint-disable */++import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";+import type { Message } from "@bufbuild/protobuf";++/**+ * Describes the file v1/review_rule.proto.+ */+export declare const file_v1_review_rule: GenFile;++/**+ * ReviewRule holds the standard review rule set. The rules are fixed: every+ * project gets them without configuration, and the only setting is a switch+ * (see ReviewRulePolicy).+ *+ * A rule id names what the rule examines. An execution check is named for+ * what it checks; a rule about the SQL itself carries REQUIRE or DISALLOW so+ * the id says which way it cuts. DISALLOW on a P1 rule means the operation+ * needs a person's acceptance, not that it is forbidden.+ *+ * The enum is nested so its values stay flat: bytebase.v1 already has+ * top-level TRUNCATE and RENAME values.+ *+ * @generated from message bytebase.v1.ReviewRule+ */+export declare type ReviewRule = Message<"bytebase.v1.ReviewRule"> & {+};++/**+ * Describes the message bytebase.v1.ReviewRule.+ * Use `create(ReviewRuleSchema)` to create a new message.+ */+export declare const ReviewRuleSchema: GenMessage<ReviewRule>;++/**+ * @generated from enum bytebase.v1.ReviewRule.Type+ */+export enum ReviewRule_Type {+ /**+ * @generated from enum value: TYPE_UNSPECIFIED = 0;+ */+ TYPE_UNSPECIFIED = 0,++ /**+ * P0: the statements do not parse for the target engine.+ *+ * @generated from enum value: SYNTAX = 1;+ */+ SYNTAX = 1,++ /**+ * P0: applying the statements to the synced schema fails: a missing+ * table or column, a duplicate object, or an invalid reference.+ *+ * @generated from enum value: WALK_THROUGH = 2;+ */+ WALK_THROUGH = 2,++ /**+ * P0: the change requests online migration but is not eligible.+ *+ * @generated from enum value: ONLINE_MIGRATION = 3;+ */+ ONLINE_MIGRATION = 3,++ /**+ * P0: the change enables prior backup but the backup cannot be taken.+ *+ * @generated from enum value: PRIOR_BACKUP = 4;+ */+ PRIOR_BACKUP = 4,++ /**+ * P0: = NULL or <> NULL in a predicate, which is always false. Test for+ * NULL with IS NULL or IS NOT NULL.+ *+ * @generated from enum value: REQUIRE_IS_NULL = 5;+ */+ REQUIRE_IS_NULL = 5,++ /**+ * P1: UPDATE or DELETE without WHERE.+ *+ * @generated from enum value: REQUIRE_WHERE = 6;+ */+ REQUIRE_WHERE = 6,++ /**+ * P1: DROP TABLE, COLUMN, SCHEMA, or DATABASE.+ *+ * @generated from enum value: DISALLOW_DROP_OBJECT = 7;+ */+ DISALLOW_DROP_OBJECT = 7,++ /**+ * P1: TRUNCATE.+ *+ * @generated from enum value: DISALLOW_TRUNCATE = 8;+ */+ DISALLOW_TRUNCATE = 8,++ /**+ * P1: dropping a PRIMARY KEY, FOREIGN KEY, UNIQUE, or CHECK constraint.+ *+ * @generated from enum value: DISALLOW_DROP_CONSTRAINT = 9;+ */+ DISALLOW_DROP_CONSTRAINT = 9,++ /**+ * P1: renaming a table or column.+ *+ * @generated from enum value: DISALLOW_RENAME = 10;+ */+ DISALLOW_RENAME = 10,++ /**+ * P1: a table still has no primary key at the end of the change.+ *+ * @generated from enum value: REQUIRE_PRIMARY_KEY = 11;+ */+ REQUIRE_PRIMARY_KEY = 11,+}++/**+ * Describes the enum bytebase.v1.ReviewRule.Type.+ */+export declare const ReviewRule_TypeSchema: GenEnum<ReviewRule_Type>;+diff --git a/frontend/src/types/proto-es/v1/review_rule_pb.js b/frontend/src/types/proto-es/v1/review_rule_pb.jsnew file mode 100644index 0000000000..bf7681a4bd--- /dev/null+++ b/frontend/src/types/proto-es/v1/review_rule_pb.js@@ -0,0 +1,31 @@+// @generated by protoc-gen-es v2.12.0+// @generated from file v1/review_rule.proto (package bytebase.v1, syntax proto3)+/* eslint-disable */++import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";++/**+ * Describes the file v1/review_rule.proto.+ */+export const file_v1_review_rule = /*@__PURE__*/+ fileDesc("ChR2MS9yZXZpZXdfcnVsZS5wcm90bxILYnl0ZWJhc2UudjEilgIKClJldmlld1J1bGUihwIKBFR5cGUSFAoQVFlQRV9VTlNQRUNJRklFRBAAEgoKBlNZTlRBWBABEhAKDFdBTEtfVEhST1VHSBACEhQKEE9OTElORV9NSUdSQVRJT04QAxIQCgxQUklPUl9CQUNLVVAQBBITCg9SRVFVSVJFX0lTX05VTEwQBRIRCg1SRVFVSVJFX1dIRVJFEAYSGAoURElTQUxMT1dfRFJPUF9PQkpFQ1QQBxIVChFESVNBTExPV19UUlVOQ0FURRAIEhwKGERJU0FMTE9XX0RST1BfQ09OU1RSQUlOVBAJEhMKD0RJU0FMTE9XX1JFTkFNRRAKEhcKE1JFUVVJUkVfUFJJTUFSWV9LRVkQC0KlAQoPY29tLmJ5dGViYXNlLnYxQg9SZXZpZXdSdWxlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z");++/**+ * Describes the message bytebase.v1.ReviewRule.+ * Use `create(ReviewRuleSchema)` to create a new message.+ */+export const ReviewRuleSchema = /*@__PURE__*/+ messageDesc(file_v1_review_rule, 0);++/**+ * Describes the enum bytebase.v1.ReviewRule.Type.+ */+export const ReviewRule_TypeSchema = /*@__PURE__*/+ enumDesc(file_v1_review_rule, 0, 0);++/**+ * @generated from enum bytebase.v1.ReviewRule.Type+ */+export const ReviewRule_Type = /*@__PURE__*/+ tsEnum(ReviewRule_TypeSchema);+diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 33098d531f..8c706bd7de 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -122,14 +122,22 @@- [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig)- [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec)+- [store/review_rule.proto](#store_review_rule-proto)+ - [ReviewRule](#bytebase-store-ReviewRule)++ - [ReviewRule.Type](#bytebase-store-ReviewRule-Type)+- [store/issue_comment.proto](#store_issue_comment-proto)- [IssueCommentPayload](#bytebase-store-IssueCommentPayload)- [IssueCommentPayload.Approval](#bytebase-store-IssueCommentPayload-Approval)- [IssueCommentPayload.IssueUpdate](#bytebase-store-IssueCommentPayload-IssueUpdate)- [IssueCommentPayload.PlanUpdate](#bytebase-store-IssueCommentPayload-PlanUpdate)+ - [IssueCommentPayload.ReviewMetadata](#bytebase-store-IssueCommentPayload-ReviewMetadata)- [IssueCommentPayload.ReviewSubmission](#bytebase-store-IssueCommentPayload-ReviewSubmission)- [IssueCommentPayload.StatementAnchor](#bytebase-store-IssueCommentPayload-StatementAnchor)+ - [IssueCommentPayload.ReviewMetadata.Priority](#bytebase-store-IssueCommentPayload-ReviewMetadata-Priority)+- [store/oauth2.proto](#store_oauth2-proto)- [OAuth2AuthorizationCodeConfig](#bytebase-store-OAuth2AuthorizationCodeConfig)- [OAuth2ClientConfig](#bytebase-store-OAuth2ClientConfig)@@ -156,6 +164,7 @@- [MaskingRulePolicy.MaskingRule](#bytebase-store-MaskingRulePolicy-MaskingRule)- [Policy](#bytebase-store-Policy)- [QueryDataPolicy](#bytebase-store-QueryDataPolicy)+ - [ReviewRulePolicy](#bytebase-store-ReviewRulePolicy)- [RolloutPolicy](#bytebase-store-RolloutPolicy)- [TagPolicy](#bytebase-store-TagPolicy)- [TagPolicy.TagsEntry](#bytebase-store-TagPolicy-TagsEntry)@@ -2082,6 +2091,60 @@ Type represents the category of issue.+<a name="store_review_rule-proto"></a>+<p align="right"><a href="#top">Top</a></p>++## store/review_rule.proto++++<a name="bytebase-store-ReviewRule"></a>++### ReviewRule+ReviewRule mirrors bytebase.v1.ReviewRule. The values are shared by+ReviewRulePolicy and IssueCommentPayload.ReviewMetadata.++A value is never removed, only marked deprecated: both payloads are jsonb,+protojson stores the enum name, and the store's unmarshaler discards an+unknown name into TYPE_UNSPECIFIED, which would blank the rule on every+stored comment that used it.+++++++++<a name="bytebase-store-ReviewRule-Type"></a>++### ReviewRule.Type+++| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| SYNTAX | 1 | |+| WALK_THROUGH | 2 | |+| ONLINE_MIGRATION | 3 | |+| PRIOR_BACKUP | 4 | |+| REQUIRE_IS_NULL | 5 | |+| REQUIRE_WHERE | 6 | |+| DISALLOW_DROP_OBJECT | 7 | |+| DISALLOW_TRUNCATE | 8 | |+| DISALLOW_DROP_CONSTRAINT | 9 | |+| DISALLOW_RENAME | 10 | |+| REQUIRE_PRIMARY_KEY | 11 | |++++++++++<a name="store_issue_comment-proto"></a><p align="right"><a href="#top">Top</a></p>@@ -2103,6 +2166,7 @@ Type represents the category of issue.| plan_update | [IssueCommentPayload.PlanUpdate](#bytebase-store-IssueCommentPayload-PlanUpdate) | | || review_submission | [IssueCommentPayload.ReviewSubmission](#bytebase-store-IssueCommentPayload-ReviewSubmission) | | || statement_anchor | [IssueCommentPayload.StatementAnchor](#bytebase-store-IssueCommentPayload-StatementAnchor) | | The statement context an inline comment references. Set at creation and immutable afterward; never set together with an event. |+| review_metadata | [IssueCommentPayload.ReviewMetadata](#bytebase-store-IssueCommentPayload-ReviewMetadata) | | Present on review results only, beside the text and never together with an event. Written by the review executor; CreateIssueComment rejects it. The anchor is statement_anchor; a result without one addresses the whole change. |@@ -2165,6 +2229,29 @@ add/remove/update from the snapshot pair.+<a name="bytebase-store-IssueCommentPayload-ReviewMetadata"></a>++### IssueCommentPayload.ReviewMetadata+ReviewMetadata is what a review result carries beyond its text: which+reviewer posted it, what it was judged against, its priority, and the+databases it applies to. Results from the same reviewer are superseded+together: when a run completes, it resolves every OPEN root of its type+and deletes every P2 of its type, in the transaction that posts the new+results.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| type | [string](#string) | | The reviewer slot that posted the result, same value domain as review_run.type: "RULE" or "GUIDELINE". |+| rule | [ReviewRule.Type](#bytebase-store-ReviewRule-Type) | | The rule judged against. Set if and only if type is "RULE". |+| priority | [IssueCommentPayload.ReviewMetadata.Priority](#bytebase-store-IssueCommentPayload-ReviewMetadata-Priority) | | A result merged across databases carries the highest priority among them. |+| targets | [string](#string) | repeated | Every database the result applies to, sorted. Always complete; the renderer collapses it when it equals the spec's target set. Format: instances/{instance}/databases/{database} |++++++<a name="bytebase-store-IssueCommentPayload-ReviewSubmission"></a>### IssueCommentPayload.ReviewSubmission@@ -2196,6 +2283,20 @@ read against the anchored sheet and the current plan, not stored.++<a name="bytebase-store-IssueCommentPayload-ReviewMetadata-Priority"></a>++### IssueCommentPayload.ReviewMetadata.Priority+++| Name | Number | Description |+| ---- | ------ | ----------- |+| PRIORITY_UNSPECIFIED | 0 | Blocks like any other open thread. |+| P0 | 1 | The SQL is wrong and must change. Resolving without changing the SQL is a claim of false positive. |+| P1 | 2 | Dangerous but legitimate; a person must accept it. |+| P2 | 3 | Advisory. Posted without thread state, so it never blocks. |++@@ -2580,6 +2681,24 @@ QueryDataPolicy is the policy configuration for querying data in the SQL Editor.+<a name="bytebase-store-ReviewRulePolicy"></a>++### ReviewRulePolicy+ReviewRulePolicy is the standard review rule switch.+Project: the rules on there; absent policy means every rule.+Workspace: the rules on in every project, which projects cannot switch+off; absent policy means none. The effective set is the union.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| rules | [ReviewRule.Type](#bytebase-store-ReviewRule-Type) | repeated | |++++++<a name="bytebase-store-RolloutPolicy"></a>### RolloutPolicy@@ -2657,6 +2776,7 @@ QueryDataPolicy is the policy configuration for querying data in the SQL Editor.| MASKING_RULE | 4 | || IAM | 5 | || TAG | 6 | |+| REVIEW_RULE | 7 | |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 94f4bab16f..1f283011c4 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -649,6 +649,25 @@</li>+ <li>+ <a href="#store%2freview_rule.proto">store/review_rule.proto</a>+ <ul>++ <li>+ <a href="#bytebase.store.ReviewRule"><span class="badge">M</span>ReviewRule</a>+ </li>+++ <li>+ <a href="#bytebase.store.ReviewRule.Type"><span class="badge">E</span>ReviewRule.Type</a>+ </li>++++ </ul>+ </li>++<li><a href="#store%2fissue_comment.proto">store/issue_comment.proto</a><ul>@@ -669,6 +688,10 @@<a href="#bytebase.store.IssueCommentPayload.PlanUpdate"><span class="badge">M</span>IssueCommentPayload.PlanUpdate</a></li>+ <li>+ <a href="#bytebase.store.IssueCommentPayload.ReviewMetadata"><span class="badge">M</span>IssueCommentPayload.ReviewMetadata</a>+ </li>+<li><a href="#bytebase.store.IssueCommentPayload.ReviewSubmission"><span class="badge">M</span>IssueCommentPayload.ReviewSubmission</a></li>@@ -678,6 +701,10 @@</li>+ <li>+ <a href="#bytebase.store.IssueCommentPayload.ReviewMetadata.Priority"><span class="badge">E</span>IssueCommentPayload.ReviewMetadata.Priority</a>+ </li>+</ul>@@ -790,6 +817,10 @@<a href="#bytebase.store.QueryDataPolicy"><span class="badge">M</span>QueryDataPolicy</a></li>+ <li>+ <a href="#bytebase.store.ReviewRulePolicy"><span class="badge">M</span>ReviewRulePolicy</a>+ </li>+<li><a href="#bytebase.store.RolloutPolicy"><span class="badge">M</span>RolloutPolicy</a></li>@@ -6081,6 +6112,110 @@ Format: environments/prod where prod is the environment resource ID. </p></td>+ <div class="file-heading">+ <h2 id="store/review_rule.proto">store/review_rule.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.store.ReviewRule">ReviewRule</h3>+ <p>ReviewRule mirrors bytebase.v1.ReviewRule. The values are shared by</p><p>ReviewRulePolicy and IssueCommentPayload.ReviewMetadata.</p><p>A value is never removed, only marked deprecated: both payloads are jsonb,</p><p>protojson stores the enum name, and the store's unmarshaler discards an</p><p>unknown name into TYPE_UNSPECIFIED, which would blank the rule on every</p><p>stored comment that used it.</p>++++++++ <h3 id="bytebase.store.ReviewRule.Type">ReviewRule.Type</h3>+ <p></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>SYNTAX</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>WALK_THROUGH</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ONLINE_MIGRATION</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PRIOR_BACKUP</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>REQUIRE_IS_NULL</td>+ <td>5</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>REQUIRE_WHERE</td>+ <td>6</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DISALLOW_DROP_OBJECT</td>+ <td>7</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DISALLOW_TRUNCATE</td>+ <td>8</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DISALLOW_DROP_CONSTRAINT</td>+ <td>9</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DISALLOW_RENAME</td>+ <td>10</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>REQUIRE_PRIMARY_KEY</td>+ <td>11</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>+++++++<div class="file-heading"><h2 id="store/issue_comment.proto">store/issue_comment.proto</h2><a href="#title">Top</a></div>@@ -6140,6 +6275,16 @@ Format: environments/prod where prod is the environment resource ID. </p></td>immutable afterward; never set together with an event. </p></td></tr>+ <tr>+ <td>review_metadata</td>+ <td><a href="#bytebase.store.IssueCommentPayload.ReviewMetadata">IssueCommentPayload.ReviewMetadata</a></td>+ <td></td>+ <td><p>Present on review results only, beside the text and never together with+an event. Written by the review executor; CreateIssueComment rejects it.+The anchor is statement_anchor; a result without one addresses the whole+change. </p></td>+ </tr>+</tbody></table>@@ -6275,6 +6420,55 @@ immutable afterward; never set together with an event. </p></td>+ <h3 id="bytebase.store.IssueCommentPayload.ReviewMetadata">IssueCommentPayload.ReviewMetadata</h3>+ <p>ReviewMetadata is what a review result carries beyond its text: which</p><p>reviewer posted it, what it was judged against, its priority, and the</p><p>databases it applies to. Results from the same reviewer are superseded</p><p>together: when a run completes, it resolves every OPEN root of its type</p><p>and deletes every P2 of its type, in the transaction that posts the new</p><p>results.</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="#string">string</a></td>+ <td></td>+ <td><p>The reviewer slot that posted the result, same value domain as+review_run.type: "RULE" or "GUIDELINE". </p></td>+ </tr>++ <tr>+ <td>rule</td>+ <td><a href="#bytebase.store.ReviewRule.Type">ReviewRule.Type</a></td>+ <td></td>+ <td><p>The rule judged against. Set if and only if type is "RULE". </p></td>+ </tr>++ <tr>+ <td>priority</td>+ <td><a href="#bytebase.store.IssueCommentPayload.ReviewMetadata.Priority">IssueCommentPayload.ReviewMetadata.Priority</a></td>+ <td></td>+ <td><p>A result merged across databases carries the highest priority among+them. </p></td>+ </tr>++ <tr>+ <td>targets</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Every database the result applies to, sorted. Always complete; the+renderer collapses it when it equals the spec's target set.+Format: instances/{instance}/databases/{database} </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.store.IssueCommentPayload.ReviewSubmission">IssueCommentPayload.ReviewSubmission</h3><p>ReviewSubmission records that an issue entered review.</p>@@ -6335,6 +6529,42 @@ Setting exactly one column to 0 is invalid. </p></td>+ <h3 id="bytebase.store.IssueCommentPayload.ReviewMetadata.Priority">IssueCommentPayload.ReviewMetadata.Priority</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>PRIORITY_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Blocks like any other open thread.</p></td>+ </tr>++ <tr>+ <td>P0</td>+ <td>1</td>+ <td><p>The SQL is wrong and must change. Resolving without changing the SQL+is a claim of false positive.</p></td>+ </tr>++ <tr>+ <td>P1</td>+ <td>2</td>+ <td><p>Dangerous but legitimate; a person must accept it.</p></td>+ </tr>++ <tr>+ <td>P2</td>+ <td>3</td>+ <td><p>Advisory. Posted without thread state, so it never blocks.</p></td>+ </tr>++ </tbody>+ </table>+@@ -7125,6 +7355,30 @@ Disallow running DDL statements in the SQL editor. </p></td>+ <h3 id="bytebase.store.ReviewRulePolicy">ReviewRulePolicy</h3>+ <p>ReviewRulePolicy is the standard review rule switch.</p><p>Project: the rules on there; absent policy means every rule.</p><p>Workspace: the rules on in every project, which projects cannot switch</p><p>off; absent policy means none. The effective set is the union.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>rules</td>+ <td><a href="#bytebase.store.ReviewRule.Type">ReviewRule.Type</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.store.RolloutPolicy">RolloutPolicy</h3><p></p>@@ -7299,6 +7553,12 @@ For example, the environment resource can have the SQL review config tag, such a<td><p></p></td></tr>+ <tr>+ <td>REVIEW_RULE</td>+ <td>7</td>+ <td><p></p></td>+ </tr>+</tbody></table>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 1be73b23c6..5360f8748a 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -170,6 +170,11 @@- [PlanService](#bytebase-v1-PlanService)+- [v1/review_rule.proto](#v1_review_rule-proto)+ - [ReviewRule](#bytebase-v1-ReviewRule)++ - [ReviewRule.Type](#bytebase-v1-ReviewRule-Type)+- [v1/issue_service.proto](#v1_issue_service-proto)- [ApprovalFlow](#bytebase-v1-ApprovalFlow)- [ApprovalTemplate](#bytebase-v1-ApprovalTemplate)@@ -185,6 +190,7 @@- [IssueComment.Approval](#bytebase-v1-IssueComment-Approval)- [IssueComment.IssueUpdate](#bytebase-v1-IssueComment-IssueUpdate)- [IssueComment.PlanUpdate](#bytebase-v1-IssueComment-PlanUpdate)+ - [IssueComment.ReviewMetadata](#bytebase-v1-IssueComment-ReviewMetadata)- [IssueComment.ReviewSubmission](#bytebase-v1-IssueComment-ReviewSubmission)- [ListIssueCommentsRequest](#bytebase-v1-ListIssueCommentsRequest)- [ListIssueCommentsResponse](#bytebase-v1-ListIssueCommentsResponse)@@ -205,6 +211,7 @@- [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status)- [Issue.Type](#bytebase-v1-Issue-Type)- [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status)+ - [IssueComment.ReviewMetadata.Priority](#bytebase-v1-IssueComment-ReviewMetadata-Priority)- [IssueComment.ThreadState](#bytebase-v1-IssueComment-ThreadState)- [ReviewRun.Status](#bytebase-v1-ReviewRun-Status)- [ReviewRun.Type](#bytebase-v1-ReviewRun-Type)@@ -595,6 +602,7 @@- [MaskingRulePolicy.MaskingRule](#bytebase-v1-MaskingRulePolicy-MaskingRule)- [Policy](#bytebase-v1-Policy)- [QueryDataPolicy](#bytebase-v1-QueryDataPolicy)+ - [ReviewRulePolicy](#bytebase-v1-ReviewRulePolicy)- [RolloutPolicy](#bytebase-v1-RolloutPolicy)- [TagPolicy](#bytebase-v1-TagPolicy)- [TagPolicy.TagsEntry](#bytebase-v1-TagPolicy-TagsEntry)@@ -3345,6 +3353,64 @@ PlanService manages deployment plans for database changes.+<a name="v1_review_rule-proto"></a>+<p align="right"><a href="#top">Top</a></p>++## v1/review_rule.proto++++<a name="bytebase-v1-ReviewRule"></a>++### ReviewRule+ReviewRule holds the standard review rule set. The rules are fixed: every+project gets them without configuration, and the only setting is a switch+(see ReviewRulePolicy).++A rule id names what the rule examines. An execution check is named for+what it checks; a rule about the SQL itself carries REQUIRE or DISALLOW so+the id says which way it cuts. DISALLOW on a P1 rule means the operation+needs a person's acceptance, not that it is forbidden.++The enum is nested so its values stay flat: bytebase.v1 already has+top-level TRUNCATE and RENAME values.+++++++++<a name="bytebase-v1-ReviewRule-Type"></a>++### ReviewRule.Type+++| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| SYNTAX | 1 | P0: the statements do not parse for the target engine. |+| WALK_THROUGH | 2 | P0: applying the statements to the synced schema fails: a missing table or column, a duplicate object, or an invalid reference. |+| ONLINE_MIGRATION | 3 | P0: the change requests online migration but is not eligible. |+| PRIOR_BACKUP | 4 | P0: the change enables prior backup but the backup cannot be taken. |+| REQUIRE_IS_NULL | 5 | P0: = NULL or <> NULL in a predicate, which is always false. Test for NULL with IS NULL or IS NOT NULL. |+| REQUIRE_WHERE | 6 | P1: UPDATE or DELETE without WHERE. |+| DISALLOW_DROP_OBJECT | 7 | P1: DROP TABLE, COLUMN, SCHEMA, or DATABASE. |+| DISALLOW_TRUNCATE | 8 | P1: TRUNCATE. |+| DISALLOW_DROP_CONSTRAINT | 9 | P1: dropping a PRIMARY KEY, FOREIGN KEY, UNIQUE, or CHECK constraint. |+| DISALLOW_RENAME | 10 | P1: renaming a table or column. |+| REQUIRE_PRIMARY_KEY | 11 | P1: a table still has no primary key at the end of the change. |++++++++++<a name="v1_issue_service-proto"></a><p align="right"><a href="#top">Top</a></p>@@ -3540,6 +3606,7 @@ A comment on an issue.| root | [string](#string) | optional | The thread root's name, set only on replies. Immutable after creation. Format: projects/{project}/issues/{issue}/issueComments/{issueComment} Must name a thread root in the same issue, never a general comment or reply. || thread_state | [IssueComment.ThreadState](#bytebase-v1-IssueComment-ThreadState) | optional | Present only on thread roots. Set OPEN on create to start a thread; an anchored root starts one without it. Omit root, thread_state, and statement_anchor to create a general comment. Update through the thread_state field mask to resolve or reopen. Adding a reply does not reopen a resolved thread. || statement_anchor | [StatementAnchor](#bytebase-v1-StatementAnchor) | | Optional source context on a root or reply. A reply's anchor must share the root's spec and sheet_sha256; it may narrow the range. Cannot be set on events. Immutable after creation. |+| review_metadata | [IssueComment.ReviewMetadata](#bytebase-v1-IssueComment-ReviewMetadata) | | Present on review results, the comments the review executor posts. Never accepted on create or update. || approval | [IssueComment.Approval](#bytebase-v1-IssueComment-Approval) | | Approval event. || issue_update | [IssueComment.IssueUpdate](#bytebase-v1-IssueComment-IssueUpdate) | | Issue update event. || plan_update | [IssueComment.PlanUpdate](#bytebase-v1-IssueComment-PlanUpdate) | | Plan update event. |@@ -3604,6 +3671,24 @@ and after a PlanService.UpdatePlan call that mutated specs).+<a name="bytebase-v1-IssueComment-ReviewMetadata"></a>++### IssueComment.ReviewMetadata+What a review result carries beyond its text.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| type | [ReviewRun.Type](#bytebase-v1-ReviewRun-Type) | | The reviewer that posted the result. |+| rule | [ReviewRule.Type](#bytebase-v1-ReviewRule-Type) | | The rule judged against. Set if and only if type is RULE. |+| priority | [IssueComment.ReviewMetadata.Priority](#bytebase-v1-IssueComment-ReviewMetadata-Priority) | | |+| targets | [string](#string) | repeated | Every database the result applies to, sorted. Format: instances/{instance}/databases/{database} |++++++<a name="bytebase-v1-IssueComment-ReviewSubmission"></a>### IssueComment.ReviewSubmission@@ -3931,6 +4016,20 @@ Approval status values.+<a name="bytebase-v1-IssueComment-ReviewMetadata-Priority"></a>++### IssueComment.ReviewMetadata.Priority+++| Name | Number | Description |+| ---- | ------ | ----------- |+| PRIORITY_UNSPECIFIED | 0 | Blocks like any other open thread. |+| P0 | 1 | The SQL is wrong and must change. |+| P1 | 2 | Dangerous but legitimate; a person must accept it. |+| P2 | 3 | Advisory. Posted without thread state, so it never blocks. |+++<a name="bytebase-v1-IssueComment-ThreadState"></a>### IssueComment.ThreadState@@ -9892,6 +9991,7 @@ For example: resource.environment_id == "test" && resource.proje| masking_exemption_policy | [MaskingExemptionPolicy](#bytebase-v1-MaskingExemptionPolicy) | | || tag_policy | [TagPolicy](#bytebase-v1-TagPolicy) | | || query_data_policy | [QueryDataPolicy](#bytebase-v1-QueryDataPolicy) | | |+| review_rule_policy | [ReviewRulePolicy](#bytebase-v1-ReviewRulePolicy) | | || enforce | [bool](#bool) | | Whether the policy is enforced. || resource_type | [PolicyResourceType](#bytebase-v1-PolicyResourceType) | | The resource type for the policy. |@@ -9918,6 +10018,30 @@ QueryDataPolicy is the policy configuration for querying data in the SQL Editor.+<a name="bytebase-v1-ReviewRulePolicy"></a>++### ReviewRulePolicy+Standard review rule policy: the rules switched on, at two levels.++On a project it is the project's switch: the rules on there. Absent policy+means every rule. On the workspace it is a lock: the rules on in every+project, which projects cannot switch off. Absent policy means none. The+effective set for a project is the union of the two.++A saved project list is explicit, so a rule added to the standard set in a+later release is appended to every saved project policy by a data+migration in that release.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| rules | [ReviewRule.Type](#bytebase-v1-ReviewRule-Type) | repeated | The rules switched on. Unknown or unspecified values are rejected. |++++++<a name="bytebase-v1-RolloutPolicy"></a>### RolloutPolicy@@ -10013,6 +10137,7 @@ The type of organizational policy.| ROLLOUT_POLICY | 3 | Rollout deployment policy. || TAG | 4 | Resource tag policy. || DATA_QUERY | 6 | Query data access policy. |+| REVIEW_RULE | 7 | Standard review rule switch. Allowed on WORKSPACE and PROJECT. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 0b05c98641..de75d0a8e7 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -815,6 +815,25 @@</li>+ <li>+ <a href="#v1%2freview_rule.proto">v1/review_rule.proto</a>+ <ul>++ <li>+ <a href="#bytebase.v1.ReviewRule"><span class="badge">M</span>ReviewRule</a>+ </li>+++ <li>+ <a href="#bytebase.v1.ReviewRule.Type"><span class="badge">E</span>ReviewRule.Type</a>+ </li>++++ </ul>+ </li>++<li><a href="#v1%2fissue_service.proto">v1/issue_service.proto</a><ul>@@ -875,6 +894,10 @@<a href="#bytebase.v1.IssueComment.PlanUpdate"><span class="badge">M</span>IssueComment.PlanUpdate</a></li>+ <li>+ <a href="#bytebase.v1.IssueComment.ReviewMetadata"><span class="badge">M</span>IssueComment.ReviewMetadata</a>+ </li>+<li><a href="#bytebase.v1.IssueComment.ReviewSubmission"><span class="badge">M</span>IssueComment.ReviewSubmission</a></li>@@ -952,6 +975,10 @@<a href="#bytebase.v1.IssueComment.Approval.Status"><span class="badge">E</span>IssueComment.Approval.Status</a></li>+ <li>+ <a href="#bytebase.v1.IssueComment.ReviewMetadata.Priority"><span class="badge">E</span>IssueComment.ReviewMetadata.Priority</a>+ </li>+<li><a href="#bytebase.v1.IssueComment.ThreadState"><span class="badge">E</span>IssueComment.ThreadState</a></li>@@ -2454,6 +2481,10 @@<a href="#bytebase.v1.QueryDataPolicy"><span class="badge">M</span>QueryDataPolicy</a></li>+ <li>+ <a href="#bytebase.v1.ReviewRulePolicy"><span class="badge">M</span>ReviewRulePolicy</a>+ </li>+<li><a href="#bytebase.v1.RolloutPolicy"><span class="badge">M</span>RolloutPolicy</a></li>@@ -10295,6 +10326,112 @@ Permissions required: bb.planCheckRuns.run</p></td>+ <div class="file-heading">+ <h2 id="v1/review_rule.proto">v1/review_rule.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.ReviewRule">ReviewRule</h3>+ <p>ReviewRule holds the standard review rule set. The rules are fixed: every</p><p>project gets them without configuration, and the only setting is a switch</p><p>(see ReviewRulePolicy).</p><p>A rule id names what the rule examines. An execution check is named for</p><p>what it checks; a rule about the SQL itself carries REQUIRE or DISALLOW so</p><p>the id says which way it cuts. DISALLOW on a P1 rule means the operation</p><p>needs a person's acceptance, not that it is forbidden.</p><p>The enum is nested so its values stay flat: bytebase.v1 already has</p><p>top-level TRUNCATE and RENAME values.</p>++++++++ <h3 id="bytebase.v1.ReviewRule.Type">ReviewRule.Type</h3>+ <p></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>SYNTAX</td>+ <td>1</td>+ <td><p>P0: the statements do not parse for the target engine.</p></td>+ </tr>++ <tr>+ <td>WALK_THROUGH</td>+ <td>2</td>+ <td><p>P0: applying the statements to the synced schema fails: a missing+table or column, a duplicate object, or an invalid reference.</p></td>+ </tr>++ <tr>+ <td>ONLINE_MIGRATION</td>+ <td>3</td>+ <td><p>P0: the change requests online migration but is not eligible.</p></td>+ </tr>++ <tr>+ <td>PRIOR_BACKUP</td>+ <td>4</td>+ <td><p>P0: the change enables prior backup but the backup cannot be taken.</p></td>+ </tr>++ <tr>+ <td>REQUIRE_IS_NULL</td>+ <td>5</td>+ <td><p>P0: = NULL or <> NULL in a predicate, which is always false. Test for+NULL with IS NULL or IS NOT NULL.</p></td>+ </tr>++ <tr>+ <td>REQUIRE_WHERE</td>+ <td>6</td>+ <td><p>P1: UPDATE or DELETE without WHERE.</p></td>+ </tr>++ <tr>+ <td>DISALLOW_DROP_OBJECT</td>+ <td>7</td>+ <td><p>P1: DROP TABLE, COLUMN, SCHEMA, or DATABASE.</p></td>+ </tr>++ <tr>+ <td>DISALLOW_TRUNCATE</td>+ <td>8</td>+ <td><p>P1: TRUNCATE.</p></td>+ </tr>++ <tr>+ <td>DISALLOW_DROP_CONSTRAINT</td>+ <td>9</td>+ <td><p>P1: dropping a PRIMARY KEY, FOREIGN KEY, UNIQUE, or CHECK constraint.</p></td>+ </tr>++ <tr>+ <td>DISALLOW_RENAME</td>+ <td>10</td>+ <td><p>P1: renaming a table or column.</p></td>+ </tr>++ <tr>+ <td>REQUIRE_PRIMARY_KEY</td>+ <td>11</td>+ <td><p>P1: a table still has no primary key at the end of the change.</p></td>+ </tr>++ </tbody>+ </table>+++++++<div class="file-heading"><h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a></div>@@ -10799,6 +10936,14 @@ the root's spec and sheet_sha256; it may narrow the range.Cannot be set on events. Immutable after creation. </p></td></tr>+ <tr>+ <td>review_metadata</td>+ <td><a href="#bytebase.v1.IssueComment.ReviewMetadata">IssueComment.ReviewMetadata</a></td>+ <td></td>+ <td><p>Present on review results, the comments the review executor posts.+Never accepted on create or update. </p></td>+ </tr>+<tr><td>approval</td><td><a href="#bytebase.v1.IssueComment.Approval">IssueComment.Approval</a></td>@@ -10962,6 +11107,52 @@ Cannot be set on events. Immutable after creation. </p></td>+ <h3 id="bytebase.v1.IssueComment.ReviewMetadata">IssueComment.ReviewMetadata</h3>+ <p>What a review result carries beyond its text.</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.ReviewRun.Type">ReviewRun.Type</a></td>+ <td></td>+ <td><p>The reviewer that posted the result. </p></td>+ </tr>++ <tr>+ <td>rule</td>+ <td><a href="#bytebase.v1.ReviewRule.Type">ReviewRule.Type</a></td>+ <td></td>+ <td><p>The rule judged against. Set if and only if type is RULE. </p></td>+ </tr>++ <tr>+ <td>priority</td>+ <td><a href="#bytebase.v1.IssueComment.ReviewMetadata.Priority">IssueComment.ReviewMetadata.Priority</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>targets</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Every database the result applies to, sorted.+Format: instances/{instance}/databases/{database} </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</h3><p>Review submission event information.</p>@@ -11758,6 +11949,41 @@ In this situation, `update_mask` is ignored. </p></td></tbody></table>+ <h3 id="bytebase.v1.IssueComment.ReviewMetadata.Priority">IssueComment.ReviewMetadata.Priority</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>PRIORITY_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Blocks like any other open thread.</p></td>+ </tr>++ <tr>+ <td>P0</td>+ <td>1</td>+ <td><p>The SQL is wrong and must change.</p></td>+ </tr>++ <tr>+ <td>P1</td>+ <td>2</td>+ <td><p>Dangerous but legitimate; a person must accept it.</p></td>+ </tr>++ <tr>+ <td>P2</td>+ <td>3</td>+ <td><p>Advisory. Posted without thread state, so it never blocks.</p></td>+ </tr>++ </tbody>+ </table>+<h3 id="bytebase.v1.IssueComment.ThreadState">IssueComment.ThreadState</h3><p></p><table class="enum-table">@@ -28203,6 +28429,13 @@ Environment resource name: environments/environment-id. </p></td><td><p> </p></td></tr>+ <tr>+ <td>review_rule_policy</td>+ <td><a href="#bytebase.v1.ReviewRulePolicy">ReviewRulePolicy</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+<tr><td>enforce</td><td><a href="#bool">bool</a></td>@@ -28278,6 +28511,30 @@ If false,+ <h3 id="bytebase.v1.ReviewRulePolicy">ReviewRulePolicy</h3>+ <p>Standard review rule policy: the rules switched on, at two levels.</p><p>On a project it is the project's switch: the rules on there. Absent policy</p><p>means every rule. On the workspace it is a lock: the rules on in every</p><p>project, which projects cannot switch off. Absent policy means none. The</p><p>effective set for a project is the union of the two.</p><p>A saved project list is explicit, so a rule added to the standard set in a</p><p>later release is appended to every saved project policy by a data</p><p>migration in that release.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>rules</td>+ <td><a href="#bytebase.v1.ReviewRule.Type">ReviewRule.Type</a></td>+ <td>repeated</td>+ <td><p>The rules switched on. Unknown or unspecified values are rejected. </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.RolloutPolicy">RolloutPolicy</h3><p>Rollout policy configuration.</p>@@ -28490,6 +28747,12 @@ In this situation, `update_mask` is ignored. </p></td><td><p>Query data access policy.</p></td></tr>+ <tr>+ <td>REVIEW_RULE</td>+ <td>7</td>+ <td><p>Standard review rule switch. Allowed on WORKSPACE and PROJECT.</p></td>+ </tr>+</tbody></table>diff --git a/proto/store/store/issue_comment.proto b/proto/store/store/issue_comment.protoindex 924678c1cf..9875e57649 100644--- a/proto/store/store/issue_comment.proto+++ b/proto/store/store/issue_comment.proto@@ -6,6 +6,7 @@ import "store/approval.proto";import "store/common.proto";import "store/issue.proto";import "store/plan.proto";+import "store/review_rule.proto";option go_package = "generated-go/store";@@ -24,6 +25,12 @@ message IssueCommentPayload {// immutable afterward; never set together with an event.StatementAnchor statement_anchor = 9;+ // Present on review results only, beside the text and never together with+ // an event. Written by the review executor; CreateIssueComment rejects it.+ // The anchor is statement_anchor; a result without one addresses the whole+ // change.+ ReviewMetadata review_metadata = 10;+message Approval {IssuePayloadApproval.Approver.Status status = 1;}@@ -51,6 +58,39 @@ message IssueCommentPayload {repeated PlanConfig.Spec to_specs = 2;}+ // ReviewMetadata is what a review result carries beyond its text: which+ // reviewer posted it, what it was judged against, its priority, and the+ // databases it applies to. Results from the same reviewer are superseded+ // together: when a run completes, it resolves every OPEN root of its type+ // and deletes every P2 of its type, in the transaction that posts the new+ // results.+ message ReviewMetadata {+ enum Priority {+ // Blocks like any other open thread.+ PRIORITY_UNSPECIFIED = 0;+ // The SQL is wrong and must change. Resolving without changing the SQL+ // is a claim of false positive.+ P0 = 1;+ // Dangerous but legitimate; a person must accept it.+ P1 = 2;+ // Advisory. Posted without thread state, so it never blocks.+ P2 = 3;+ }++ // The reviewer slot that posted the result, same value domain as+ // review_run.type: "RULE" or "GUIDELINE".+ string type = 1;+ // The rule judged against. Set if and only if type is "RULE".+ ReviewRule.Type rule = 2;+ // A result merged across databases carries the highest priority among+ // them.+ Priority priority = 3;+ // Every database the result applies to, sorted. Always complete; the+ // renderer collapses it when it equals the spec's target set.+ // Format: instances/{instance}/databases/{database}+ repeated string targets = 4;+ }+// StatementAnchor records the anchored statement revision and range.// The SQL excerpt and current/changed/unavailable state are computed on// read against the anchored sheet and the current plan, not stored.diff --git a/proto/store/store/policy.proto b/proto/store/store/policy.protoindex 990e2bcffc..387dafd761 100644--- a/proto/store/store/policy.proto+++ b/proto/store/store/policy.proto@@ -3,6 +3,7 @@ syntax = "proto3";package bytebase.store;import "google/type/expr.proto";+import "store/review_rule.proto";option go_package = "generated-go/store";@@ -15,6 +16,7 @@ message Policy {MASKING_RULE = 4;IAM = 5;TAG = 6;+ REVIEW_RULE = 7;}enum Resource {@@ -25,6 +27,14 @@ message Policy {}}+// ReviewRulePolicy is the standard review rule switch.+// Project: the rules on there; absent policy means every rule.+// Workspace: the rules on in every project, which projects cannot switch+// off; absent policy means none. The effective set is the union.+message ReviewRulePolicy {+ repeated ReviewRule.Type rules = 1;+}+message RolloutPolicy {bool automatic = 1;repeated string roles = 2;diff --git a/proto/store/store/review_rule.proto b/proto/store/store/review_rule.protonew file mode 100644index 0000000000..5d50ce2b1c--- /dev/null+++ b/proto/store/store/review_rule.proto@@ -0,0 +1,29 @@+syntax = "proto3";++package bytebase.store;++option go_package = "generated-go/store";++// ReviewRule mirrors bytebase.v1.ReviewRule. The values are shared by+// ReviewRulePolicy and IssueCommentPayload.ReviewMetadata.+//+// A value is never removed, only marked deprecated: both payloads are jsonb,+// protojson stores the enum name, and the store's unmarshaler discards an+// unknown name into TYPE_UNSPECIFIED, which would blank the rule on every+// stored comment that used it.+message ReviewRule {+ enum Type {+ TYPE_UNSPECIFIED = 0;+ SYNTAX = 1;+ WALK_THROUGH = 2;+ ONLINE_MIGRATION = 3;+ PRIOR_BACKUP = 4;+ REQUIRE_IS_NULL = 5;+ REQUIRE_WHERE = 6;+ DISALLOW_DROP_OBJECT = 7;+ DISALLOW_TRUNCATE = 8;+ DISALLOW_DROP_CONSTRAINT = 9;+ DISALLOW_RENAME = 10;+ REQUIRE_PRIMARY_KEY = 11;+ }+}diff --git a/proto/v1/v1/issue_service.proto b/proto/v1/v1/issue_service.protoindex b6d050f882..56994f7ff9 100644--- a/proto/v1/v1/issue_service.proto+++ b/proto/v1/v1/issue_service.proto@@ -14,6 +14,7 @@ import "google/type/expr.proto";import "v1/annotation.proto";import "v1/common.proto";import "v1/plan_service.proto";+import "v1/review_rule.proto";option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";@@ -689,6 +690,33 @@ message IssueComment {// Cannot be set on events. Immutable after creation.StatementAnchor statement_anchor = 16 [(google.api.field_behavior) = IMMUTABLE];+ // Present on review results, the comments the review executor posts.+ // Never accepted on create or update.+ ReviewMetadata review_metadata = 17 [(google.api.field_behavior) = OUTPUT_ONLY];++ // What a review result carries beyond its text.+ message ReviewMetadata {+ enum Priority {+ // Blocks like any other open thread.+ PRIORITY_UNSPECIFIED = 0;+ // The SQL is wrong and must change.+ P0 = 1;+ // Dangerous but legitimate; a person must accept it.+ P1 = 2;+ // Advisory. Posted without thread state, so it never blocks.+ P2 = 3;+ }++ // The reviewer that posted the result.+ ReviewRun.Type type = 1;+ // The rule judged against. Set if and only if type is RULE.+ ReviewRule.Type rule = 2;+ Priority priority = 3;+ // Every database the result applies to, sorted.+ // Format: instances/{instance}/databases/{database}+ repeated string targets = 4;+ }+enum ThreadState {THREAD_STATE_UNSPECIFIED = 0;OPEN = 1;diff --git a/proto/v1/v1/org_policy_service.proto b/proto/v1/v1/org_policy_service.protoindex 33c27f2905..47d6b4cd11 100644--- a/proto/v1/v1/org_policy_service.proto+++ b/proto/v1/v1/org_policy_service.proto@@ -10,6 +10,7 @@ import "google/protobuf/empty.proto";import "google/protobuf/field_mask.proto";import "google/type/expr.proto";import "v1/annotation.proto";+import "v1/review_rule.proto";option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";@@ -214,6 +215,7 @@ message Policy {MaskingExemptionPolicy masking_exemption_policy = 6;TagPolicy tag_policy = 7;QueryDataPolicy query_data_policy = 9;+ ReviewRulePolicy review_rule_policy = 12;}// Whether the policy is enforced.@@ -238,6 +240,8 @@ enum PolicyType {TAG = 4;// Query data access policy.DATA_QUERY = 6;+ // Standard review rule switch. Allowed on WORKSPACE and PROJECT.+ REVIEW_RULE = 7;}// The resource type that a policy can be attached to.@@ -252,6 +256,21 @@ enum PolicyResourceType {PROJECT = 3;}+// Standard review rule policy: the rules switched on, at two levels.+//+// On a project it is the project's switch: the rules on there. Absent policy+// means every rule. On the workspace it is a lock: the rules on in every+// project, which projects cannot switch off. Absent policy means none. The+// effective set for a project is the union of the two.+//+// A saved project list is explicit, so a rule added to the standard set in a+// later release is appended to every saved project policy by a data+// migration in that release.+message ReviewRulePolicy {+ // The rules switched on. Unknown or unspecified values are rejected.+ repeated ReviewRule.Type rules = 1;+}+// Rollout policy configuration.message RolloutPolicy {// Whether rollout is automatic without manual approval.diff --git a/proto/v1/v1/review_rule.proto b/proto/v1/v1/review_rule.protonew file mode 100644index 0000000000..2ab99ee36e--- /dev/null+++ b/proto/v1/v1/review_rule.proto@@ -0,0 +1,48 @@+syntax = "proto3";++package bytebase.v1;++option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";++// ReviewRule holds the standard review rule set. The rules are fixed: every+// project gets them without configuration, and the only setting is a switch+// (see ReviewRulePolicy).+//+// A rule id names what the rule examines. An execution check is named for+// what it checks; a rule about the SQL itself carries REQUIRE or DISALLOW so+// the id says which way it cuts. DISALLOW on a P1 rule means the operation+// needs a person's acceptance, not that it is forbidden.+//+// The enum is nested so its values stay flat: bytebase.v1 already has+// top-level TRUNCATE and RENAME values.+message ReviewRule {+ enum Type {+ TYPE_UNSPECIFIED = 0;++ // P0: the statements do not parse for the target engine.+ SYNTAX = 1;+ // P0: applying the statements to the synced schema fails: a missing+ // table or column, a duplicate object, or an invalid reference.+ WALK_THROUGH = 2;+ // P0: the change requests online migration but is not eligible.+ ONLINE_MIGRATION = 3;+ // P0: the change enables prior backup but the backup cannot be taken.+ PRIOR_BACKUP = 4;+ // P0: = NULL or <> NULL in a predicate, which is always false. Test for+ // NULL with IS NULL or IS NOT NULL.+ REQUIRE_IS_NULL = 5;++ // P1: UPDATE or DELETE without WHERE.+ REQUIRE_WHERE = 6;+ // P1: DROP TABLE, COLUMN, SCHEMA, or DATABASE.+ DISALLOW_DROP_OBJECT = 7;+ // P1: TRUNCATE.+ DISALLOW_TRUNCATE = 8;+ // P1: dropping a PRIMARY KEY, FOREIGN KEY, UNIQUE, or CHECK constraint.+ DISALLOW_DROP_CONSTRAINT = 9;+ // P1: renaming a table or column.+ DISALLOW_RENAME = 10;+ // P1: a table still has no primary key at the end of the change.+ REQUIRE_PRIMARY_KEY = 11;+ }+}