Skip to content

Update proto names#79

Open
cicoyle wants to merge 12 commits intodapr:mainfrom
cicoyle:update-proto-names
Open

Update proto names#79
cicoyle wants to merge 12 commits intodapr:mainfrom
cicoyle:update-proto-names

Conversation

@cicoyle
Copy link
Copy Markdown

@cicoyle cicoyle commented Mar 31, 2026

based on this PR: dapr/durabletask-protobuf#33

  • Renamed all go types/methods/vars from: Orchestration/Orchestrator/SubOrchestration -> Workflow/ChildWorkflow
  • Removed OrchestrationIdReusePolicy and CreateOrchestrationAction bc it was rm-ed from protos and not used

What was intentionally not changed:

  • OrchestrationStatus enum type per proto spec which remained as-is
  • err msg strings to not break users
  • OpenTelemetry span names to not break users
  • proto file names

cicoyle added 4 commits March 31, 2026 08:51
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>
@cicoyle cicoyle marked this pull request as ready for review March 31, 2026 20:57
@cicoyle cicoyle requested a review from a team as a code owner March 31, 2026 20:57
Copilot AI review requested due to automatic review settings March 31, 2026 20:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/, and client/ 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.

@cicoyle cicoyle changed the title WIP Update proto names Update proto names Apr 1, 2026
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

cicoyle added 5 commits April 1, 2026 08:58
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
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 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we add the deprecated functions too?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I did not bc adding deprecated funcs to the interface would force every implementor to implement both old and new funcs.

cicoyle added 2 commits April 2, 2026 11:49
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +30 to +33
// Deprecated: Use AddWorkflowN instead.
func (r *TaskRegistry) AddOrchestratorN(name string, o Workflow) error {
return r.AddWorkflowN(name, o)
}
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
//
// [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.
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
// [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.

Copilot uses AI. Check for mistakes.

// 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.
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

Grammar: an workflow should be a workflow.

Copilot uses AI. Check for mistakes.
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.

3 participants