Nexus CancelCommand in CHASM#9288
Nexus CancelCommand in CHASM#9288stephanos merged 24 commits intotemporalio:nexus/hsm-to-chasm-migrationfrom
Conversation
d38faf1 to
44bd2ec
Compare
f682e20 to
f0fcdff
Compare
3f0512c to
449d70e
Compare
a5a614f to
33afd1a
Compare
6d937d4 to
e57ae37
Compare
|
|
||
| var op *nexusoperation.Operation | ||
| if operationFound { | ||
| op = operationField.Get(chasmCtx) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Not applicable, the operation should be deleted after completion in the CHASM implementation.
There was a problem hiding this comment.
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 | ||
| }) |
There was a problem hiding this comment.
Just as in the schedule command handler for CHASM, Apply is not invoked here anymore.
There was a problem hiding this comment.
@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).
33afd1a to
e80cd83
Compare
222edbe to
32ba391
Compare
32ba391 to
af6d957
Compare
af6d957 to
1a142c4
Compare
| return nil, chasmErr | ||
| } | ||
| err = chasmHandler(chasmCtx, chasmWorkflow, validator, command, handlerOpts) | ||
| handledByCHASM = !errors.Is(err, chasmcommand.ErrNotSupported) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I'll file a reminder for this; it was originally meant to be covered by the "Migration" ticket but we deprioritized that.
f0ba72b
into
temporalio:nexus/hsm-to-chasm-migration
## 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
What changed?
Ported command handler for Nexus "cancel" command from HSM to CHASM.
Why?
CHASM migration.
How did you test it?