finish wiring up cancel cause to Workflow cancellation.#2695
Merged
Quinn-With-Two-Ns merged 2 commits intotemporalio:masterfrom Oct 22, 2025
Merged
finish wiring up cancel cause to Workflow cancellation.#2695Quinn-With-Two-Ns merged 2 commits intotemporalio:masterfrom
Quinn-With-Two-Ns merged 2 commits intotemporalio:masterfrom
Conversation
maciejdudko
approved these changes
Oct 21, 2025
Contributor
maciejdudko
left a comment
There was a problem hiding this comment.
One small comment but otherwise looks good, LGTM!
Comment on lines
+2010
to
+2011
| } else { | ||
| log.info("not lockings"); |
Contributor
There was a problem hiding this comment.
This log should be either removed or made more informative.
26d4342 to
ad28e2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
finish wiring up cancel cause to Workflow cancellation. The client side is already done and the workflow already has access to this information so this PR just exposes it to workflow to workflow cancellation and tests it.
closes #2414
Note
Adds an optional cancellation reason to external workflow cancel APIs, plumbs it through SDK -> command attributes -> test server, derives from current CancellationScope when absent, and adds tests.
ExternalWorkflowStub: addcancel(@Nullable String reason);cancel()delegates.WorkflowInternal: addcancelWorkflow(execution, @Nullable reason)overload.WorkflowOutboundCallsInterceptor.CancelWorkflowInput: add optionalreason.ReplayWorkflowContext.requestCancelExternalWorkflowExecution(...): add@Nullable String reasonparam.reasonintoRequestCancelExternalWorkflowExecutionCommandAttributesand test serverRequestCancelWorkflowExecutionRequest.ExternalWorkflowStubImpl.cancel(...): derive reason from currentCancellationScopeif not provided.SyncWorkflowContext.cancelWorkflowandReplayWorkflowContextImpl.WorkflowCancelReasonTestcovering client-supplied, command-supplied, absent, and context-derived reasons.Written by Cursor Bugbot for commit 26d4342. This will update automatically on new commits. Configure here.