conductor-oss / conductor-oss/python-sdk
No ExclusiveJoinTask builder class — defaultExclusiveJoinTask field unreachable
- Ngôn ngữ chính
- Python
- Star
- 104
- Fork
- 42
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 3
Mô tả
## Summary
Tested against: **Conductor OSS 3.32.0-rc.9**
`TaskType.EXCLUSIVE_JOIN` exists in the SDK enum but there is no `ExclusiveJoinTask`
builder class. More critically, the `defaultExclusiveJoinTask` field (which tells
the server which task to use when no SWITCH branch ran) cannot be set through any
SDK path.
## Details
`JoinTask` always produces `TaskType.JOIN`, not `TaskType.EXCLUSIVE_JOIN`. There
is no way to build an EXCLUSIVE_JOIN task using SDK classes alone.
EXCLUSIVE_JOIN is designed for SWITCH branches (where exactly one branch executes).
Without `defaultExclusiveJoinTask` set, EXCLUSIVE_JOIN workflows with a branch that
doesn't match will stall.
## Suggested fix
```python
class ExclusiveJoinTask(TaskInterface):
def __init__(self, task_ref_name: str, join_on: List[str],
default_exclusive_join_task: Optional[List[str]] = None):
super().__init__(task_ref_name, TaskType.EXCLUSIVE_JOIN)
self._join_on = join_on
self._default = default_exclusive_join_task or []
def to_workflow_task(self) -> WorkflowTask:
wf = super().to_workflow_task()
wf.join_on = self._join_on
wf.default_exclusive_join_task = self._default
return wf
```
## Verified against
Conductor server **3.32.0-rc.9**. EXCLUSIVE_JOIN runs correctly when built via
raw `WorkflowTask` with the correct fields set. The gap is purely in the SDK —
no builder class exists.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Locate the existing JoinTask and TaskInterface entry points, then inspect how they create a WorkflowTask and assign TaskType. Add coverage for constructing an EXCLUSIVE_JOIN task with join_on and default_exclusive_join_task; done means the SDK can serialize those fields and the resulting workflow runs correctly for an unmatched SWITCH branch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- backend-api-design
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 68/100