Skip to content

Added unified workflow orchestration capability#5

Merged
yusufaytas merged 1 commit into
mainfrom
add-orchestration-support
Jan 7, 2026
Merged

Added unified workflow orchestration capability#5
yusufaytas merged 1 commit into
mainfrom
add-orchestration-support

Conversation

@yusufaytas
Copy link
Copy Markdown
Contributor

  • Introduced a new orchestration capability to opsorch-core
  • Orchestration capability can be served by workflow engines
  • It's normalized API for runbook/playbook execution

- Introduced a new orchestration capability to opsorch-core
- Orchestration capability can be served by workflow engines
- It's normalized API for runbook/playbook execution
@yusufaytas yusufaytas force-pushed the add-orchestration-support branch from 508de00 to 66f333c Compare January 6, 2026 22:17
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jan 6, 2026

Greptile Summary

  • Adds a unified workflow orchestration capability to opsorch-core for runbook/playbook execution across workflow engines
  • Implements comprehensive orchestration API with plans (templates), runs (executions), and step completion functionality
  • Follows established provider pattern with registry system, plugin support, schema definitions, and thorough test coverage

Important Files Changed

Filename Overview
schema/orchestration.go New schema definitions for orchestration plans, runs, steps, and queries with workflow execution state tracking
orchestration/provider.go New provider interface supporting plan/run queries, run creation, and step completion operations
api/orchestration_handler.go New API handler implementing 6 HTTP endpoints for orchestration plan and run management
api/server.go Integrated orchestration handler into server structure with graceful failure handling
api/plugin_providers.go Added JSON-RPC plugin provider implementation for external orchestration engines

Confidence score: 4/5

  • This PR is well-structured with comprehensive implementation following established patterns but needs careful review of complex orchestration logic
  • Score reflects thorough implementation across all necessary components but deducted one point for the complexity of workflow orchestration state management and potential edge cases in step completion logic
  • Pay close attention to api/orchestration_handler.go and schema/orchestration.go for workflow state consistency and URL parsing edge cases

Sequence Diagram

sequenceDiagram
    participant User
    participant Server as "OpsOrch Server"
    participant OrchHandler as "OrchestrationHandler" 
    participant Provider as "Orchestration Provider"
    participant WorkflowEngine as "Workflow Engine"

    User->>Server: "POST /orchestration/plans/query"
    Server->>OrchHandler: "Query Plans"
    OrchHandler->>Provider: "QueryPlans(query)"
    Provider->>WorkflowEngine: "List plans matching query"
    WorkflowEngine-->>Provider: "Return plan list"
    Provider-->>OrchHandler: "Return plans"
    OrchHandler-->>Server: "Return plans"
    Server-->>User: "Return orchestration plans"

    User->>Server: "GET /orchestration/plans/{planId}"
    Server->>OrchHandler: "Get Plan Details"
    OrchHandler->>Provider: "GetPlan(planId)"
    Provider->>WorkflowEngine: "Get plan with steps"
    WorkflowEngine-->>Provider: "Return plan details"
    Provider-->>OrchHandler: "Return plan"
    OrchHandler-->>Server: "Return plan"
    Server-->>User: "Return plan with steps"

    User->>Server: "POST /orchestration/runs"
    Server->>OrchHandler: "Start Run"
    OrchHandler->>Provider: "StartRun(planId)"
    Provider->>WorkflowEngine: "Create run instance"
    WorkflowEngine-->>Provider: "Return new run"
    Provider-->>OrchHandler: "Return run"
    OrchHandler-->>Server: "Return run"
    Server-->>User: "Return created run"

    User->>Server: "GET /orchestration/runs/{runId}"
    Server->>OrchHandler: "Get Run Status"
    OrchHandler->>Provider: "GetRun(runId)"
    Provider->>WorkflowEngine: "Get run with step states"
    WorkflowEngine-->>Provider: "Return run status"
    Provider-->>OrchHandler: "Return run"
    OrchHandler-->>Server: "Return run"
    Server-->>User: "Return run with step states"

    User->>Server: "POST /orchestration/runs/{runId}/steps/{stepId}/complete"
    Server->>OrchHandler: "Complete Step"
    OrchHandler->>Provider: "CompleteStep(runId, stepId, actor, note)"
    Provider->>WorkflowEngine: "Mark step complete"
    WorkflowEngine-->>Provider: "Confirm completion"
    Provider-->>OrchHandler: "Return success"
    OrchHandler-->>Server: "Return success"
    Server-->>User: "Return completion status"
Loading

@yusufaytas yusufaytas merged commit 3891d30 into main Jan 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant