Skip to content

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

chore: retire ActivityPipelineTaskStatusUpdate in project webhook activities (#7953)

p0ny4aadec322ff9
diff --git a/backend/legacyapi/activity.go b/backend/legacyapi/activity.go
index 0faf03afe4..674c961c03 100644
--- a/backend/legacyapi/activity.go
+++ b/backend/legacyapi/activity.go
@@ -24,6 +24,7 @@ const (
// ActivityPipelineStageStatusUpdate is the type for stage begins or ends.
ActivityPipelineStageStatusUpdate ActivityType = "bb.pipeline.stage.status.update"
// ActivityPipelineTaskStatusUpdate is the type for updating pipeline task status.
+ // Deprecated: use `ActivityPipelineTaskRunStatusUpdate` instead.
ActivityPipelineTaskStatusUpdate ActivityType = "bb.pipeline.task.status.update"
// ActivityPipelineTaskRunStatusUpdate is the type for updating pipeline task run status.
ActivityPipelineTaskRunStatusUpdate ActivityType = "bb.pipeline.taskrun.status.update"
diff --git a/backend/migrator/migration/prod/2.7/0009##remove_task_status_update_from_project_webhook.sql b/backend/migrator/migration/prod/2.7/0009##remove_task_status_update_from_project_webhook.sql
new file mode 100644
index 0000000000..21c6462426
--- /dev/null
+++ b/backend/migrator/migration/prod/2.7/0009##remove_task_status_update_from_project_webhook.sql
@@ -0,0 +1,7 @@
+ALTER TABLE project_webhook DISABLE TRIGGER update_project_webhook_updated_ts;
+
+UPDATE project_webhook
+SET activity_list = array_remove(activity_list, 'bb.pipeline.task.status.update')
+WHERE activity_list @> '{bb.pipeline.task.status.update}';
+
+ALTER TABLE project_webhook ENABLE TRIGGER update_project_webhook_updated_ts;
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index d6e31058af..8397c26937 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -241,5 +241,5 @@ func TestMigrationCompatibility(t *testing.T) {
func TestGetCutoffVersion(t *testing.T) {
releaseVersion, err := getProdCutoffVersion()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("2.7.8"), releaseVersion)
+ require.Equal(t, semver.MustParse("2.7.9"), releaseVersion)
}
diff --git a/frontend/src/types/v1/projectWebhook.ts b/frontend/src/types/v1/projectWebhook.ts
index 7bdc214977..b17b1cc695 100644
--- a/frontend/src/types/v1/projectWebhook.ts
+++ b/frontend/src/types/v1/projectWebhook.ts
@@ -98,15 +98,6 @@ export const projectWebhookV1ActivityItemList =
label: t(
"project.webhook.activity-item.issue-task-status-change.label"
),
- activity: Activity_Type.TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE,
- },
- {
- title: t(
- "project.webhook.activity-item.issue-task-run-status-change.title"
- ),
- label: t(
- "project.webhook.activity-item.issue-task-run-status-change.label"
- ),
activity: Activity_Type.TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE,
},
{