Skip to content

implement workflow run api migration - #291

Merged
raylrui merged 1 commit into
mainfrom
feat/implement-worklfowrun-api-migration
Aug 13, 2026
Merged

implement workflow run api migration#291
raylrui merged 1 commit into
mainfrom
feat/implement-worklfowrun-api-migration

Conversation

@raylrui

@raylrui raylrui commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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:

    • DEPRECATEDdeprecate
    • RESOLVEDresolve
    • CANCELLEDcancel
  • Updated 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.

@raylrui
raylrui requested a lite review from Copilot August 11, 2026 04:52
@raylrui raylrui self-assigned this Aug 11, 2026
@raylrui raylrui added the feature New feature or request label Aug 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and cancel mutations 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.

@raylrui raylrui changed the title implement workflow run migration implement workflow run api migration Aug 13, 2026
@raylrui
raylrui merged commit cde0358 into main Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants