Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: show backup error issue comment (#13744)

boojack5956885d9289
diff --git a/backend/api/v1/issue_service_convert.go b/backend/api/v1/issue_service_convert.go
index afa37ae558..55465b4429 100644
--- a/backend/api/v1/issue_service_convert.go
+++ b/backend/api/v1/issue_service_convert.go
@@ -492,6 +492,7 @@ func convertToIssueCommentEventTaskPriorBackup(b *storepb.IssueCommentPayload_Ta
Tables: convertToIssueCommentEventTaskPriorBackupTables(b.TaskPriorBackup.Tables),
Database: b.TaskPriorBackup.Database,
OriginalLine: b.TaskPriorBackup.OriginalLine,
+ Error: b.TaskPriorBackup.Error,
},
}
}
diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionIcon.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionIcon.vue
index fc56bddf55..ecd4998250 100644
--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionIcon.vue
+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionIcon.vue
@@ -114,6 +114,7 @@ import {
IssueComment_Approval,
IssueComment_Approval_Status,
IssueComment_IssueUpdate,
+ IssueComment_TaskPriorBackup,
IssueComment_TaskUpdate,
IssueComment_TaskUpdate_Status,
} from "@/types/proto/v1/issue_service";
@@ -208,6 +209,15 @@ const icon = computed((): ActionIconType => {
return "update";
}
// Otherwise, show avatar icon based on the creator.
+ } else if (issueComment.type === IssueCommentType.TASK_PRIOR_BACKUP) {
+ const taskPriorBackup = IssueComment_TaskPriorBackup.fromPartial(
+ issueComment.taskPriorBackup || {}
+ );
+ if (taskPriorBackup.error !== "") {
+ return "fail";
+ } else {
+ return "complete";
+ }
}
return extractUserResourceName(issueComment.creator) ==
diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vue
index 1526f7589f..b42df6c64c 100644
--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vue
+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vue
@@ -182,10 +182,14 @@ const renderActionSentence = () => {
});
}
} else if (issueComment.type === IssueCommentType.TASK_PRIOR_BACKUP) {
- const { task, tables, originalLine, database } =
+ const { task, tables, originalLine, database, error } =
IssueComment_TaskPriorBackup.fromPartial(
issueComment.taskPriorBackup || {}
);
+ if (error) {
+ return t("activity.sentence.failed-to-backup", { error });
+ }
+
const taskEntity = findTaskByName(issue.rolloutEntity, task);
let verb = t("activity.sentence.prior-back-table", {
database: database.length > 0 ? database : "bbdataarchive",
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index d5c8e440cb..f5428f66c5 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -1024,6 +1024,7 @@
"verb-type-target-by-people": "{verb} {type} {target}",
"verb-type-target-by-system-bot": "{type} {target} {verb}",
"changed-x-link": "changed {name}. {link}",
+ "failed-to-backup": "Failed to backup data: {error}",
"prior-back-table": "Data backup to database {database} and tables {tables}",
"prior-back-table-for-line": "Data backup to database {database} and table {tables} for DML in line {line}"
},
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 3eaa040a6f..af0c5f025e 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -1024,6 +1024,7 @@
"verb-type-target-by-people": "{verb} {type} {target}",
"verb-type-target-by-system-bot": "{type} {target} {verb}",
"changed-x-link": "cambiado {name}. \n{link}",
+ "failed-to-backup": "No se pudo realizar la copia de seguridad de los datos: {error}",
"prior-back-table": "Copia de seguridad de datos en la base de datos {database} y tablas {tables}",
"prior-back-table-for-line": "Copia de seguridad de datos en la base de datos {database} y la tabla {tables} para DML en la línea {line}"
},
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index b010ee729d..b690d0f7f1 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -1024,6 +1024,7 @@
"verb-type-target-by-people": "{verb}{type} {target}",
"verb-type-target-by-system-bot": "{type} {target} {verb}",
"changed-x-link": "{name} が変更されました。 {link}",
+ "failed-to-backup": "データのバックアップに失敗しました: {error}",
"prior-back-table": "データベース {database} のテーブル {tables} にバックアップされました",
"prior-back-table-for-line": "DML のデータベース {database} とテーブル {tables} の行 {line} へのデータのバックアップ"
},
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 0688f5bdc5..1c6ce69df7 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -1024,6 +1024,7 @@
"verb-type-target-by-people": "{verb}{type} {target}",
"verb-type-target-by-system-bot": "{type} {target} {verb}",
"changed-x-link": "修改了 {name}。{link}",
+ "failed-to-backup": "数据备份失败:{error}",
"prior-back-table": "已备份到数据库 {database} 中表 {tables}",
"prior-back-table-for-line": "数据备份到数据库 {database} 和表 {tables},用于第 {line} 行的DML"
},
@@ -3736,4 +3737,4 @@
},
"self": "设置"
}
-}
\ No newline at end of file
+}