Skip to content

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

chore: show cancel task button for ghost issues (#12537)

boojack43502ccb1586
diff --git a/backend/api/v1/rollout_service.go b/backend/api/v1/rollout_service.go
index 0e8b2422da..755c9e4fea 100644
--- a/backend/api/v1/rollout_service.go
+++ b/backend/api/v1/rollout_service.go
@@ -517,7 +517,6 @@ func (s *RolloutService) BatchSkipTasks(ctx context.Context, request *v1pb.Batch
}
// BatchCancelTaskRuns cancels a list of task runs.
-// TODO(p0ny): forbid cancel noncancellable task runs.
func (s *RolloutService) BatchCancelTaskRuns(ctx context.Context, request *v1pb.BatchCancelTaskRunsRequest) (*v1pb.BatchCancelTaskRunsResponse, error) {
if len(request.TaskRuns) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "task runs cannot be empty")
diff --git a/frontend/src/components/IssueV1/logic/action/task.ts b/frontend/src/components/IssueV1/logic/action/task.ts
index 28622773ab..0685525681 100644
--- a/frontend/src/components/IssueV1/logic/action/task.ts
+++ b/frontend/src/components/IssueV1/logic/action/task.ts
@@ -31,7 +31,7 @@ export const CancelableTaskTypeList: Task_Type[] = [
Task_Type.DATABASE_DATA_UPDATE,
Task_Type.DATABASE_SCHEMA_UPDATE,
Task_Type.DATABASE_SCHEMA_UPDATE_SDL,
- // Task_Type.DATABASE_SCHEMA_UPDATE_GHOST_SYNC, // on the way
+ Task_Type.DATABASE_SCHEMA_UPDATE_GHOST_SYNC,
];
export const TaskRolloutActionMap: Record<Task_Status, TaskRolloutAction[]> = {
@@ -60,10 +60,9 @@ export const getApplicableTaskRolloutActionList = (
return list.filter((action) => {
if (action === "CANCEL") {
return CancelableTaskTypeList.includes(task.type);
- return task.type === Task_Type.DATABASE_SCHEMA_UPDATE_GHOST_SYNC;
}
if (action === "RETRY") {
- // RETRYing gh-ost cut-over task is not allowed (yet).
+ // RETRYing gh-ost cut-over task is not allowed.
if (task.type === Task_Type.DATABASE_SCHEMA_UPDATE_GHOST_CUTOVER) {
return false;
}