Skip to content

Nexus Standalone: Start + Describe#9487

Merged
stephanos merged 14 commits intofeature/nexus-standalonefrom
stephanos/nexus-standalone-describe
Mar 19, 2026
Merged

Nexus Standalone: Start + Describe#9487
stephanos merged 14 commits intofeature/nexus-standalonefrom
stephanos/nexus-standalone-describe

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented Mar 11, 2026

What changed?

Add Nexus Standalone Describe and Start handlers.

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)

@stephanos stephanos changed the title Stephanos/nexus standalone describe Nexus Standalone: Describe Mar 11, 2026
@stephanos stephanos changed the base branch from feature/nexus-standalone to stephanos/standalone-nexus-op March 11, 2026 22:32
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from 469761d to 5653b5c Compare March 11, 2026 22:33
@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch from c11d5be to 18cc7c6 Compare March 11, 2026 22:41
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from 5653b5c to e524f3e Compare March 11, 2026 22:41
@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch from 18cc7c6 to ace3e84 Compare March 11, 2026 22:46
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from e524f3e to 9f16247 Compare March 11, 2026 22:46
@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch from ace3e84 to 3984b20 Compare March 11, 2026 22:48
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from 9f16247 to 318f104 Compare March 11, 2026 22:50
@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch from 3984b20 to f29c9cc Compare March 11, 2026 23:21
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from 318f104 to d0991cc Compare March 11, 2026 23:24
@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch 2 times, most recently from 8bcb6e7 to d7411cf Compare March 11, 2026 23:52
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from d0991cc to 764aa94 Compare March 11, 2026 23:52
@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch from d7411cf to 4d205bd Compare March 12, 2026 00:15
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from 764aa94 to 48cb4b5 Compare March 12, 2026 00:15
@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch 2 times, most recently from 853646f to 9d77393 Compare March 12, 2026 01:37
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from 48cb4b5 to a56b849 Compare March 12, 2026 01:38
@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch 5 times, most recently from a7032dd to b362c16 Compare March 12, 2026 02:47
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from a56b849 to dd59299 Compare March 12, 2026 15:06
@stephanos stephanos changed the base branch from stephanos/standalone-nexus-op to feature/nexus-standalone March 12, 2026 15:07
@stephanos stephanos changed the base branch from feature/nexus-standalone to stephanos/standalone-nexus-op March 12, 2026 15:08
Base automatically changed from stephanos/standalone-nexus-op to feature/nexus-standalone March 12, 2026 17:11
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from dd59299 to 3573e90 Compare March 12, 2026 20:19
@stephanos stephanos changed the title Nexus Standalone: Describe Nexus Standalone: Start + Describe Mar 12, 2026
@stephanos stephanos force-pushed the feature/nexus-standalone branch from 01a8083 to 293d69c Compare March 16, 2026 22:25
@temporalio temporalio deleted a comment from semgrep-managed-scans bot Mar 16, 2026
@stephanos stephanos force-pushed the feature/nexus-standalone branch from 293d69c to 259059f Compare March 16, 2026 22:50
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from c2bb9c9 to fc63ef8 Compare March 16, 2026 22:50
) (bool, error) {
return false, serviceerror.NewUnimplemented("unimplemented")
// TODO: implement
return false, nil
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.

Required to make tests pass.

@stephanos stephanos force-pushed the feature/nexus-standalone branch from 259059f to 8ae49db Compare March 17, 2026 15:23
@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch from fc63ef8 to e384f18 Compare March 17, 2026 15:23

func operationExecutionStatus(status nexusoperationpb.OperationStatus) enumspb.NexusOperationExecutionStatus {
switch status {
case nexusoperationpb.OPERATION_STATUS_SCHEDULED,
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.

Is this right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks right to me.

@stephanos stephanos force-pushed the stephanos/nexus-standalone-describe branch 4 times, most recently from bffc1f9 to 942ddd7 Compare March 17, 2026 15:56
}

// DescribeNexusOperation queries current operation state.
// TODO: Add long-poll support.
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.

Will be added together with Poll API.

return chasm.TerminateComponentResponse{}, nil
}
return chasm.TerminateComponentResponse{}, transitionFailed.Apply(o, ctx, EventFailed{})
}
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.

^ needed for chasm.RootComponent


service NexusOperationService {
rpc StartNexusOperation(StartNexusOperationRequest) returns (StartNexusOperationResponse) {
option (temporal.server.api.routing.v1.routing).business_id = "frontend_request.operation_id";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You will need to add to both RPCs:

        option (temporal.server.api.common.v1.api_category).category = API_CATEGORY_STANDARD;

stephanos and others added 6 commits March 18, 2026 10:54
Use nexusoperation.Enabled flag instead of ChasmNexusEnabled for
standalone operation APIs. All handlers check the feature flag.
Added StartDisabled/DescribeDisabled tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Per review feedback: both StartNexusOperation and DescribeNexusOperation
need API_CATEGORY_STANDARD annotation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Overall LGTM. I had a hard stop and didn't quite get to reviewing the tests or the the search attribute validation logic (which is okay if it was copied from SAA).

func (h *frontendHandler) StartNexusOperationExecution(context.Context, *workflowservice.StartNexusOperationExecutionRequest) (*workflowservice.StartNexusOperationExecutionResponse, error) {
return nil, serviceerror.NewUnimplemented("StartNexusOperationExecution not implemented")
func (h *frontendHandler) checkEnabled(namespaceName string) error {
if !h.config.ChasmEnabled(namespaceName) || !h.config.ChasmNexusEnabled(namespaceName) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need a separate DC here to enable standalone to be able to turn the two separate features on.

NamespaceID: req.GetNamespaceId(),
BusinessID: frontendReq.GetOperationId(),
},
func(ctx chasm.MutableContext, req *nexusoperationpb.StartNexusOperationRequest) (*Operation, error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would you please create a NewStandaloneOperation constructor instead of inlining all of this logic?


// closeTime returns the close time of the operation based on LastAttemptCompleteTime for terminal states.
func (o *Operation) closeTime() *timestamppb.Timestamp {
switch o.Status {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: you can also check if LifecycleState isn't "running", it would save a tiny bit of duplicate logic but not critical.


func operationExecutionStatus(status nexusoperationpb.OperationStatus) enumspb.NexusOperationExecutionStatus {
switch status {
case nexusoperationpb.OPERATION_STATUS_SCHEDULED,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks right to me.

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.

2 participants