conductor-oss / conductor-oss/python-sdk

WaitTask base class sets wrong inputParameter key 'wait_until' instead of 'until'

未关闭 适合新手
#426 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
104
派生
42
平均合并
2 天 1 小时
30 天内合并 PR
3

描述

## Summary

Tested against: **Conductor OSS 3.32.0-rc.9**

`WaitTask.__init__(wait_until=...)` sets the inputParameter key `"wait_until"`,
but the Conductor server reads `"until"`. The task is accepted at registration
but never triggers at runtime — the workflow stays RUNNING indefinitely.

## Reproduction

```python
from conductor.client.workflow.task.wait_task import WaitTask

t = WaitTask("my_wait", wait_until="2024-01-01 00:00 UTC")
print(t.input_parameters)
# {'wait_until': '2024-01-01 00:00 UTC'} ← WRONG KEY
```

Start a workflow containing this task. The task status stays `IN_PROGRESS`
forever — the server never sees `"until"` so the condition is never evaluated.

## Root cause

`wait_task.py` line 26:
```python
self.input_parameters = {"wait_until": wait_until} # wrong key
```

Server constant (`Wait.java`):
```java
public static final String UNTIL_INPUT = "until";
```

## Fix

```python
self.input_parameters = {"until": wait_until}
```

Note: the `WaitUntilTask` subclass already uses the correct key `"until"` and
is unaffected. Only `WaitTask.__init__()` called directly with `wait_until=` is broken.

## Verified against

Conductor server **3.32.0-rc.9**, confirmed via live test in
[conductor-oss/conductor-test-harness](https://github.com/nthmost-orkes/conductor-test-harness):
task remained `RUNNING` after 10 s with `wait_until` key; `WaitUntilTask` with
`until` key completed immediately.

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 wait_task.py 第 26 行开始,将 WaitTask.__init__() 与未受影响的 WaitUntilTask 子类以及服务器的 Wait.java 常量进行比较。完成标准是直接使用 WaitTask 会发出服务器识别的输入参数,并且不再使任务无限期处于运行状态;验证复现中描述的序列化参数和工作流行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
backend
Issue 类型
缺陷
难度
1/5
预计耗时
1 小时以内
活跃度
冷清
描述清晰度
描述清楚
新手友好度
82/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。