Skip to content

ChildWorkflowOptions missing WorkflowIDConflictPolicy (only StartWorkflowOptions has it) #2335

Description

@autocracy

Summary

WorkflowIDConflictPolicy was added to StartWorkflowOptions in v1.26.0, but ChildWorkflowOptions has never been updated to include an equivalent field. This creates an asymmetry: callers who want WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING semantics for child workflows have no supported way to express it.

Current behavior

ChildWorkflowOptions only exposes WorkflowIDReusePolicy. The deprecation of WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING was paired with the introduction of WorkflowIDConflictPolicy on the client-start path (StartWorkflowOptions), but the child-workflow execution path was not updated to match.

// Works fine — conflict policy available
opts := client.StartWorkflowOptions{
    WorkflowIDConflictPolicy: enumspb.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING,
}

// No equivalent — must use the deprecated reuse policy instead
childOpts := workflow.ChildWorkflowOptions{
    WorkflowIDReusePolicy: enumspb.WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING, // deprecated, but only option
}

Expected behavior

ChildWorkflowOptions should include a WorkflowIDConflictPolicy field, mirroring the field already present in StartWorkflowOptions.

Impact

Users who follow the migration guidance to replace WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING with WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING can do so for top-level workflow starts but are forced to suppress deprecation lints and continue using the deprecated reuse policy for child workflows. There is no non-deprecated path to achieve terminate-existing semantics in child workflow execution.

SDK version

Confirmed in v1.41.1. The asymmetry has existed since at least v1.26.0 when WorkflowIDConflictPolicy was introduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions