Skip to content

DynamicForkTask broken: sets deprecated field rejected by server with HTTP 400 #428

Description

@nthmost-orkes

Summary

Tested against: Conductor OSS 3.32.0-rc.9

DynamicForkTask.to_workflow_task() sets the deprecated dynamicForkJoinTasksParam
field on WorkflowTask. The Conductor server now rejects this field at
registration time with HTTP 400. Any workflow that uses DynamicForkTask via the
Python SDK fails to register.

Error

HTTP 400 Bad Request
{
  "status": 400,
  "message": "Validation failed, check below errors for detail.",
  "validationErrors": [{
    "path": "updateWorkflowDef.arg0[0].tasks[0]",
    "message": "dynamicForkJoinTasksParam or combination of dynamicForkTasksInputParamName
                and dynamicForkTasksParam cam be used for taskType: FORK_JOIN_DYNAMIC
                taskName: dyn_fork_ref"
  }]
}

Despite the phrasing, dynamicForkJoinTasksParam alone is not accepted.

Root cause

dynamic_fork_task.py line 24:

wf_task.dynamic_fork_join_tasks_param = self.tasks_param   # deprecated field

The current server field is dynamicForkTasksParam (non-deprecated).

Fix

wf_task.dynamic_fork_tasks_param = self.tasks_param           # current field
wf_task.dynamic_fork_tasks_input_param_name = self.tasks_input_param_name

Verified against

Conductor server 3.32.0-rc.9. Registration fails with HTTP 400 for any
workflow using DynamicForkTask. The task type itself works correctly when
built via raw dict with dynamicForkTasksParam.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions