style: clarify workflow activity retry fields/defaults
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 62/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- python
调研方向
从 ext/dapr-ext-workflow/dapr/ext/workflow/retry_policy.py 中 RetryPolicy 定义附近开始,然后将其字段和默认值与链接的 durabletask-go workflow.go 参考进行比较。更新文档中对字段行为的说明和合理的默认值,按要求保留受支持的字段,使用 max_retry_interval 验证重试,并明确 retry_timeout 失败的后果。
由索引模型根据 Issue 内容生成。
描述
Describe the WORKFLOW SDK feature
There are multiple gotchas in the workflow activity retry policies as described below:
ACTIVITY_RETRY_POLICY = RetryPolicy(
first_retry_interval=timedelta(seconds=1),
# max_number_of_attempts is the total attempt count, not the retry count
max_number_of_attempts=5,
backoff_coefficient=3,
# Set max_retry_interval else there won't be any retries
max_retry_interval=timedelta(seconds=10),
# DON'T set retry_timeout. If the timeout is hit, the entire workflow fails and the
# final activity isn't executed.
)
https://github.com/dapr/python-sdk/blob/main/ext/dapr-ext-workflow/dapr/ext/workflow/retry_policy.py#L26
go-sdk ref https://github.com/dapr/durabletask-go/blob/main/workflow/workflow.go#L147
acceptance criteria:
- update the field values to sensible defaults if not provided
- max_number_of_attempts can remain as is, or become deprecated (still supported) and a new field of max_attempts added that will eventuallyyyyy replace this field
- all field docs strings updated to be clearer on what they do
- ensure that retries still apply if max_retry_interval is set
- update retry_timeout to indicate that if this fails then the workflow will fail
Release Note
RELEASE NOTE: ADD Clarify workflow activity retry policies fields and defaults
- 主要语言
- Python
- 星标
- 272
- 派生
- 152
- 平均合并
- 3 天 21 小时
- 30 天内合并 PR
- 5
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dapr/python-sdk 的其他 Issue
-
dapr-ext-workflow good first issue kind/enhancement P2
难度 2/5 1-2 天 新手友好度 72/100
dapr/python-sdk#853 · 4 条评论 ·
-
kind/bug
难度 4/5 3-5 天 新手友好度 45/100
dapr/python-sdk#1230 ·
-
feature-request
难度 3/5 1-2 天 新手友好度 76/100
dapr/python-sdk#1214 · 已指派 1 人 ·
-
dapr-ext-workflow kind/enhancement
难度 3/5 1-2 天 新手友好度 78/100
dapr/python-sdk#1213 ·
-
难度 3/5 1-2 天 新手友好度 76/100
dapr/python-sdk#1200 ·
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 70/100
huggingface/Repo2RLEnv#163 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
难度 2/5 1-3 小时 新手友好度 70/100
NousResearch/hermes-agent#121143 ·