Skip to content

Standalone Nexus Operations API#9458

Merged
stephanos merged 3 commits intofeature/nexus-standalonefrom
stephanos/standalone-nexus-op
Mar 12, 2026
Merged

Standalone Nexus Operations API#9458
stephanos merged 3 commits intofeature/nexus-standalonefrom
stephanos/standalone-nexus-op

Conversation

@stephanos
Copy link
Contributor

@stephanos stephanos commented Mar 11, 2026

What changed?

Add API boilerplate for standalone Nexus Operations.

Note that this targets a feature branch that is based on nexus/hsm-to-chasm-migration.

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 force-pushed the stephanos/standalone-nexus-op branch 7 times, most recently from 02f3ede to 070805a Compare March 11, 2026 02:23
@stephanos stephanos changed the base branch from nexus/hsm-to-chasm-migration to feature/nexus-standalone March 11, 2026 22:26
@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch 4 times, most recently from 3984b20 to f29c9cc Compare March 11, 2026 23:21
go.opentelemetry.io/otel/sdk/metric v1.34.0
go.opentelemetry.io/otel/trace v1.34.0
go.temporal.io/api v1.62.2
go.temporal.io/api v1.62.3-0.20260311231426-d5018d14a239
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fork of api-go that has temporalio/api#685

)

var FrontendModule = fx.Module(
"chasm.lib.nexusoperations.frontend",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

SSA is using "activity-frontend" but this seems better

Copy link
Member

Choose a reason for hiding this comment

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

It would be nexusoperation singular but let's make sure we keep all of the module names consistent. I don't have a strong opinion. If you want to change either this or other modules, just make sure you get agreement from others if they may have opinions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was following the lead of the existing Module in that file; but I see now that all the others are singular. Using singular for both now.

@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch from f29c9cc to 8bcb6e7 Compare March 11, 2026 23:45
"CountNexusOperationExecutions": {Scope: ScopeNamespace, Access: AccessReadOnly, Polling: PollingNone},
"RequestCancelNexusOperationExecution": {Scope: ScopeNamespace, Access: AccessWrite, Polling: PollingNone},
"TerminateNexusOperationExecution": {Scope: ScopeNamespace, Access: AccessWrite, Polling: PollingNone},
"DeleteNexusOperationExecution": {Scope: ScopeNamespace, Access: AccessWrite, Polling: PollingNone},
Copy link
Contributor Author

@stephanos stephanos Mar 11, 2026

Choose a reason for hiding this comment

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

All the same as for SSA

Copy link
Member

Choose a reason for hiding this comment

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

This should just be a proto annotation but kinda low priority.

@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch 8 times, most recently from 65727f8 to a7032dd Compare March 12, 2026 02:41
@stephanos stephanos force-pushed the stephanos/standalone-nexus-op branch from a7032dd to b362c16 Compare March 12, 2026 02:47
@stephanos stephanos marked this pull request as ready for review March 12, 2026 03:21
@stephanos stephanos requested review from a team as code owners March 12, 2026 03:21
@stephanos stephanos requested a review from bergundy March 12, 2026 03:22
@stephanos stephanos requested a review from gow March 12, 2026 03:22
Copy link
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.

Approved since I don't need another review but please address the couple of comments before merging.

)

var FrontendModule = fx.Module(
"chasm.lib.nexusoperations.frontend",
Copy link
Member

Choose a reason for hiding this comment

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

It would be nexusoperation singular but let's make sure we keep all of the module names consistent. I don't have a strong opinion. If you want to change either this or other modules, just make sure you get agreement from others if they may have opinions.

"CountNexusOperationExecutions": {Scope: ScopeNamespace, Access: AccessReadOnly, Polling: PollingNone},
"RequestCancelNexusOperationExecution": {Scope: ScopeNamespace, Access: AccessWrite, Polling: PollingNone},
"TerminateNexusOperationExecution": {Scope: ScopeNamespace, Access: AccessWrite, Polling: PollingNone},
"DeleteNexusOperationExecution": {Scope: ScopeNamespace, Access: AccessWrite, Polling: PollingNone},
Copy link
Member

Choose a reason for hiding this comment

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

This should just be a proto annotation but kinda low priority.

Copy link
Member

Choose a reason for hiding this comment

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

Wanna fix the log tag generation to print the business ID for chasm APIs (activity, nexus, schedules)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 I'll open a separate PR

"TerminateActivityExecution": func() any { return &workflowservice.TerminateActivityExecutionResponse{} },
"DeleteActivityExecution": func() any { return &workflowservice.DeleteActivityExecutionResponse{} },

"DescribeNexusOperationExecution": func() any { return &workflowservice.DescribeNexusOperationExecutionResponse{} },
Copy link
Member

Choose a reason for hiding this comment

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

Same: This should just be a proto annotation but kinda low priority.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you elaborate on "should" here? Do you mean this should apply to all services?

"/temporal.api.workflowservice.v1.WorkflowService/PollActivityExecution": 1,
// Long-running if nexus operation outcome is not already available
"/temporal.api.workflowservice.v1.WorkflowService/PollNexusOperationExecution": 1,
"/temporal.api.workflowservice.v1.WorkflowService/DescribeNexusOperationExecution": 1,
Copy link
Member

Choose a reason for hiding this comment

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

Should go below // Long-running if certain request parameters are set

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then the PollActivityExecution comment was misleading/wrong; I've restructured the comments now in 1df9309

@stephanos stephanos merged commit 01a8083 into feature/nexus-standalone Mar 12, 2026
45 checks passed
@stephanos stephanos deleted the stephanos/standalone-nexus-op branch March 12, 2026 17:11
stephanos added a commit that referenced this pull request Mar 16, 2026
Add API boilerplate for standalone Nexus Operations.

- [x] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)
stephanos added a commit that referenced this pull request Mar 16, 2026
Add API boilerplate for standalone Nexus Operations.

- [x] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)
stephanos added a commit that referenced this pull request Mar 17, 2026
Add API boilerplate for standalone Nexus Operations.

- [x] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)
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