Skip to content

Nexus CancelCommand in CHASM#9288

Merged
stephanos merged 24 commits intotemporalio:nexus/hsm-to-chasm-migrationfrom
stephanos:nexus-chasm-cmd-cancel
Mar 12, 2026
Merged

Nexus CancelCommand in CHASM#9288
stephanos merged 24 commits intotemporalio:nexus/hsm-to-chasm-migrationfrom
stephanos:nexus-chasm-cmd-cancel

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented Feb 11, 2026

What changed?

Ported command handler for Nexus "cancel" command from HSM to CHASM.

Why?

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 changed the base branch from main to nexus/hsm-to-chasm-migration February 11, 2026 01:18
@stephanos stephanos changed the title Nexus chasm cmd cancel Nexus ScheduleCommand in CHASM Feb 13, 2026
@stephanos stephanos changed the title Nexus ScheduleCommand in CHASM Nexus CancelCommand in CHASM Feb 17, 2026
@gow gow force-pushed the nexus/hsm-to-chasm-migration branch from d38faf1 to 44bd2ec Compare February 18, 2026 23:25
@stephanos stephanos force-pushed the nexus-chasm-cmd-cancel branch 2 times, most recently from f682e20 to f0fcdff Compare February 19, 2026 17:17
@stephanos stephanos changed the base branch from nexus/hsm-to-chasm-migration to nexus-chasm-cmd February 20, 2026 17:41
@stephanos stephanos changed the base branch from nexus-chasm-cmd to nexus/hsm-to-chasm-migration February 26, 2026 02:13
@stephanos stephanos force-pushed the nexus-chasm-cmd-cancel branch 6 times, most recently from 3f0512c to 449d70e Compare February 26, 2026 03:14
@gow gow force-pushed the nexus/hsm-to-chasm-migration branch from a5a614f to 33afd1a Compare March 5, 2026 19:11
@stephanos stephanos force-pushed the nexus-chasm-cmd-cancel branch 3 times, most recently from 6d937d4 to e57ae37 Compare March 9, 2026 22:29

var op *nexusoperation.Operation
if operationFound {
op = operationField.Get(chasmCtx)
Copy link
Copy Markdown
Contributor Author

@stephanos stephanos Mar 9, 2026

Choose a reason for hiding this comment

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

The original in HSM had a TODO here

// TODO(bergundy): Remove this when operation auto-deletes itself on terminal state.

but it seems to me that this is not applicable in CHASM.

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.

Not applicable, the operation should be deleted after completion in the CHASM implementation.

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 should be able to remove this entire if statement. The operation should either be deleted or the transition to canceled is possible.

},
}
he.UserMetadata = cmd.UserMetadata
})
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 as in the schedule command handler for CHASM, Apply is not invoked here anymore.

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.

@gow is fixing this. We discussed this and said that workflow.AddHistoryEvent is going to apply the event. All of the logic below will move to the event definition (not blocking this PR).

@gow gow force-pushed the nexus/hsm-to-chasm-migration branch from 33afd1a to e80cd83 Compare March 10, 2026 00:12
@stephanos stephanos force-pushed the nexus-chasm-cmd-cancel branch from 222edbe to 32ba391 Compare March 10, 2026 00:23
@stephanos stephanos force-pushed the nexus-chasm-cmd-cancel branch from 32ba391 to af6d957 Compare March 10, 2026 00:24
@stephanos stephanos force-pushed the nexus-chasm-cmd-cancel branch from af6d957 to 1a142c4 Compare March 10, 2026 00:25
@stephanos stephanos requested a review from bergundy March 11, 2026 23:27
return nil, chasmErr
}
err = chasmHandler(chasmCtx, chasmWorkflow, validator, command, handlerOpts)
handledByCHASM = !errors.Is(err, chasmcommand.ErrNotSupported)
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.

Side note: You'll still need to handle the case where the command is RequestCancelNexusOperation and a component (nexus operation) is in the HSM tree. I see that the TODO is still in line 327.

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.

I'll file a reminder for this; it was originally meant to be covered by the "Migration" ticket but we deprioritized that.

@stephanos stephanos merged commit f0ba72b into temporalio:nexus/hsm-to-chasm-migration Mar 12, 2026
45 checks passed
@stephanos stephanos deleted the nexus-chasm-cmd-cancel branch March 12, 2026 00:42
gow pushed a commit that referenced this pull request Mar 12, 2026
## What changed?

Ported command handler for Nexus "cancel" command from HSM to CHASM.

## Why?

CHASM migration.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 16, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
stephanos added a commit that referenced this pull request Mar 16, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
stephanos added a commit that referenced this pull request Mar 17, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 17, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 18, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 18, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 19, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 20, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 23, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 24, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 24, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 25, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 26, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 27, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 27, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Mar 30, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Apr 1, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
gow pushed a commit that referenced this pull request Apr 3, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
bergundy added a commit to bergundy/temporal that referenced this pull request Apr 7, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
bergundy added a commit to bergundy/temporal that referenced this pull request Apr 7, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
bergundy added a commit that referenced this pull request Apr 8, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
bergundy added a commit that referenced this pull request Apr 9, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
bergundy added a commit that referenced this pull request Apr 9, 2026
Ported command handler for Nexus "cancel" command from HSM to CHASM.

CHASM migration.

- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

---------

Co-authored-by: Roey Berman <roey.berman@gmail.com>
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