-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Implement signal_with_start_workflow client method #44
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: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tim Li <ltim@uber.com>
Signed-off-by: Tim Li <ltim@uber.com>
…n-client into signal_with_start Signed-off-by: Tim Li <ltim@uber.com>
Signed-off-by: Tim Li <ltim@uber.com>
Resolved conflicts: - Added Generic import to support Generic[C] type parameter - Removed unused TYPE_CHECKING import and empty block - Removed client() method from WorkflowContext (removed in upstream) - Removed test_workflow_engine_integration.py as upstream reorganized tests - Adopted upstream's frozen=True for WorkflowInfo
cadence/client.py
Outdated
| self, | ||
| workflow: Union[str, WorkflowDefinition], | ||
| signal_name: str, | ||
| signal_input: Any = None, |
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 think we similarly want a list here
| Test cases: | ||
| 1. new_workflow: SignalWithStartWorkflow starts a new workflow if it doesn't exist | ||
| 2. existing_workflow: SignalWithStartWorkflow signals existing workflow without restart |
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.
While these two scenarios are testing different behaviors, they're largely testing server behaviors rather than client behaviors. In both scenarios the client sends the same data. I think just one of them is fine.
I'd expand the test to verify that the workflow history actually has the signal event and that the payload/name match what we expect, since that's demonstrating end to end that we can signal a specific workflow.
Signed-off-by: Tim Li <ltim@uber.com>
What changed?
Implement signal_with_start_workflow client method
Why?
It's a necessary feature for signaling in python client
How did you test it?
Add an integration test to test signal_with_start.
Potential risks
Release notes
Documentation Changes