From f037980a94d4d22503ee840e9b8478ca633561ef Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Sat, 14 Sep 2024 17:20:55 +0800 Subject: [PATCH 01/11] clean annotation --- sqle/driver/v2/driver_grpc_server.go | 5 ++--- sqle/model/rule.go | 10 +++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/sqle/driver/v2/driver_grpc_server.go b/sqle/driver/v2/driver_grpc_server.go index 9248c0bd5..f67ccb065 100644 --- a/sqle/driver/v2/driver_grpc_server.go +++ b/sqle/driver/v2/driver_grpc_server.go @@ -36,7 +36,7 @@ type DSN struct { type Rule struct { Name string Level RuleLevel - Params params.Params // 仅用于ParamValue处理,展示 Param.Desc 等以 I18nRuleInfo->RuleInfo.Params 为准 + Params params.Params I18nRuleInfo I18nRuleInfo } @@ -72,8 +72,7 @@ type RuleInfo struct { // Category is the category of the rule. Such as "Naming Conventions"... // Rules will be displayed on the SQLE rule list page by category. - Category string - //Params params.Params // 仅用于国际化,ParamValue以 Rule.Params 为准 + Category string Knowledge RuleKnowledge } diff --git a/sqle/model/rule.go b/sqle/model/rule.go index 94b2cbc33..c7a970348 100644 --- a/sqle/model/rule.go +++ b/sqle/model/rule.go @@ -84,13 +84,9 @@ func (r *RuleKnowledge) GetContentByLangTag(lang language.Tag) string { } type Rule struct { - Name string `json:"name" gorm:"primary_key; not null;type:varchar(255)"` - DBType string `json:"db_type" gorm:"primary_key; not null; default:\"mysql\";type:varchar(255)"` - // todo i18n 规则应该不用兼容老sqle数据 - //Desc string `json:"desc" gorm:"type:varchar(255)"` // Deprecated: use driverV2.RuleInfo .Desc in I18nRuleInfo instead - //Annotation string `json:"annotation" gorm:"column:annotation;type:varchar(1024)"` // Deprecated: use driverV2.RuleInfo .Annotation in I18nRuleInfo instead - Level string `json:"level" example:"error" gorm:"type:varchar(255)"` // notice, warn, error - //Typ string `json:"type" gorm:"column:type; not null;type:varchar(255)"` // Deprecated: use driverV2.RuleInfo .Category in I18nRuleInfo instead + Name string `json:"name" gorm:"primary_key; not null;type:varchar(255)"` + DBType string `json:"db_type" gorm:"primary_key; not null; default:\"mysql\";type:varchar(255)"` + Level string `json:"level" example:"error" gorm:"type:varchar(255)"` // notice, warn, error Params params.Params `json:"params" gorm:"type:varchar(1000)"` KnowledgeId uint `json:"knowledge_id"` Knowledge *RuleKnowledge `json:"knowledge" gorm:"foreignkey:KnowledgeId"` From fa127f1505e5fe40669379462e54e848bd14caa2 Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Sat, 14 Sep 2024 17:22:08 +0800 Subject: [PATCH 02/11] params column use json type --- sqle/model/audit_plan.go | 2 +- sqle/model/instance_audit_plan.go | 4 ++-- sqle/model/rule.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sqle/model/audit_plan.go b/sqle/model/audit_plan.go index af335490c..a07a12bfd 100644 --- a/sqle/model/audit_plan.go +++ b/sqle/model/audit_plan.go @@ -26,7 +26,7 @@ type AuditPlan struct { InstanceDatabase string `json:"instance_database" gorm:"type:varchar(255)"` Type string `json:"type" gorm:"type:varchar(255)"` RuleTemplateName string `json:"rule_template_name" gorm:"type:varchar(255)"` - Params params.Params `json:"params" gorm:"type:varchar(1000)"` + Params params.Params `json:"params" gorm:"type:json"` NotifyInterval int `json:"notify_interval" gorm:"default:10"` NotifyLevel string `json:"notify_level" gorm:"default:'warn';type:varchar(255)"` diff --git a/sqle/model/instance_audit_plan.go b/sqle/model/instance_audit_plan.go index 58fea1b0c..8613cff1e 100644 --- a/sqle/model/instance_audit_plan.go +++ b/sqle/model/instance_audit_plan.go @@ -124,8 +124,8 @@ type AuditPlanV2 struct { InstanceAuditPlanID uint `json:"instance_audit_plan_id" gorm:"not null"` Type string `json:"type" gorm:"type:varchar(255)"` RuleTemplateName string `json:"rule_template_name" gorm:"type:varchar(255)"` - Params params.Params `json:"params" gorm:"type:varchar(1000)"` - HighPriorityParams params.ParamsWithOperator `json:"high_priority_params" gorm:"type:varchar(1000)"` + Params params.Params `json:"params" gorm:"type:json"` + HighPriorityParams params.ParamsWithOperator `json:"high_priority_params" gorm:"type:json"` NeedMarkHighPrioritySQL bool `json:"need_mark_high_priority_sql"` ActiveStatus string `json:"active_status" gorm:"type:varchar(255)"` diff --git a/sqle/model/rule.go b/sqle/model/rule.go index c7a970348..7afe1feaa 100644 --- a/sqle/model/rule.go +++ b/sqle/model/rule.go @@ -87,7 +87,7 @@ type Rule struct { Name string `json:"name" gorm:"primary_key; not null;type:varchar(255)"` DBType string `json:"db_type" gorm:"primary_key; not null; default:\"mysql\";type:varchar(255)"` Level string `json:"level" example:"error" gorm:"type:varchar(255)"` // notice, warn, error - Params params.Params `json:"params" gorm:"type:varchar(1000)"` + Params params.Params `json:"params" gorm:"type:json"` KnowledgeId uint `json:"knowledge_id"` Knowledge *RuleKnowledge `json:"knowledge" gorm:"foreignkey:KnowledgeId"` HasAuditPower bool `json:"has_audit_power" gorm:"type:bool" example:"true"` @@ -103,7 +103,7 @@ type RuleTemplateRule struct { RuleTemplateId uint `json:"rule_template_id" gorm:"primary_key;auto_increment:false;"` RuleName string `json:"name" gorm:"primary_key;type:varchar(255)"` RuleLevel string `json:"level" gorm:"column:level;type:varchar(255)"` - RuleParams params.Params `json:"value" gorm:"column:rule_params;type:varchar(1000)"` + RuleParams params.Params `json:"value" gorm:"column:rule_params;type:json"` RuleDBType string `json:"rule_db_type" gorm:"column:db_type; not null; type:varchar(255)"` Rule *Rule `json:"-" gorm:"foreignkey:Name,DBType;references:RuleName,RuleDBType"` From 6e8460ca17295fd5879cb609e4aca1317b580613 Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Wed, 18 Sep 2024 13:14:20 +0800 Subject: [PATCH 03/11] incompatible, del deprecated column --- sqle/model/audit_plan_list_test.go | 3 ++- sqle/model/operation_record.go | 5 ----- sqle/model/rule.go | 1 - sqle/model/task.go | 5 ----- sqle/model/utils.go | 12 +----------- 5 files changed, 3 insertions(+), 23 deletions(-) diff --git a/sqle/model/audit_plan_list_test.go b/sqle/model/audit_plan_list_test.go index 61ae2feb3..b45e9605e 100644 --- a/sqle/model/audit_plan_list_test.go +++ b/sqle/model/audit_plan_list_test.go @@ -6,6 +6,7 @@ import ( "testing" sqlmock "github.com/DATA-DOG/go-sqlmock" + "github.com/actiontech/dms/pkg/dms-common/i18nPkg" "github.com/stretchr/testify/assert" ) @@ -171,7 +172,7 @@ func TestStorage_GetAuditPlanReportSQLsByReq(t *testing.T) { defer mockDB.Close() mock.ExpectQuery("SELECT VERSION()").WillReturnRows(sqlmock.NewRows([]string{"VERSION()"}).AddRow("5.7")) InitMockStorage(mockDB) - mockResult := []AuditResult{{Level: "error", Message: "FAKE AUDIT RESULT"}} + mockResult := []AuditResult{{Level: "error", I18nAuditResultInfo: I18nAuditResultInfo{i18nPkg.DefaultLang: AuditResultInfo{Message: "FAKE AUDIT RESULT"}}}} mockResultBytes, _ := json.Marshal(mockResult) mock.ExpectPrepare(fmt.Sprintf(`SELECT report_sqls.sql, report_sqls.audit_results, report_sqls.number %v LIMIT ? OFFSET ?`, tableAndRowOfSQL)). diff --git a/sqle/model/operation_record.go b/sqle/model/operation_record.go index 172845c94..459c73d58 100644 --- a/sqle/model/operation_record.go +++ b/sqle/model/operation_record.go @@ -14,17 +14,12 @@ type OperationRecord struct { OperationReqIP string `gorm:"column:operation_req_ip; type:varchar(255)" json:"operation_req_ip"` OperationTypeName string `gorm:"column:operation_type_name; type:varchar(255)" json:"operation_type_name"` OperationAction string `gorm:"column:operation_action; type:varchar(255)" json:"operation_action"` - OperationContent string `gorm:"column:operation_content; type:varchar(255)" json:"operation_content"` // Deprecated: use OperationI18nContent instead OperationProjectName string `gorm:"column:operation_project_name; type:varchar(255)" json:"operation_project_name"` OperationStatus string `gorm:"column:operation_status; type:varchar(255)" json:"operation_status"` OperationI18nContent i18nPkg.I18nStr `gorm:"column:operation_i18n_content; type:json" json:"operation_i18n_content"` } func (o *OperationRecord) GetOperationContentByLangTag(lang language.Tag) string { - if o.OperationContent != "" { - // 兼容老sqle的数据 - o.OperationI18nContent.SetStrInLang(i18nPkg.DefaultLang, o.OperationContent) - } return o.OperationI18nContent.GetStrInLang(lang) } diff --git a/sqle/model/rule.go b/sqle/model/rule.go index 7afe1feaa..d0c885f74 100644 --- a/sqle/model/rule.go +++ b/sqle/model/rule.go @@ -68,7 +68,6 @@ func ConvertRuleToDriverRule(r *Rule) *driverV2.Rule { type RuleKnowledge struct { Model - Content string `gorm:"type:longtext"` // Deprecated: use I18nContent instead I18nContent i18nPkg.I18nStr `gorm:"type:json"` } diff --git a/sqle/model/task.go b/sqle/model/task.go index 3dccca486..326ac8a21 100644 --- a/sqle/model/task.go +++ b/sqle/model/task.go @@ -155,16 +155,11 @@ func (s *BaseSQL) GetExecStatusDesc(ctx context.Context) string { type AuditResult struct { Level string `json:"level"` - Message string `json:"message"` // Deprecated: use I18nAuditResultInfo instead RuleName string `json:"rule_name"` I18nAuditResultInfo I18nAuditResultInfo `json:"i18n_audit_result_info"` } func (ar *AuditResult) GetAuditMsgByLangTag(lang language.Tag) string { - if len(ar.I18nAuditResultInfo) == 0 { - // 兼容老sqle数据 - return ar.Message - } return ar.I18nAuditResultInfo.GetAuditResultInfoByLangTag(lang).Message } diff --git a/sqle/model/utils.go b/sqle/model/utils.go index e575a315e..73ee87936 100644 --- a/sqle/model/utils.go +++ b/sqle/model/utils.go @@ -13,7 +13,6 @@ import ( "text/template" "time" - "github.com/actiontech/dms/pkg/dms-common/i18nPkg" driverV2 "github.com/actiontech/sqle/sqle/driver/v2" "github.com/actiontech/sqle/sqle/errors" "github.com/actiontech/sqle/sqle/log" @@ -215,12 +214,8 @@ func (s *Storage) CreateRulesIfNotExist(rulesMap map[string][]*Rule) error { return err } } else { - //isRuleDescSame := existedRule.Desc == rule.Desc - //isRuleAnnotationSame := existedRule.Annotation == rule.Annotation isRuleLevelSame := existedRule.Level == rule.Level - //isRuleTypSame := existedRule.Typ == rule.Typ isI18nInfoSame := reflect.DeepEqual(existedRule.I18nRuleInfo, rule.I18nRuleInfo) - isOldKnowledge := existedRule.Knowledge.Content != "" isHasAuditPowerSame := existedRule.HasAuditPower == rule.HasAuditPower isHasRewritePowerSame := existedRule.HasRewritePower == rule.HasRewritePower existRuleParam, err := existedRule.Params.Value() @@ -233,12 +228,7 @@ func (s *Storage) CreateRulesIfNotExist(rulesMap map[string][]*Rule) error { } isParamSame := reflect.DeepEqual(existRuleParam, pluginRuleParam) - if !isI18nInfoSame || isOldKnowledge || !isRuleLevelSame || !isParamSame || !isHasAuditPowerSame || !isHasRewritePowerSame { - if isOldKnowledge { - // 兼容老sqle的数据,将其移动到默认Key下 - existedRule.Knowledge.I18nContent = i18nPkg.ConvertStr2I18nAsDefaultLang(existedRule.Knowledge.Content) - existedRule.Knowledge.Content = "" - } + if !isI18nInfoSame || !isRuleLevelSame || !isParamSame || !isHasAuditPowerSame || !isHasRewritePowerSame { if existedRule.Knowledge != nil && existedRule.Knowledge.I18nContent != nil { for lang, content := range existedRule.Knowledge.I18nContent { if content != "" { From 96f7aec19c085d469c8532db685a877465990f50 Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Wed, 18 Sep 2024 13:29:34 +0800 Subject: [PATCH 04/11] del AuditResults ruleNameIndex --- sqle/driver/plugin_adapter_v2.go | 2 +- sqle/driver/v2/driver_interface.go | 72 +++++++++++++----------------- 2 files changed, 33 insertions(+), 41 deletions(-) diff --git a/sqle/driver/plugin_adapter_v2.go b/sqle/driver/plugin_adapter_v2.go index 0f3c1553a..d707c21f9 100644 --- a/sqle/driver/plugin_adapter_v2.go +++ b/sqle/driver/plugin_adapter_v2.go @@ -256,7 +256,7 @@ func (s *PluginImplV2) Audit(ctx context.Context, sqls []string) ([]*driverV2.Au return nil, err } ret := driverV2.NewAuditResults() - ret.SetResults(dResult) + ret.Results = dResult rets = append(rets, ret) } return rets, nil diff --git a/sqle/driver/v2/driver_interface.go b/sqle/driver/v2/driver_interface.go index 0e36ac33a..366056d61 100644 --- a/sqle/driver/v2/driver_interface.go +++ b/sqle/driver/v2/driver_interface.go @@ -146,8 +146,7 @@ func RuleLevelLessOrEqual(a, b string) bool { } type AuditResults struct { - Results []*AuditResult - ruleNameIndex map[string]int + Results []*AuditResult } type AuditResult struct { @@ -162,8 +161,7 @@ type AuditResultInfo struct { func NewAuditResults() *AuditResults { return &AuditResults{ - Results: []*AuditResult{}, - ruleNameIndex: map[string]int{}, + Results: []*AuditResult{}, } } @@ -207,39 +205,41 @@ func (rs *AuditResults) Add(level RuleLevel, ruleName string, i18nMsgPattern i18 return } - if rs.ruleNameIndex == nil { - rs.ruleNameIndex = make(map[string]int) - } - - if index, exist := rs.ruleNameIndex[ruleName]; exist { - rs.Results[index].Level = level - for langTag, msg := range i18nMsgPattern { - rs.Results[index].I18nAuditResultInfo[langTag] = AuditResultInfo{ - Message: msg, + defer rs.SortByLevel() + + if ruleName != "" { + for _, v := range rs.Results { + // 审核结果规则存在则更新 + if v.RuleName == ruleName { + v.Level = level + for langTag, msg := range i18nMsgPattern { + if len(args) > 0 { + msg = fmt.Sprintf(msg, args...) + } + v.I18nAuditResultInfo[langTag] = AuditResultInfo{ + Message: msg, + } + } + return } } - } else { - ar := &AuditResult{ - Level: level, - RuleName: ruleName, - I18nAuditResultInfo: make(map[language.Tag]AuditResultInfo, len(i18nMsgPattern)), - } - for langTag, msg := range i18nMsgPattern { - ari := AuditResultInfo{ - Message: msg, - } - if len(args) > 0 { - ari.Message = fmt.Sprintf(msg, args...) - } - ar.I18nAuditResultInfo[langTag] = ari + } + + ar := &AuditResult{ + Level: level, + RuleName: ruleName, + I18nAuditResultInfo: make(map[language.Tag]AuditResultInfo, len(i18nMsgPattern)), + } + for langTag, msg := range i18nMsgPattern { + if len(args) > 0 { + msg = fmt.Sprintf(msg, args...) } - if ruleName != "" { - rs.ruleNameIndex[ruleName] = len(rs.Results) + ari := AuditResultInfo{ + Message: msg, } - rs.Results = append(rs.Results, ar) + ar.I18nAuditResultInfo[langTag] = ari } - - rs.SortByLevel() + rs.Results = append(rs.Results, ar) } func (rs *AuditResults) SortByLevel() { @@ -252,14 +252,6 @@ func (rs *AuditResults) HasResult() bool { return len(rs.Results) != 0 } -func (rs *AuditResults) SetResults(ars []*AuditResult) { - rs.Results = ars - rs.ruleNameIndex = make(map[string]int, len(ars)) - for k, v := range ars { - rs.ruleNameIndex[v.RuleName] = k - } -} - type QueryConf struct { TimeOutSecond uint32 } From 64d2821a175010ac459257403a9617b708a8bc5e Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Wed, 18 Sep 2024 15:20:44 +0800 Subject: [PATCH 05/11] i18n rules initialization for MySQL --- sqle/driver/mysql/rule/rule.go | 94 +-------------------- sqle/driver/mysql/rule/rule_list.go | 2 - sqle/driver/mysql/rule/rule_list_trial.go | 2 - sqle/driver/mysql/rule/rule_source.go | 99 +++++++++++++++++++++++ 4 files changed, 101 insertions(+), 96 deletions(-) create mode 100644 sqle/driver/mysql/rule/rule_source.go diff --git a/sqle/driver/mysql/rule/rule.go b/sqle/driver/mysql/rule/rule.go index bece9492c..e9894e2b0 100644 --- a/sqle/driver/mysql/rule/rule.go +++ b/sqle/driver/mysql/rule/rule.go @@ -19,7 +19,6 @@ import ( "github.com/actiontech/sqle/sqle/driver/mysql/util" driverV2 "github.com/actiontech/sqle/sqle/driver/v2" "github.com/actiontech/sqle/sqle/log" - "github.com/actiontech/sqle/sqle/pkg/params" "github.com/actiontech/sqle/sqle/utils" "github.com/nicksnyder/go-i18n/v2/i18n" "github.com/pingcap/parser/ast" @@ -29,7 +28,6 @@ import ( tidbTypes "github.com/pingcap/tidb/types" parserdriver "github.com/pingcap/tidb/types/parser_driver" dry "github.com/ungerik/go-dry" - "golang.org/x/text/language" ) // rule type @@ -242,97 +240,8 @@ type RuleHandler struct { NotSupportExecutedSQLAuditStmts []ast.Node } -type SourceEnum struct { - Value string `json:"value"` - Desc *i18n.Message `json:"desc"` -} - -type SourceParam struct { - Key string `json:"key"` - Value string `json:"value"` - Desc *i18n.Message `json:"desc"` - Type params.ParamType `json:"type"` - Enums []SourceEnum `json:"enums"` -} - -type SourceRule struct { - Name string - Desc *i18n.Message - Annotation *i18n.Message - Category *i18n.Message - Level driverV2.RuleLevel - Params []*SourceParam - Knowledge driverV2.RuleKnowledge -} - -type SourceHandler struct { - Rule SourceRule - Message *i18n.Message - Func RuleHandlerFunc - AllowOffline bool - NotAllowOfflineStmts []ast.Node - // 开始事后审核时将会跳过这个值为ture的规则 - OnlyAuditNotExecutedSQL bool - // 事后审核时将会跳过下方列表中的类型 - NotSupportExecutedSQLAuditStmts []ast.Node -} - -// 通过 source* 生成多语言版本的 RuleHandler -func generateRuleHandlers(shs []*SourceHandler) []RuleHandler { - rhs := make([]RuleHandler, len(shs)) - for k, v := range shs { - rhs[k] = RuleHandler{ - Rule: *ConvertSourceRule(&v.Rule), - Message: v.Message, - Func: v.Func, - AllowOffline: v.AllowOffline, - NotAllowOfflineStmts: v.NotAllowOfflineStmts, - OnlyAuditNotExecutedSQL: v.OnlyAuditNotExecutedSQL, - NotSupportExecutedSQLAuditStmts: v.NotSupportExecutedSQLAuditStmts, - } - } - return rhs -} - -func ConvertSourceRule(sr *SourceRule) *driverV2.Rule { - r := &driverV2.Rule{ - Name: sr.Name, - Level: sr.Level, - Params: make(params.Params, 0, len(sr.Params)), - I18nRuleInfo: genAllI18nRuleInfo(sr), - } - for _, v := range sr.Params { - r.Params = append(r.Params, ¶ms.Param{ - Key: v.Key, - Value: v.Value, - Desc: plocale.Bundle.LocalizeMsgByLang(i18nPkg.DefaultLang, v.Desc), - I18nDesc: plocale.Bundle.LocalizeAll(v.Desc), - Type: v.Type, - Enums: nil, // all nil now - }) - } - - return r -} - -func genAllI18nRuleInfo(sr *SourceRule) map[language.Tag]*driverV2.RuleInfo { - result := make(map[language.Tag]*driverV2.RuleInfo, len(plocale.Bundle.LanguageTags())) - for _, langTag := range plocale.Bundle.LanguageTags() { - newInfo := &driverV2.RuleInfo{ - Desc: plocale.Bundle.LocalizeMsgByLang(langTag, sr.Desc), - Annotation: plocale.Bundle.LocalizeMsgByLang(langTag, sr.Annotation), - Category: plocale.Bundle.LocalizeMsgByLang(langTag, sr.Category), - //Level: sr.Level, - Knowledge: driverV2.RuleKnowledge{Content: sr.Knowledge.Content}, //todo i18n Knowledge - } - - result[langTag] = newInfo - } - return result -} - func init() { - RuleHandlers = generateRuleHandlers(sourceRuleHandlers) + RuleHandlers = generateI18nRuleHandlersFromSource(sourceRuleHandlers) defaultRulesKnowledge, err := getDefaultRulesKnowledge() if err != nil { panic(fmt.Errorf("get default rules knowledge failed: %v", err)) @@ -384,6 +293,7 @@ func (rh *RuleHandler) IsDisableExecutedSQLRule(node ast.Node) bool { } var ( + RuleHandlers []RuleHandler RuleHandlerMap = map[string]RuleHandler{} ) diff --git a/sqle/driver/mysql/rule/rule_list.go b/sqle/driver/mysql/rule/rule_list.go index 721ec0828..1f5c216c3 100644 --- a/sqle/driver/mysql/rule/rule_list.go +++ b/sqle/driver/mysql/rule/rule_list.go @@ -10,8 +10,6 @@ import ( "github.com/pingcap/parser/ast" ) -var RuleHandlers []RuleHandler - var sourceRuleHandlers = []*SourceHandler{ { Rule: SourceRule{ diff --git a/sqle/driver/mysql/rule/rule_list_trial.go b/sqle/driver/mysql/rule/rule_list_trial.go index 03931b011..e889e74b5 100644 --- a/sqle/driver/mysql/rule/rule_list_trial.go +++ b/sqle/driver/mysql/rule/rule_list_trial.go @@ -10,8 +10,6 @@ import ( "github.com/pingcap/parser/ast" ) -var RuleHandlers = generateRuleHandlers(sourceRuleHandlers) - var sourceRuleHandlers = []*SourceHandler{ { Rule: SourceRule{ diff --git a/sqle/driver/mysql/rule/rule_source.go b/sqle/driver/mysql/rule/rule_source.go new file mode 100644 index 000000000..04ee3de13 --- /dev/null +++ b/sqle/driver/mysql/rule/rule_source.go @@ -0,0 +1,99 @@ +package rule + +import ( + "github.com/actiontech/dms/pkg/dms-common/i18nPkg" + "github.com/actiontech/sqle/sqle/driver/mysql/plocale" + driverV2 "github.com/actiontech/sqle/sqle/driver/v2" + "github.com/actiontech/sqle/sqle/pkg/params" + "github.com/nicksnyder/go-i18n/v2/i18n" + "github.com/pingcap/parser/ast" + "golang.org/x/text/language" +) + +type SourceEnum struct { + Value string `json:"value"` + Desc *i18n.Message `json:"desc"` +} + +type SourceParam struct { + Key string `json:"key"` + Value string `json:"value"` + Desc *i18n.Message `json:"desc"` + Type params.ParamType `json:"type"` + Enums []SourceEnum `json:"enums"` +} + +type SourceRule struct { + Name string + Desc *i18n.Message + Annotation *i18n.Message + Category *i18n.Message + Level driverV2.RuleLevel + Params []*SourceParam + Knowledge driverV2.RuleKnowledge +} + +type SourceHandler struct { + Rule SourceRule + Message *i18n.Message + Func RuleHandlerFunc + AllowOffline bool + NotAllowOfflineStmts []ast.Node + // 开始事后审核时将会跳过这个值为ture的规则 + OnlyAuditNotExecutedSQL bool + // 事后审核时将会跳过下方列表中的类型 + NotSupportExecutedSQLAuditStmts []ast.Node +} + +// 通过 source* 生成多语言版本的 RuleHandler +func generateI18nRuleHandlersFromSource(shs []*SourceHandler) []RuleHandler { + rhs := make([]RuleHandler, len(shs)) + for k, v := range shs { + rhs[k] = RuleHandler{ + Rule: *ConvertSourceRule(&v.Rule), + Message: v.Message, + Func: v.Func, + AllowOffline: v.AllowOffline, + NotAllowOfflineStmts: v.NotAllowOfflineStmts, + OnlyAuditNotExecutedSQL: v.OnlyAuditNotExecutedSQL, + NotSupportExecutedSQLAuditStmts: v.NotSupportExecutedSQLAuditStmts, + } + } + return rhs +} + +func ConvertSourceRule(sr *SourceRule) *driverV2.Rule { + r := &driverV2.Rule{ + Name: sr.Name, + Level: sr.Level, + Params: make(params.Params, 0, len(sr.Params)), + I18nRuleInfo: genAllI18nRuleInfo(sr), + } + for _, v := range sr.Params { + r.Params = append(r.Params, ¶ms.Param{ + Key: v.Key, + Value: v.Value, + Desc: plocale.Bundle.LocalizeMsgByLang(i18nPkg.DefaultLang, v.Desc), + I18nDesc: plocale.Bundle.LocalizeAll(v.Desc), + Type: v.Type, + Enums: nil, // all nil now + }) + } + + return r +} + +func genAllI18nRuleInfo(sr *SourceRule) map[language.Tag]*driverV2.RuleInfo { + result := make(map[language.Tag]*driverV2.RuleInfo, len(plocale.Bundle.LanguageTags())) + for _, langTag := range plocale.Bundle.LanguageTags() { + newInfo := &driverV2.RuleInfo{ + Desc: plocale.Bundle.LocalizeMsgByLang(langTag, sr.Desc), + Annotation: plocale.Bundle.LocalizeMsgByLang(langTag, sr.Annotation), + Category: plocale.Bundle.LocalizeMsgByLang(langTag, sr.Category), + Knowledge: driverV2.RuleKnowledge{Content: sr.Knowledge.Content}, //todo i18n Knowledge + } + + result[langTag] = newInfo + } + return result +} From dbb7dca10ff22f6bc702de05db869362a440fbd9 Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Wed, 18 Sep 2024 15:41:25 +0800 Subject: [PATCH 06/11] mv HighPriorityCondition to where used --- sqle/api/controller/v1/audit_plan.go | 9 --------- sqle/api/controller/v1/instance_audit_plan.go | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sqle/api/controller/v1/audit_plan.go b/sqle/api/controller/v1/audit_plan.go index 66cd24244..a14198c3a 100644 --- a/sqle/api/controller/v1/audit_plan.go +++ b/sqle/api/controller/v1/audit_plan.go @@ -85,15 +85,6 @@ type AuditPlanParamResV1 struct { EnumsValues []EnumsValueResV1 `json:"enums_value"` } -type HighPriorityCondition struct { - Key string `json:"key"` - Desc string `json:"desc"` - Value string `json:"value"` - Type string `json:"type" enums:"string,int,bool,password"` - EnumsValues []params.EnumsValue `json:"enums_value"` - Operator Operator `json:"operator"` -} - type Operator struct { Value string `json:"operator_value"` EnumsValue []params.EnumsValue `json:"operator_enums_value"` diff --git a/sqle/api/controller/v1/instance_audit_plan.go b/sqle/api/controller/v1/instance_audit_plan.go index f0977332b..801c93292 100644 --- a/sqle/api/controller/v1/instance_audit_plan.go +++ b/sqle/api/controller/v1/instance_audit_plan.go @@ -607,6 +607,15 @@ type AuditPlanRes struct { HighPriorityConditions []HighPriorityCondition `json:"high_priority_conditions"` } +type HighPriorityCondition struct { + Key string `json:"key"` + Desc string `json:"desc"` + Value string `json:"value"` + Type string `json:"type" enums:"string,int,bool,password"` + EnumsValues []params.EnumsValue `json:"enums_value"` + Operator Operator `json:"operator"` +} + // @Summary 获取实例扫描任务详情 // @Description get instance audit plan detail // @Id getInstanceAuditPlanDetailV1 From 97fcd48baab3803019704eae1cf9330e2be97cfd Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Thu, 19 Sep 2024 15:17:20 +0800 Subject: [PATCH 07/11] add plugin i18n OptionalModule --- sqle/driver/mysql/mysql.go | 1 + sqle/driver/plugin_adapter_v2.go | 23 ++- sqle/driver/plugin_manager.go | 7 +- sqle/driver/v2/driver_grpc_server.go | 2 +- sqle/driver/v2/proto/driver_v2.pb.go | 272 ++++++++++++++------------- sqle/driver/v2/proto/driver_v2.proto | 1 + sqle/driver/v2/util.go | 43 +++-- 7 files changed, 186 insertions(+), 163 deletions(-) diff --git a/sqle/driver/mysql/mysql.go b/sqle/driver/mysql/mysql.go index bdbab3a6b..d556fc43b 100644 --- a/sqle/driver/mysql/mysql.go +++ b/sqle/driver/mysql/mysql.go @@ -646,6 +646,7 @@ func (p *PluginProcessor) GetDriverMetas() (*driverV2.DriverMetas, error) { driverV2.OptionalModuleEstimateSQLAffectRows, driverV2.OptionalModuleKillProcess, driverV2.OptionalExecBatch, + driverV2.OptionalModuleI18n, }, }, nil } diff --git a/sqle/driver/plugin_adapter_v2.go b/sqle/driver/plugin_adapter_v2.go index d707c21f9..ac1d8b0d1 100644 --- a/sqle/driver/plugin_adapter_v2.go +++ b/sqle/driver/plugin_adapter_v2.go @@ -77,6 +77,15 @@ func (d *PluginProcessorV2) GetDriverMetas() (*driverV2.DriverMetas, error) { return nil, err } + var isI18n bool + ms := make([]driverV2.OptionalModule, 0, len(result.EnabledOptionalModule)) + for _, m := range result.EnabledOptionalModule { + ms = append(ms, driverV2.OptionalModule(m)) + if driverV2.OptionalModule(m) == driverV2.OptionalModuleI18n { + isI18n = true + } + } + rules := make([]*driverV2.Rule, 0, len(result.Rules)) for _, r := range result.Rules { if len(r.I18NRuleInfo) > 0 { @@ -85,17 +94,13 @@ func (d *PluginProcessorV2) GetDriverMetas() (*driverV2.DriverMetas, error) { return nil, fmt.Errorf("client rule: %s not support language: %s", r.Name, i18nPkg.DefaultLang.String()) } } - dr, err := driverV2.ConvertI18nRuleFromProtoToDriver(r) + dr, err := driverV2.ConvertI18nRuleFromProtoToDriver(r, isI18n) if err != nil { return nil, err } rules = append(rules, dr) } - ms := make([]driverV2.OptionalModule, 0, len(result.EnabledOptionalModule)) - for _, m := range result.EnabledOptionalModule { - ms = append(ms, driverV2.OptionalModule(m)) - } ps, err := driverV2.ConvertProtoParamToParam(result.DatabaseAdditionalParams) if err != nil { return nil, fmt.Errorf("plugin Metas rule param err: %w", err) @@ -148,6 +153,7 @@ func (d *PluginProcessorV2) Open(l *logrus.Entry, cfgV2 *driverV2.Config) (Plugi client: c, Session: result.Session, l: l.WithField("session_id", result.Session.Id), + meta: d.meta, }, nil } @@ -165,6 +171,7 @@ type PluginImplV2 struct { l *logrus.Entry client protoV2.DriverClient Session *protoV2.Session + meta *driverV2.DriverMetas } func (s *PluginImplV2) preLog(ApiName string) { @@ -251,7 +258,7 @@ func (s *PluginImplV2) Audit(ctx context.Context, sqls []string) ([]*driverV2.Au rets := make([]*driverV2.AuditResults, 0, len(resp.AuditResults)) for _, results := range resp.AuditResults { - dResult, err := driverV2.ConvertI18nAuditResultsFromProtoToDriver(results.Results) + dResult, err := driverV2.ConvertI18nAuditResultsFromProtoToDriver(results.Results, s.meta.IsOptionalModuleEnabled(driverV2.OptionalModuleI18n)) if err != nil { return nil, err } @@ -443,7 +450,7 @@ func (s *PluginImplV2) Explain(ctx context.Context, conf *driverV2.ExplainConf) return nil, err } - td, err := driverV2.ConvertProtoTabularDataToDriver(res.ClassicResult.Data) + td, err := driverV2.ConvertProtoTabularDataToDriver(res.ClassicResult.Data, s.meta.IsOptionalModuleEnabled(driverV2.OptionalModuleI18n)) if err != nil { return nil, fmt.Errorf("ClassicResult: %w", err) } @@ -487,7 +494,7 @@ func (s *PluginImplV2) getTableMeta(ctx context.Context, table *driverV2.Table) if err != nil { return nil, err } - return driverV2.ConvertProtoTableMetaToDriver(result.TableMeta) + return driverV2.ConvertProtoTableMetaToDriver(result.TableMeta, s.meta.IsOptionalModuleEnabled(driverV2.OptionalModuleI18n)) } func (s *PluginImplV2) extractTableFromSQL(ctx context.Context, sql string) ([]*driverV2.Table, error) { diff --git a/sqle/driver/plugin_manager.go b/sqle/driver/plugin_manager.go index 7a29b24e2..aff6ffa84 100644 --- a/sqle/driver/plugin_manager.go +++ b/sqle/driver/plugin_manager.go @@ -110,12 +110,7 @@ func (pm *pluginManager) IsOptionalModuleEnabled(pluginName string, expectModule if !ok { return false } - for _, m := range meta.EnabledOptionalModule { - if m == expectModule { - return true - } - } - return false + return meta.IsOptionalModuleEnabled(expectModule) } func (pm *pluginManager) register(pp PluginProcessor) error { diff --git a/sqle/driver/v2/driver_grpc_server.go b/sqle/driver/v2/driver_grpc_server.go index f67ccb065..7c61f327c 100644 --- a/sqle/driver/v2/driver_grpc_server.go +++ b/sqle/driver/v2/driver_grpc_server.go @@ -129,7 +129,7 @@ func (d *DriverGrpcServer) Metas(ctx context.Context, req *protoV2.Empty) (*prot func (d *DriverGrpcServer) Init(ctx context.Context, req *protoV2.InitRequest) (*protoV2.InitResponse, error) { var rules = make([]*Rule, 0, len(req.GetRules())) for _, rule := range req.GetRules() { - dr, err := ConvertI18nRuleFromProtoToDriver(rule) + dr, err := ConvertI18nRuleFromProtoToDriver(rule, d.Meta.IsOptionalModuleEnabled(OptionalModuleI18n)) if err != nil { return nil, err } diff --git a/sqle/driver/v2/proto/driver_v2.pb.go b/sqle/driver/v2/proto/driver_v2.pb.go index 922126b43..a85fce7f6 100644 --- a/sqle/driver/v2/proto/driver_v2.pb.go +++ b/sqle/driver/v2/proto/driver_v2.pb.go @@ -109,6 +109,7 @@ const ( OptionalModule_EstimateSQLAffectRows OptionalModule = 5 OptionalModule_KillProcess OptionalModule = 6 OptionalModule_ExecBatch OptionalModule = 7 + OptionalModule_I18n OptionalModule = 8 ) var OptionalModule_name = map[int32]string{ @@ -120,6 +121,7 @@ var OptionalModule_name = map[int32]string{ 5: "EstimateSQLAffectRows", 6: "KillProcess", 7: "ExecBatch", + 8: "I18n", } var OptionalModule_value = map[string]int32{ "GenRollbackSQL": 0, @@ -130,6 +132,7 @@ var OptionalModule_value = map[string]int32{ "EstimateSQLAffectRows": 5, "KillProcess": 6, "ExecBatch": 7, + "I18n": 8, } func (x OptionalModule) String() string { @@ -2339,140 +2342,141 @@ var _Driver_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("driver_v2.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 2155 bytes of a gzipped FileDescriptorProto + // 2163 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4b, 0x73, 0x13, 0xcb, - 0x15, 0x8e, 0xde, 0xd6, 0x91, 0x64, 0x8b, 0xb6, 0x0d, 0x42, 0x18, 0xe3, 0x34, 0x60, 0x5c, 0xc0, - 0x35, 0x20, 0x12, 0x2e, 0x17, 0x52, 0x29, 0x83, 0xed, 0x80, 0x2f, 0xe0, 0x98, 0x36, 0x61, 0x91, - 0xaa, 0x5b, 0xdc, 0xb1, 0xa6, 0x6d, 0xa6, 0x18, 0xcd, 0xc8, 0xd3, 0x2d, 0x6c, 0xef, 0x53, 0x95, - 0x2c, 0xf3, 0x17, 0x92, 0x5f, 0x90, 0xcd, 0xdd, 0xa4, 0x2a, 0x7f, 0x21, 0xfb, 0xfc, 0x92, 0x6c, - 0x53, 0xfd, 0x98, 0x99, 0xee, 0xd1, 0x88, 0x87, 0x2a, 0x77, 0xa5, 0xe9, 0xf3, 0x3e, 0xa7, 0xbf,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, 0x55, 0xd7, - 0xff, 0x7b, 0xbd, 0xf0, 0x75, 0xa8, 0x27, 0x74, 0xd4, 0x81, 0x5a, 0x3f, 0x0c, 0x38, 0x0d, 0x62, - 0x30, 0xc7, 0x43, 0xfc, 0x53, 0x11, 0x5a, 0xaf, 0x28, 0x77, 0x18, 0xa1, 0x6c, 0x18, 0x06, 0x8c, - 0x8a, 0x50, 0x86, 0xfe, 0xe8, 0xc8, 0x0b, 0x76, 0x53, 0x08, 0x19, 0x14, 0x74, 0x17, 0xe6, 0x63, - 0xb4, 0x6e, 0xd1, 0x43, 0x67, 0xe4, 0xf3, 0xbd, 0x78, 0x41, 0x94, 0x48, 0x1e, 0x0b, 0x7d, 0x0f, - 0x9d, 0x98, 0xfc, 0x24, 0x8b, 0xed, 0x52, 0x2e, 0x8c, 0x26, 0xca, 0xa3, 0xab, 0x50, 0x89, 0x46, - 0x3e, 0x65, 0x9d, 0xb2, 0x54, 0x6c, 0x59, 0xf3, 0x4f, 0x14, 0x0f, 0xbd, 0x82, 0x45, 0x1a, 0x38, - 0x07, 0x3e, 0x75, 0x7f, 0x3f, 0x54, 0xda, 0xaf, 0x42, 0x77, 0xe4, 0x53, 0x09, 0xda, 0xd9, 0xde, - 0x85, 0x44, 0xc9, 0x66, 0x93, 0x7c, 0x2d, 0x31, 0x99, 0x7e, 0x78, 0x14, 0xca, 0x69, 0x69, 0x12, - 0xf9, 0x8d, 0x09, 0x34, 0x76, 0x02, 0x8f, 0x13, 0x7a, 0x3c, 0xa2, 0x8c, 0xa3, 0x65, 0x28, 0xb9, - 0x2c, 0x90, 0xd5, 0x6a, 0xf4, 0x9a, 0x89, 0xfd, 0xad, 0xfd, 0x5d, 0x22, 0x18, 0x69, 0xd8, 0xc5, - 0xc9, 0x61, 0xe3, 0x47, 0xd0, 0x54, 0x36, 0xf5, 0x4c, 0xdc, 0x84, 0x1a, 0x53, 0x3d, 0x57, 0x1b, - 0x6e, 0x27, 0x6a, 0xba, 0x17, 0x93, 0x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96, 0x0e, 0x31, 0x57, 0x5b, 0x8b, - 0xe0, 0x1f, 0xa0, 0xfe, 0xe6, 0xf4, 0xe7, 0xcb, 0xee, 0x31, 0x80, 0x30, 0xaf, 0x23, 0xfb, 0xca, - 0xc4, 0x56, 0x60, 0xe6, 0xb5, 0xc0, 0xe6, 0x64, 0xd0, 0xde, 0x83, 0xba, 0x94, 0xd8, 0x0c, 0x83, - 0x43, 0x74, 0x0d, 0x5a, 0xdc, 0x1b, 0xd0, 0x70, 0xc4, 0xf7, 0x69, 0x3f, 0x0c, 0x14, 0xa8, 0x5a, - 0xc4, 0x26, 0xe2, 0x3f, 0x17, 0xa0, 0x29, 0x75, 0xa6, 0x49, 0xfa, 0xaa, 0x89, 0xf4, 0x74, 0x6f, - 0x8e, 0xa3, 0x94, 0x50, 0x47, 0xab, 0x50, 0xee, 0x87, 0xc1, 0xa1, 0x44, 0xa0, 0x79, 0x0e, 0x4a, - 0x22, 0x25, 0x92, 0x8f, 0x5d, 0x68, 0xe9, 0x40, 0x92, 0x36, 0x50, 0xed, 0x87, 0xfe, 0x68, 0x10, - 0xe8, 0xea, 0x8c, 0xdd, 0xda, 0x14, 0x17, 0xdd, 0x82, 0xb2, 0x40, 0xab, 0x2e, 0xfd, 0x05, 0xdb, - 0x81, 0x2e, 0x62, 0x78, 0x42, 0xa4, 0x10, 0xde, 0x84, 0x59, 0x9b, 0x8e, 0xee, 0x41, 0x55, 0x36, - 0xa5, 0x78, 0x12, 0x2e, 0xe6, 0x19, 0x78, 0x2b, 0x24, 0x88, 0x16, 0xc4, 0x6b, 0xd0, 0xce, 0xf2, - 0xd2, 0x8b, 0x79, 0xc1, 0xb8, 0x98, 0x63, 0x2c, 0x96, 0xf9, 0xd0, 0x77, 0xbc, 0x60, 0xf2, 0xac, - 0xf5, 0x61, 0x56, 0xcb, 0x4c, 0x77, 0x40, 0x32, 0xe6, 0xc0, 0x04, 0x50, 0xec, 0x55, 0x35, 0x9c, - 0xb7, 0x62, 0x5d, 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 0x49, 0xcd, 0x8b, 0x46, + 0xcd, 0x17, 0xa0, 0xe2, 0xd3, 0x8f, 0xd4, 0xd7, 0x91, 0xab, 0x81, 0x08, 0x6f, 0xe0, 0x70, 0x7a, + 0x18, 0x46, 0xa7, 0x71, 0xe8, 0xf1, 0x18, 0xad, 0x40, 0x75, 0xa4, 0x82, 0xaa, 0xe4, 0x06, 0xa5, + 0xb9, 0xe8, 0x32, 0x80, 0x13, 0x04, 0x21, 0x77, 0x44, 0x80, 0xdd, 0xaa, 0xb4, 0x62, 0x50, 0xd0, + 0x5d, 0x68, 0x7c, 0x08, 0xc2, 0x63, 0x9f, 0xba, 0x87, 0xb4, 0x5b, 0x5b, 0x2e, 0xac, 0x36, 0xfb, + 0x28, 0x31, 0xf5, 0x22, 0xe6, 0x90, 0x54, 0x08, 0x6d, 0x40, 0x4b, 0xcc, 0xae, 0xc8, 0x6f, 0x3b, + 0x38, 0x08, 0xbb, 0x75, 0xe9, 0xff, 0x4a, 0xa2, 0x24, 0x18, 0x12, 0x0e, 0xb1, 0x84, 0x82, 0x84, + 0xa5, 0xd4, 0x7b, 0x0b, 0x67, 0x27, 0x44, 0x72, 0xa0, 0x71, 0xcb, 0x84, 0x46, 0xb3, 0xbf, 0x98, + 0x38, 0x31, 0x95, 0x4d, 0xc4, 0xfc, 0xb5, 0x00, 0x2d, 0x93, 0x97, 0x5b, 0xed, 0x4f, 0xd5, 0xf5, + 0xff, 0x5e, 0x2f, 0x7c, 0x1d, 0x1a, 0x09, 0x1d, 0x75, 0xa1, 0x36, 0x08, 0x03, 0x4e, 0x83, 0x18, + 0xcc, 0xf1, 0x10, 0xff, 0x54, 0x84, 0xf6, 0x2b, 0xca, 0x1d, 0x46, 0x28, 0x1b, 0x85, 0x01, 0xa3, + 0x22, 0x94, 0x91, 0x3f, 0x3e, 0xf4, 0x82, 0x9d, 0x14, 0x42, 0x06, 0x05, 0xdd, 0x85, 0xf9, 0x18, + 0xad, 0x9b, 0xf4, 0xc0, 0x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 0xaa, 0x36, + 0xb1, 0x89, 0xf8, 0xcf, 0x05, 0x68, 0x49, 0x9d, 0x59, 0x92, 0xbe, 0x6a, 0x22, 0x3d, 0xdd, 0x9b, + 0xe3, 0x28, 0x25, 0xd4, 0xd1, 0x0a, 0x94, 0x07, 0x61, 0x70, 0x20, 0x11, 0x68, 0x9e, 0x83, 0x92, + 0x48, 0x89, 0xe4, 0x63, 0x17, 0xda, 0x3a, 0x90, 0xa4, 0x0d, 0x54, 0x07, 0xa1, 0x3f, 0x1e, 0x06, + 0xba, 0x3a, 0x13, 0xb7, 0x36, 0xc5, 0x45, 0xb7, 0xa0, 0x2c, 0xd0, 0xaa, 0x4b, 0x7f, 0xde, 0x76, + 0xa0, 0x8b, 0x18, 0x1e, 0x13, 0x29, 0x84, 0x37, 0x60, 0xce, 0xa6, 0xa3, 0x7b, 0x50, 0x95, 0x4d, + 0x29, 0x9e, 0x84, 0x0b, 0x79, 0x06, 0xde, 0x0a, 0x09, 0xa2, 0x05, 0xf1, 0x2a, 0x74, 0xb2, 0xbc, + 0xf4, 0x62, 0x5e, 0x30, 0x2e, 0xe6, 0x18, 0x8b, 0x65, 0x3e, 0xf2, 0x1d, 0x2f, 0x98, 0x3e, 0x6b, + 0x03, 0x98, 0xd3, 0x32, 0xb3, 0x1d, 0x90, 0x8c, 0x39, 0x30, 0x01, 0x14, 0x7b, 0x55, 0x0d, 0xe7, + 0xad, 0x58, 0x57, 0xda, 0x89, 0xae, 0xef, 0x06, 0xb4, 0x07, 0xbe, 0xc3, 0x98, 0xa7, 0x91, 0xa6, + 0x7d, 0x5d, 0xca, 0xda, 0xd8, 0x30, 0x85, 0x88, 0xad, 0x83, 0xd7, 0x61, 0x21, 0x4f, 0x0c, 0xad, + 0x42, 0x59, 0xdc, 0x86, 0x26, 0x9a, 0xf8, 0x1b, 0x67, 0x7f, 0xec, 0x3b, 0xd1, 0xa6, 0xc3, 0x1d, + 0x22, 0x25, 0xf0, 0x13, 0x98, 0x7f, 0x46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c, 0x25, 0x8d, 0x8a, 0x1b, 0x37, 0xcb, 0x89, + 0xd2, 0xdd, 0x87, 0xb2, 0x98, 0x74, 0x43, 0xda, 0xb8, 0x2b, 0xf6, 0x16, 0xb3, 0xa7, 0x78, 0xe5, + 0x62, 0xdd, 0x40, 0x0a, 0xba, 0x60, 0xc9, 0x98, 0x77, 0xaa, 0x5e, 0x37, 0x8f, 0xa5, 0x2f, 0x42, + 0xc5, 0x37, 0x27, 0xc8, 0xd8, 0xba, 0xe3, 0x9b, 0x4a, 0x6f, 0xde, 0xa2, 0xa5, 0xe5, 0x95, 0x2b, + 0xc1, 0x28, 0xaf, 0x79, 0xd2, 0x37, 0xca, 0x6b, 0x9f, 0xbb, 0x7f, 0x93, 0x2c, 0x1b, 0x74, 0x3e, + 0x7b, 0x16, 0xcc, 0x0b, 0xd2, 0x3e, 0x55, 0xbe, 0x90, 0xeb, 0x2c, 0x39, 0x6b, 0xa1, 0x25, 0xa3, + 0xf4, 0x13, 0xa7, 0xbc, 0xde, 0xa5, 0x29, 0x5c, 0xcb, 0x58, 0x7a, 0x12, 0xb1, 0x8c, 0x65, 0x4f, + 0x54, 0xb6, 0xb1, 0xc9, 0x63, 0xd0, 0x8f, 0xb9, 0xeb, 0x1d, 0x5d, 0xcd, 0x76, 0xf9, 0x9c, 0x3d, + 0xa4, 0x77, 0xed, 0xd3, 0x42, 0xda, 0xc3, 0xc1, 0x94, 0xc6, 0x81, 0xae, 0xa7, 0xea, 0x9f, 0x68, + 0xe3, 0xbd, 0x95, 0xcf, 0x89, 0x29, 0x3f, 0x4f, 0x5b, 0x7f, 0x84, 0xb5, 0x3b, 0x8f, 0xb5, 0xec, + 0x7e, 0x55, 0x7e, 0xdc, 0xff, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x28, 0x2a, 0x4b, 0x80, 0x10, + 0x1d, 0x00, 0x00, } diff --git a/sqle/driver/v2/proto/driver_v2.proto b/sqle/driver/v2/proto/driver_v2.proto index b4610d765..59a968e6d 100644 --- a/sqle/driver/v2/proto/driver_v2.proto +++ b/sqle/driver/v2/proto/driver_v2.proto @@ -49,6 +49,7 @@ enum OptionalModule { EstimateSQLAffectRows = 5; KillProcess = 6; ExecBatch = 7; + I18n = 8; } message Param { diff --git a/sqle/driver/v2/util.go b/sqle/driver/v2/util.go index 27fbbc508..36ab475f6 100644 --- a/sqle/driver/v2/util.go +++ b/sqle/driver/v2/util.go @@ -53,6 +53,7 @@ const ( OptionalModuleEstimateSQLAffectRows OptionalModuleKillProcess OptionalExecBatch + OptionalModuleI18n ) func (m OptionalModule) String() string { @@ -73,6 +74,8 @@ func (m OptionalModule) String() string { return "KillProcess" case OptionalExecBatch: return "ExecBatch" + case OptionalModuleI18n: + return "I18n" default: return "Unknown" } @@ -87,10 +90,22 @@ type DriverMetas struct { EnabledOptionalModule []OptionalModule } -func ConvertI18nAuditResultsFromProtoToDriver(pars []*protoV2.AuditResult) ([]*AuditResult, error) { +func (d *DriverMetas) IsOptionalModuleEnabled(expectModule OptionalModule) bool { + if d == nil { + return false + } + for _, m := range d.EnabledOptionalModule { + if m == expectModule { + return true + } + } + return false +} + +func ConvertI18nAuditResultsFromProtoToDriver(pars []*protoV2.AuditResult, isI18n bool) ([]*AuditResult, error) { ars := make([]*AuditResult, len(pars)) for k, par := range pars { - ar, err := ConvertI18nAuditResultFromProtoToDriver(par) + ar, err := ConvertI18nAuditResultFromProtoToDriver(par, isI18n) if err != nil { return nil, err } @@ -99,13 +114,13 @@ func ConvertI18nAuditResultsFromProtoToDriver(pars []*protoV2.AuditResult) ([]*A return ars, nil } -func ConvertI18nAuditResultFromProtoToDriver(par *protoV2.AuditResult) (*AuditResult, error) { +func ConvertI18nAuditResultFromProtoToDriver(par *protoV2.AuditResult, isI18n bool) (*AuditResult, error) { ar := &AuditResult{ RuleName: par.RuleName, Level: RuleLevel(par.Level), I18nAuditResultInfo: make(map[language.Tag]AuditResultInfo, len(par.I18NAuditResultInfo)), } - if len(par.I18NAuditResultInfo) == 0 { + if !isI18n { // 对非多语言的插件支持 ar.I18nAuditResultInfo = map[language.Tag]AuditResultInfo{ i18nPkg.DefaultLang: {Message: par.Message}, @@ -143,7 +158,7 @@ func ConvertI18nAuditResultFromDriverToProto(ar *AuditResult) *protoV2.AuditResu return par } -func ConvertI18nRuleFromProtoToDriver(rule *protoV2.Rule) (*Rule, error) { +func ConvertI18nRuleFromProtoToDriver(rule *protoV2.Rule, isI18n bool) (*Rule, error) { ps, err := ConvertProtoParamToParam(rule.Params) if err != nil { return nil, err @@ -161,7 +176,7 @@ func ConvertI18nRuleFromProtoToDriver(rule *protoV2.Rule) (*Rule, error) { } dRule.I18nRuleInfo[tag] = ConvertI18nRuleInfoFromProtoToDriver(ruleInfo) } - if len(rule.I18NRuleInfo) == 0 { + if !isI18n { // 对非多语言的插件支持 ruleInfo := &RuleInfo{ Desc: rule.Desc, @@ -273,11 +288,11 @@ func ConvertRuleFromProtoToDriver(rule *protoV2.Rule) (*Rule, error) { func ConvertRuleFromDriverToProto(rule *Rule) *protoV2.Rule { pr := &protoV2.Rule{ Name: rule.Name, - Desc: "", + Desc: rule.I18nRuleInfo[i18nPkg.DefaultLang].Desc, Level: string(rule.Level), - Category: "", + Category: rule.I18nRuleInfo[i18nPkg.DefaultLang].Category, Params: ConvertParamToProtoParam(rule.Params), - Annotation: "", + Annotation: rule.I18nRuleInfo[i18nPkg.DefaultLang].Annotation, Knowledge: nil, I18NRuleInfo: make(map[string]*protoV2.I18NRuleInfo, len(rule.I18nRuleInfo)), } @@ -353,14 +368,14 @@ func ConvertTabularDataToProto(td TabularData) *protoV2.TabularData { } } -func ConvertProtoTabularDataToDriver(pTd *protoV2.TabularData) (TabularData, error) { +func ConvertProtoTabularDataToDriver(pTd *protoV2.TabularData, isI18n bool) (TabularData, error) { columns := make([]TabularDataHead, 0, len(pTd.Columns)) for _, c := range pTd.Columns { h := TabularDataHead{ Name: c.Name, I18nDesc: nil, } - if len(c.I18NDesc) > 0 { + if isI18n { if _, exist := c.I18NDesc[i18nPkg.DefaultLang.String()]; !exist { // 多语言的插件 需包含 i18nPkg.DefaultLang return TabularData{}, fmt.Errorf("client TabularDataHead: %s does not support language: %s", c.Name, i18nPkg.DefaultLang.String()) @@ -396,12 +411,12 @@ func ConvertTableMetaToProto(meta *TableMeta) *protoV2.TableMeta { } } -func ConvertProtoTableMetaToDriver(meta *protoV2.TableMeta) (*TableMeta, error) { - columnsInfo, err := ConvertProtoTabularDataToDriver(meta.ColumnsInfo.Data) +func ConvertProtoTableMetaToDriver(meta *protoV2.TableMeta, isI18n bool) (*TableMeta, error) { + columnsInfo, err := ConvertProtoTabularDataToDriver(meta.ColumnsInfo.Data, isI18n) if err != nil { return nil, fmt.Errorf("ColumnsInfo: %w", err) } - indexesInfo, err := ConvertProtoTabularDataToDriver(meta.IndexesInfo.Data) + indexesInfo, err := ConvertProtoTabularDataToDriver(meta.IndexesInfo.Data, isI18n) if err != nil { return nil, fmt.Errorf("IndexesInfo: %w", err) } From 9417a67bc605ddbc89b9fa86b5bfd33655830971 Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Fri, 20 Sep 2024 13:37:39 +0800 Subject: [PATCH 08/11] clean driver_v2.proto --- sqle/driver/v2/proto/driver_v2.pb.go | 284 +++++++++++++-------------- sqle/driver/v2/proto/driver_v2.proto | 11 +- 2 files changed, 146 insertions(+), 149 deletions(-) diff --git a/sqle/driver/v2/proto/driver_v2.pb.go b/sqle/driver/v2/proto/driver_v2.pb.go index a85fce7f6..ae437080d 100644 --- a/sqle/driver/v2/proto/driver_v2.pb.go +++ b/sqle/driver/v2/proto/driver_v2.pb.go @@ -341,12 +341,10 @@ func (m *Rule) GetI18NRuleInfo() map[string]*I18NRuleInfo { } type I18NRuleInfo struct { - Desc string `protobuf:"bytes,2,opt,name=desc" json:"desc,omitempty"` - // string level = 3; - Category string `protobuf:"bytes,4,opt,name=category" json:"category,omitempty"` - // repeated Param params = 5; - Annotation string `protobuf:"bytes,6,opt,name=annotation" json:"annotation,omitempty"` - Knowledge *Knowledge `protobuf:"bytes,7,opt,name=knowledge" json:"knowledge,omitempty"` + Desc string `protobuf:"bytes,1,opt,name=desc" json:"desc,omitempty"` + Category string `protobuf:"bytes,2,opt,name=category" json:"category,omitempty"` + Annotation string `protobuf:"bytes,3,opt,name=annotation" json:"annotation,omitempty"` + Knowledge *Knowledge `protobuf:"bytes,4,opt,name=knowledge" json:"knowledge,omitempty"` } func (m *I18NRuleInfo) Reset() { *m = I18NRuleInfo{} } @@ -2342,141 +2340,141 @@ var _Driver_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("driver_v2.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 2163 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4b, 0x73, 0x13, 0xcb, - 0x15, 0x8e, 0xde, 0xd2, 0x91, 0x64, 0x44, 0xdb, 0x06, 0x21, 0x0c, 0x38, 0x0d, 0x18, 0x17, 0x70, - 0x0d, 0x88, 0x84, 0xcb, 0x85, 0x54, 0xca, 0x60, 0x3b, 0xe0, 0x0b, 0x38, 0xa6, 0x4d, 0x58, 0xa4, - 0xea, 0x16, 0x77, 0xac, 0x69, 0x9b, 0x29, 0x46, 0x33, 0xf2, 0x74, 0x0b, 0xdb, 0xfb, 0x54, 0x25, - 0xcb, 0xfc, 0x85, 0xec, 0xb3, 0xc8, 0xe6, 0x6e, 0x52, 0x95, 0xbf, 0x90, 0x7d, 0x7e, 0x49, 0xb6, - 0xa9, 0x7e, 0xcc, 0x4c, 0xf7, 0x68, 0xc4, 0x43, 0x95, 0xbb, 0xd2, 0xf4, 0x79, 0x9f, 0xd3, 0x5f, - 0x9f, 0x7e, 0x08, 0xce, 0xb8, 0x91, 0xf7, 0x91, 0x46, 0xef, 0x3e, 0xf6, 0xd7, 0x46, 0x51, 0xc8, - 0x43, 0x54, 0x93, 0x3f, 0x6f, 0xf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7, 0x91, 0x7d, 0x65, - 0x62, 0xcb, 0x50, 0x7f, 0x2d, 0xb0, 0x39, 0x1d, 0xb4, 0xf7, 0xa0, 0x21, 0x25, 0x36, 0xc2, 0xe0, - 0x00, 0x5d, 0x83, 0x36, 0xf7, 0x86, 0x34, 0x1c, 0xf3, 0x3d, 0x3a, 0x08, 0x03, 0x05, 0xaa, 0x36, - 0xb1, 0x89, 0xf8, 0xcf, 0x05, 0x68, 0x49, 0x9d, 0x59, 0x92, 0xbe, 0x6a, 0x22, 0x3d, 0xdd, 0x9b, - 0xe3, 0x28, 0x25, 0xd4, 0xd1, 0x0a, 0x94, 0x07, 0x61, 0x70, 0x20, 0x11, 0x68, 0x9e, 0x83, 0x92, - 0x48, 0x89, 0xe4, 0x63, 0x17, 0xda, 0x3a, 0x90, 0xa4, 0x0d, 0x54, 0x07, 0xa1, 0x3f, 0x1e, 0x06, - 0xba, 0x3a, 0x13, 0xb7, 0x36, 0xc5, 0x45, 0xb7, 0xa0, 0x2c, 0xd0, 0xaa, 0x4b, 0x7f, 0xde, 0x76, - 0xa0, 0x8b, 0x18, 0x1e, 0x13, 0x29, 0x84, 0x37, 0x60, 0xce, 0xa6, 0xa3, 0x7b, 0x50, 0x95, 0x4d, - 0x29, 0x9e, 0x84, 0x0b, 0x79, 0x06, 0xde, 0x0a, 0x09, 0xa2, 0x05, 0xf1, 0x2a, 0x74, 0xb2, 0xbc, - 0xf4, 0x62, 0x5e, 0x30, 0x2e, 0xe6, 0x18, 0x8b, 0x65, 0x3e, 0xf2, 0x1d, 0x2f, 0x98, 0x3e, 0x6b, - 0x03, 0x98, 0xd3, 0x32, 0xb3, 0x1d, 0x90, 0x8c, 0x39, 0x30, 0x01, 0x14, 0x7b, 0x55, 0x0d, 0xe7, - 0xad, 0x58, 0x57, 0xda, 0x89, 0xae, 0xef, 0x06, 0xb4, 0x07, 0xbe, 0xc3, 0x98, 0xa7, 0x91, 0xa6, - 0x7d, 0x5d, 0xca, 0xda, 0xd8,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x61, - 0xa8, 0x1c, 0xff, 0x00, 0x97, 0xa6, 0x78, 0xd5, 0x59, 0x2e, 0x40, 0x65, 0x10, 0x8e, 0xf5, 0xf3, - 0x5c, 0x89, 0xa8, 0x01, 0xba, 0x0c, 0x40, 0xa3, 0xe8, 0x95, 0x75, 0x79, 0x31, 0x28, 0xf8, 0xd7, - 0x30, 0x6f, 0x3d, 0xdc, 0xa4, 0x2f, 0x78, 0x86, 0x5a, 0x21, 0xab, 0x76, 0xf3, 0xef, 0x05, 0x98, - 0x9b, 0x78, 0xe2, 0x9a, 0xb3, 0xaf, 0x10, 0x9d, 0x5f, 0xa0, 0x06, 0x54, 0xe4, 0xde, 0xdc, 0x29, - 0xa0, 0xa6, 0x38, 0xe4, 0xcb, 0xbd, 0xa9, 0x53, 0x44, 0x1d, 0x68, 0x99, 0xcd, 0xb1, 0x53, 0x42, - 0xe7, 0x61, 0x3e, 0x67, 0x0a, 0x3b, 0x65, 0x74, 0x01, 0x16, 0x73, 0xf3, 0xee, 0x54, 0xd0, 0x19, - 0x68, 0x1a, 0xb1, 0x77, 0xaa, 0xa8, 0x0d, 0x8d, 0xe4, 0xbc, 0xda, 0xa9, 0xa1, 0x3a, 0x94, 0xc5, - 0x32, 0xec, 0xd4, 0xfb, 0xff, 0xa9, 0x43, 0x75, 0x53, 0xfe, 0x41, 0x81, 0xee, 0x40, 0x45, 0x3e, - 0x56, 0xa2, 0x14, 0x05, 0xf2, 0xef, 0x89, 0x5e, 0x5a, 0x7d, 0xfb, 0x31, 0xf3, 0x3e, 0x94, 0xb7, - 0x03, 0x8f, 0x23, 0xb3, 0x57, 0x26, 0xcf, 0x27, 0xbd, 0xc5, 0x0c, 0x55, 0x2b, 0xad, 0x41, 0x45, - 0xbe, 0xa5, 0xa1, 0x94, 0x6f, 0xbe, 0xad, 0xf5, 0x32, 0xce, 0xd1, 0x73, 0x2b, 0x15, 0x74, 0x31, - 0x7d, 0x98, 0x9d, 0x78, 0x55, 0xeb, 0x2d, 0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 0xa7, 0xea, 0x9f, 0x68, - 0xe3, 0xbd, 0x95, 0xcf, 0x89, 0x29, 0x3f, 0x4f, 0x5b, 0x7f, 0x84, 0xb5, 0x3b, 0x8f, 0xb5, 0xec, - 0x7e, 0x55, 0x7e, 0xdc, 0xff, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x28, 0x2a, 0x4b, 0x80, 0x10, - 0x1d, 0x00, 0x00, + // 2174 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcb, 0x73, 0x13, 0xc9, + 0x19, 0x8f, 0xde, 0xd2, 0x27, 0xc9, 0x88, 0xb6, 0x0d, 0x42, 0x18, 0x70, 0x1a, 0x30, 0x2e, 0x60, + 0x0d, 0x88, 0x84, 0x65, 0x21, 0x95, 0x32, 0xd8, 0x0e, 0x78, 0x01, 0xc7, 0xb4, 0x09, 0x87, 0x54, + 0x6d, 0xb1, 0x63, 0x4d, 0xdb, 0x4c, 0x31, 0x9a, 0x91, 0xa7, 0x5b, 0xd8, 0xbe, 0xa7, 0x2a, 0x39, + 0xe6, 0x5f, 0xc8, 0x3d, 0x87, 0x5c, 0xf6, 0x92, 0xaa, 0xfc, 0x0b, 0xb9, 0xe7, 0x2f, 0xc9, 0x75, + 0xab, 0x1f, 0x33, 0xd3, 0x3d, 0x1a, 0xf1, 0x50, 0xd5, 0x9e, 0x34, 0xfd, 0xbd, 0xbf, 0xaf, 0x7f, + 0xfd, 0xf5, 0x43, 0x70, 0xc6, 0x8d, 0xbc, 0x8f, 0x34, 0x7a, 0xf7, 0xb1, 0xbf, 0x36, 0x8a, 0x42, + 0x1e, 0xa2, 0x9a, 0xfc, 0x79, 0xdb, 0xc7, 0x35, 0xa8, 0x6c, 0x0d, 0x47, 0xfc, 0x14, 0x5f, 0x80, + 0xda, 0x1e, 0x65, 0xcc, 0x0b, 0x03, 0x34, 0x07, 0x45, 0xcf, 0x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a1, 0x4c, 0xc6, 0xbe, 0xac, 0x6f, 0xe0, 0x0c, 0x69, 0x1c, 0xb8, 0xf8, 0x4e, 0x6a, 0x5e, 0x34, + 0x6a, 0xbe, 0x00, 0x15, 0x9f, 0x7e, 0xa4, 0xbe, 0x8e, 0x5c, 0x0d, 0x44, 0x78, 0x03, 0x87, 0xd3, + 0xc3, 0x30, 0x3a, 0x8d, 0x43, 0x8f, 0xc7, 0x68, 0x05, 0xaa, 0x23, 0x15, 0x54, 0x25, 0x37, 0x28, + 0xcd, 0x45, 0x97, 0x01, 0x9c, 0x20, 0x08, 0xb9, 0x23, 0x02, 0xec, 0x56, 0xa5, 0x15, 0x83, 0x82, + 0xee, 0x42, 0xe3, 0x43, 0x10, 0x1e, 0xfb, 0xd4, 0x3d, 0xa4, 0xdd, 0xda, 0x72, 0x61, 0xb5, 0xd9, + 0x47, 0x89, 0xa9, 0x17, 0x31, 0x87, 0xa4, 0x42, 0x68, 0x03, 0x5a, 0x62, 0x76, 0x45, 0x7e, 0xdb, + 0xc1, 0x41, 0xd8, 0xad, 0x4b, 0xff, 0x57, 0x12, 0x25, 0xc1, 0x90, 0x70, 0x88, 0x25, 0x14, 0x24, + 0x2c, 0xa5, 0xde, 0x5b, 0x38, 0x3b, 0x21, 0x92, 0x03, 0x8d, 0x5b, 0x26, 0x34, 0x9a, 0xfd, 0xc5, + 0xc4, 0x89, 0xa9, 0x6c, 0x22, 0xe6, 0xef, 0x05, 0x68, 0x99, 0xbc, 0xa4, 0xda, 0x05, 0xa3, 0xda, + 0x66, 0x5d, 0x8b, 0x99, 0xba, 0xda, 0xf5, 0x2a, 0x7d, 0xba, 0x5e, 0xe5, 0x2f, 0xa8, 0x17, 0xbe, + 0x0e, 0x8d, 0x84, 0x8e, 0xba, 0x50, 0x1b, 0x84, 0x01, 0xa7, 0x41, 0x0c, 0xe6, 0x78, 0x88, 0x7f, + 0x2a, 0x42, 0xfb, 0x15, 0xe5, 0x0e, 0x23, 0x94, 0x8d, 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 0x40, 0xfe, 0x93, 0x62, 0x79, 0x36, 0x1f, 0xcd, 0x8c, + 0x34, 0xed, 0xe7, 0xa5, 0x07, 0x50, 0x91, 0x37, 0x7e, 0x34, 0xf1, 0x02, 0x90, 0xd5, 0xb3, 0x9f, + 0x11, 0x5e, 0x67, 0xa7, 0x1d, 0x5d, 0x4e, 0x24, 0x73, 0xef, 0xfe, 0xbd, 0x2b, 0x53, 0xf9, 0xda, + 0xe4, 0x6d, 0x28, 0x8b, 0xab, 0xa4, 0x51, 0x71, 0xe3, 0x66, 0x39, 0x51, 0xba, 0xfb, 0x50, 0x16, + 0x93, 0x6e, 0x48, 0x1b, 0x77, 0xc5, 0xde, 0x62, 0xf6, 0x14, 0xaf, 0x5c, 0xac, 0x1b, 0x48, 0x41, + 0x17, 0x2c, 0x19, 0xf3, 0x4e, 0xd5, 0xeb, 0xe6, 0xb1, 0xf4, 0x45, 0xa8, 0xf8, 0xe6, 0x04, 0x19, + 0x5b, 0x77, 0x7c, 0x53, 0xe9, 0xcd, 0x5b, 0xb4, 0xb4, 0xbc, 0x72, 0x25, 0x18, 0xe5, 0x35, 0x4f, + 0xfa, 0x46, 0x79, 0xed, 0x73, 0xf7, 0xef, 0x92, 0x65, 0x83, 0xce, 0x67, 0xcf, 0x82, 0x79, 0x41, + 0xda, 0xa7, 0xca, 0x17, 0x72, 0x9d, 0x25, 0x67, 0x2d, 0xb4, 0x64, 0x94, 0x7e, 0xe2, 0x94, 0xd7, + 0xbb, 0x34, 0x85, 0x6b, 0x19, 0x4b, 0x4f, 0x22, 0x96, 0xb1, 0xec, 0x89, 0xca, 0x36, 0x36, 0x79, + 0x0c, 0xfa, 0x31, 0x77, 0xbd, 0xa3, 0xab, 0xd9, 0x2e, 0x9f, 0xb3, 0x87, 0xf4, 0xae, 0x7d, 0x5a, + 0x48, 0x7b, 0x38, 0x98, 0xd2, 0x38, 0xd0, 0xf5, 0x54, 0xfd, 0x13, 0x6d, 0xbc, 0xb7, 0xf2, 0x39, + 0x31, 0xe5, 0xe7, 0x69, 0xeb, 0xcf, 0xb0, 0x76, 0xe7, 0xb1, 0x96, 0xdd, 0xaf, 0xca, 0x8f, 0xfb, + 0x3f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x2b, 0xbc, 0xee, 0x10, 0x1d, 0x00, 0x00, } diff --git a/sqle/driver/v2/proto/driver_v2.proto b/sqle/driver/v2/proto/driver_v2.proto index 59a968e6d..f738268d6 100644 --- a/sqle/driver/v2/proto/driver_v2.proto +++ b/sqle/driver/v2/proto/driver_v2.proto @@ -81,12 +81,10 @@ message Rule { } message I18nRuleInfo { - string desc = 2; -// string level = 3; - string category = 4; -// repeated Param params = 5; - string annotation = 6; - Knowledge knowledge = 7; + string desc = 1; + string category = 2; + string annotation = 3; + Knowledge knowledge = 4; } message Knowledge { @@ -379,3 +377,4 @@ message EstimateSQLAffectRowsResponse { message KillProcessResponse { string errMessage = 1; // 记录执行失败原因 } + From 2ff8eb7f172974b04b7c3fa63b8773ad564456dc Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Fri, 20 Sep 2024 14:03:26 +0800 Subject: [PATCH 09/11] rename rule_source.go --- sqle/driver/mysql/rule/{rule_source.go => rule_i18n_converter.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sqle/driver/mysql/rule/{rule_source.go => rule_i18n_converter.go} (100%) diff --git a/sqle/driver/mysql/rule/rule_source.go b/sqle/driver/mysql/rule/rule_i18n_converter.go similarity index 100% rename from sqle/driver/mysql/rule/rule_source.go rename to sqle/driver/mysql/rule/rule_i18n_converter.go From b1a898daf1ca2349b2bd0feeea7f0a62f7e5693b Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Fri, 20 Sep 2024 10:54:37 +0800 Subject: [PATCH 10/11] use HighPriorityConditionResV1 for resp --- sqle/api/controller/v1/instance_audit_plan.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sqle/api/controller/v1/instance_audit_plan.go b/sqle/api/controller/v1/instance_audit_plan.go index 801c93292..37c1f399f 100644 --- a/sqle/api/controller/v1/instance_audit_plan.go +++ b/sqle/api/controller/v1/instance_audit_plan.go @@ -600,11 +600,11 @@ type InstanceAuditPlanDetailResV1 struct { } type AuditPlanRes struct { - RuleTemplateName string `json:"rule_template_name" from:"rule_template_name" example:"default_MySQL"` - Type AuditPlanTypeResBase `json:"audit_plan_type" form:"audit_plan_type"` - Params []AuditPlanParamResV1 `json:"audit_plan_params" valid:"dive,required"` - NeedMarkHighPrioritySQL bool `json:"need_mark_high_priority_sql"` - HighPriorityConditions []HighPriorityCondition `json:"high_priority_conditions"` + RuleTemplateName string `json:"rule_template_name" from:"rule_template_name" example:"default_MySQL"` + Type AuditPlanTypeResBase `json:"audit_plan_type" form:"audit_plan_type"` + Params []AuditPlanParamResV1 `json:"audit_plan_params" valid:"dive,required"` + NeedMarkHighPrioritySQL bool `json:"need_mark_high_priority_sql"` + HighPriorityConditions []HighPriorityConditionResV1 `json:"high_priority_conditions"` } type HighPriorityCondition struct { @@ -689,20 +689,20 @@ func ConvertAuditPlansToRes(ctx context.Context, auditPlans []*model.AuditPlanV2 } if v.HighPriorityParams != nil && len(v.HighPriorityParams) > 0 { - hppParamsRes := make([]HighPriorityCondition, len(v.HighPriorityParams)) + hppParamsRes := make([]HighPriorityConditionResV1, len(v.HighPriorityParams)) for i, hpp := range v.HighPriorityParams { for _, metaHpp := range meta.HighPriorityParams { if metaHpp.Key != hpp.Key { continue } - highParamRes := HighPriorityCondition{ + highParamRes := HighPriorityConditionResV1{ Key: metaHpp.Key, Desc: metaHpp.GetDesc(locale.Bundle.GetLangTagFromCtx(ctx)), Value: hpp.Value, Type: string(metaHpp.Type), - Operator: Operator{ + Operator: OperatorResV1{ Value: string(hpp.Operator.Value), - EnumsValue: metaHpp.Operator.EnumsValue, + EnumsValue: ConvertEnumsValuesToRes(ctx, metaHpp.Operator.EnumsValue), }, } hppParamsRes[i] = highParamRes From 32088edf58ce4b99afe5170fe02d9ffc3ed412e8 Mon Sep 17 00:00:00 2001 From: BugsGuru Date: Fri, 20 Sep 2024 16:30:55 +0800 Subject: [PATCH 11/11] update api docs --- sqle/docs/docs.go | 64 +----------------------------------------- sqle/docs/swagger.json | 64 +----------------------------------------- sqle/docs/swagger.yaml | 44 +---------------------------- 3 files changed, 3 insertions(+), 169 deletions(-) diff --git a/sqle/docs/docs.go b/sqle/docs/docs.go index 060dce3e6..c870daf01 100644 --- a/sqle/docs/docs.go +++ b/sqle/docs/docs.go @@ -10476,21 +10476,6 @@ var doc = `{ "$ref": "#/definitions/model.AuditResultInfo" } }, - "params.EnumsValue": { - "type": "object", - "properties": { - "desc": { - "description": "Deprecated: use I18nDesc instead", - "type": "string" - }, - "i18n_desc": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, "v1.AffectRows": { "type": "object", "properties": { @@ -10694,7 +10679,7 @@ var doc = `{ "high_priority_conditions": { "type": "array", "items": { - "$ref": "#/definitions/v1.HighPriorityCondition" + "$ref": "#/definitions/v1.HighPriorityConditionResV1" } }, "need_mark_high_priority_sql": { @@ -14072,39 +14057,6 @@ var doc = `{ } } }, - "v1.HighPriorityCondition": { - "type": "object", - "properties": { - "desc": { - "type": "string" - }, - "enums_value": { - "type": "array", - "items": { - "$ref": "#/definitions/params.EnumsValue" - } - }, - "key": { - "type": "string" - }, - "operator": { - "type": "object", - "$ref": "#/definitions/v1.Operator" - }, - "type": { - "type": "string", - "enum": [ - "string", - "int", - "bool", - "password" - ] - }, - "value": { - "type": "string" - } - } - }, "v1.HighPriorityConditionReq": { "type": "object", "properties": { @@ -14597,20 +14549,6 @@ var doc = `{ } } }, - "v1.Operator": { - "type": "object", - "properties": { - "operator_enums_value": { - "type": "array", - "items": { - "$ref": "#/definitions/params.EnumsValue" - } - }, - "operator_value": { - "type": "string" - } - } - }, "v1.OperatorResV1": { "type": "object", "properties": { diff --git a/sqle/docs/swagger.json b/sqle/docs/swagger.json index 4a711220b..91adb6ddc 100644 --- a/sqle/docs/swagger.json +++ b/sqle/docs/swagger.json @@ -10460,21 +10460,6 @@ "$ref": "#/definitions/model.AuditResultInfo" } }, - "params.EnumsValue": { - "type": "object", - "properties": { - "desc": { - "description": "Deprecated: use I18nDesc instead", - "type": "string" - }, - "i18n_desc": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, "v1.AffectRows": { "type": "object", "properties": { @@ -10678,7 +10663,7 @@ "high_priority_conditions": { "type": "array", "items": { - "$ref": "#/definitions/v1.HighPriorityCondition" + "$ref": "#/definitions/v1.HighPriorityConditionResV1" } }, "need_mark_high_priority_sql": { @@ -14056,39 +14041,6 @@ } } }, - "v1.HighPriorityCondition": { - "type": "object", - "properties": { - "desc": { - "type": "string" - }, - "enums_value": { - "type": "array", - "items": { - "$ref": "#/definitions/params.EnumsValue" - } - }, - "key": { - "type": "string" - }, - "operator": { - "type": "object", - "$ref": "#/definitions/v1.Operator" - }, - "type": { - "type": "string", - "enum": [ - "string", - "int", - "bool", - "password" - ] - }, - "value": { - "type": "string" - } - } - }, "v1.HighPriorityConditionReq": { "type": "object", "properties": { @@ -14581,20 +14533,6 @@ } } }, - "v1.Operator": { - "type": "object", - "properties": { - "operator_enums_value": { - "type": "array", - "items": { - "$ref": "#/definitions/params.EnumsValue" - } - }, - "operator_value": { - "type": "string" - } - } - }, "v1.OperatorResV1": { "type": "object", "properties": { diff --git a/sqle/docs/swagger.yaml b/sqle/docs/swagger.yaml index de2dc2add..f5f8e951d 100644 --- a/sqle/docs/swagger.yaml +++ b/sqle/docs/swagger.yaml @@ -18,16 +18,6 @@ definitions: additionalProperties: $ref: '#/definitions/model.AuditResultInfo' type: object - params.EnumsValue: - properties: - desc: - description: 'Deprecated: use I18nDesc instead' - type: string - i18n_desc: - type: string - value: - type: string - type: object v1.AffectRows: properties: count: @@ -165,7 +155,7 @@ definitions: type: object high_priority_conditions: items: - $ref: '#/definitions/v1.HighPriorityCondition' + $ref: '#/definitions/v1.HighPriorityConditionResV1' type: array need_mark_high_priority_sql: type: boolean @@ -2491,29 +2481,6 @@ definitions: example: ok type: string type: object - v1.HighPriorityCondition: - properties: - desc: - type: string - enums_value: - items: - $ref: '#/definitions/params.EnumsValue' - type: array - key: - type: string - operator: - $ref: '#/definitions/v1.Operator' - type: object - type: - enum: - - string - - int - - bool - - password - type: string - value: - type: string - type: object v1.HighPriorityConditionReq: properties: key: @@ -2844,15 +2811,6 @@ definitions: user_name: type: string type: object - v1.Operator: - properties: - operator_enums_value: - items: - $ref: '#/definitions/params.EnumsValue' - type: array - operator_value: - type: string - type: object v1.OperatorResV1: properties: operator_enums_value: