-
Notifications
You must be signed in to change notification settings - Fork 805
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
Fix SignalWithStartWorkflow Api #5671
Conversation
Pull Request Test Coverage Report for Build 018dd21e-5b88-4d12-91ee-7c05d5340b28Details
💛 - Coveralls |
service/history/historyEngine.go
Outdated
@@ -2584,6 +2584,10 @@ func (e *historyEngineImpl) SignalWithStartWorkflowExecution( | |||
return nil, workflow.ErrSignalsLimitExceeded | |||
} | |||
|
|||
if requestID := sRequest.GetRequestID(); requestID != "" { |
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.
How did you notice this was missing? It's a little bit unclear to me what are the side effects of doing this here. There's already AddWorkflowExecutionSignaled
below, do these get deduped somehow?
It would be great if we take this opportunity to add some extra documentation/diagram for SignalWithStart flow.
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.
I tested it locally and found it's not idempotent in this case.
ac9198a
to
1413ab9
Compare
@@ -2584,6 +2584,10 @@ func (e *historyEngineImpl) SignalWithStartWorkflowExecution( | |||
return nil, workflow.ErrSignalsLimitExceeded | |||
} | |||
|
|||
if requestID := sRequest.GetRequestID(); requestID != "" { |
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.
I mean, pretty amazingly big fix, nice find. Is this flow covered with a unit-test? If they're not, I think we ought to probably cover all write (+query) APIs to ensure they're idempotent
What changed?
Store request ID to mutable state when handling signalwithstart request
Why?
To make SignalWithStartWorkflow idempotent
How did you test it?
manual test
Potential risks
Release notes
Documentation Changes