Skip to content

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

chore: support task skip (#7727)

Liu Ji5b121bc455c7
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionIcon.vue b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionIcon.vue
index b20b60218c..767442cb9f 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionIcon.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionIcon.vue
@@ -179,6 +179,9 @@ const icon = computed((): ActionIconType => {
case "FAILED": {
return "fail";
}
+ case "SKIPPED": {
+ return "skip";
+ }
case "PENDING_APPROVAL": {
return "avatar"; // stale approval dismissed.
}
@@ -202,12 +205,6 @@ const icon = computed((): ActionIconType => {
}
case "DONE": {
return "complete";
- // TODO check if skipped
- // if (payload.oldStatus === "RUNNING") {
- // return "complete";
- // } else {
- // return "skip";
- // }
}
case "FAILED": {
return "fail";
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionSentence.vue b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionSentence.vue
index a4fe1a3f76..0720839dd4 100644
--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionSentence.vue
+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionSentence.vue
@@ -140,6 +140,10 @@ const renderActionSentence = () => {
params.verb = t("activity.sentence.canceled");
break;
}
+ case "SKIPPED": {
+ params.verb = t("activity.sentence.skipped");
+ break;
+ }
default:
params.verb = t("activity.sentence.changed");
}
@@ -155,17 +159,6 @@ const renderActionSentence = () => {
const payload = JSON.parse(
activity.payload
) as ActivityPipelineTaskRunStatusUpdatePayload;
- // if (payload.newStatus === "PENDING_APPROVAL") {
- // // stale approval dismissed.
-
- // const task = findTaskByUID(issue.rolloutEntity, String(payload.taskId));
- // const taskName = t("activity.sentence.task-name", {
- // name: task.title,
- // });
- // return t("activity.sentence.dismissed-stale-approval", {
- // task: taskName,
- // });
- // }
const params: VerbTypeTarget = {
activity,
verb: "",
@@ -186,12 +179,6 @@ const renderActionSentence = () => {
}
case "DONE": {
params.verb = t("activity.sentence.completed");
- // TODO: check if skipped
- // if (payload.oldStatus === "RUNNING") {
- // params.verb = t("activity.sentence.completed");
- // } else {
- // params.verb = t("activity.sentence.skipped");
- // }
break;
}
case "FAILED": {
diff --git a/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue
index c9dd564b45..36213501e3 100644
--- a/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue
+++ b/frontend/src/components/IssueV1/components/Panel/TaskRolloutActionPanel.vue
@@ -149,11 +149,13 @@ const handleConfirm = async (
await rolloutServiceClient.batchRunTasks({
parent: stage.name,
tasks: props.taskList.map((task) => task.name),
+ reason: comment,
});
} else if (action === "SKIP") {
await rolloutServiceClient.batchSkipTasks({
parent: stage.name,
tasks: props.taskList.map((task) => task.name),
+ reason: comment,
});
} else if (action === "CANCEL") {
const taskRunListToCancel = props.taskList
@@ -169,6 +171,7 @@ const handleConfirm = async (
await rolloutServiceClient.batchCancelTaskRuns({
parent: `${stage.name}/tasks/-`,
taskRuns: taskRunListToCancel.map((taskRun) => taskRun.name),
+ reason: comment,
});
}
}
diff --git a/frontend/src/types/pipeline/task.ts b/frontend/src/types/pipeline/task.ts
index 48caa2fbbe..4125626ff7 100644
--- a/frontend/src/types/pipeline/task.ts
+++ b/frontend/src/types/pipeline/task.ts
@@ -35,7 +35,8 @@ export type TaskStatus =
| "RUNNING"
| "DONE"
| "FAILED"
- | "CANCELED";
+ | "CANCELED"
+ | "SKIPPED";
export type TaskGeneralPayload = {
statement: string;