Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: move SQLReviewRule to review_config protos (#18362)
Danny Xueda8245883b9
diff --git a/backend/generated-go/store/policy.pb.go b/backend/generated-go/store/policy.pb.goindex 385f0410aa..276d81326c 100644--- a/backend/generated-go/store/policy.pb.go+++ b/backend/generated-go/store/policy.pb.go@@ -23,55 +23,6 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))-type SQLReviewRuleLevel int32--const (- SQLReviewRuleLevel_LEVEL_UNSPECIFIED SQLReviewRuleLevel = 0- SQLReviewRuleLevel_ERROR SQLReviewRuleLevel = 1- SQLReviewRuleLevel_WARNING SQLReviewRuleLevel = 2-)--// Enum value maps for SQLReviewRuleLevel.-var (- SQLReviewRuleLevel_name = map[int32]string{- 0: "LEVEL_UNSPECIFIED",- 1: "ERROR",- 2: "WARNING",- }- SQLReviewRuleLevel_value = map[string]int32{- "LEVEL_UNSPECIFIED": 0,- "ERROR": 1,- "WARNING": 2,- }-)--func (x SQLReviewRuleLevel) Enum() *SQLReviewRuleLevel {- p := new(SQLReviewRuleLevel)- *p = x- return p-}--func (x SQLReviewRuleLevel) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (SQLReviewRuleLevel) Descriptor() protoreflect.EnumDescriptor {- return file_store_policy_proto_enumTypes[0].Descriptor()-}--func (SQLReviewRuleLevel) Type() protoreflect.EnumType {- return &file_store_policy_proto_enumTypes[0]-}--func (x SQLReviewRuleLevel) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use SQLReviewRuleLevel.Descriptor instead.-func (SQLReviewRuleLevel) EnumDescriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{0}-}-type Policy_Type int32const (@@ -120,11 +71,11 @@ func (x Policy_Type) String() string {}func (Policy_Type) Descriptor() protoreflect.EnumDescriptor {- return file_store_policy_proto_enumTypes[1].Descriptor()+ return file_store_policy_proto_enumTypes[0].Descriptor()}func (Policy_Type) Type() protoreflect.EnumType {- return &file_store_policy_proto_enumTypes[1]+ return &file_store_policy_proto_enumTypes[0]}func (x Policy_Type) Number() protoreflect.EnumNumber {@@ -172,11 +123,11 @@ func (x Policy_Resource) String() string {}func (Policy_Resource) Descriptor() protoreflect.EnumDescriptor {- return file_store_policy_proto_enumTypes[2].Descriptor()+ return file_store_policy_proto_enumTypes[1].Descriptor()}func (Policy_Resource) Type() protoreflect.EnumType {- return &file_store_policy_proto_enumTypes[2]+ return &file_store_policy_proto_enumTypes[1]}func (x Policy_Resource) Number() protoreflect.EnumNumber {@@ -224,11 +175,11 @@ func (x RolloutPolicy_Checkers_PlanCheckEnforcement) String() string {}func (RolloutPolicy_Checkers_PlanCheckEnforcement) Descriptor() protoreflect.EnumDescriptor {- return file_store_policy_proto_enumTypes[3].Descriptor()+ return file_store_policy_proto_enumTypes[2].Descriptor()}func (RolloutPolicy_Checkers_PlanCheckEnforcement) Type() protoreflect.EnumType {- return &file_store_policy_proto_enumTypes[3]+ return &file_store_policy_proto_enumTypes[2]}func (x RolloutPolicy_Checkers_PlanCheckEnforcement) Number() protoreflect.EnumNumber {@@ -273,11 +224,11 @@ func (x MaskingExceptionPolicy_MaskingException_Action) String() string {}func (MaskingExceptionPolicy_MaskingException_Action) Descriptor() protoreflect.EnumDescriptor {- return file_store_policy_proto_enumTypes[4].Descriptor()+ return file_store_policy_proto_enumTypes[3].Descriptor()}func (MaskingExceptionPolicy_MaskingException_Action) Type() protoreflect.EnumType {- return &file_store_policy_proto_enumTypes[4]+ return &file_store_policy_proto_enumTypes[3]}func (x MaskingExceptionPolicy_MaskingException_Action) Number() protoreflect.EnumNumber {@@ -322,11 +273,11 @@ func (x EnvironmentTierPolicy_EnvironmentTier) String() string {}func (EnvironmentTierPolicy_EnvironmentTier) Descriptor() protoreflect.EnumDescriptor {- return file_store_policy_proto_enumTypes[5].Descriptor()+ return file_store_policy_proto_enumTypes[4].Descriptor()}func (EnvironmentTierPolicy_EnvironmentTier) Type() protoreflect.EnumType {- return &file_store_policy_proto_enumTypes[5]+ return &file_store_policy_proto_enumTypes[4]}func (x EnvironmentTierPolicy_EnvironmentTier) Number() protoreflect.EnumNumber {@@ -335,7 +286,7 @@ func (x EnvironmentTierPolicy_EnvironmentTier) Number() protoreflect.EnumNumber// Deprecated: Use EnvironmentTierPolicy_EnvironmentTier.Descriptor instead.func (EnvironmentTierPolicy_EnvironmentTier) EnumDescriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{8, 0}+ return file_store_policy_proto_rawDescGZIP(), []int{7, 0}}type DataSourceQueryPolicy_Restriction int32@@ -373,11 +324,11 @@ func (x DataSourceQueryPolicy_Restriction) String() string {}func (DataSourceQueryPolicy_Restriction) Descriptor() protoreflect.EnumDescriptor {- return file_store_policy_proto_enumTypes[6].Descriptor()+ return file_store_policy_proto_enumTypes[5].Descriptor()}func (DataSourceQueryPolicy_Restriction) Type() protoreflect.EnumType {- return &file_store_policy_proto_enumTypes[6]+ return &file_store_policy_proto_enumTypes[5]}func (x DataSourceQueryPolicy_Restriction) Number() protoreflect.EnumNumber {@@ -386,7 +337,7 @@ func (x DataSourceQueryPolicy_Restriction) Number() protoreflect.EnumNumber {// Deprecated: Use DataSourceQueryPolicy_Restriction.Descriptor instead.func (DataSourceQueryPolicy_Restriction) EnumDescriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{10, 0}+ return file_store_policy_proto_rawDescGZIP(), []int{9, 0}}type Policy struct {@@ -576,74 +527,6 @@ func (x *MaskingRulePolicy) GetRules() []*MaskingRulePolicy_MaskingRule {return nil}-type SQLReviewRule struct {- state protoimpl.MessageState `protogen:"open.v1"`- Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`- Level SQLReviewRuleLevel `protobuf:"varint,2,opt,name=level,proto3,enum=bytebase.store.SQLReviewRuleLevel" json:"level,omitempty"`- Payload string `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`- Engine Engine `protobuf:"varint,4,opt,name=engine,proto3,enum=bytebase.store.Engine" json:"engine,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *SQLReviewRule) Reset() {- *x = SQLReviewRule{}- mi := &file_store_policy_proto_msgTypes[4]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *SQLReviewRule) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*SQLReviewRule) ProtoMessage() {}--func (x *SQLReviewRule) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[4]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use SQLReviewRule.ProtoReflect.Descriptor instead.-func (*SQLReviewRule) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{4}-}--func (x *SQLReviewRule) GetType() string {- if x != nil {- return x.Type- }- return ""-}--func (x *SQLReviewRule) GetLevel() SQLReviewRuleLevel {- if x != nil {- return x.Level- }- return SQLReviewRuleLevel_LEVEL_UNSPECIFIED-}--func (x *SQLReviewRule) GetPayload() string {- if x != nil {- return x.Payload- }- return ""-}--func (x *SQLReviewRule) GetEngine() Engine {- if x != nil {- return x.Engine- }- return Engine_ENGINE_UNSPECIFIED-}-type TagPolicy struct {state protoimpl.MessageState `protogen:"open.v1"`// tags is the key-value map for resources.@@ -655,7 +538,7 @@ type TagPolicy struct {func (x *TagPolicy) Reset() {*x = TagPolicy{}- mi := &file_store_policy_proto_msgTypes[5]+ mi := &file_store_policy_proto_msgTypes[4]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -667,7 +550,7 @@ func (x *TagPolicy) String() string {func (*TagPolicy) ProtoMessage() {}func (x *TagPolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[5]+ mi := &file_store_policy_proto_msgTypes[4]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -680,7 +563,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{5}+ return file_store_policy_proto_rawDescGZIP(), []int{4}}func (x *TagPolicy) GetTags() map[string]string {@@ -709,7 +592,7 @@ type Binding struct {func (x *Binding) Reset() {*x = Binding{}- mi := &file_store_policy_proto_msgTypes[6]+ mi := &file_store_policy_proto_msgTypes[5]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -721,7 +604,7 @@ func (x *Binding) String() string {func (*Binding) ProtoMessage() {}func (x *Binding) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[6]+ mi := &file_store_policy_proto_msgTypes[5]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -734,7 +617,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{6}+ return file_store_policy_proto_rawDescGZIP(), []int{5}}func (x *Binding) GetRole() string {@@ -769,7 +652,7 @@ type IamPolicy struct {func (x *IamPolicy) Reset() {*x = IamPolicy{}- mi := &file_store_policy_proto_msgTypes[7]+ mi := &file_store_policy_proto_msgTypes[6]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -781,7 +664,7 @@ func (x *IamPolicy) String() string {func (*IamPolicy) ProtoMessage() {}func (x *IamPolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[7]+ mi := &file_store_policy_proto_msgTypes[6]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -794,7 +677,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{7}+ return file_store_policy_proto_rawDescGZIP(), []int{6}}func (x *IamPolicy) GetBindings() []*Binding {@@ -815,7 +698,7 @@ type EnvironmentTierPolicy struct {func (x *EnvironmentTierPolicy) Reset() {*x = EnvironmentTierPolicy{}- mi := &file_store_policy_proto_msgTypes[8]+ mi := &file_store_policy_proto_msgTypes[7]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -827,7 +710,7 @@ func (x *EnvironmentTierPolicy) String() string {func (*EnvironmentTierPolicy) ProtoMessage() {}func (x *EnvironmentTierPolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[8]+ mi := &file_store_policy_proto_msgTypes[7]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -840,7 +723,7 @@ func (x *EnvironmentTierPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use EnvironmentTierPolicy.ProtoReflect.Descriptor instead.func (*EnvironmentTierPolicy) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{8}+ return file_store_policy_proto_rawDescGZIP(), []int{7}}func (x *EnvironmentTierPolicy) GetEnvironmentTier() EnvironmentTierPolicy_EnvironmentTier {@@ -878,7 +761,7 @@ type QueryDataPolicy struct {func (x *QueryDataPolicy) Reset() {*x = QueryDataPolicy{}- mi := &file_store_policy_proto_msgTypes[9]+ mi := &file_store_policy_proto_msgTypes[8]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -890,7 +773,7 @@ func (x *QueryDataPolicy) String() string {func (*QueryDataPolicy) ProtoMessage() {}func (x *QueryDataPolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[9]+ mi := &file_store_policy_proto_msgTypes[8]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -903,7 +786,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{9}+ return file_store_policy_proto_rawDescGZIP(), []int{8}}func (x *QueryDataPolicy) GetTimeout() *durationpb.Duration {@@ -955,7 +838,7 @@ type DataSourceQueryPolicy struct {func (x *DataSourceQueryPolicy) Reset() {*x = DataSourceQueryPolicy{}- mi := &file_store_policy_proto_msgTypes[10]+ mi := &file_store_policy_proto_msgTypes[9]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -967,7 +850,7 @@ func (x *DataSourceQueryPolicy) String() string {func (*DataSourceQueryPolicy) ProtoMessage() {}func (x *DataSourceQueryPolicy) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[10]+ mi := &file_store_policy_proto_msgTypes[9]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -980,7 +863,7 @@ func (x *DataSourceQueryPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use DataSourceQueryPolicy.ProtoReflect.Descriptor instead.func (*DataSourceQueryPolicy) Descriptor() ([]byte, []int) {- return file_store_policy_proto_rawDescGZIP(), []int{10}+ return file_store_policy_proto_rawDescGZIP(), []int{9}}func (x *DataSourceQueryPolicy) GetAdminDataSourceRestriction() DataSourceQueryPolicy_Restriction {@@ -1016,7 +899,7 @@ type RolloutPolicy_Checkers struct {func (x *RolloutPolicy_Checkers) Reset() {*x = RolloutPolicy_Checkers{}- mi := &file_store_policy_proto_msgTypes[11]+ mi := &file_store_policy_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1028,7 +911,7 @@ func (x *RolloutPolicy_Checkers) String() string {func (*RolloutPolicy_Checkers) ProtoMessage() {}func (x *RolloutPolicy_Checkers) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[11]+ mi := &file_store_policy_proto_msgTypes[10]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1068,7 +951,7 @@ type RolloutPolicy_Checkers_RequiredStatusChecks struct {func (x *RolloutPolicy_Checkers_RequiredStatusChecks) Reset() {*x = RolloutPolicy_Checkers_RequiredStatusChecks{}- mi := &file_store_policy_proto_msgTypes[12]+ mi := &file_store_policy_proto_msgTypes[11]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1080,7 +963,7 @@ func (x *RolloutPolicy_Checkers_RequiredStatusChecks) String() string {func (*RolloutPolicy_Checkers_RequiredStatusChecks) ProtoMessage() {}func (x *RolloutPolicy_Checkers_RequiredStatusChecks) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[12]+ mi := &file_store_policy_proto_msgTypes[11]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1119,7 +1002,7 @@ type MaskingExceptionPolicy_MaskingException struct {func (x *MaskingExceptionPolicy_MaskingException) Reset() {*x = MaskingExceptionPolicy_MaskingException{}- mi := &file_store_policy_proto_msgTypes[13]+ mi := &file_store_policy_proto_msgTypes[12]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1131,7 +1014,7 @@ func (x *MaskingExceptionPolicy_MaskingException) String() string {func (*MaskingExceptionPolicy_MaskingException) ProtoMessage() {}func (x *MaskingExceptionPolicy_MaskingException) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[13]+ mi := &file_store_policy_proto_msgTypes[12]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1180,7 +1063,7 @@ type MaskingRulePolicy_MaskingRule struct {func (x *MaskingRulePolicy_MaskingRule) Reset() {*x = MaskingRulePolicy_MaskingRule{}- mi := &file_store_policy_proto_msgTypes[14]+ mi := &file_store_policy_proto_msgTypes[13]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1192,7 +1075,7 @@ func (x *MaskingRulePolicy_MaskingRule) String() string {func (*MaskingRulePolicy_MaskingRule) ProtoMessage() {}func (x *MaskingRulePolicy_MaskingRule) ProtoReflect() protoreflect.Message {- mi := &file_store_policy_proto_msgTypes[14]+ mi := &file_store_policy_proto_msgTypes[13]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1233,7 +1116,7 @@ var File_store_policy_proto protoreflect.FileDescriptorconst file_store_policy_proto_rawDesc = "" +"\n" +- "\x12store/policy.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x12store/common.proto\"\xe9\x01\n" ++ "\x12store/policy.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\"\xe9\x01\n" +"\x06Policy\"\x8b\x01\n" +"\x04Type\x12\x14\n" +"\x10TYPE_UNSPECIFIED\x10\x00\x12\v\n" +@@ -1282,12 +1165,7 @@ const file_store_policy_proto_rawDesc = "" +"\vMaskingRule\x12\x0e\n" +"\x02id\x18\x01 \x01(\tR\x02id\x12/\n" +"\tcondition\x18\x02 \x01(\v2\x11.google.type.ExprR\tcondition\x12#\n" +- "\rsemantic_type\x18\x03 \x01(\tR\fsemanticType\"\xa7\x01\n" +- "\rSQLReviewRule\x12\x12\n" +- "\x04type\x18\x01 \x01(\tR\x04type\x128\n" +- "\x05level\x18\x02 \x01(\x0e2\".bytebase.store.SQLReviewRuleLevelR\x05level\x12\x18\n" +- "\apayload\x18\x03 \x01(\tR\apayload\x12.\n" +- "\x06engine\x18\x04 \x01(\x0e2\x16.bytebase.store.EngineR\x06engine\"}\n" ++ "\rsemantic_type\x18\x03 \x01(\tR\fsemanticType\"}\n" +"\tTagPolicy\x127\n" +"\x04tags\x18\x01 \x03(\v2#.bytebase.store.TagPolicy.TagsEntryR\x04tags\x1a7\n" +"\tTagsEntry\x12\x10\n" +@@ -1319,11 +1197,7 @@ const file_store_policy_proto_rawDesc = "" +"\vRestriction\x12\x1b\n" +"\x17RESTRICTION_UNSPECIFIED\x10\x00\x12\f\n" +"\bFALLBACK\x10\x01\x12\f\n" +- "\bDISALLOW\x10\x02*C\n" +- "\x12SQLReviewRuleLevel\x12\x15\n" +- "\x11LEVEL_UNSPECIFIED\x10\x00\x12\t\n" +- "\x05ERROR\x10\x01\x12\v\n" +- "\aWARNING\x10\x02B\x8e\x01\n" ++ "\bDISALLOW\x10\x02B\x8e\x01\n" +"\x12com.bytebase.storeB\vPolicyProtoP\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 (@@ -1338,58 +1212,53 @@ func file_store_policy_proto_rawDescGZIP() []byte {return file_store_policy_proto_rawDescData}-var file_store_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 7)-var file_store_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 16)+var file_store_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 6)+var file_store_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 15)var file_store_policy_proto_goTypes = []any{- (SQLReviewRuleLevel)(0), // 0: bytebase.store.SQLReviewRuleLevel- (Policy_Type)(0), // 1: bytebase.store.Policy.Type- (Policy_Resource)(0), // 2: bytebase.store.Policy.Resource- (RolloutPolicy_Checkers_PlanCheckEnforcement)(0), // 3: bytebase.store.RolloutPolicy.Checkers.PlanCheckEnforcement- (MaskingExceptionPolicy_MaskingException_Action)(0), // 4: bytebase.store.MaskingExceptionPolicy.MaskingException.Action- (EnvironmentTierPolicy_EnvironmentTier)(0), // 5: bytebase.store.EnvironmentTierPolicy.EnvironmentTier- (DataSourceQueryPolicy_Restriction)(0), // 6: bytebase.store.DataSourceQueryPolicy.Restriction- (*Policy)(nil), // 7: bytebase.store.Policy- (*RolloutPolicy)(nil), // 8: bytebase.store.RolloutPolicy- (*MaskingExceptionPolicy)(nil), // 9: bytebase.store.MaskingExceptionPolicy- (*MaskingRulePolicy)(nil), // 10: bytebase.store.MaskingRulePolicy- (*SQLReviewRule)(nil), // 11: bytebase.store.SQLReviewRule- (*TagPolicy)(nil), // 12: bytebase.store.TagPolicy- (*Binding)(nil), // 13: bytebase.store.Binding- (*IamPolicy)(nil), // 14: bytebase.store.IamPolicy- (*EnvironmentTierPolicy)(nil), // 15: bytebase.store.EnvironmentTierPolicy- (*QueryDataPolicy)(nil), // 16: bytebase.store.QueryDataPolicy- (*DataSourceQueryPolicy)(nil), // 17: bytebase.store.DataSourceQueryPolicy- (*RolloutPolicy_Checkers)(nil), // 18: bytebase.store.RolloutPolicy.Checkers- (*RolloutPolicy_Checkers_RequiredStatusChecks)(nil), // 19: bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks- (*MaskingExceptionPolicy_MaskingException)(nil), // 20: bytebase.store.MaskingExceptionPolicy.MaskingException- (*MaskingRulePolicy_MaskingRule)(nil), // 21: bytebase.store.MaskingRulePolicy.MaskingRule- nil, // 22: bytebase.store.TagPolicy.TagsEntry- (Engine)(0), // 23: bytebase.store.Engine- (*expr.Expr)(nil), // 24: google.type.Expr- (*durationpb.Duration)(nil), // 25: google.protobuf.Duration+ (Policy_Type)(0), // 0: bytebase.store.Policy.Type+ (Policy_Resource)(0), // 1: bytebase.store.Policy.Resource+ (RolloutPolicy_Checkers_PlanCheckEnforcement)(0), // 2: bytebase.store.RolloutPolicy.Checkers.PlanCheckEnforcement+ (MaskingExceptionPolicy_MaskingException_Action)(0), // 3: bytebase.store.MaskingExceptionPolicy.MaskingException.Action+ (EnvironmentTierPolicy_EnvironmentTier)(0), // 4: bytebase.store.EnvironmentTierPolicy.EnvironmentTier+ (DataSourceQueryPolicy_Restriction)(0), // 5: bytebase.store.DataSourceQueryPolicy.Restriction+ (*Policy)(nil), // 6: bytebase.store.Policy+ (*RolloutPolicy)(nil), // 7: bytebase.store.RolloutPolicy+ (*MaskingExceptionPolicy)(nil), // 8: bytebase.store.MaskingExceptionPolicy+ (*MaskingRulePolicy)(nil), // 9: bytebase.store.MaskingRulePolicy+ (*TagPolicy)(nil), // 10: bytebase.store.TagPolicy+ (*Binding)(nil), // 11: bytebase.store.Binding+ (*IamPolicy)(nil), // 12: bytebase.store.IamPolicy+ (*EnvironmentTierPolicy)(nil), // 13: bytebase.store.EnvironmentTierPolicy+ (*QueryDataPolicy)(nil), // 14: bytebase.store.QueryDataPolicy+ (*DataSourceQueryPolicy)(nil), // 15: bytebase.store.DataSourceQueryPolicy+ (*RolloutPolicy_Checkers)(nil), // 16: bytebase.store.RolloutPolicy.Checkers+ (*RolloutPolicy_Checkers_RequiredStatusChecks)(nil), // 17: bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks+ (*MaskingExceptionPolicy_MaskingException)(nil), // 18: bytebase.store.MaskingExceptionPolicy.MaskingException+ (*MaskingRulePolicy_MaskingRule)(nil), // 19: bytebase.store.MaskingRulePolicy.MaskingRule+ nil, // 20: bytebase.store.TagPolicy.TagsEntry+ (*expr.Expr)(nil), // 21: google.type.Expr+ (*durationpb.Duration)(nil), // 22: google.protobuf.Duration}var file_store_policy_proto_depIdxs = []int32{- 18, // 0: bytebase.store.RolloutPolicy.checkers:type_name -> bytebase.store.RolloutPolicy.Checkers- 20, // 1: bytebase.store.MaskingExceptionPolicy.masking_exceptions:type_name -> bytebase.store.MaskingExceptionPolicy.MaskingException- 21, // 2: bytebase.store.MaskingRulePolicy.rules:type_name -> bytebase.store.MaskingRulePolicy.MaskingRule- 0, // 3: bytebase.store.SQLReviewRule.level:type_name -> bytebase.store.SQLReviewRuleLevel- 23, // 4: bytebase.store.SQLReviewRule.engine:type_name -> bytebase.store.Engine- 22, // 5: bytebase.store.TagPolicy.tags:type_name -> bytebase.store.TagPolicy.TagsEntry- 24, // 6: bytebase.store.Binding.condition:type_name -> google.type.Expr- 13, // 7: bytebase.store.IamPolicy.bindings:type_name -> bytebase.store.Binding- 5, // 8: bytebase.store.EnvironmentTierPolicy.environment_tier:type_name -> bytebase.store.EnvironmentTierPolicy.EnvironmentTier- 25, // 9: bytebase.store.QueryDataPolicy.timeout:type_name -> google.protobuf.Duration- 6, // 10: bytebase.store.DataSourceQueryPolicy.admin_data_source_restriction:type_name -> bytebase.store.DataSourceQueryPolicy.Restriction- 19, // 11: bytebase.store.RolloutPolicy.Checkers.required_status_checks:type_name -> bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks- 3, // 12: bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks.plan_check_enforcement:type_name -> bytebase.store.RolloutPolicy.Checkers.PlanCheckEnforcement- 4, // 13: bytebase.store.MaskingExceptionPolicy.MaskingException.action:type_name -> bytebase.store.MaskingExceptionPolicy.MaskingException.Action- 24, // 14: bytebase.store.MaskingExceptionPolicy.MaskingException.condition:type_name -> google.type.Expr- 24, // 15: bytebase.store.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr- 16, // [16:16] is the sub-list for method output_type- 16, // [16:16] is the sub-list for method input_type- 16, // [16:16] is the sub-list for extension type_name- 16, // [16:16] is the sub-list for extension extendee- 0, // [0:16] is the sub-list for field type_name+ 16, // 0: bytebase.store.RolloutPolicy.checkers:type_name -> bytebase.store.RolloutPolicy.Checkers+ 18, // 1: bytebase.store.MaskingExceptionPolicy.masking_exceptions:type_name -> bytebase.store.MaskingExceptionPolicy.MaskingException+ 19, // 2: bytebase.store.MaskingRulePolicy.rules:type_name -> bytebase.store.MaskingRulePolicy.MaskingRule+ 20, // 3: bytebase.store.TagPolicy.tags:type_name -> bytebase.store.TagPolicy.TagsEntry+ 21, // 4: bytebase.store.Binding.condition:type_name -> google.type.Expr+ 11, // 5: bytebase.store.IamPolicy.bindings:type_name -> bytebase.store.Binding+ 4, // 6: bytebase.store.EnvironmentTierPolicy.environment_tier:type_name -> bytebase.store.EnvironmentTierPolicy.EnvironmentTier+ 22, // 7: bytebase.store.QueryDataPolicy.timeout:type_name -> google.protobuf.Duration+ 5, // 8: bytebase.store.DataSourceQueryPolicy.admin_data_source_restriction:type_name -> bytebase.store.DataSourceQueryPolicy.Restriction+ 17, // 9: bytebase.store.RolloutPolicy.Checkers.required_status_checks:type_name -> bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks+ 2, // 10: bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks.plan_check_enforcement:type_name -> bytebase.store.RolloutPolicy.Checkers.PlanCheckEnforcement+ 3, // 11: bytebase.store.MaskingExceptionPolicy.MaskingException.action:type_name -> bytebase.store.MaskingExceptionPolicy.MaskingException.Action+ 21, // 12: bytebase.store.MaskingExceptionPolicy.MaskingException.condition:type_name -> google.type.Expr+ 21, // 13: bytebase.store.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr+ 14, // [14:14] is the sub-list for method output_type+ 14, // [14:14] is the sub-list for method input_type+ 14, // [14:14] is the sub-list for extension type_name+ 14, // [14:14] is the sub-list for extension extendee+ 0, // [0:14] is the sub-list for field type_name}func init() { file_store_policy_proto_init() }@@ -1397,14 +1266,13 @@ func file_store_policy_proto_init() {if File_store_policy_proto != nil {return}- file_store_common_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: 7,- NumMessages: 16,+ NumEnums: 6,+ NumMessages: 15,NumExtensions: 0,NumServices: 0,},diff --git a/backend/generated-go/store/policy_equal.pb.go b/backend/generated-go/store/policy_equal.pb.goindex c39f1b473a..ac771f04a4 100644--- a/backend/generated-go/store/policy_equal.pb.go+++ b/backend/generated-go/store/policy_equal.pb.go@@ -149,28 +149,6 @@ func (x *MaskingRulePolicy) Equal(y *MaskingRulePolicy) bool {return true}-func (x *SQLReviewRule) Equal(y *SQLReviewRule) 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.Level != y.Level {- return false- }- if x.Payload != y.Payload {- return false- }- if x.Engine != y.Engine {- return false- }- return true-}-func (x *TagPolicy) Equal(y *TagPolicy) bool {if x == y {return truediff --git a/backend/generated-go/store/review_config.pb.go b/backend/generated-go/store/review_config.pb.goindex 26683438ba..de09bbe81f 100644--- a/backend/generated-go/store/review_config.pb.go+++ b/backend/generated-go/store/review_config.pb.go@@ -21,6 +21,55 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))+type SQLReviewRuleLevel int32++const (+ SQLReviewRuleLevel_LEVEL_UNSPECIFIED SQLReviewRuleLevel = 0+ SQLReviewRuleLevel_ERROR SQLReviewRuleLevel = 1+ SQLReviewRuleLevel_WARNING SQLReviewRuleLevel = 2+)++// Enum value maps for SQLReviewRuleLevel.+var (+ SQLReviewRuleLevel_name = map[int32]string{+ 0: "LEVEL_UNSPECIFIED",+ 1: "ERROR",+ 2: "WARNING",+ }+ SQLReviewRuleLevel_value = map[string]int32{+ "LEVEL_UNSPECIFIED": 0,+ "ERROR": 1,+ "WARNING": 2,+ }+)++func (x SQLReviewRuleLevel) Enum() *SQLReviewRuleLevel {+ p := new(SQLReviewRuleLevel)+ *p = x+ return p+}++func (x SQLReviewRuleLevel) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (SQLReviewRuleLevel) Descriptor() protoreflect.EnumDescriptor {+ return file_store_review_config_proto_enumTypes[0].Descriptor()+}++func (SQLReviewRuleLevel) Type() protoreflect.EnumType {+ return &file_store_review_config_proto_enumTypes[0]+}++func (x SQLReviewRuleLevel) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use SQLReviewRuleLevel.Descriptor instead.+func (SQLReviewRuleLevel) EnumDescriptor() ([]byte, []int) {+ return file_store_review_config_proto_rawDescGZIP(), []int{0}+}+type ReviewConfigPayload struct {state protoimpl.MessageState `protogen:"open.v1"`SqlReviewRules []*SQLReviewRule `protobuf:"bytes,1,rep,name=sql_review_rules,json=sqlReviewRules,proto3" json:"sql_review_rules,omitempty"`@@ -65,13 +114,90 @@ func (x *ReviewConfigPayload) GetSqlReviewRules() []*SQLReviewRule {return nil}+type SQLReviewRule struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`+ Level SQLReviewRuleLevel `protobuf:"varint,2,opt,name=level,proto3,enum=bytebase.store.SQLReviewRuleLevel" json:"level,omitempty"`+ Payload string `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`+ Engine Engine `protobuf:"varint,4,opt,name=engine,proto3,enum=bytebase.store.Engine" json:"engine,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *SQLReviewRule) Reset() {+ *x = SQLReviewRule{}+ mi := &file_store_review_config_proto_msgTypes[1]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *SQLReviewRule) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SQLReviewRule) ProtoMessage() {}++func (x *SQLReviewRule) ProtoReflect() protoreflect.Message {+ mi := &file_store_review_config_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 SQLReviewRule.ProtoReflect.Descriptor instead.+func (*SQLReviewRule) Descriptor() ([]byte, []int) {+ return file_store_review_config_proto_rawDescGZIP(), []int{1}+}++func (x *SQLReviewRule) GetType() string {+ if x != nil {+ return x.Type+ }+ return ""+}++func (x *SQLReviewRule) GetLevel() SQLReviewRuleLevel {+ if x != nil {+ return x.Level+ }+ return SQLReviewRuleLevel_LEVEL_UNSPECIFIED+}++func (x *SQLReviewRule) GetPayload() string {+ if x != nil {+ return x.Payload+ }+ return ""+}++func (x *SQLReviewRule) GetEngine() Engine {+ if x != nil {+ return x.Engine+ }+ return Engine_ENGINE_UNSPECIFIED+}+var File_store_review_config_proto protoreflect.FileDescriptorconst file_store_review_config_proto_rawDesc = "" +"\n" +- "\x19store/review_config.proto\x12\x0ebytebase.store\x1a\x12store/policy.proto\"^\n" ++ "\x19store/review_config.proto\x12\x0ebytebase.store\x1a\x12store/common.proto\"^\n" +"\x13ReviewConfigPayload\x12G\n" +- "\x10sql_review_rules\x18\x01 \x03(\v2\x1d.bytebase.store.SQLReviewRuleR\x0esqlReviewRulesB\x94\x01\n" ++ "\x10sql_review_rules\x18\x01 \x03(\v2\x1d.bytebase.store.SQLReviewRuleR\x0esqlReviewRules\"\xa7\x01\n" ++ "\rSQLReviewRule\x12\x12\n" ++ "\x04type\x18\x01 \x01(\tR\x04type\x128\n" ++ "\x05level\x18\x02 \x01(\x0e2\".bytebase.store.SQLReviewRuleLevelR\x05level\x12\x18\n" ++ "\apayload\x18\x03 \x01(\tR\apayload\x12.\n" ++ "\x06engine\x18\x04 \x01(\x0e2\x16.bytebase.store.EngineR\x06engine*C\n" ++ "\x12SQLReviewRuleLevel\x12\x15\n" ++ "\x11LEVEL_UNSPECIFIED\x10\x00\x12\t\n" ++ "\x05ERROR\x10\x01\x12\v\n" ++ "\aWARNING\x10\x02B\x94\x01\n" +"\x12com.bytebase.storeB\x11ReviewConfigProtoP\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 (@@ -86,18 +212,23 @@ func file_store_review_config_proto_rawDescGZIP() []byte {return file_store_review_config_proto_rawDescData}-var file_store_review_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1)+var file_store_review_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)+var file_store_review_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)var file_store_review_config_proto_goTypes = []any{- (*ReviewConfigPayload)(nil), // 0: bytebase.store.ReviewConfigPayload- (*SQLReviewRule)(nil), // 1: bytebase.store.SQLReviewRule+ (SQLReviewRuleLevel)(0), // 0: bytebase.store.SQLReviewRuleLevel+ (*ReviewConfigPayload)(nil), // 1: bytebase.store.ReviewConfigPayload+ (*SQLReviewRule)(nil), // 2: bytebase.store.SQLReviewRule+ (Engine)(0), // 3: bytebase.store.Engine}var file_store_review_config_proto_depIdxs = []int32{- 1, // 0: bytebase.store.ReviewConfigPayload.sql_review_rules:type_name -> bytebase.store.SQLReviewRule- 1, // [1:1] is the sub-list for method output_type- 1, // [1:1] is the sub-list for method input_type- 1, // [1:1] is the sub-list for extension type_name- 1, // [1:1] is the sub-list for extension extendee- 0, // [0:1] is the sub-list for field type_name+ 2, // 0: bytebase.store.ReviewConfigPayload.sql_review_rules:type_name -> bytebase.store.SQLReviewRule+ 0, // 1: bytebase.store.SQLReviewRule.level:type_name -> bytebase.store.SQLReviewRuleLevel+ 3, // 2: bytebase.store.SQLReviewRule.engine:type_name -> bytebase.store.Engine+ 3, // [3:3] is the sub-list for method output_type+ 3, // [3:3] is the sub-list for method input_type+ 3, // [3:3] is the sub-list for extension type_name+ 3, // [3:3] is the sub-list for extension extendee+ 0, // [0:3] is the sub-list for field type_name}func init() { file_store_review_config_proto_init() }@@ -105,19 +236,20 @@ func file_store_review_config_proto_init() {if File_store_review_config_proto != nil {return}- file_store_policy_proto_init()+ file_store_common_proto_init()type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_review_config_proto_rawDesc), len(file_store_review_config_proto_rawDesc)),- NumEnums: 0,- NumMessages: 1,+ NumEnums: 1,+ NumMessages: 2,NumExtensions: 0,NumServices: 0,},GoTypes: file_store_review_config_proto_goTypes,DependencyIndexes: file_store_review_config_proto_depIdxs,+ EnumInfos: file_store_review_config_proto_enumTypes,MessageInfos: file_store_review_config_proto_msgTypes,}.Build()File_store_review_config_proto = out.Filediff --git a/backend/generated-go/store/review_config_equal.pb.go b/backend/generated-go/store/review_config_equal.pb.goindex 727acc8e2c..a5b8ce48c6 100644--- a/backend/generated-go/store/review_config_equal.pb.go+++ b/backend/generated-go/store/review_config_equal.pb.go@@ -20,3 +20,25 @@ func (x *ReviewConfigPayload) Equal(y *ReviewConfigPayload) bool {}return true}++func (x *SQLReviewRule) Equal(y *SQLReviewRule) 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.Level != y.Level {+ return false+ }+ if x.Payload != y.Payload {+ return false+ }+ if x.Engine != y.Engine {+ return false+ }+ return true+}diff --git a/backend/generated-go/v1/org_policy_service.pb.go b/backend/generated-go/v1/org_policy_service.pb.goindex ff52d6ab62..7a22ae41bd 100644--- a/backend/generated-go/v1/org_policy_service.pb.go+++ b/backend/generated-go/v1/org_policy_service.pb.go@@ -152,59 +152,6 @@ func (PolicyResourceType) EnumDescriptor() ([]byte, []int) {return file_v1_org_policy_service_proto_rawDescGZIP(), []int{1}}-// The severity level for SQL review rules.-type SQLReviewRuleLevel int32--const (- // Unspecified level.- SQLReviewRuleLevel_LEVEL_UNSPECIFIED SQLReviewRuleLevel = 0- // Rule violation is an error.- SQLReviewRuleLevel_ERROR SQLReviewRuleLevel = 1- // Rule violation is a warning.- SQLReviewRuleLevel_WARNING SQLReviewRuleLevel = 2-)--// Enum value maps for SQLReviewRuleLevel.-var (- SQLReviewRuleLevel_name = map[int32]string{- 0: "LEVEL_UNSPECIFIED",- 1: "ERROR",- 2: "WARNING",- }- SQLReviewRuleLevel_value = map[string]int32{- "LEVEL_UNSPECIFIED": 0,- "ERROR": 1,- "WARNING": 2,- }-)--func (x SQLReviewRuleLevel) Enum() *SQLReviewRuleLevel {- p := new(SQLReviewRuleLevel)- *p = x- return p-}--func (x SQLReviewRuleLevel) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (SQLReviewRuleLevel) Descriptor() protoreflect.EnumDescriptor {- return file_v1_org_policy_service_proto_enumTypes[2].Descriptor()-}--func (SQLReviewRuleLevel) Type() protoreflect.EnumType {- return &file_v1_org_policy_service_proto_enumTypes[2]-}--func (x SQLReviewRuleLevel) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use SQLReviewRuleLevel.Descriptor instead.-func (SQLReviewRuleLevel) EnumDescriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{2}-}-type RolloutPolicy_Checkers_PlanCheckEnforcement int32const (@@ -241,11 +188,11 @@ func (x RolloutPolicy_Checkers_PlanCheckEnforcement) String() string {}func (RolloutPolicy_Checkers_PlanCheckEnforcement) Descriptor() protoreflect.EnumDescriptor {- return file_v1_org_policy_service_proto_enumTypes[3].Descriptor()+ return file_v1_org_policy_service_proto_enumTypes[2].Descriptor()}func (RolloutPolicy_Checkers_PlanCheckEnforcement) Type() protoreflect.EnumType {- return &file_v1_org_policy_service_proto_enumTypes[3]+ return &file_v1_org_policy_service_proto_enumTypes[2]}func (x RolloutPolicy_Checkers_PlanCheckEnforcement) Number() protoreflect.EnumNumber {@@ -294,11 +241,11 @@ func (x MaskingExceptionPolicy_MaskingException_Action) String() string {}func (MaskingExceptionPolicy_MaskingException_Action) Descriptor() protoreflect.EnumDescriptor {- return file_v1_org_policy_service_proto_enumTypes[4].Descriptor()+ return file_v1_org_policy_service_proto_enumTypes[3].Descriptor()}func (MaskingExceptionPolicy_MaskingException_Action) Type() protoreflect.EnumType {- return &file_v1_org_policy_service_proto_enumTypes[4]+ return &file_v1_org_policy_service_proto_enumTypes[3]}func (x MaskingExceptionPolicy_MaskingException_Action) Number() protoreflect.EnumNumber {@@ -307,7 +254,7 @@ func (x MaskingExceptionPolicy_MaskingException_Action) Number() protoreflect.En// Deprecated: Use MaskingExceptionPolicy_MaskingException_Action.Descriptor instead.func (MaskingExceptionPolicy_MaskingException_Action) EnumDescriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10, 0, 0}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{9, 0, 0}}// Restriction level for admin data source access.@@ -347,11 +294,11 @@ func (x DataSourceQueryPolicy_Restriction) String() string {}func (DataSourceQueryPolicy_Restriction) Descriptor() protoreflect.EnumDescriptor {- return file_v1_org_policy_service_proto_enumTypes[5].Descriptor()+ return file_v1_org_policy_service_proto_enumTypes[4].Descriptor()}func (DataSourceQueryPolicy_Restriction) Type() protoreflect.EnumType {- return &file_v1_org_policy_service_proto_enumTypes[5]+ return &file_v1_org_policy_service_proto_enumTypes[4]}func (x DataSourceQueryPolicy_Restriction) Number() protoreflect.EnumNumber {@@ -360,7 +307,7 @@ func (x DataSourceQueryPolicy_Restriction) Number() protoreflect.EnumNumber {// Deprecated: Use DataSourceQueryPolicy_Restriction.Descriptor instead.func (DataSourceQueryPolicy_Restriction) EnumDescriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{13, 0}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{12, 0}}type CreatePolicyRequest struct {@@ -1053,79 +1000,6 @@ func (x *QueryDataPolicy) GetDisableCopyData() bool {return false}-// SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.-type SQLReviewRule struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The type of SQL review rule.- Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`- // The severity level of the rule.- Level SQLReviewRuleLevel `protobuf:"varint,2,opt,name=level,proto3,enum=bytebase.v1.SQLReviewRuleLevel" json:"level,omitempty"`- // The payload is a JSON string that varies by rule type.- Payload string `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`- // The database engine this rule applies to.- Engine Engine `protobuf:"varint,4,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *SQLReviewRule) Reset() {- *x = SQLReviewRule{}- mi := &file_v1_org_policy_service_proto_msgTypes[9]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *SQLReviewRule) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*SQLReviewRule) ProtoMessage() {}--func (x *SQLReviewRule) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[9]- 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 SQLReviewRule.ProtoReflect.Descriptor instead.-func (*SQLReviewRule) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{9}-}--func (x *SQLReviewRule) GetType() string {- if x != nil {- return x.Type- }- return ""-}--func (x *SQLReviewRule) GetLevel() SQLReviewRuleLevel {- if x != nil {- return x.Level- }- return SQLReviewRuleLevel_LEVEL_UNSPECIFIED-}--func (x *SQLReviewRule) GetPayload() string {- if x != nil {- return x.Payload- }- return ""-}--func (x *SQLReviewRule) GetEngine() Engine {- if x != nil {- return x.Engine- }- return Engine_ENGINE_UNSPECIFIED-}-// MaskingExceptionPolicy is the allowlist of users who can access sensitive data.type MaskingExceptionPolicy struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -1137,7 +1011,7 @@ type MaskingExceptionPolicy struct {func (x *MaskingExceptionPolicy) Reset() {*x = MaskingExceptionPolicy{}- mi := &file_v1_org_policy_service_proto_msgTypes[10]+ mi := &file_v1_org_policy_service_proto_msgTypes[9]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1149,7 +1023,7 @@ func (x *MaskingExceptionPolicy) String() string {func (*MaskingExceptionPolicy) ProtoMessage() {}func (x *MaskingExceptionPolicy) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[10]+ mi := &file_v1_org_policy_service_proto_msgTypes[9]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1162,7 +1036,7 @@ func (x *MaskingExceptionPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use MaskingExceptionPolicy.ProtoReflect.Descriptor instead.func (*MaskingExceptionPolicy) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{9}}func (x *MaskingExceptionPolicy) GetMaskingExceptions() []*MaskingExceptionPolicy_MaskingException {@@ -1183,7 +1057,7 @@ type MaskingRulePolicy struct {func (x *MaskingRulePolicy) Reset() {*x = MaskingRulePolicy{}- mi := &file_v1_org_policy_service_proto_msgTypes[11]+ mi := &file_v1_org_policy_service_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1195,7 +1069,7 @@ func (x *MaskingRulePolicy) String() string {func (*MaskingRulePolicy) ProtoMessage() {}func (x *MaskingRulePolicy) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[11]+ mi := &file_v1_org_policy_service_proto_msgTypes[10]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1208,7 +1082,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{11}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10}}func (x *MaskingRulePolicy) GetRules() []*MaskingRulePolicy_MaskingRule {@@ -1230,7 +1104,7 @@ type TagPolicy struct {func (x *TagPolicy) Reset() {*x = TagPolicy{}- mi := &file_v1_org_policy_service_proto_msgTypes[12]+ mi := &file_v1_org_policy_service_proto_msgTypes[11]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1242,7 +1116,7 @@ func (x *TagPolicy) String() string {func (*TagPolicy) ProtoMessage() {}func (x *TagPolicy) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[12]+ mi := &file_v1_org_policy_service_proto_msgTypes[11]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1255,7 +1129,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{12}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{11}}func (x *TagPolicy) GetTags() map[string]string {@@ -1280,7 +1154,7 @@ type DataSourceQueryPolicy struct {func (x *DataSourceQueryPolicy) Reset() {*x = DataSourceQueryPolicy{}- mi := &file_v1_org_policy_service_proto_msgTypes[13]+ mi := &file_v1_org_policy_service_proto_msgTypes[12]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1292,7 +1166,7 @@ func (x *DataSourceQueryPolicy) String() string {func (*DataSourceQueryPolicy) ProtoMessage() {}func (x *DataSourceQueryPolicy) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[13]+ mi := &file_v1_org_policy_service_proto_msgTypes[12]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1305,7 +1179,7 @@ func (x *DataSourceQueryPolicy) ProtoReflect() protoreflect.Message {// Deprecated: Use DataSourceQueryPolicy.ProtoReflect.Descriptor instead.func (*DataSourceQueryPolicy) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{13}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{12}}func (x *DataSourceQueryPolicy) GetAdminDataSourceRestriction() DataSourceQueryPolicy_Restriction {@@ -1341,7 +1215,7 @@ type RolloutPolicy_Checkers struct {func (x *RolloutPolicy_Checkers) Reset() {*x = RolloutPolicy_Checkers{}- mi := &file_v1_org_policy_service_proto_msgTypes[14]+ mi := &file_v1_org_policy_service_proto_msgTypes[13]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1353,7 +1227,7 @@ func (x *RolloutPolicy_Checkers) String() string {func (*RolloutPolicy_Checkers) ProtoMessage() {}func (x *RolloutPolicy_Checkers) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[14]+ mi := &file_v1_org_policy_service_proto_msgTypes[13]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1393,7 +1267,7 @@ type RolloutPolicy_Checkers_RequiredStatusChecks struct {func (x *RolloutPolicy_Checkers_RequiredStatusChecks) Reset() {*x = RolloutPolicy_Checkers_RequiredStatusChecks{}- mi := &file_v1_org_policy_service_proto_msgTypes[15]+ mi := &file_v1_org_policy_service_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1405,7 +1279,7 @@ func (x *RolloutPolicy_Checkers_RequiredStatusChecks) String() string {func (*RolloutPolicy_Checkers_RequiredStatusChecks) ProtoMessage() {}func (x *RolloutPolicy_Checkers_RequiredStatusChecks) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[15]+ mi := &file_v1_org_policy_service_proto_msgTypes[14]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1461,7 +1335,7 @@ type MaskingExceptionPolicy_MaskingException struct {func (x *MaskingExceptionPolicy_MaskingException) Reset() {*x = MaskingExceptionPolicy_MaskingException{}- mi := &file_v1_org_policy_service_proto_msgTypes[16]+ mi := &file_v1_org_policy_service_proto_msgTypes[15]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1473,7 +1347,7 @@ func (x *MaskingExceptionPolicy_MaskingException) String() string {func (*MaskingExceptionPolicy_MaskingException) ProtoMessage() {}func (x *MaskingExceptionPolicy_MaskingException) ProtoReflect() protoreflect.Message {- mi := &file_v1_org_policy_service_proto_msgTypes[16]+ mi := &file_v1_org_policy_service_proto_msgTypes[15]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1486,7 +1360,7 @@ func (x *MaskingExceptionPolicy_MaskingException) ProtoReflect() protoreflect.Me// Deprecated: Use MaskingExceptionPolicy_MaskingException.ProtoReflect.Descriptor instead.func (*MaskingExceptionPolicy_MaskingException) Descriptor() ([]byte, []int) {- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10, 0}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{9, 0}}func (x *MaskingExceptionPolicy_MaskingException) GetAction() MaskingExceptionPolicy_MaskingException_Action {@@ -1547,7 +1421,7 @@ type MaskingRulePolicy_MaskingRule struct {func (x *MaskingRulePolicy_MaskingRule) Reset() {*x = MaskingRulePolicy_MaskingRule{}- mi := &file_v1_org_policy_service_proto_msgTypes[17]+ mi := &file_v1_org_policy_service_proto_msgTypes[16]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1559,7 +1433,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[17]+ mi := &file_v1_org_policy_service_proto_msgTypes[16]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1572,7 +1446,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{11, 0}+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10, 0}}func (x *MaskingRulePolicy_MaskingRule) GetId() string {@@ -1600,7 +1474,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\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.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\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.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" +@@ -1659,12 +1533,7 @@ const file_v1_org_policy_service_proto_rawDesc = "" +"\x0edisable_export\x18\x02 \x01(\bR\rdisableExport\x12.\n" +"\x13maximum_result_size\x18\x03 \x01(\x03R\x11maximumResultSize\x12.\n" +"\x13maximum_result_rows\x18\x04 \x01(\x05R\x11maximumResultRows\x12*\n" +- "\x11disable_copy_data\x18\x05 \x01(\bR\x0fdisableCopyData\"\xa1\x01\n" +- "\rSQLReviewRule\x12\x12\n" +- "\x04type\x18\x01 \x01(\tR\x04type\x125\n" +- "\x05level\x18\x02 \x01(\x0e2\x1f.bytebase.v1.SQLReviewRuleLevelR\x05level\x12\x18\n" +- "\apayload\x18\x03 \x01(\tR\apayload\x12+\n" +- "\x06engine\x18\x04 \x01(\x0e2\x13.bytebase.v1.EngineR\x06engine\"\xe9\x02\n" ++ "\x11disable_copy_data\x18\x05 \x01(\bR\x0fdisableCopyData\"\xe9\x02\n" +"\x16MaskingExceptionPolicy\x12c\n" +"\x12masking_exceptions\x18\x01 \x03(\v24.bytebase.v1.MaskingExceptionPolicy.MaskingExceptionR\x11maskingExceptions\x1a\xe9\x01\n" +"\x10MaskingException\x12S\n" +@@ -1710,11 +1579,7 @@ const file_v1_org_policy_service_proto_rawDesc = "" +"\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\r\n" +"\tWORKSPACE\x10\x01\x12\x0f\n" +"\vENVIRONMENT\x10\x02\x12\v\n" +- "\aPROJECT\x10\x03*C\n" +- "\x12SQLReviewRuleLevel\x12\x15\n" +- "\x11LEVEL_UNSPECIFIED\x10\x00\x12\t\n" +- "\x05ERROR\x10\x01\x12\v\n" +- "\aWARNING\x10\x022\xf4\f\n" ++ "\aPROJECT\x10\x032\xf4\f\n" +"\x10OrgPolicyService\x12\xa0\x02\n" +"\tGetPolicy\x12\x1d.bytebase.v1.GetPolicyRequest\x1a\x13.bytebase.v1.Policy\"\xde\x01\xdaA\x04name\x8a\xea0\x0fbb.policies.get\x90\xea0\x01\x82\xd3\xe4\x93\x02\xb9\x01Z\"\x12 /v1/{name=projects/*/policies/*}Z&\x12$/v1/{name=environments/*/policies/*}Z#\x12!/v1/{name=instances/*/policies/*}Z/\x12-/v1/{name=instances/*/databases/*/policies/*}\x12\x15/v1/{name=policies/*}\x12\xa8\x02\n" +"\fListPolicies\x12 .bytebase.v1.ListPoliciesRequest\x1a!.bytebase.v1.ListPoliciesResponse\"\xd2\x01\xdaA\x00\x8a\xea0\x10bb.policies.list\x90\xea0\x01\x82\xd3\xe4\x93\x02\xb0\x01Z\"\x12 /v1/{parent=projects/*}/policiesZ&\x12$/v1/{parent=environments/*}/policiesZ#\x12!/v1/{parent=instances/*}/policiesZ/\x12-/v1/{parent=instances/*/databases/*}/policies\x12\f/v1/policies\x12\xd5\x02\n" +@@ -1735,83 +1600,78 @@ func file_v1_org_policy_service_proto_rawDescGZIP() []byte {return file_v1_org_policy_service_proto_rawDescData}-var file_v1_org_policy_service_proto_enumTypes = make([]protoimpl.EnumInfo, 6)-var file_v1_org_policy_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19)+var file_v1_org_policy_service_proto_enumTypes = make([]protoimpl.EnumInfo, 5)+var file_v1_org_policy_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18)var file_v1_org_policy_service_proto_goTypes = []any{- (PolicyType)(0), // 0: bytebase.v1.PolicyType- (PolicyResourceType)(0), // 1: bytebase.v1.PolicyResourceType- (SQLReviewRuleLevel)(0), // 2: bytebase.v1.SQLReviewRuleLevel- (RolloutPolicy_Checkers_PlanCheckEnforcement)(0), // 3: bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement- (MaskingExceptionPolicy_MaskingException_Action)(0), // 4: bytebase.v1.MaskingExceptionPolicy.MaskingException.Action- (DataSourceQueryPolicy_Restriction)(0), // 5: bytebase.v1.DataSourceQueryPolicy.Restriction- (*CreatePolicyRequest)(nil), // 6: bytebase.v1.CreatePolicyRequest- (*UpdatePolicyRequest)(nil), // 7: bytebase.v1.UpdatePolicyRequest- (*DeletePolicyRequest)(nil), // 8: bytebase.v1.DeletePolicyRequest- (*GetPolicyRequest)(nil), // 9: bytebase.v1.GetPolicyRequest- (*ListPoliciesRequest)(nil), // 10: bytebase.v1.ListPoliciesRequest- (*ListPoliciesResponse)(nil), // 11: bytebase.v1.ListPoliciesResponse- (*Policy)(nil), // 12: bytebase.v1.Policy- (*RolloutPolicy)(nil), // 13: bytebase.v1.RolloutPolicy- (*QueryDataPolicy)(nil), // 14: bytebase.v1.QueryDataPolicy- (*SQLReviewRule)(nil), // 15: bytebase.v1.SQLReviewRule- (*MaskingExceptionPolicy)(nil), // 16: bytebase.v1.MaskingExceptionPolicy- (*MaskingRulePolicy)(nil), // 17: bytebase.v1.MaskingRulePolicy- (*TagPolicy)(nil), // 18: bytebase.v1.TagPolicy- (*DataSourceQueryPolicy)(nil), // 19: bytebase.v1.DataSourceQueryPolicy- (*RolloutPolicy_Checkers)(nil), // 20: bytebase.v1.RolloutPolicy.Checkers- (*RolloutPolicy_Checkers_RequiredStatusChecks)(nil), // 21: bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks- (*MaskingExceptionPolicy_MaskingException)(nil), // 22: bytebase.v1.MaskingExceptionPolicy.MaskingException- (*MaskingRulePolicy_MaskingRule)(nil), // 23: bytebase.v1.MaskingRulePolicy.MaskingRule- nil, // 24: bytebase.v1.TagPolicy.TagsEntry- (*fieldmaskpb.FieldMask)(nil), // 25: google.protobuf.FieldMask- (*durationpb.Duration)(nil), // 26: google.protobuf.Duration- (Engine)(0), // 27: bytebase.v1.Engine- (*expr.Expr)(nil), // 28: google.type.Expr- (*emptypb.Empty)(nil), // 29: google.protobuf.Empty+ (PolicyType)(0), // 0: bytebase.v1.PolicyType+ (PolicyResourceType)(0), // 1: bytebase.v1.PolicyResourceType+ (RolloutPolicy_Checkers_PlanCheckEnforcement)(0), // 2: bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement+ (MaskingExceptionPolicy_MaskingException_Action)(0), // 3: bytebase.v1.MaskingExceptionPolicy.MaskingException.Action+ (DataSourceQueryPolicy_Restriction)(0), // 4: bytebase.v1.DataSourceQueryPolicy.Restriction+ (*CreatePolicyRequest)(nil), // 5: bytebase.v1.CreatePolicyRequest+ (*UpdatePolicyRequest)(nil), // 6: bytebase.v1.UpdatePolicyRequest+ (*DeletePolicyRequest)(nil), // 7: bytebase.v1.DeletePolicyRequest+ (*GetPolicyRequest)(nil), // 8: bytebase.v1.GetPolicyRequest+ (*ListPoliciesRequest)(nil), // 9: bytebase.v1.ListPoliciesRequest+ (*ListPoliciesResponse)(nil), // 10: bytebase.v1.ListPoliciesResponse+ (*Policy)(nil), // 11: bytebase.v1.Policy+ (*RolloutPolicy)(nil), // 12: bytebase.v1.RolloutPolicy+ (*QueryDataPolicy)(nil), // 13: bytebase.v1.QueryDataPolicy+ (*MaskingExceptionPolicy)(nil), // 14: bytebase.v1.MaskingExceptionPolicy+ (*MaskingRulePolicy)(nil), // 15: bytebase.v1.MaskingRulePolicy+ (*TagPolicy)(nil), // 16: bytebase.v1.TagPolicy+ (*DataSourceQueryPolicy)(nil), // 17: bytebase.v1.DataSourceQueryPolicy+ (*RolloutPolicy_Checkers)(nil), // 18: bytebase.v1.RolloutPolicy.Checkers+ (*RolloutPolicy_Checkers_RequiredStatusChecks)(nil), // 19: bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks+ (*MaskingExceptionPolicy_MaskingException)(nil), // 20: bytebase.v1.MaskingExceptionPolicy.MaskingException+ (*MaskingRulePolicy_MaskingRule)(nil), // 21: bytebase.v1.MaskingRulePolicy.MaskingRule+ nil, // 22: bytebase.v1.TagPolicy.TagsEntry+ (*fieldmaskpb.FieldMask)(nil), // 23: google.protobuf.FieldMask+ (*durationpb.Duration)(nil), // 24: google.protobuf.Duration+ (*expr.Expr)(nil), // 25: google.type.Expr+ (*emptypb.Empty)(nil), // 26: google.protobuf.Empty}var file_v1_org_policy_service_proto_depIdxs = []int32{- 12, // 0: bytebase.v1.CreatePolicyRequest.policy:type_name -> bytebase.v1.Policy+ 11, // 0: bytebase.v1.CreatePolicyRequest.policy:type_name -> bytebase.v1.Policy0, // 1: bytebase.v1.CreatePolicyRequest.type:type_name -> bytebase.v1.PolicyType- 12, // 2: bytebase.v1.UpdatePolicyRequest.policy:type_name -> bytebase.v1.Policy- 25, // 3: bytebase.v1.UpdatePolicyRequest.update_mask:type_name -> google.protobuf.FieldMask+ 11, // 2: bytebase.v1.UpdatePolicyRequest.policy:type_name -> bytebase.v1.Policy+ 23, // 3: bytebase.v1.UpdatePolicyRequest.update_mask:type_name -> google.protobuf.FieldMask0, // 4: bytebase.v1.ListPoliciesRequest.policy_type:type_name -> bytebase.v1.PolicyType- 12, // 5: bytebase.v1.ListPoliciesResponse.policies:type_name -> bytebase.v1.Policy+ 11, // 5: bytebase.v1.ListPoliciesResponse.policies:type_name -> bytebase.v1.Policy0, // 6: bytebase.v1.Policy.type:type_name -> bytebase.v1.PolicyType- 13, // 7: bytebase.v1.Policy.rollout_policy:type_name -> bytebase.v1.RolloutPolicy- 17, // 8: bytebase.v1.Policy.masking_rule_policy:type_name -> bytebase.v1.MaskingRulePolicy- 16, // 9: bytebase.v1.Policy.masking_exception_policy:type_name -> bytebase.v1.MaskingExceptionPolicy- 18, // 10: bytebase.v1.Policy.tag_policy:type_name -> bytebase.v1.TagPolicy- 19, // 11: bytebase.v1.Policy.data_source_query_policy:type_name -> bytebase.v1.DataSourceQueryPolicy- 14, // 12: bytebase.v1.Policy.query_data_policy:type_name -> bytebase.v1.QueryDataPolicy+ 12, // 7: bytebase.v1.Policy.rollout_policy:type_name -> bytebase.v1.RolloutPolicy+ 15, // 8: bytebase.v1.Policy.masking_rule_policy:type_name -> bytebase.v1.MaskingRulePolicy+ 14, // 9: bytebase.v1.Policy.masking_exception_policy:type_name -> bytebase.v1.MaskingExceptionPolicy+ 16, // 10: bytebase.v1.Policy.tag_policy:type_name -> bytebase.v1.TagPolicy+ 17, // 11: bytebase.v1.Policy.data_source_query_policy:type_name -> bytebase.v1.DataSourceQueryPolicy+ 13, // 12: bytebase.v1.Policy.query_data_policy:type_name -> bytebase.v1.QueryDataPolicy1, // 13: bytebase.v1.Policy.resource_type:type_name -> bytebase.v1.PolicyResourceType- 20, // 14: bytebase.v1.RolloutPolicy.checkers:type_name -> bytebase.v1.RolloutPolicy.Checkers- 26, // 15: bytebase.v1.QueryDataPolicy.timeout:type_name -> google.protobuf.Duration- 2, // 16: bytebase.v1.SQLReviewRule.level:type_name -> bytebase.v1.SQLReviewRuleLevel- 27, // 17: bytebase.v1.SQLReviewRule.engine:type_name -> bytebase.v1.Engine- 22, // 18: bytebase.v1.MaskingExceptionPolicy.masking_exceptions:type_name -> bytebase.v1.MaskingExceptionPolicy.MaskingException- 23, // 19: bytebase.v1.MaskingRulePolicy.rules:type_name -> bytebase.v1.MaskingRulePolicy.MaskingRule- 24, // 20: bytebase.v1.TagPolicy.tags:type_name -> bytebase.v1.TagPolicy.TagsEntry- 5, // 21: bytebase.v1.DataSourceQueryPolicy.admin_data_source_restriction:type_name -> bytebase.v1.DataSourceQueryPolicy.Restriction- 21, // 22: bytebase.v1.RolloutPolicy.Checkers.required_status_checks:type_name -> bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks- 3, // 23: bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks.plan_check_enforcement:type_name -> bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement- 4, // 24: bytebase.v1.MaskingExceptionPolicy.MaskingException.action:type_name -> bytebase.v1.MaskingExceptionPolicy.MaskingException.Action- 28, // 25: bytebase.v1.MaskingExceptionPolicy.MaskingException.condition:type_name -> google.type.Expr- 28, // 26: bytebase.v1.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr- 9, // 27: bytebase.v1.OrgPolicyService.GetPolicy:input_type -> bytebase.v1.GetPolicyRequest- 10, // 28: bytebase.v1.OrgPolicyService.ListPolicies:input_type -> bytebase.v1.ListPoliciesRequest- 6, // 29: bytebase.v1.OrgPolicyService.CreatePolicy:input_type -> bytebase.v1.CreatePolicyRequest- 7, // 30: bytebase.v1.OrgPolicyService.UpdatePolicy:input_type -> bytebase.v1.UpdatePolicyRequest- 8, // 31: bytebase.v1.OrgPolicyService.DeletePolicy:input_type -> bytebase.v1.DeletePolicyRequest- 12, // 32: bytebase.v1.OrgPolicyService.GetPolicy:output_type -> bytebase.v1.Policy- 11, // 33: bytebase.v1.OrgPolicyService.ListPolicies:output_type -> bytebase.v1.ListPoliciesResponse- 12, // 34: bytebase.v1.OrgPolicyService.CreatePolicy:output_type -> bytebase.v1.Policy- 12, // 35: bytebase.v1.OrgPolicyService.UpdatePolicy:output_type -> bytebase.v1.Policy- 29, // 36: bytebase.v1.OrgPolicyService.DeletePolicy:output_type -> google.protobuf.Empty- 32, // [32:37] is the sub-list for method output_type- 27, // [27:32] is the sub-list for method input_type- 27, // [27:27] is the sub-list for extension type_name- 27, // [27:27] is the sub-list for extension extendee- 0, // [0:27] is the sub-list for field type_name+ 18, // 14: bytebase.v1.RolloutPolicy.checkers:type_name -> bytebase.v1.RolloutPolicy.Checkers+ 24, // 15: bytebase.v1.QueryDataPolicy.timeout:type_name -> google.protobuf.Duration+ 20, // 16: bytebase.v1.MaskingExceptionPolicy.masking_exceptions:type_name -> bytebase.v1.MaskingExceptionPolicy.MaskingException+ 21, // 17: bytebase.v1.MaskingRulePolicy.rules:type_name -> bytebase.v1.MaskingRulePolicy.MaskingRule+ 22, // 18: bytebase.v1.TagPolicy.tags:type_name -> bytebase.v1.TagPolicy.TagsEntry+ 4, // 19: bytebase.v1.DataSourceQueryPolicy.admin_data_source_restriction:type_name -> bytebase.v1.DataSourceQueryPolicy.Restriction+ 19, // 20: bytebase.v1.RolloutPolicy.Checkers.required_status_checks:type_name -> bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks+ 2, // 21: bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks.plan_check_enforcement:type_name -> bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement+ 3, // 22: bytebase.v1.MaskingExceptionPolicy.MaskingException.action:type_name -> bytebase.v1.MaskingExceptionPolicy.MaskingException.Action+ 25, // 23: bytebase.v1.MaskingExceptionPolicy.MaskingException.condition:type_name -> google.type.Expr+ 25, // 24: bytebase.v1.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr+ 8, // 25: bytebase.v1.OrgPolicyService.GetPolicy:input_type -> bytebase.v1.GetPolicyRequest+ 9, // 26: bytebase.v1.OrgPolicyService.ListPolicies:input_type -> bytebase.v1.ListPoliciesRequest+ 5, // 27: bytebase.v1.OrgPolicyService.CreatePolicy:input_type -> bytebase.v1.CreatePolicyRequest+ 6, // 28: bytebase.v1.OrgPolicyService.UpdatePolicy:input_type -> bytebase.v1.UpdatePolicyRequest+ 7, // 29: bytebase.v1.OrgPolicyService.DeletePolicy:input_type -> bytebase.v1.DeletePolicyRequest+ 11, // 30: bytebase.v1.OrgPolicyService.GetPolicy:output_type -> bytebase.v1.Policy+ 10, // 31: bytebase.v1.OrgPolicyService.ListPolicies:output_type -> bytebase.v1.ListPoliciesResponse+ 11, // 32: bytebase.v1.OrgPolicyService.CreatePolicy:output_type -> bytebase.v1.Policy+ 11, // 33: bytebase.v1.OrgPolicyService.UpdatePolicy:output_type -> bytebase.v1.Policy+ 26, // 34: bytebase.v1.OrgPolicyService.DeletePolicy:output_type -> google.protobuf.Empty+ 30, // [30:35] is the sub-list for method output_type+ 25, // [25:30] is the sub-list for method input_type+ 25, // [25:25] is the sub-list for extension type_name+ 25, // [25:25] is the sub-list for extension extendee+ 0, // [0:25] is the sub-list for field type_name}func init() { file_v1_org_policy_service_proto_init() }@@ -1820,7 +1680,6 @@ func file_v1_org_policy_service_proto_init() {return}file_v1_annotation_proto_init()- file_v1_common_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),@@ -1835,8 +1694,8 @@ func file_v1_org_policy_service_proto_init() {File: protoimpl.DescBuilder{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: 6,- NumMessages: 19,+ NumEnums: 5,+ NumMessages: 18,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 4029740054..c45e1f60bf 100644--- a/backend/generated-go/v1/org_policy_service_equal.pb.go+++ b/backend/generated-go/v1/org_policy_service_equal.pb.go@@ -235,28 +235,6 @@ func (x *QueryDataPolicy) Equal(y *QueryDataPolicy) bool {return true}-func (x *SQLReviewRule) Equal(y *SQLReviewRule) 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.Level != y.Level {- return false- }- if x.Payload != y.Payload {- return false- }- if x.Engine != y.Engine {- return false- }- return true-}-func (x *MaskingExceptionPolicy_MaskingException) Equal(y *MaskingExceptionPolicy_MaskingException) bool {if x == y {return truediff --git a/backend/generated-go/v1/review_config_service.pb.go b/backend/generated-go/v1/review_config_service.pb.goindex 85d3d691aa..5fb498bcab 100644--- a/backend/generated-go/v1/review_config_service.pb.go+++ b/backend/generated-go/v1/review_config_service.pb.go@@ -25,6 +25,59 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))+// The severity level for SQL review rules.+type SQLReviewRuleLevel int32++const (+ // Unspecified level.+ SQLReviewRuleLevel_LEVEL_UNSPECIFIED SQLReviewRuleLevel = 0+ // Rule violation is an error.+ SQLReviewRuleLevel_ERROR SQLReviewRuleLevel = 1+ // Rule violation is a warning.+ SQLReviewRuleLevel_WARNING SQLReviewRuleLevel = 2+)++// Enum value maps for SQLReviewRuleLevel.+var (+ SQLReviewRuleLevel_name = map[int32]string{+ 0: "LEVEL_UNSPECIFIED",+ 1: "ERROR",+ 2: "WARNING",+ }+ SQLReviewRuleLevel_value = map[string]int32{+ "LEVEL_UNSPECIFIED": 0,+ "ERROR": 1,+ "WARNING": 2,+ }+)++func (x SQLReviewRuleLevel) Enum() *SQLReviewRuleLevel {+ p := new(SQLReviewRuleLevel)+ *p = x+ return p+}++func (x SQLReviewRuleLevel) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (SQLReviewRuleLevel) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_review_config_service_proto_enumTypes[0].Descriptor()+}++func (SQLReviewRuleLevel) Type() protoreflect.EnumType {+ return &file_v1_review_config_service_proto_enumTypes[0]+}++func (x SQLReviewRuleLevel) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use SQLReviewRuleLevel.Descriptor instead.+func (SQLReviewRuleLevel) EnumDescriptor() ([]byte, []int) {+ return file_v1_review_config_service_proto_rawDescGZIP(), []int{0}+}+type ListReviewConfigsRequest struct {state protoimpl.MessageState `protogen:"open.v1"`unknownFields protoimpl.UnknownFields@@ -392,11 +445,84 @@ func (x *ReviewConfig) GetResources() []string {return nil}+// SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.+type SQLReviewRule struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The type of SQL review rule.+ Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`+ // The severity level of the rule.+ Level SQLReviewRuleLevel `protobuf:"varint,2,opt,name=level,proto3,enum=bytebase.v1.SQLReviewRuleLevel" json:"level,omitempty"`+ // The payload is a JSON string that varies by rule type.+ Payload string `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`+ // The database engine this rule applies to.+ Engine Engine `protobuf:"varint,4,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *SQLReviewRule) Reset() {+ *x = SQLReviewRule{}+ mi := &file_v1_review_config_service_proto_msgTypes[7]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *SQLReviewRule) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SQLReviewRule) ProtoMessage() {}++func (x *SQLReviewRule) ProtoReflect() protoreflect.Message {+ mi := &file_v1_review_config_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 SQLReviewRule.ProtoReflect.Descriptor instead.+func (*SQLReviewRule) Descriptor() ([]byte, []int) {+ return file_v1_review_config_service_proto_rawDescGZIP(), []int{7}+}++func (x *SQLReviewRule) GetType() string {+ if x != nil {+ return x.Type+ }+ return ""+}++func (x *SQLReviewRule) GetLevel() SQLReviewRuleLevel {+ if x != nil {+ return x.Level+ }+ return SQLReviewRuleLevel_LEVEL_UNSPECIFIED+}++func (x *SQLReviewRule) GetPayload() string {+ if x != nil {+ return x.Payload+ }+ return ""+}++func (x *SQLReviewRule) GetEngine() Engine {+ if x != nil {+ return x.Engine+ }+ return Engine_ENGINE_UNSPECIFIED+}+var File_v1_review_config_service_proto protoreflect.FileDescriptorconst file_v1_review_config_service_proto_rawDesc = "" +"\n" +- "\x1ev1/review_config_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\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x13v1/annotation.proto\x1a\x1bv1/org_policy_service.proto\"\x1a\n" ++ "\x1ev1/review_config_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\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\"\x1a\n" +"\x18ListReviewConfigsRequest\"]\n" +"\x19ListReviewConfigsResponse\x12@\n" +"\x0ereview_configs\x18\x01 \x03(\v2\x19.bytebase.v1.ReviewConfigR\rreviewConfigs\"`\n" +@@ -419,7 +545,16 @@ const file_v1_review_config_service_proto_rawDesc = "" +"\aenabled\x18\x03 \x01(\bR\aenabled\x120\n" +"\x05rules\x18\a \x03(\v2\x1a.bytebase.v1.SQLReviewRuleR\x05rules\x12\x1c\n" +"\tresources\x18\b \x03(\tR\tresources:<\xeaA9\n" +- "\x19bytebase.com/ReviewConfig\x12\x1creviewConfigs/{reviewConfig}2\xed\x06\n" ++ "\x19bytebase.com/ReviewConfig\x12\x1creviewConfigs/{reviewConfig}\"\xa1\x01\n" ++ "\rSQLReviewRule\x12\x12\n" ++ "\x04type\x18\x01 \x01(\tR\x04type\x125\n" ++ "\x05level\x18\x02 \x01(\x0e2\x1f.bytebase.v1.SQLReviewRuleLevelR\x05level\x12\x18\n" ++ "\apayload\x18\x03 \x01(\tR\apayload\x12+\n" ++ "\x06engine\x18\x04 \x01(\x0e2\x13.bytebase.v1.EngineR\x06engine*C\n" ++ "\x12SQLReviewRuleLevel\x12\x15\n" ++ "\x11LEVEL_UNSPECIFIED\x10\x00\x12\t\n" ++ "\x05ERROR\x10\x01\x12\v\n" ++ "\aWARNING\x10\x022\xed\x06\n" +"\x13ReviewConfigService\x12\xa3\x01\n" +"\x12CreateReviewConfig\x12&.bytebase.v1.CreateReviewConfigRequest\x1a\x19.bytebase.v1.ReviewConfig\"J\xdaA\x00\x8a\xea0\x17bb.reviewConfigs.create\x90\xea0\x01\x82\xd3\xe4\x93\x02\":\rreview_config\"\x11/v1/reviewConfigs\x12\x9d\x01\n" +"\x11ListReviewConfigs\x12%.bytebase.v1.ListReviewConfigsRequest\x1a&.bytebase.v1.ListReviewConfigsResponse\"9\xdaA\x00\x8a\xea0\x15bb.reviewConfigs.list\x90\xea0\x01\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/reviewConfigs\x12\x98\x01\n" +@@ -440,40 +575,45 @@ func file_v1_review_config_service_proto_rawDescGZIP() []byte {return file_v1_review_config_service_proto_rawDescData}-var file_v1_review_config_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)+var file_v1_review_config_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)+var file_v1_review_config_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8)var file_v1_review_config_service_proto_goTypes = []any{- (*ListReviewConfigsRequest)(nil), // 0: bytebase.v1.ListReviewConfigsRequest- (*ListReviewConfigsResponse)(nil), // 1: bytebase.v1.ListReviewConfigsResponse- (*CreateReviewConfigRequest)(nil), // 2: bytebase.v1.CreateReviewConfigRequest- (*UpdateReviewConfigRequest)(nil), // 3: bytebase.v1.UpdateReviewConfigRequest- (*GetReviewConfigRequest)(nil), // 4: bytebase.v1.GetReviewConfigRequest- (*DeleteReviewConfigRequest)(nil), // 5: bytebase.v1.DeleteReviewConfigRequest- (*ReviewConfig)(nil), // 6: bytebase.v1.ReviewConfig- (*fieldmaskpb.FieldMask)(nil), // 7: google.protobuf.FieldMask+ (SQLReviewRuleLevel)(0), // 0: bytebase.v1.SQLReviewRuleLevel+ (*ListReviewConfigsRequest)(nil), // 1: bytebase.v1.ListReviewConfigsRequest+ (*ListReviewConfigsResponse)(nil), // 2: bytebase.v1.ListReviewConfigsResponse+ (*CreateReviewConfigRequest)(nil), // 3: bytebase.v1.CreateReviewConfigRequest+ (*UpdateReviewConfigRequest)(nil), // 4: bytebase.v1.UpdateReviewConfigRequest+ (*GetReviewConfigRequest)(nil), // 5: bytebase.v1.GetReviewConfigRequest+ (*DeleteReviewConfigRequest)(nil), // 6: bytebase.v1.DeleteReviewConfigRequest+ (*ReviewConfig)(nil), // 7: bytebase.v1.ReviewConfig(*SQLReviewRule)(nil), // 8: bytebase.v1.SQLReviewRule- (*emptypb.Empty)(nil), // 9: google.protobuf.Empty+ (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask+ (Engine)(0), // 10: bytebase.v1.Engine+ (*emptypb.Empty)(nil), // 11: google.protobuf.Empty}var file_v1_review_config_service_proto_depIdxs = []int32{- 6, // 0: bytebase.v1.ListReviewConfigsResponse.review_configs:type_name -> bytebase.v1.ReviewConfig- 6, // 1: bytebase.v1.CreateReviewConfigRequest.review_config:type_name -> bytebase.v1.ReviewConfig- 6, // 2: bytebase.v1.UpdateReviewConfigRequest.review_config:type_name -> bytebase.v1.ReviewConfig- 7, // 3: bytebase.v1.UpdateReviewConfigRequest.update_mask:type_name -> google.protobuf.FieldMask+ 7, // 0: bytebase.v1.ListReviewConfigsResponse.review_configs:type_name -> bytebase.v1.ReviewConfig+ 7, // 1: bytebase.v1.CreateReviewConfigRequest.review_config:type_name -> bytebase.v1.ReviewConfig+ 7, // 2: bytebase.v1.UpdateReviewConfigRequest.review_config:type_name -> bytebase.v1.ReviewConfig+ 9, // 3: bytebase.v1.UpdateReviewConfigRequest.update_mask:type_name -> google.protobuf.FieldMask8, // 4: bytebase.v1.ReviewConfig.rules:type_name -> bytebase.v1.SQLReviewRule- 2, // 5: bytebase.v1.ReviewConfigService.CreateReviewConfig:input_type -> bytebase.v1.CreateReviewConfigRequest- 0, // 6: bytebase.v1.ReviewConfigService.ListReviewConfigs:input_type -> bytebase.v1.ListReviewConfigsRequest- 4, // 7: bytebase.v1.ReviewConfigService.GetReviewConfig:input_type -> bytebase.v1.GetReviewConfigRequest- 3, // 8: bytebase.v1.ReviewConfigService.UpdateReviewConfig:input_type -> bytebase.v1.UpdateReviewConfigRequest- 5, // 9: bytebase.v1.ReviewConfigService.DeleteReviewConfig:input_type -> bytebase.v1.DeleteReviewConfigRequest- 6, // 10: bytebase.v1.ReviewConfigService.CreateReviewConfig:output_type -> bytebase.v1.ReviewConfig- 1, // 11: bytebase.v1.ReviewConfigService.ListReviewConfigs:output_type -> bytebase.v1.ListReviewConfigsResponse- 6, // 12: bytebase.v1.ReviewConfigService.GetReviewConfig:output_type -> bytebase.v1.ReviewConfig- 6, // 13: bytebase.v1.ReviewConfigService.UpdateReviewConfig:output_type -> bytebase.v1.ReviewConfig- 9, // 14: bytebase.v1.ReviewConfigService.DeleteReviewConfig:output_type -> google.protobuf.Empty- 10, // [10:15] is the sub-list for method output_type- 5, // [5:10] is the sub-list for method input_type- 5, // [5:5] is the sub-list for extension type_name- 5, // [5:5] is the sub-list for extension extendee- 0, // [0:5] is the sub-list for field type_name+ 0, // 5: bytebase.v1.SQLReviewRule.level:type_name -> bytebase.v1.SQLReviewRuleLevel+ 10, // 6: bytebase.v1.SQLReviewRule.engine:type_name -> bytebase.v1.Engine+ 3, // 7: bytebase.v1.ReviewConfigService.CreateReviewConfig:input_type -> bytebase.v1.CreateReviewConfigRequest+ 1, // 8: bytebase.v1.ReviewConfigService.ListReviewConfigs:input_type -> bytebase.v1.ListReviewConfigsRequest+ 5, // 9: bytebase.v1.ReviewConfigService.GetReviewConfig:input_type -> bytebase.v1.GetReviewConfigRequest+ 4, // 10: bytebase.v1.ReviewConfigService.UpdateReviewConfig:input_type -> bytebase.v1.UpdateReviewConfigRequest+ 6, // 11: bytebase.v1.ReviewConfigService.DeleteReviewConfig:input_type -> bytebase.v1.DeleteReviewConfigRequest+ 7, // 12: bytebase.v1.ReviewConfigService.CreateReviewConfig:output_type -> bytebase.v1.ReviewConfig+ 2, // 13: bytebase.v1.ReviewConfigService.ListReviewConfigs:output_type -> bytebase.v1.ListReviewConfigsResponse+ 7, // 14: bytebase.v1.ReviewConfigService.GetReviewConfig:output_type -> bytebase.v1.ReviewConfig+ 7, // 15: bytebase.v1.ReviewConfigService.UpdateReviewConfig:output_type -> bytebase.v1.ReviewConfig+ 11, // 16: bytebase.v1.ReviewConfigService.DeleteReviewConfig:output_type -> google.protobuf.Empty+ 12, // [12:17] is the sub-list for method output_type+ 7, // [7:12] 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}func init() { file_v1_review_config_service_proto_init() }@@ -482,19 +622,20 @@ func file_v1_review_config_service_proto_init() {return}file_v1_annotation_proto_init()- file_v1_org_policy_service_proto_init()+ file_v1_common_proto_init()type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_review_config_service_proto_rawDesc), len(file_v1_review_config_service_proto_rawDesc)),- NumEnums: 0,- NumMessages: 7,+ NumEnums: 1,+ NumMessages: 8,NumExtensions: 0,NumServices: 1,},GoTypes: file_v1_review_config_service_proto_goTypes,DependencyIndexes: file_v1_review_config_service_proto_depIdxs,+ EnumInfos: file_v1_review_config_service_proto_enumTypes,MessageInfos: file_v1_review_config_service_proto_msgTypes,}.Build()File_v1_review_config_service_proto = out.Filediff --git a/backend/generated-go/v1/review_config_service_equal.pb.go b/backend/generated-go/v1/review_config_service_equal.pb.goindex cfd5737ae5..f98854ab9b 100644--- a/backend/generated-go/v1/review_config_service_equal.pb.go+++ b/backend/generated-go/v1/review_config_service_equal.pb.go@@ -132,3 +132,25 @@ func (x *ReviewConfig) Equal(y *ReviewConfig) bool {}return true}++func (x *SQLReviewRule) Equal(y *SQLReviewRule) 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.Level != y.Level {+ return false+ }+ if x.Payload != y.Payload {+ return false+ }+ if x.Engine != y.Engine {+ return false+ }+ return true+}diff --git a/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue b/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vueindex 8e1996a047..e761c4d9fb 100644--- a/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue+++ b/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue@@ -256,7 +256,6 @@ import {ruleTemplateMapV2,SQLReviewPolicyErrorCode,} from "@/types";-import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";import type {PlanCheckRun,PlanCheckRun_Result,@@ -266,6 +265,7 @@ import {PlanCheckRun_ResultSchema,PlanCheckRun_Status,} from "@/types/proto-es/v1/plan_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";import { convertPositionLineToMonacoLine } from "@/utils/v1/position";import { usePlanCheckRunContext } from "./context";diff --git a/frontend/src/components/SQLReview/components/RuleLevelSwitch.vue b/frontend/src/components/SQLReview/components/RuleLevelSwitch.vueindex 5db8f73f81..98a7ff46c6 100644--- a/frontend/src/components/SQLReview/components/RuleLevelSwitch.vue+++ b/frontend/src/components/SQLReview/components/RuleLevelSwitch.vue@@ -15,7 +15,7 @@<script lang="ts" setup>import { computed } from "vue";import { useI18n } from "vue-i18n";-import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";const props = withDefaults(defineProps<{diff --git a/frontend/src/components/SQLReview/components/SQLReviewLevelFilter.vue b/frontend/src/components/SQLReview/components/SQLReviewLevelFilter.vueindex 7079046673..0eaba94359 100644--- a/frontend/src/components/SQLReview/components/SQLReviewLevelFilter.vue+++ b/frontend/src/components/SQLReview/components/SQLReviewLevelFilter.vue@@ -25,7 +25,7 @@<script lang="ts" setup>import { NCheckbox } from "naive-ui";import { computed } from "vue";-import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";import type { RuleListWithCategory } from "./SQLReviewCategoryTabFilter.vue";import SQLRuleLevelBadge from "./SQLRuleLevelBadge.vue";diff --git a/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vue b/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vueindex 41663c46a1..d13f91c6b2 100644--- a/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vue+++ b/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vue@@ -72,7 +72,7 @@ import { nextTick, reactive, ref, watch } from "vue";import { BBModal } from "@/bbkit";import { payloadValueListToComponentList } from "@/components/SQLReview/components";import { RichEngineName } from "@/components/v2";-import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";import type { RuleTemplateV2 } from "@/types/sqlReview";import { getRuleLocalization } from "@/types/sqlReview";import RuleConfig from "./RuleConfigComponents/RuleConfig.vue";diff --git a/frontend/src/components/SQLReview/components/SQLRuleFilter.vue b/frontend/src/components/SQLReview/components/SQLRuleFilter.vueindex fb523f23ad..bc50eae39c 100644--- a/frontend/src/components/SQLReview/components/SQLRuleFilter.vue+++ b/frontend/src/components/SQLReview/components/SQLRuleFilter.vue@@ -54,7 +54,7 @@ import { NCheckbox, NDivider } from "naive-ui";import { SearchBox } from "@/components/v2";import type { RuleTemplateV2 } from "@/types";import { getRuleLocalization } from "@/types";-import type { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";import type { RuleListWithCategory } from "./SQLReviewCategoryTabFilter.vue";import SQLReviewCategoryTabFilter from "./SQLReviewCategoryTabFilter.vue";import SQLReviewLevelFilter from "./SQLReviewLevelFilter.vue";diff --git a/frontend/src/components/SQLReview/components/SQLRuleLevelBadge.vue b/frontend/src/components/SQLReview/components/SQLRuleLevelBadge.vueindex 4cbc3a678c..0c953810fd 100644--- a/frontend/src/components/SQLReview/components/SQLRuleLevelBadge.vue+++ b/frontend/src/components/SQLReview/components/SQLRuleLevelBadge.vue@@ -12,7 +12,7 @@ import { computed } from "vue";import { useI18n } from "vue-i18n";import { BBBadge } from "@/bbkit";import type { BBBadgeStyle } from "@/bbkit/BBBadge.vue";-import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";const props = withDefaults(defineProps<{diff --git a/frontend/src/components/SQLReview/components/SQLRuleTable.vue b/frontend/src/components/SQLReview/components/SQLRuleTable.vueindex 2cd497e5fe..8b514cdd8d 100644--- a/frontend/src/components/SQLReview/components/SQLRuleTable.vue+++ b/frontend/src/components/SQLReview/components/SQLRuleTable.vue@@ -103,7 +103,7 @@ import { computed, reactive } from "vue";import { useI18n } from "vue-i18n";import type { RuleTemplateV2 } from "@/types";import { getRuleLocalization } from "@/types";-import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";import RuleConfig from "./RuleConfigComponents/RuleConfig.vue";import RuleLevelSwitch from "./RuleLevelSwitch.vue";import type { RuleListWithCategory } from "./SQLReviewCategoryTabFilter.vue";diff --git a/frontend/src/components/SQLReview/components/useSQLRuleFilter.ts b/frontend/src/components/SQLReview/components/useSQLRuleFilter.tsindex 9a3faa8423..9800987c11 100644--- a/frontend/src/components/SQLReview/components/useSQLRuleFilter.ts+++ b/frontend/src/components/SQLReview/components/useSQLRuleFilter.ts@@ -1,6 +1,6 @@import { reactive } from "vue";import { useRoute } from "vue-router";-import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";export type SQLRuleFilterParams = {checkedLevel: Set<SQLReviewRuleLevel>;diff --git a/frontend/src/plugins/i18n.test.ts b/frontend/src/plugins/i18n.test.tsindex 82c7a1440e..b8d725a232 100644--- a/frontend/src/plugins/i18n.test.ts+++ b/frontend/src/plugins/i18n.test.ts@@ -1,6 +1,6 @@import { describe, expect, test } from "vitest";import { Engine } from "@/types/proto-es/v1/common_pb";-import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";import { getRuleLocalizationKey, TEMPLATE_LIST_V2 } from "../types/sqlReview";import { mergedLocalMessage } from "./i18n-messages";diff --git a/frontend/src/store/modules/sqlReview.ts b/frontend/src/store/modules/sqlReview.tsindex b5f1c7bf13..b1c25e5560 100644--- a/frontend/src/store/modules/sqlReview.ts+++ b/frontend/src/store/modules/sqlReview.ts@@ -14,7 +14,6 @@ import type {} from "@/types";import {PolicyType,- SQLReviewRuleSchema,TagPolicySchema,} from "@/types/proto-es/v1/org_policy_service_pb";import type { ReviewConfig } from "@/types/proto-es/v1/review_config_service_pb";@@ -23,6 +22,7 @@ import {GetReviewConfigRequestSchema,ListReviewConfigsRequestSchema,ReviewConfigSchema,+ SQLReviewRuleSchema,UpdateReviewConfigRequestSchema,} from "@/types/proto-es/v1/review_config_service_pb";import { usePolicyV1Store } from "./v1/policy";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 990f775a91..d7c62af12a 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,7 +5,6 @@import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";import type { Message } from "@bufbuild/protobuf";import type { Duration, EmptySchema, FieldMask } from "@bufbuild/protobuf/wkt";-import type { Engine } from "./common_pb";import type { Expr } from "../google/type/expr_pb";/**@@ -435,47 +434,6 @@ export declare type QueryDataPolicy = Message<"bytebase.v1.QueryDataPolicy"> & {*/export declare const QueryDataPolicySchema: GenMessage<QueryDataPolicy>;-/**- * SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.- *- * @generated from message bytebase.v1.SQLReviewRule- */-export declare type SQLReviewRule = Message<"bytebase.v1.SQLReviewRule"> & {- /**- * The type of SQL review rule.- *- * @generated from field: string type = 1;- */- type: string;-- /**- * The severity level of the rule.- *- * @generated from field: bytebase.v1.SQLReviewRuleLevel level = 2;- */- level: SQLReviewRuleLevel;-- /**- * The payload is a JSON string that varies by rule type.- *- * @generated from field: string payload = 3;- */- payload: string;-- /**- * The database engine this rule applies to.- *- * @generated from field: bytebase.v1.Engine engine = 4;- */- engine: Engine;-};--/**- * Describes the message bytebase.v1.SQLReviewRule.- * Use `create(SQLReviewRuleSchema)` to create a new message.- */-export declare const SQLReviewRuleSchema: GenMessage<SQLReviewRule>;-/*** MaskingExceptionPolicy is the allowlist of users who can access sensitive data.*@@ -846,39 +804,6 @@ export enum PolicyResourceType {*/export declare const PolicyResourceTypeSchema: GenEnum<PolicyResourceType>;-/**- * The severity level for SQL review rules.- *- * @generated from enum bytebase.v1.SQLReviewRuleLevel- */-export enum SQLReviewRuleLevel {- /**- * Unspecified level.- *- * @generated from enum value: LEVEL_UNSPECIFIED = 0;- */- LEVEL_UNSPECIFIED = 0,-- /**- * Rule violation is an error.- *- * @generated from enum value: ERROR = 1;- */- ERROR = 1,-- /**- * Rule violation is a warning.- *- * @generated from enum value: WARNING = 2;- */- WARNING = 2,-}--/**- * Describes the enum bytebase.v1.SQLReviewRuleLevel.- */-export declare const SQLReviewRuleLevelSchema: GenEnum<SQLReviewRuleLevel>;-/*** OrgPolicyService manages organizational policies at various resource levels.*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 05590fa661..2739503290 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,13 +10,12 @@ import { file_google_api_resource } from "../google/api/resource_pb";import { file_google_protobuf_duration, 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_common } from "./common_pb";/*** Describes the file v1/org_policy_service.proto.*/export const file_v1_org_policy_service = /*@__PURE__*/- fileDesc("Cht2MS9vcmdfcG9saWN5X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIpMBChNDcmVhdGVQb2xpY3lSZXF1ZXN0EisKBnBhcmVudBgBIAEoCUIb4EEC+kEVEhNieXRlYmFzZS5jb20vUG9saWN5EigKBnBvbGljeRgCIAEoCzITLmJ5dGViYXNlLnYxLlBvbGljeUID4EECEiUKBHR5cGUYAyABKA4yFy5ieXRlYmFzZS52MS5Qb2xpY3lUeXBlIocBChNVcGRhdGVQb2xpY3lSZXF1ZXN0EigKBnBvbGljeRgBIAEoCzITLmJ5dGViYXNlLnYxLlBvbGljeUID4EECEi8KC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzaxIVCg1hbGxvd19taXNzaW5nGAMgASgIIkAKE0RlbGV0ZVBvbGljeVJlcXVlc3QSKQoEbmFtZRgBIAEoCUIb4EEC+kEVChNieXRlYmFzZS5jb20vUG9saWN5Ij0KEEdldFBvbGljeVJlcXVlc3QSKQoEbmFtZRgBIAEoCUIb4EEC+kEVChNieXRlYmFzZS5jb20vUG9saWN5IpsBChNMaXN0UG9saWNpZXNSZXF1ZXN0EisKBnBhcmVudBgBIAEoCUIb4EEC+kEVEhNieXRlYmFzZS5jb20vUG9saWN5EjEKC3BvbGljeV90eXBl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W1lPWVudmlyb25tZW50cy8qL3BvbGljaWVzLyp9WjI6BnBvbGljeTIoL3YxL3twb2xpY3kubmFtZT1pbnN0YW5jZXMvKi9wb2xpY2llcy8qfVo+OgZwb2xpY3kyNC92MS97cG9saWN5Lm5hbWU9aW5zdGFuY2VzLyovZGF0YWJhc2VzLyovcG9saWNpZXMvKn0yHC92MS97cG9saWN5Lm5hbWU9cG9saWNpZXMvKn0SsAIKDERlbGV0ZVBvbGljeRIgLmJ5dGViYXNlLnYxLkRlbGV0ZVBvbGljeVJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHki5QHaQQRuYW1liuowEmJiLnBvbGljaWVzLmRlbGV0ZZDqMAGY6jABgtPkkwK5AVoiKiAvdjEve25hbWU9cHJvamVjdHMvKi9wb2xpY2llcy8qfVomKiQvdjEve25hbWU9ZW52aXJvbm1lbnRzLyovcG9saWNpZXMvKn1aIyohL3YxL3tuYW1lPWluc3RhbmNlcy8qL3BvbGljaWVzLyp9Wi8qLS92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKi9wb2xpY2llcy8qfSoVL3YxL3tuYW1lPXBvbGljaWVzLyp9QqsBCg9jb20uYnl0ZWJhc2UudjFCFU9yZ1BvbGljeVNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common]);+ fileDesc("Cht2MS9vcmdfcG9saWN5X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIpMBChNDcmVhdGVQb2xp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YmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation]);/*** Describes the message bytebase.v1.CreatePolicyRequest.@@ -107,32 +106,25 @@ export const RolloutPolicy_Checkers_PlanCheckEnforcement = /*@__PURE__*/export const QueryDataPolicySchema = /*@__PURE__*/messageDesc(file_v1_org_policy_service, 8);-/**- * Describes the message bytebase.v1.SQLReviewRule.- * Use `create(SQLReviewRuleSchema)` to create a new message.- */-export const SQLReviewRuleSchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 9);-/*** Describes the message bytebase.v1.MaskingExceptionPolicy.* Use `create(MaskingExceptionPolicySchema)` to create a new message.*/export const MaskingExceptionPolicySchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 10);+ messageDesc(file_v1_org_policy_service, 9);/*** Describes the message bytebase.v1.MaskingExceptionPolicy.MaskingException.* Use `create(MaskingExceptionPolicy_MaskingExceptionSchema)` to create a new message.*/export const MaskingExceptionPolicy_MaskingExceptionSchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 10, 0);+ messageDesc(file_v1_org_policy_service, 9, 0);/*** Describes the enum bytebase.v1.MaskingExceptionPolicy.MaskingException.Action.*/export const MaskingExceptionPolicy_MaskingException_ActionSchema = /*@__PURE__*/- enumDesc(file_v1_org_policy_service, 10, 0, 0);+ enumDesc(file_v1_org_policy_service, 9, 0, 0);/*** The action that the exception permits.@@ -147,34 +139,34 @@ export const MaskingExceptionPolicy_MaskingException_Action = /*@__PURE__*/* Use `create(MaskingRulePolicySchema)` to create a new message.*/export const MaskingRulePolicySchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 11);+ messageDesc(file_v1_org_policy_service, 10);/*** 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, 11, 0);+ messageDesc(file_v1_org_policy_service, 10, 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, 12);+ messageDesc(file_v1_org_policy_service, 11);/*** Describes the message bytebase.v1.DataSourceQueryPolicy.* Use `create(DataSourceQueryPolicySchema)` to create a new message.*/export const DataSourceQueryPolicySchema = /*@__PURE__*/- messageDesc(file_v1_org_policy_service, 13);+ messageDesc(file_v1_org_policy_service, 12);/*** Describes the enum bytebase.v1.DataSourceQueryPolicy.Restriction.*/export const DataSourceQueryPolicy_RestrictionSchema = /*@__PURE__*/- enumDesc(file_v1_org_policy_service, 13, 0);+ enumDesc(file_v1_org_policy_service, 12, 0);/*** Restriction level for admin data source access.@@ -212,20 +204,6 @@ export const PolicyResourceTypeSchema = /*@__PURE__*/export const PolicyResourceType = /*@__PURE__*/tsEnum(PolicyResourceTypeSchema);-/**- * Describes the enum bytebase.v1.SQLReviewRuleLevel.- */-export const SQLReviewRuleLevelSchema = /*@__PURE__*/- enumDesc(file_v1_org_policy_service, 2);--/**- * The severity level for SQL review rules.- *- * @generated from enum bytebase.v1.SQLReviewRuleLevel- */-export const SQLReviewRuleLevel = /*@__PURE__*/- tsEnum(SQLReviewRuleLevelSchema);-/*** OrgPolicyService manages organizational policies at various resource levels.*diff --git a/frontend/src/types/proto-es/v1/review_config_service_pb.d.ts b/frontend/src/types/proto-es/v1/review_config_service_pb.d.tsindex 3192b61db8..8edbe1c244 100644--- a/frontend/src/types/proto-es/v1/review_config_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/review_config_service_pb.d.ts@@ -2,10 +2,10 @@// @generated from file v1/review_config_service.proto (package bytebase.v1, syntax proto3)/* eslint-disable */-import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";+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 { SQLReviewRule } from "./org_policy_service_pb";+import type { Engine } from "./common_pb";/*** Describes the file v1/review_config_service.proto.@@ -181,6 +181,80 @@ export declare type ReviewConfig = Message<"bytebase.v1.ReviewConfig"> & {*/export declare const ReviewConfigSchema: GenMessage<ReviewConfig>;+/**+ * SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.+ *+ * @generated from message bytebase.v1.SQLReviewRule+ */+export declare type SQLReviewRule = Message<"bytebase.v1.SQLReviewRule"> & {+ /**+ * The type of SQL review rule.+ *+ * @generated from field: string type = 1;+ */+ type: string;++ /**+ * The severity level of the rule.+ *+ * @generated from field: bytebase.v1.SQLReviewRuleLevel level = 2;+ */+ level: SQLReviewRuleLevel;++ /**+ * The payload is a JSON string that varies by rule type.+ *+ * @generated from field: string payload = 3;+ */+ payload: string;++ /**+ * The database engine this rule applies to.+ *+ * @generated from field: bytebase.v1.Engine engine = 4;+ */+ engine: Engine;+};++/**+ * Describes the message bytebase.v1.SQLReviewRule.+ * Use `create(SQLReviewRuleSchema)` to create a new message.+ */+export declare const SQLReviewRuleSchema: GenMessage<SQLReviewRule>;++/**+ * The severity level for SQL review rules.+ *+ * @generated from enum bytebase.v1.SQLReviewRuleLevel+ */+export enum SQLReviewRuleLevel {+ /**+ * Unspecified level.+ *+ * @generated from enum value: LEVEL_UNSPECIFIED = 0;+ */+ LEVEL_UNSPECIFIED = 0,++ /**+ * Rule violation is an error.+ *+ * @generated from enum value: ERROR = 1;+ */+ ERROR = 1,++ /**+ * Rule violation is a warning.+ *+ * @generated from enum value: WARNING = 2;+ */+ WARNING = 2,+}++/**+ * Describes the enum bytebase.v1.SQLReviewRuleLevel.+ */+export declare const SQLReviewRuleLevelSchema: GenEnum<SQLReviewRuleLevel>;+/*** ReviewConfigService manages approval flow configurations.*diff --git a/frontend/src/types/proto-es/v1/review_config_service_pb.js b/frontend/src/types/proto-es/v1/review_config_service_pb.jsindex 6c698a7a52..34534feeed 100644--- a/frontend/src/types/proto-es/v1/review_config_service_pb.js+++ b/frontend/src/types/proto-es/v1/review_config_service_pb.js@@ -2,7 +2,7 @@// @generated from file v1/review_config_service.proto (package bytebase.v1, syntax proto3)/* eslint-disable */-import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";+import { enumDesc, fileDesc, messageDesc, serviceDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";import { file_buf_validate_validate } from "../buf/validate/validate_pb";import { file_google_api_annotations } from "../google/api/annotations_pb";import { file_google_api_client } from "../google/api/client_pb";@@ -10,13 +10,13 @@ import { file_google_api_field_behavior } from "../google/api/field_behavior_pb"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_v1_annotation } from "./annotation_pb";-import { file_v1_org_policy_service } from "./org_policy_service_pb";+import { file_v1_common } from "./common_pb";/*** Describes the file v1/review_config_service.proto.*/export const file_v1_review_config_service = /*@__PURE__*/- fileDesc("Ch52MS9yZXZpZXdfY29uZmlnX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhoKGExpc3RSZXZpZXdDb25maWdzUmVxdWVzdCJOChlMaXN0UmV2aWV3Q29uZmlnc1Jlc3BvbnNlEjEKDnJldmlld19jb25maWdzGAEgAygLMhkuYnl0ZWJhc2UudjEuUmV2aWV3Q29uZmlnIlIKGUNyZWF0ZVJldmlld0NvbmZpZ1JlcXVlc3QSNQoNcmV2aWV3X2NvbmZpZxgBIAEoCzIZLmJ5dGViYXNlLnYxLlJldmlld0NvbmZpZ0ID4EECIpoBCh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XdDb25maWdzLmxpc3SQ6jABgtPkkwITEhEvdjEvcmV2aWV3Q29uZmlncxKYAQoPR2V0UmV2aWV3Q29uZmlnEiMuYnl0ZWJhc2UudjEuR2V0UmV2aWV3Q29uZmlnUmVxdWVzdBoZLmJ5dGViYXNlLnYxLlJldmlld0NvbmZpZyJF2kEEbmFtZYrqMBRiYi5yZXZpZXdDb25maWdzLmdldJDqMAGC0+STAhwSGi92MS97bmFtZT1yZXZpZXdDb25maWdzLyp9EtMBChJVcGRhdGVSZXZpZXdDb25maWcSJi5ieXRlYmFzZS52MS5VcGRhdGVSZXZpZXdDb25maWdSZXF1ZXN0GhkuYnl0ZWJhc2UudjEuUmV2aWV3Q29uZmlnInraQRlyZXZpZXdfY29uZmlnLHVwZGF0ZV9tYXNriuowF2JiLnJldmlld0NvbmZpZ3MudXBkYXRlkOowAYLT5JMCOToNcmV2aWV3X2NvbmZpZzIoL3YxL3tyZXZpZXdfY29uZmlnLm5hbWU9cmV2aWV3Q29uZmlncy8qfRKeAQoSRGVsZXRlUmV2aWV3Q29uZmlnEiYuYnl0ZWJhc2UudjEuRGVsZXRlUmV2aWV3Q29uZmlnUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSJI2kEEbmFtZYrqMBdiYi5yZXZpZXdDb25maWdzLmRlbGV0ZZDqMAGC0+STAhwqGi92MS97bmFtZT1yZXZpZXdDb25maWdzLyp9Qq4BCg9jb20uYnl0ZWJhc2UudjFCGFJldmlld0NvbmZpZ1NlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, 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_v1_annotation, file_v1_org_policy_service]);+ fileDesc("Ch52MS9yZXZpZXdfY29uZmlnX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhoKGExpc3RSZXZpZXdDb25maWdzUmVxdWVzdCJOChlMaXN0UmV2aWV3Q29uZmlnc1Jlc3BvbnNlEjEKDnJldmlld19jb25maWdzGAEgAygLMhkuYnl0ZWJhc2UudjEuUmV2aWV3Q29uZmlnIlIKGUNyZWF0ZVJldmlld0NvbmZpZ1JlcXVlc3QSNQoNcmV2aWV3X2NvbmZpZxgBIAEoCzIZLmJ5dGViYXNlLnYxLlJldmlld0NvbmZpZ0ID4EECIpoBChlVcGRhdGVSZXZpZXdDb25maWdSZXF1ZXN0EjUKDXJldmlld19jb25maWcYASABKAsyGS5ieXRlYmFzZS52MS5SZXZpZXdDb25maWdCA+BBAhIvCgt1cGRhdGVfbWFzaxgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2sSFQoNYWxsb3dfbWlzc2luZxgDIAEoCCJJChZHZXRSZXZpZXdDb25maWdSZXF1ZXN0Ei8KBG5hbWUYASABKAlCIeBBAvpBGwoZYnl0ZWJhc2UuY29tL1Jldmlld0NvbmZpZyJMChlEZWxldGVSZXZpZXdDb25maWdSZXF1ZXN0Ei8KBG5hbWUYASABKAlCIeBBAvpBGwoZYnl0ZWJhc2UuY29tL1Jldmlld0NvbmZpZyLHAQoMUmV2aWV3Q29uZmlnEhEKBG5hbWUYASABKAlCA+BBAxIXCgV0aXRsZRgCIAEoCUIIukgFcgMYyAESDwoHZW5hYmxlZBgDIAEoCBIpCgVydWxlcxgHIAMoCzIaLmJ5dGViYXNlLnYxLlNRTFJldmlld1J1bGUSEQoJcmVzb3VyY2VzGAggAygJOjzqQTkKGWJ5dGViYXNlLmNvbS9SZXZpZXdDb25maWcSHHJldmlld0NvbmZpZ3Mve3Jldmlld0NvbmZpZ30igwEKDVNRTFJldmlld1J1bGUSD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RlX21hc2uK6jAXYmIucmV2aWV3Q29uZmlncy51cGRhdGWQ6jABgtPkkwI5Og1yZXZpZXdfY29uZmlnMigvdjEve3Jldmlld19jb25maWcubmFtZT1yZXZpZXdDb25maWdzLyp9Ep4BChJEZWxldGVSZXZpZXdDb25maWcSJi5ieXRlYmFzZS52MS5EZWxldGVSZXZpZXdDb25maWdSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IkjaQQRuYW1liuowF2JiLnJldmlld0NvbmZpZ3MuZGVsZXRlkOowAYLT5JMCHCoaL3YxL3tuYW1lPXJldmlld0NvbmZpZ3MvKn1CrgEKD2NvbS5ieXRlYmFzZS52MUIYUmV2aWV3Q29uZmlnU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, 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_v1_annotation, file_v1_common]);/*** Describes the message bytebase.v1.ListReviewConfigsRequest.@@ -67,6 +67,27 @@ export const DeleteReviewConfigRequestSchema = /*@__PURE__*/export const ReviewConfigSchema = /*@__PURE__*/messageDesc(file_v1_review_config_service, 6);+/**+ * Describes the message bytebase.v1.SQLReviewRule.+ * Use `create(SQLReviewRuleSchema)` to create a new message.+ */+export const SQLReviewRuleSchema = /*@__PURE__*/+ messageDesc(file_v1_review_config_service, 7);++/**+ * Describes the enum bytebase.v1.SQLReviewRuleLevel.+ */+export const SQLReviewRuleLevelSchema = /*@__PURE__*/+ enumDesc(file_v1_review_config_service, 0);++/**+ * The severity level for SQL review rules.+ *+ * @generated from enum bytebase.v1.SQLReviewRuleLevel+ */+export const SQLReviewRuleLevel = /*@__PURE__*/+ tsEnum(SQLReviewRuleLevelSchema);+/*** ReviewConfigService manages approval flow configurations.*diff --git a/frontend/src/types/sqlReview.test.ts b/frontend/src/types/sqlReview.test.tsindex ac5570ff52..fdff43b8ab 100644--- a/frontend/src/types/sqlReview.test.ts+++ b/frontend/src/types/sqlReview.test.ts@@ -1,5 +1,5 @@import { describe, expect, test } from "vitest";-import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";import sqlReviewDevTemplate from "./sql-review.dev.yaml";import sqlReviewProdTemplate from "./sql-review.prod.yaml";import sqlReviewSampleTemplate from "./sql-review.sample.yaml";diff --git a/frontend/src/types/sqlReview.ts b/frontend/src/types/sqlReview.tsindex 5ad8e5354d..80631d5dbc 100644--- a/frontend/src/types/sqlReview.ts+++ b/frontend/src/types/sqlReview.ts@@ -1,6 +1,6 @@import { t, te } from "@/plugins/i18n";import { Engine } from "@/types/proto-es/v1/common_pb";-import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/review_config_service_pb";import sqlReviewDevTemplate from "./sql-review.dev.yaml";import sqlReviewProdTemplate from "./sql-review.prod.yaml";import sqlReviewSampleTemplate from "./sql-review.sample.yaml";diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 7502636c5d..105c1e8cf6 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -210,7 +210,6 @@- [RolloutPolicy](#bytebase-store-RolloutPolicy)- [RolloutPolicy.Checkers](#bytebase-store-RolloutPolicy-Checkers)- [RolloutPolicy.Checkers.RequiredStatusChecks](#bytebase-store-RolloutPolicy-Checkers-RequiredStatusChecks)- - [SQLReviewRule](#bytebase-store-SQLReviewRule)- [TagPolicy](#bytebase-store-TagPolicy)- [TagPolicy.TagsEntry](#bytebase-store-TagPolicy-TagsEntry)@@ -220,7 +219,6 @@- [Policy.Resource](#bytebase-store-Policy-Resource)- [Policy.Type](#bytebase-store-Policy-Type)- [RolloutPolicy.Checkers.PlanCheckEnforcement](#bytebase-store-RolloutPolicy-Checkers-PlanCheckEnforcement)- - [SQLReviewRuleLevel](#bytebase-store-SQLReviewRuleLevel)- [store/project.proto](#store_project-proto)- [Label](#bytebase-store-Label)@@ -245,6 +243,9 @@- [store/review_config.proto](#store_review_config-proto)- [ReviewConfigPayload](#bytebase-store-ReviewConfigPayload)+ - [SQLReviewRule](#bytebase-store-SQLReviewRule)++ - [SQLReviewRuleLevel](#bytebase-store-SQLReviewRuleLevel)- [store/revision.proto](#store_revision-proto)- [RevisionPayload](#bytebase-store-RevisionPayload)@@ -3571,24 +3572,6 @@ QueryDataPolicy is the policy configuration for querying data.-<a name="bytebase-store-SQLReviewRule"></a>--### SQLReviewRule----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| type | [string](#string) | | |-| level | [SQLReviewRuleLevel](#bytebase-store-SQLReviewRuleLevel) | | |-| payload | [string](#string) | | |-| engine | [Engine](#bytebase-store-Engine) | | |------<a name="bytebase-store-TagPolicy"></a>### TagPolicy@@ -3705,19 +3688,6 @@ QueryDataPolicy is the policy configuration for querying data.| STRICT | 2 | Block rollout when plan check finds errors or warnings. |--<a name="bytebase-store-SQLReviewRuleLevel"></a>--### SQLReviewRuleLevel---| Name | Number | Description |-| ---- | ------ | ----------- |-| LEVEL_UNSPECIFIED | 0 | |-| ERROR | 1 | |-| WARNING | 2 | |--@@ -4028,8 +3998,39 @@ ISSUE_CREATE represents creating an issue. |++<a name="bytebase-store-SQLReviewRule"></a>++### SQLReviewRule++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| type | [string](#string) | | |+| level | [SQLReviewRuleLevel](#bytebase-store-SQLReviewRuleLevel) | | |+| payload | [string](#string) | | |+| engine | [Engine](#bytebase-store-Engine) | | |+++++++<a name="bytebase-store-SQLReviewRuleLevel"></a>++### SQLReviewRuleLevel+++| Name | Number | Description |+| ---- | ------ | ----------- |+| LEVEL_UNSPECIFIED | 0 | |+| ERROR | 1 | |+| WARNING | 2 | |++diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex ec5d61a5db..d936a643dd 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -1002,10 +1002,6 @@<a href="#bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks"><span class="badge">M</span>RolloutPolicy.Checkers.RequiredStatusChecks</a></li>- <li>- <a href="#bytebase.store.SQLReviewRule"><span class="badge">M</span>SQLReviewRule</a>- </li>-<li><a href="#bytebase.store.TagPolicy"><span class="badge">M</span>TagPolicy</a></li>@@ -1039,10 +1035,6 @@<a href="#bytebase.store.RolloutPolicy.Checkers.PlanCheckEnforcement"><span class="badge">E</span>RolloutPolicy.Checkers.PlanCheckEnforcement</a></li>- <li>- <a href="#bytebase.store.SQLReviewRuleLevel"><span class="badge">E</span>SQLReviewRuleLevel</a>- </li>-</ul>@@ -1149,6 +1141,14 @@<a href="#bytebase.store.ReviewConfigPayload"><span class="badge">M</span>ReviewConfigPayload</a></li>+ <li>+ <a href="#bytebase.store.SQLReviewRule"><span class="badge">M</span>SQLReviewRule</a>+ </li>+++ <li>+ <a href="#bytebase.store.SQLReviewRuleLevel"><span class="badge">E</span>SQLReviewRuleLevel</a>+ </li>@@ -9876,51 +9876,6 @@ These checks are performed in UI workflows only. </p></td>- <h3 id="bytebase.store.SQLReviewRule">SQLReviewRule</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>type</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>level</td>- <td><a href="#bytebase.store.SQLReviewRuleLevel">SQLReviewRuleLevel</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>payload</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>engine</td>- <td><a href="#bytebase.store.Engine">Engine</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>-----<h3 id="bytebase.store.TagPolicy">TagPolicy</h3><p></p>@@ -10189,35 +10144,6 @@ For example, the environment resource can have the SQL review config tag, such a</tbody></table>- <h3 id="bytebase.store.SQLReviewRuleLevel">SQLReviewRuleLevel</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>LEVEL_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>ERROR</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>WARNING</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-@@ -10884,8 +10810,82 @@ Format: projects/{project}/sheets/{sheet} </p></td>+ <h3 id="bytebase.store.SQLReviewRule">SQLReviewRule</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>type</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>level</td>+ <td><a href="#bytebase.store.SQLReviewRuleLevel">SQLReviewRuleLevel</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>payload</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>engine</td>+ <td><a href="#bytebase.store.Engine">Engine</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.store.SQLReviewRuleLevel">SQLReviewRuleLevel</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>LEVEL_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ERROR</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>WARNING</td>+ <td>2</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 4d552a539a..647808c345 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -432,7 +432,6 @@- [RolloutPolicy](#bytebase-v1-RolloutPolicy)- [RolloutPolicy.Checkers](#bytebase-v1-RolloutPolicy-Checkers)- [RolloutPolicy.Checkers.RequiredStatusChecks](#bytebase-v1-RolloutPolicy-Checkers-RequiredStatusChecks)- - [SQLReviewRule](#bytebase-v1-SQLReviewRule)- [TagPolicy](#bytebase-v1-TagPolicy)- [TagPolicy.TagsEntry](#bytebase-v1-TagPolicy-TagsEntry)- [UpdatePolicyRequest](#bytebase-v1-UpdatePolicyRequest)@@ -442,7 +441,6 @@- [PolicyResourceType](#bytebase-v1-PolicyResourceType)- [PolicyType](#bytebase-v1-PolicyType)- [RolloutPolicy.Checkers.PlanCheckEnforcement](#bytebase-v1-RolloutPolicy-Checkers-PlanCheckEnforcement)- - [SQLReviewRuleLevel](#bytebase-v1-SQLReviewRuleLevel)- [OrgPolicyService](#bytebase-v1-OrgPolicyService)@@ -548,8 +546,11 @@- [ListReviewConfigsRequest](#bytebase-v1-ListReviewConfigsRequest)- [ListReviewConfigsResponse](#bytebase-v1-ListReviewConfigsResponse)- [ReviewConfig](#bytebase-v1-ReviewConfig)+ - [SQLReviewRule](#bytebase-v1-SQLReviewRule)- [UpdateReviewConfigRequest](#bytebase-v1-UpdateReviewConfigRequest)+ - [SQLReviewRuleLevel](#bytebase-v1-SQLReviewRuleLevel)+- [ReviewConfigService](#bytebase-v1-ReviewConfigService)- [v1/revision_service.proto](#v1_revision_service-proto)@@ -7261,24 +7262,6 @@ Rollout policy configuration.-<a name="bytebase-v1-SQLReviewRule"></a>--### SQLReviewRule-SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| type | [string](#string) | | The type of SQL review rule. |-| level | [SQLReviewRuleLevel](#bytebase-v1-SQLReviewRuleLevel) | | The severity level of the rule. |-| payload | [string](#string) | | The payload is a JSON string that varies by rule type. |-| engine | [Engine](#bytebase-v1-Engine) | | The database engine this rule applies to. |------<a name="bytebase-v1-TagPolicy"></a>### TagPolicy@@ -7400,19 +7383,6 @@ The type of organizational policy.| STRICT | 2 | Block rollout when plan check finds errors or warnings. |--<a name="bytebase-v1-SQLReviewRuleLevel"></a>--### SQLReviewRuleLevel-The severity level for SQL review rules.--| Name | Number | Description |-| ---- | ------ | ----------- |-| LEVEL_UNSPECIFIED | 0 | Unspecified level. |-| ERROR | 1 | Rule violation is an error. |-| WARNING | 2 | Rule violation is a warning. |--@@ -9025,6 +8995,24 @@ ReleaseService manages releases for coordinating deployments.+<a name="bytebase-v1-SQLReviewRule"></a>++### SQLReviewRule+SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| type | [string](#string) | | The type of SQL review rule. |+| level | [SQLReviewRuleLevel](#bytebase-v1-SQLReviewRuleLevel) | | The severity level of the rule. |+| payload | [string](#string) | | The payload is a JSON string that varies by rule type. |+| engine | [Engine](#bytebase-v1-Engine) | | The database engine this rule applies to. |++++++<a name="bytebase-v1-UpdateReviewConfigRequest"></a>### UpdateReviewConfigRequest@@ -9045,6 +9033,19 @@ The name field is used to identify the SQL review config to update. |++<a name="bytebase-v1-SQLReviewRuleLevel"></a>++### SQLReviewRuleLevel+The severity level for SQL review rules.++| Name | Number | Description |+| ---- | ------ | ----------- |+| LEVEL_UNSPECIFIED | 0 | Unspecified level. |+| ERROR | 1 | Rule violation is an error. |+| WARNING | 2 | Rule violation is a warning. |++diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex c6cff1ec24..5aa1102d11 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -1828,10 +1828,6 @@<a href="#bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks"><span class="badge">M</span>RolloutPolicy.Checkers.RequiredStatusChecks</a></li>- <li>- <a href="#bytebase.v1.SQLReviewRule"><span class="badge">M</span>SQLReviewRule</a>- </li>-<li><a href="#bytebase.v1.TagPolicy"><span class="badge">M</span>TagPolicy</a></li>@@ -1865,10 +1861,6 @@<a href="#bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement"><span class="badge">E</span>RolloutPolicy.Checkers.PlanCheckEnforcement</a></li>- <li>- <a href="#bytebase.v1.SQLReviewRuleLevel"><span class="badge">E</span>SQLReviewRuleLevel</a>- </li>-<li>@@ -2272,11 +2264,19 @@<a href="#bytebase.v1.ReviewConfig"><span class="badge">M</span>ReviewConfig</a></li>+ <li>+ <a href="#bytebase.v1.SQLReviewRule"><span class="badge">M</span>SQLReviewRule</a>+ </li>+<li><a href="#bytebase.v1.UpdateReviewConfigRequest"><span class="badge">M</span>UpdateReviewConfigRequest</a></li>+ <li>+ <a href="#bytebase.v1.SQLReviewRuleLevel"><span class="badge">E</span>SQLReviewRuleLevel</a>+ </li>+<li>@@ -20440,51 +20440,6 @@ These checks are performed in UI workflows only. </p></td>- <h3 id="bytebase.v1.SQLReviewRule">SQLReviewRule</h3>- <p>SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.</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 type of SQL review rule. </p></td>- </tr>-- <tr>- <td>level</td>- <td><a href="#bytebase.v1.SQLReviewRuleLevel">SQLReviewRuleLevel</a></td>- <td></td>- <td><p>The severity level of the rule. </p></td>- </tr>-- <tr>- <td>payload</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The payload is a JSON string that varies by rule type. </p></td>- </tr>-- <tr>- <td>engine</td>- <td><a href="#bytebase.v1.Engine">Engine</a></td>- <td></td>- <td><p>The database engine this rule applies to. </p></td>- </tr>-- </tbody>- </table>-----<h3 id="bytebase.v1.TagPolicy">TagPolicy</h3><p>Policy for tagging resources with metadata.</p>@@ -20764,35 +20719,6 @@ In this situation, `update_mask` is ignored. </p></td></tbody></table>- <h3 id="bytebase.v1.SQLReviewRuleLevel">SQLReviewRuleLevel</h3>- <p>The severity level for SQL review rules.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>LEVEL_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified level.</p></td>- </tr>-- <tr>- <td>ERROR</td>- <td>1</td>- <td><p>Rule violation is an error.</p></td>- </tr>-- <tr>- <td>WARNING</td>- <td>2</td>- <td><p>Rule violation is a warning.</p></td>- </tr>-- </tbody>- </table>-@@ -25279,6 +25205,51 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td>+ <h3 id="bytebase.v1.SQLReviewRule">SQLReviewRule</h3>+ <p>SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.</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 type of SQL review rule. </p></td>+ </tr>++ <tr>+ <td>level</td>+ <td><a href="#bytebase.v1.SQLReviewRuleLevel">SQLReviewRuleLevel</a></td>+ <td></td>+ <td><p>The severity level of the rule. </p></td>+ </tr>++ <tr>+ <td>payload</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The payload is a JSON string that varies by rule type. </p></td>+ </tr>++ <tr>+ <td>engine</td>+ <td><a href="#bytebase.v1.Engine">Engine</a></td>+ <td></td>+ <td><p>The database engine this rule applies to. </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.UpdateReviewConfigRequest">UpdateReviewConfigRequest</h3><p></p>@@ -25322,6 +25293,35 @@ In this situation, `update_mask` is ignored. </p></td>+ <h3 id="bytebase.v1.SQLReviewRuleLevel">SQLReviewRuleLevel</h3>+ <p>The severity level for SQL review rules.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>LEVEL_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified level.</p></td>+ </tr>++ <tr>+ <td>ERROR</td>+ <td>1</td>+ <td><p>Rule violation is an error.</p></td>+ </tr>++ <tr>+ <td>WARNING</td>+ <td>2</td>+ <td><p>Rule violation is a warning.</p></td>+ </tr>++ </tbody>+ </table>+diff --git a/proto/store/store/policy.proto b/proto/store/store/policy.protoindex a5a20b3f20..cde582de68 100644--- a/proto/store/store/policy.proto+++ b/proto/store/store/policy.proto@@ -4,7 +4,6 @@ package bytebase.store;import "google/protobuf/duration.proto";import "google/type/expr.proto";-import "store/common.proto";option go_package = "generated-go/store";@@ -95,19 +94,6 @@ message MaskingRulePolicy {repeated MaskingRule rules = 1;}-message SQLReviewRule {- string type = 1;- SQLReviewRuleLevel level = 2;- string payload = 3;- Engine engine = 4;-}--enum SQLReviewRuleLevel {- LEVEL_UNSPECIFIED = 0;- ERROR = 1;- WARNING = 2;-}-message TagPolicy {// tags is the key-value map for resources.// For example, the environment resource can have the SQL review config tag, such as "bb.tag.review_config": "reviewConfigs/{review config resource id}".diff --git a/proto/store/store/review_config.proto b/proto/store/store/review_config.protoindex 34c6360f5b..728a8dcc29 100644--- a/proto/store/store/review_config.proto+++ b/proto/store/store/review_config.proto@@ -2,10 +2,23 @@ syntax = "proto3";package bytebase.store;-import "store/policy.proto";+import "store/common.proto";option go_package = "generated-go/store";message ReviewConfigPayload {repeated SQLReviewRule sql_review_rules = 1;}++message SQLReviewRule {+ string type = 1;+ SQLReviewRuleLevel level = 2;+ string payload = 3;+ Engine engine = 4;+}++enum SQLReviewRuleLevel {+ LEVEL_UNSPECIFIED = 0;+ ERROR = 1;+ WARNING = 2;+}diff --git a/proto/v1/v1/org_policy_service.proto b/proto/v1/v1/org_policy_service.protoindex 51c500ed50..0975414895 100644--- a/proto/v1/v1/org_policy_service.proto+++ b/proto/v1/v1/org_policy_service.proto@@ -11,7 +11,6 @@ import "google/protobuf/empty.proto";import "google/protobuf/field_mask.proto";import "google/type/expr.proto";import "v1/annotation.proto";-import "v1/common.proto";option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";@@ -336,29 +335,6 @@ message QueryDataPolicy {bool disable_copy_data = 5;}-// SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.-message SQLReviewRule {- // The type of SQL review rule.- string type = 1;- // The severity level of the rule.- SQLReviewRuleLevel level = 2;-- // The payload is a JSON string that varies by rule type.- string payload = 3;- // The database engine this rule applies to.- Engine engine = 4;-}--// The severity level for SQL review rules.-enum SQLReviewRuleLevel {- // Unspecified level.- LEVEL_UNSPECIFIED = 0;- // Rule violation is an error.- ERROR = 1;- // Rule violation is a warning.- WARNING = 2;-}-// MaskingExceptionPolicy is the allowlist of users who can access sensitive data.message MaskingExceptionPolicy {// An exception allowing specific users to access masked data.diff --git a/proto/v1/v1/review_config_service.proto b/proto/v1/v1/review_config_service.protoindex b0e66ba13a..feee7fb5f8 100644--- a/proto/v1/v1/review_config_service.proto+++ b/proto/v1/v1/review_config_service.proto@@ -10,7 +10,7 @@ import "google/api/resource.proto";import "google/protobuf/empty.proto";import "google/protobuf/field_mask.proto";import "v1/annotation.proto";-import "v1/org_policy_service.proto";+import "v1/common.proto";option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";@@ -136,3 +136,26 @@ message ReviewConfig {// Format: {resource}/{resource id}, e.g., environments/test.repeated string resources = 8;}++// SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.+message SQLReviewRule {+ // The type of SQL review rule.+ string type = 1;+ // The severity level of the rule.+ SQLReviewRuleLevel level = 2;++ // The payload is a JSON string that varies by rule type.+ string payload = 3;+ // The database engine this rule applies to.+ Engine engine = 4;+}++// The severity level for SQL review rules.+enum SQLReviewRuleLevel {+ // Unspecified level.+ LEVEL_UNSPECIFIED = 0;+ // Rule violation is an error.+ ERROR = 1;+ // Rule violation is a warning.+ WARNING = 2;+}