Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: add doc link and remove test trigger (#5832)
rebelice9083a8ba0505
diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.goindex 893043f091..3dc9447676 100644--- a/backend/api/v1/setting_service.go+++ b/backend/api/v1/setting_service.go@@ -182,7 +182,6 @@ func (s *SettingService) SetSetting(ctx context.Context, request *v1pb.SetSettinapiValue.Password = &oldValue.Password}if request.ValidateOnly {- s.stateCfg.TestSlowQueryWeeklyEmailChan <- trueif err := s.sendTestEmail(ctx, apiValue); err != nil {return nil, status.Errorf(codes.InvalidArgument, "failed to validate smtp setting: %v", err)}diff --git a/backend/component/state/state.go b/backend/component/state/state.goindex 22b86b7350..7990d64bf4 100644--- a/backend/component/state/state.go+++ b/backend/component/state/state.go@@ -41,8 +41,5 @@ type State struct {// InstanceOutstandingConnections is the maximum number of connections per instance.InstanceOutstandingConnections map[int]int- // TestSlowQueryWeeklyEmailChan is the channel for testing slow query weekly email.- TestSlowQueryWeeklyEmailChan chan bool-sync.Mutex}diff --git a/backend/runner/mail/slow_query_weekly_mail.go b/backend/runner/mail/slow_query_weekly_mail.goindex 879d2ea036..f7db6294d7 100644--- a/backend/runner/mail/slow_query_weekly_mail.go+++ b/backend/runner/mail/slow_query_weekly_mail.go@@ -76,9 +76,6 @@ func (s *SlowQueryWeeklyMailSender) Run(ctx context.Context, wg *sync.WaitGroup)if now.Weekday() == time.Saturday && now.Hour() == 0 {s.sendEmail(ctx, now)}- case <-s.stateCfg.TestSlowQueryWeeklyEmailChan:- log.Debug("Slow query weekly mail sender received test email")- s.sendEmail(ctx, time.Now())}}}@@ -668,7 +665,7 @@ func (*SlowQueryWeeklyMailSender) sendNeedConfigSlowQueryPolicyEmail(mailSetting}body := strings.ReplaceAll(string(needConfigureTemplate), "{{VISIT_URL}}", visitURL)- // TODO(rebelice): replace {{DOC_LINK}}+ body = strings.ReplaceAll(body, "{{DOC_LINK}}", `https://www.bytebase.com/docs/slow-query/overview`)email.SetFrom(fmt.Sprintf("Bytebase <%s>", mailSetting.SMTPFrom)).AddTo(mailSetting.SMTPTo).diff --git a/backend/server/server.go b/backend/server/server.goindex 7f7b9b073d..be41dafbd6 100644--- a/backend/server/server.go+++ b/backend/server/server.go@@ -314,7 +314,6 @@ func NewServer(ctx context.Context, profile config.Profile) (*Server, error) {InstanceDatabaseSyncChan: make(chan *api.Instance, 100),InstanceSlowQuerySyncChan: make(chan *api.Instance, 100),InstanceOutstandingConnections: make(map[int]int),- TestSlowQueryWeeklyEmailChan: make(chan bool, 100),}s.store = storeInstances.licenseService, err = enterpriseService.NewLicenseService(profile.Mode, storeInstance)