style: clarify workflow activity retry fields/defaults
- Ngôn ngữ chính
- Python
- Star
- 272
- Fork
- 152
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
## 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Start with ext/dapr-ext-workflow/dapr/ext/workflow/retry_policy.py around the RetryPolicy definition, then compare its fields and defaults with the linked durabletask-go workflow.go reference. Update the documented field behavior and sensible defaults, preserve supported fields as required, verify retries with max_retry_interval, and make the retry_timeout failure consequence explicit.
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
- distributed-systems
- 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
- Khá rõ ràng
- Mức phù hợp với người mới
- 62/100