implement workflow run api migration - #291
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the workflow-run state transition flow to use the new permission-specific workflow-run state transition endpoints, while keeping the existing “validate-first → dialog → transition → refresh” UI behavior.
Changes:
- Replaced the generic workflow-run state creation mutation with dedicated
deprecate,resolve, andcancelmutations and updated the details header to route transitions accordingly. - Updated the state transition validation-map request to use the new global endpoint (no per-run path parameter).
- Migrated the rerun dialog’s optional “Mark as DEPRECATED” action to the dedicated deprecate endpoint.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/modules/workflows/components/workflowRuns/WorkflowRunsDetailsHeader.tsx |
Switches state transitions (and rerun deprecate) to the new dedicated transition mutations with per-transition success/error handling. |
src/modules/workflows/components/workflowRuns/WorkflowRunsContext.tsx |
Updates the transition validation-map query call to match the new global endpoint signature (no path params). |
src/api/workflow.ts |
Adds the new transition mutation hooks and updates the validation-map endpoint path. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the workflow-run state transition flow to support the new permission-specific API endpoints.
Changes
Replaced the removed workflow-run state creation endpoint with:
POST /api/v1/workflowrun/state/deprecate/POST /api/v1/workflowrun/state/resolve/POST /api/v1/workflowrun/state/cancel/Updated the validation-map request to use the new global endpoint:
GET /api/v1/workflowrun/state/get_states_transition_validation_map/Added state-to-endpoint mapping:
DEPRECATED→deprecateRESOLVED→resolveCANCELLED→cancelUpdated transition requests to use the following format:
{ "workflowrunOrcabusIds": ["wfr.xxxxxxxxx"], "comment": "Reason for the transition" }Preserved the existing validation-first workflow and state dialog behavior.
Migrated the rerun dialog’s optional Mark as DEPRECATED action to the dedicated deprecate endpoint.
Preserved state-history refreshes and success/error notifications.