temporal icon indicating copy to clipboard operation
temporal copied to clipboard

[Feature Request] Add reason field to RequestCancelWorkflowExecutionRequest

Open tsurdilo opened this issue 2 years ago • 5 comments

Currently both TerminateWorkflowExecutionRequest and ResetWorkflowExecutionRequest have a "reason" field. RequestCancelWorkflowExecutionRequest does not.

We should add "reason" to RequestCancelWorkflowExecutionRequest as well please.

tsurdilo avatar Jan 27 '22 15:01 tsurdilo

reason should be added to RequestCancelExternalWorkflowExecutionCommandAttributes too.

bergundy avatar Jan 27 '22 17:01 bergundy

What would be nice if there could be a unique identifier which can be used to reference and correlate the scope cancelation to the cancelfailure. Even if this is fixed you are relying on a string comparison.

darewreck54 avatar Jan 28 '22 01:01 darewreck54

@darewreck54 could you explain a little bit on the use case of this scope cancelation and the need of unique identifier.

yiminc avatar Jan 28 '22 18:01 yiminc

How would you distinguish a cancelFailure that is triggered from a cancelation of a workflow vs. a detach cancelation that you triggered yourself. I tried to pass a reason into the cancelation message and use that to tell the difference, but that doesn’t propagate to the CancelFailure at least from what I can tell

for example, trigger this…

getCancellationScope().cancel("reason");

Then when I catch the CancelFailure, I would expect it to be see it somewhere but the “reason” message isn’t anywhere image

darewreck54 avatar Mar 22 '22 00:03 darewreck54

dependent on go SDK support issue https://github.com/temporalio/tctl/issues/144#issuecomment-1101912150 cc @bergundy

feedmeapples avatar Apr 19 '22 01:04 feedmeapples

@feedmeapples & @yiminc Is there any update on this being addressed or eta?

darewreck54 avatar Apr 13 '23 12:04 darewreck54

@darewreck54 yes we are considering adding this. I'll let you know asap about the ETA

feedmeapples avatar May 11 '23 05:05 feedmeapples