-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add support for standalone activity termination #8665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: saa-complete-activity
Are you sure you want to change the base?
Conversation
c31f512 to
146055a
Compare
afa9058 to
d19eee6
Compare
8710d0b to
de5e4f2
Compare
|
cursor review |
| } | ||
|
|
||
| return store.RecordCompleted(ctx, func(ctx chasm.MutableContext) error { | ||
| attempt, err := a.Attempt.Get(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why update the last attempt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we're updating the last worker identity from the termination req. If the identity should not be updated on termination, lmk.
| return heartbeat, nil | ||
| } | ||
|
|
||
| func (a *Activity) handleTerminated(ctx chasm.MutableContext, req *activitypb.TerminateActivityExecutionRequest) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should dedupe based on the request ID. I forgot that detail in my initial review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this requires API change, I'll do this as a separate PR.
What changed?
Added standalone activity termination handling.
Why?
Needed to support standalone activities full operation.
How did you test it?
Note
Adds termination support for standalone activities across API, frontend/handler, state machine, and tests.
TerminateActivityExecutionRPC: request/response messages inproto/v1/request_response.protoand service inproto/v1/service.proto.activitypbrequest/response, service, layered client, and gRPC stubs.TerminateActivityExecutioninfrontend.goto resolve namespace and forward to activity service.TerminateActivityExecutionto update component via(*Activity).handleTerminated.Activity.handleTerminatedto apply termination transition.TransitionTerminatedto finalize execution, setLastWorkerIdentity, and recordTerminatedFailureInfoin outcome.TestTransitionTerminated.Written by Cursor Bugbot for commit de5e4f2. This will update automatically on new commits. Configure here.