Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix(plan-checks): reword Run button and block re-run after rollout (#20008)
Danny Xuf16ea2ab9941
diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.goindex 56aa7bb666..f92fa4232a 100644--- a/backend/api/v1/plan_service.go+++ b/backend/api/v1/plan_service.go@@ -440,6 +440,12 @@ func (s *PlanService) RunPlanChecks(ctx context.Context, request *connect.Requesif storePlanConfigHasRelease(plan.Config) {return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("cannot run plan checks because plan %q has release", plan.Name))}+ // Once a rollout exists the plan is frozen; re-running checks produces the+ // same result and is misleading. Match the frontend gate in+ // PlanCheckSection.vue / ChecksSection.vue / IssueDetailChecks.tsx.+ if plan.Config.GetHasRollout() {+ return nil, connect.NewError(connect.CodeFailedPrecondition, errors.Errorf("cannot run plan checks because plan %q already has a rollout", plan.Name))+ }var databaseGroup *v1pb.DatabaseGroupfor _, spec := range plan.Config.GetSpecs() {if c, ok := spec.Config.(*storepb.PlanConfig_Spec_ChangeDatabaseConfig); ok {diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ChecksSection.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ChecksSection.vueindex d5760c0b82..eb09e31090 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ChecksSection.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ChecksSection.vue@@ -66,6 +66,9 @@ const isRunningChecks = ref(false);const selectedResultStatus = ref<Advice_Level | undefined>(undefined);const allowRunChecks = computed(() => {+ // Once a rollout exists, the plan is frozen — re-running checks produces+ // the same result and is misleading for the user.+ if (plan.value.hasRollout) return false;const me = currentUser.value;if (extractUserEmail(plan.value.creator) === me.email) {return true;diff --git a/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vue b/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vueindex e03fe849e5..1a72f50ca5 100644--- a/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vue+++ b/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vue@@ -120,6 +120,9 @@ const shouldShow = computed(() => {const allowRunChecks = computed(() => {if (plan.value.state === State.DELETED) return false;if (issue.value && issue.value.status !== IssueStatus.OPEN) return false;+ // Once a rollout exists, the plan is frozen — re-running checks produces+ // the same result and is misleading for the user.+ if (plan.value.hasRollout) return false;const me = currentUser.value;if (extractUserEmail(plan.value.creator) === me.email) {return true;diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 12b6a3f651..0d70b50f07 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1429,7 +1429,7 @@"refresh-indicator": {"last-refresh": "Last refresh: {time}"},- "run": "Run check",+ "run": "Run checks","select-isolation-level": "Select isolation level","select-targets": "Select Targets","sidebar": {diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 2b0814a36d..2ff17ea453 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -1429,7 +1429,7 @@"refresh-indicator": {"last-refresh": "Última actualización: {time}"},- "run": "Ejecutar verificación",+ "run": "Volver a verificar","select-isolation-level": "Seleccionar nivel de aislamiento","select-targets": "Seleccionar objetivos","sidebar": {diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 8fd60663f4..0443ee8767 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -1429,7 +1429,7 @@"refresh-indicator": {"last-refresh": "最終更新: {time}"},- "run": "チェックを実行",+ "run": "再チェック","select-isolation-level": "分離レベルを選択","select-targets": "ターゲットを選択","sidebar": {diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 1ab67466c1..57ad1c24e7 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -1429,7 +1429,7 @@"refresh-indicator": {"last-refresh": "Làm mới lần cuối: {time}"},- "run": "Chạy kiểm tra",+ "run": "Kiểm tra lại","select-isolation-level": "Chọn mức độ cô lập","select-targets": "Chọn mục tiêu","sidebar": {diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex ea895e1c44..77dbcf1d09 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1429,7 +1429,7 @@"refresh-indicator": {"last-refresh": "上次刷新:{time}"},- "run": "运行检查",+ "run": "重新检查","select-isolation-level": "选择隔离级别","select-targets": "选择目标库","sidebar": {diff --git a/frontend/src/react/locales/en-US.json b/frontend/src/react/locales/en-US.jsonindex 42e5ccb3cf..86b6f827a3 100644--- a/frontend/src/react/locales/en-US.json+++ b/frontend/src/react/locales/en-US.json@@ -1299,7 +1299,7 @@"plan.options.self": "Options","plan.overview.no-checks": "No checks","plan.ready-for-review": "Ready for Review",- "plan.run": "Run",+ "plan.run": "Run checks","plan.select-isolation-level": "Select isolation level","plan.spec.change": "Change","plan.spec.type.database-change": "Database Change",diff --git a/frontend/src/react/locales/es-ES.json b/frontend/src/react/locales/es-ES.jsonindex c90e61533a..8c4859155c 100644--- a/frontend/src/react/locales/es-ES.json+++ b/frontend/src/react/locales/es-ES.json@@ -1299,7 +1299,7 @@"plan.options.self": "Opciones","plan.overview.no-checks": "No checks","plan.ready-for-review": "Ready for Review",- "plan.run": "Run",+ "plan.run": "Volver a verificar","plan.select-isolation-level": "Seleccionar nivel de aislamiento","plan.spec.change": "Change","plan.spec.type.database-change": "Cambio de base de datos",diff --git a/frontend/src/react/locales/ja-JP.json b/frontend/src/react/locales/ja-JP.jsonindex f775804441..3aa9904a37 100644--- a/frontend/src/react/locales/ja-JP.json+++ b/frontend/src/react/locales/ja-JP.json@@ -1299,7 +1299,7 @@"plan.options.self": "オプション","plan.overview.no-checks": "No checks","plan.ready-for-review": "Ready for Review",- "plan.run": "Run",+ "plan.run": "再チェック","plan.select-isolation-level": "分離レベルを選択","plan.spec.change": "Change","plan.spec.type.database-change": "データベース変更",diff --git a/frontend/src/react/locales/vi-VN.json b/frontend/src/react/locales/vi-VN.jsonindex 418968ce24..d73d006abd 100644--- a/frontend/src/react/locales/vi-VN.json+++ b/frontend/src/react/locales/vi-VN.json@@ -1299,7 +1299,7 @@"plan.options.self": "Tùy chọn","plan.overview.no-checks": "No checks","plan.ready-for-review": "Ready for Review",- "plan.run": "Run",+ "plan.run": "Kiểm tra lại","plan.select-isolation-level": "Chọn mức độ cô lập","plan.spec.change": "Change","plan.spec.type.database-change": "Thay đổi cơ sở dữ liệu",diff --git a/frontend/src/react/locales/zh-CN.json b/frontend/src/react/locales/zh-CN.jsonindex 5d9889480d..124211e926 100644--- a/frontend/src/react/locales/zh-CN.json+++ b/frontend/src/react/locales/zh-CN.json@@ -1299,7 +1299,7 @@"plan.options.self": "配置项","plan.overview.no-checks": "没有检查","plan.ready-for-review": "准备提交评审",- "plan.run": "运行",+ "plan.run": "重新检查","plan.select-isolation-level": "选择隔离级别","plan.spec.change": "Change","plan.spec.type.database-change": "数据库变更",diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailChecks.tsx b/frontend/src/react/pages/project/issue-detail/components/IssueDetailChecks.tsxindex 9ab90b43f3..51a6d9a244 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailChecks.tsx+++ b/frontend/src/react/pages/project/issue-detail/components/IssueDetailChecks.tsx@@ -76,6 +76,11 @@ export function IssueDetailChecks() {if (!page.plan) {return false;}+ // Once a rollout exists, the plan is frozen — re-running checks produces+ // the same result and is misleading for the user.+ if (page.plan.hasRollout) {+ return false;+ }if (extractUserEmail(page.plan.creator) === currentUser.email) {return true;}