Skip to content

Implement stand-alone callback executions#9805

Draft
Quinn-With-Two-Ns wants to merge 4 commits intotemporalio:mainfrom
Quinn-With-Two-Ns:stand-alone-callbacks
Draft

Implement stand-alone callback executions#9805
Quinn-With-Two-Ns wants to merge 4 commits intotemporalio:mainfrom
Quinn-With-Two-Ns:stand-alone-callbacks

Conversation

@Quinn-With-Two-Ns
Copy link
Copy Markdown
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Apr 3, 2026

What changed?

Add standalone callback execution support as first-class CHASM entities independent of workflows. A standalone callback is a durable Nexus completion delivery mechanism managed through new WorkflowService RPCs.

Why?

Allow users to implement custom async Nexus operations.

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)

API PR: temporalio/api#753

Add standalone callback execution support as first-class CHASM entities
independent of workflows. A standalone callback is a durable Nexus completion
delivery mechanism managed through new WorkflowService RPCs.
EnableChasm = NewNamespaceBoolSetting(
"history.enableChasm",
false,
true,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just set these for easy testing

@bergundy bergundy self-requested a review April 3, 2026 22:44
// the operation has started and no operation token is provided. This message is used by the
// callback invocation layer to detect this specific condition and retry without triggering
// the circuit breaker.
const ErrMsgOperationNotStarted = "nexus operation not started yet"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed we also want to wait a bit on the receiving side to avoid this race condition, but I think this code is needed wither way.

if reason == "" {
reason = "callback execution terminated"
}
cb.LastAttemptFailure = &failurepb.Failure{
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit of a hack using LastAttemptFailure to store the failure in this case, we could add a dedicated field for failure as well

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