Skip to content

Add new transfer task type for cancelling activities using Nexus#9232

Open
rkannan82 wants to merge 2 commits intokannan/activity-cancel/persist-worker-keyfrom
kannan/activity-cancel/task-definition
Open

Add new transfer task type for cancelling activities using Nexus#9232
rkannan82 wants to merge 2 commits intokannan/activity-cancel/persist-worker-keyfrom
kannan/activity-cancel/task-definition

Conversation

@rkannan82
Copy link
Contributor

@rkannan82 rkannan82 commented Feb 5, 2026

Add new transfer task type for activity cancellation control:

  • ActivityCancelControlTask struct with WorkerInstanceKey field
  • Serialization/deserialization for persistence
  • No-op executor (dispatch logic in separate PR)

What changed?

Added a new transfer task type called CancelActivityNexusTask transfer task type. This will be used to dispatch activity cancellation requests to workers via their Nexus control queue.

Main changes:
Task definition
Proto

  • task.proto: New task type: TASK_TYPE_TRANSFER_CANCEL_ACTIVITY_NEXUS
  • executions.proto: Task definition

Struct

  • cancel_activity_nexus_task.go
  • task_serializers.go: Serialization/deserialization support

Task creation

  • Controlled by dynamic config: EnableActivityCancellationNexusTask
  • workflow_task_completed_handler.go: Groups activities by the worker and creates 1 task per group.

Task dispatch using Nexus

  • Controlled by dynamic config: EnableActivityCancellationNexusTask
  • Will be implemented in separate PR.

Why?

To support activity cancellation without activity heartbeat.

Overall flow:

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

No. The new task creation is disabled by default.

@rkannan82 rkannan82 requested review from a team as code owners February 5, 2026 20:00
@rkannan82 rkannan82 force-pushed the kannan/activity-cancel/task-definition branch 3 times, most recently from 9eea93d to 835d5bf Compare February 5, 2026 21:10
@rkannan82 rkannan82 requested a review from yycptt February 5, 2026 21:11
@rkannan82 rkannan82 force-pushed the kannan/activity-cancel/task-definition branch from d402868 to 54b6d1a Compare February 6, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant