[Draft] Add support for standalone callbacks#10192
Draft
Conversation
0d3b36b to
ad9f7cb
Compare
edb387a to
40f2f7e
Compare
stephanos
reviewed
May 8, 2026
| return missingRequiredFieldError("Namespace") | ||
| } | ||
| return nil | ||
| } |
Contributor
There was a problem hiding this comment.
Some things I'm missing:
- is the
run_idvalidation; see use ofuuid.Validate identitylength validationreasonlength validation- SANO also has a
if ref.NamespaceID != namespaceIDcheck for the polling token
| if completion.GetSuccess() != nil && completion.GetFailure() != nil { | ||
| return serviceerror.NewInvalidArgument("Completion must have exactly one of success or failure set, not both.") | ||
| } | ||
| // Validate the size of the completion is reasonable. |
Contributor
There was a problem hiding this comment.
nit: I don't think this comment adds anything, the method name is already very expressive
| return missingRequiredFieldError("Namespace") | ||
| } | ||
| return nil | ||
| } |
Contributor
There was a problem hiding this comment.
I'm not seeing any tests for the validations. I think those are valuable. See temporal/chasm/lib/nexusoperation/validator_test.go for an example.
| } | ||
|
|
||
| // ScheduleToCloseTimeout | ||
| if req.GetScheduleToCloseTimeout() == nil || req.GetScheduleToCloseTimeout().AsDuration() <= 0 { |
Contributor
There was a problem hiding this comment.
I wonder if we want a MaxOperationScheduleToCloseTimeout? SANO has it.
| } | ||
| } | ||
|
|
||
| // Create the CHASM Callback in so-called "standalone" mode, where it will be the root |
Contributor
There was a problem hiding this comment.
nit: I don't think we need "so-called" and quotes; "standalone" for all the standalone features is part of the public-facing wording.
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.
What changed?
Adds support for "standalone" callbacks. Today, the CHASM
Callbackcomponent is used to deliver an arbitrary payload to a URL. (e.g. when a Workflow has completed.) As part of supplying the Nexus Connector Foundations, this feature adds CRUD operations on callbacks directly. So callers can invokeStartCallbackExecution(...)and get the durability guarantees to ensure that the callback actually gets invoked.Why?
The primary (only?) use-case for this is for completing Nexus operations. With this capability, a Handler can implement a Nexus operation outside of Temporal. And when that operation completes, simply call
StartCallbackExecution(...)with the right callback URL and Token. Then the CHASMCallbackmachinery will attempt to deliver the result for the Nexus operation. (Rather than, say, the Nexus operation to be implemented as a Workflow that is separately polling the async or out-of-band process.)How did you test it?
Potential risks
TBD. Will need to ask around.