Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

style: clarify workflow activity retry fields/defaults

未关闭
#836 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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 内容生成。

描述

dapr-ext-workflow good first issue kind/enhancement

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dapr/python-sdk 的其他 Issue

查看 dapr/python-sdk 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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