Conversation
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
…oved. manually cleanup now Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
There was a problem hiding this comment.
Pull request overview
This PR updates the Go SDK to match the latest protobuf naming, renaming “orchestration/orchestrator/sub-orchestration” concepts to “workflow/child workflow”, and removing the OrchestrationIdReusePolicy/CreateOrchestrationAction surface area that was removed from the protos.
Changes:
- Renamed Go-facing APIs across
workflow/,task/,backend/, andclient/from orchestration → workflow and sub-orchestration → child workflow. - Updated runtime state, work item types, executor interfaces, and gRPC plumbing to use the new Workflow* proto messages (e.g.,
WorkflowRequest/Response,WorkflowRuntimeState). - Updated tests and samples to use the new workflow/child-workflow terminology and APIs.
Reviewed changes
Copilot reviewed 52 out of 53 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| workflow/workflow.go | Renames child workflow option and call path to CallChildWorkflow. |
| workflow/state.go | Switches metadata alias to protos.WorkflowMetadata. |
| workflow/registry.go | Registry now registers workflows via task.TaskRegistry workflow APIs. |
| workflow/client.go | Client methods renamed to workflow variants and updated option types. |
| workflow/api.go | Updates option type aliases and metadata helper wrappers (workflow vs orchestration). |
| tests/worker_test.go | Updates worker tests to use workflow work items and workflow executor APIs. |
| tests/utils/tracing.go | Renames tracing assertion helpers to workflow terminology. |
| tests/taskhub_test.go | Updates task hub worker wiring to workflow worker types. |
| tests/task_executor_test.go | Updates task executor tests to use workflow APIs/events. |
| tests/runtimestate_test.go | Updates runtime state tests for workflow/child workflow events and actions. |
| tests/mocks/Executor.go | Renames mocked executor method to ExecuteWorkflow and updates response type. |
| tests/grpc/grpc_test.go | Updates gRPC integration tests to workflow APIs; removes reuse-ID tests removed from protos. |
| tests/backend_test.go | Updates backend tests to workflow instance/work item/state APIs. |
| task/task.go | Renames internal context field to workflow context and updates docs. |
| task/registry.go | Renames registry maps and registration functions to workflows. |
| task/executor.go | Renames executor entrypoint to ExecuteWorkflow and updates response/version types. |
| samples/taskexecutionid/taskexecutionid.go | Updates sample to register/schedule/await workflows. |
| samples/sequence/sequence.go | Updates sample to register/schedule/await workflows. |
| samples/retries/retries.go | Updates sample to register/schedule/await workflows. |
| samples/parallel/parallel.go | Updates sample to register/schedule/await workflows. |
| samples/externalevents/externalevents.go | Updates sample to schedule and wait for workflow start/completion. |
| samples/distributedtracing/distributedtracing.go | Updates sample to run a workflow and wait for completion. |
| samples/azurefunctions/middleware.go | Renames function mapping to MapWorkflow and executes workflows. |
| samples/azurefunctions/main.go | Updates Azure Functions sample workflow signature and mapping. |
| main.go | Updates worker creation to use NewWorkflowWorker. |
| client/worker_grpc.go | Updates work item listener to process workflow requests/responses and complete workflow tasks. |
| client/client_grpc.go | Renames public gRPC client methods to workflow variants and updates metadata/state mapping. |
| backend/workitem.go | Renames orchestration work item/state types to workflow equivalents. |
| backend/taskhub.go | Task hub worker now hosts a workflow worker instead of orchestration worker. |
| backend/sqlite/sqlite.go | Updates SQLite backend to workflow APIs, types, and lock timeout option naming. |
| backend/runtimestate/runtimestate.go | Renames runtime state helpers to workflow runtime state types/events. |
| backend/runtimestate/runtimestate_test.go | Updates runtime state unit tests to workflow events/status fields. |
| backend/runtimestate/applier.go | Updates action application to workflow actions, child workflow events, and message types. |
| backend/postgres/postgres.go | Updates Postgres backend to workflow APIs/types and lock timeout option naming. |
| backend/orchestration.go | Renames orchestration worker/processor to workflow worker/processor and updates span helpers. |
| backend/local/task.go | Updates local tasks backend to workflow request/response plumbing. |
| backend/executor.go | Updates gRPC executor to dispatch workflow work items and handle workflow completion RPC. |
| backend/client.go | Updates in-proc backend client API to schedule/manage workflows. |
| backend/backend.go | Renames backend interface methods/types to workflow equivalents; updates recursive purge/terminate helpers. |
| api/protos/orchestrator_service_grpc.pb.go | Regenerates gRPC bindings adding CompleteWorkflowTask and workflow terminology. |
| api/orchestration.go | Renames API option types and metadata helpers to workflow variants; removes reuse-policy types. |
| api/helpers/tracing.go | Renames span helper functions to workflow variants and reads instance ID from WorkflowInstance. |
| api/helpers/history.go | Updates action summary and task ID extraction for workflow action/event types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 52 out of 53 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
…le being backwards compatible Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
| @@ -17,15 +17,15 @@ import ( | |||
| ) | |||
|
|
|||
| type TaskHubClient interface { | |||
There was a problem hiding this comment.
Should we add the deprecated functions too?
There was a problem hiding this comment.
I did not bc adding deprecated funcs to the interface would force every implementor to implement both old and new funcs.
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 59 out of 60 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Deprecated: Use AddWorkflowN instead. | ||
| func (r *TaskRegistry) AddOrchestratorN(name string, o Workflow) error { | ||
| return r.AddWorkflowN(name, o) | ||
| } |
There was a problem hiding this comment.
The deprecated compatibility shims cover AddOrchestratorN, but the pre-existing AddOrchestrator helper (reflection-based name) is no longer available. If backward compatibility is intended (this file suggests it is), consider adding a deprecated AddOrchestrator(o Orchestrator) (or Workflow) wrapper that forwards to AddWorkflow, mirroring the old API surface.
| // | ||
| // [api.api.ErrInstanceNotFound] is returned if the specified orchestration instance doesn't exist. | ||
| func (c *TaskHubGrpcClient) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { | ||
| // [api.api.ErrInstanceNotFound] is returned if the specified workflow instance doesn't exist. |
There was a problem hiding this comment.
The doc link typo api.api.ErrInstanceNotFound should be api.ErrInstanceNotFound (or just plain text). As written it doesn’t resolve and is confusing for readers.
| // [api.api.ErrInstanceNotFound] is returned if the specified workflow instance doesn't exist. | |
| // [api.ErrInstanceNotFound] is returned if the specified workflow instance doesn't exist. |
|
|
||
| // HelloCities is an orchestrator function that generates a "hello" message for several cities. | ||
| func HelloCities(ctx *task.OrchestrationContext) (any, error) { | ||
| // HelloCities is an workflow function that generates a "hello" message for several cities. |
There was a problem hiding this comment.
Grammar: an workflow should be a workflow.
based on this PR: dapr/durabletask-protobuf#33
What was intentionally not changed: