feat: Cancel workflow by id via the client#310
feat: Cancel workflow by id via the client#310jamescmartinez merged 2 commits intoopenworkflowdev:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a convenience method to the OpenWorkflow client that allows users to cancel workflow runs directly by their ID, without needing to have a WorkflowRunHandle instance. This is useful when users have stored a workflow run ID and want to cancel it later without going through the handle.
Changes:
- Added
cancelWorkflowRun(workflowRunId: string)method to theOpenWorkflowclass - Added tests for the new cancellation method including error handling for non-existent workflow IDs
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/openworkflow/client.ts | Added cancelWorkflowRun method to OpenWorkflow class that delegates to the backend's existing cancel functionality |
| packages/openworkflow/client.test.ts | Added two tests: one for successful cancellation via client by ID, and one for error handling when canceling non-existent workflows |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e0282da to
9b48fbc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
504d87a to
5489bf1
Compare
1d5812d to
d9dcaaf
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
thanks! |
Summary
This pull request adds support for canceling workflow runs by their ID in the
OpenWorkflowclient directly.Changes
cancelWorkflowRunmethod to theOpenWorkflowclass, allowing users to cancel workflow runs by ID.