aws / aws/aws-durable-execution-sdk-python

[Feature]: Add targeted retries for retryable SerDes failures

未关闭
#681 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement parity pkg:sdk
主要语言
Python
星标
53
派生
25
平均合并
1 天 19 小时
30 天内合并 PR
40

描述

## What would you like?

Add a targeted retry decorator for transient SerDes failures.

Python already exposes `RetryableSerDesError`, but the configured SerDes call is currently propagated after the first failure. External-storage transformations such as S3 Files/EFS access can fail transiently without requiring the entire durable operation to be rerun.

## Possible Implementation

- Provide a `RetrySerDes` decorator, and make it usable as a stage if/when a composable SerDes pipeline is added.
- Retry only `RetryableSerDesError`; propagate `SerDesError` and other non-retryable failures immediately.
- Accept a bounded retry policy with maximum attempts and optional backoff/jitter, reusing existing retry-strategy concepts where that does not imply durable checkpoints.
- Pass the same value/data and `SerDesContext` to every attempt.
- Preserve the final exception type, causal chain, error data, and stack information after exhaustion.
- Ensure retries wrap only the selected SerDes transformation rather than restarting the value codec or durable operation.
- Add deterministic tests with an injected sleeper/clock so retry tests do not depend on real delays.

## Is this a breaking change?

No.

## Does this require an RFC?

No.

## Additional Context

This builds on the existing `RetryableSerDesError` classification rather than introducing another recoverability mechanism. The Java SDK implementation in aws/aws-durable-execution-sdk-java#648 provides a stage-level retry decorator with the same targeted behavior.

贡献指南

打开贡献指南

调研方向

首先定位现有的 RetryableSerDesError 分类以及 issue 中描述的已配置 SerDes 调用;比较 aws/aws-durable-execution-sdk-java#648 中的 stage 级行为。完成的标准是,只有可重试的 SerDes 失败会根据有界且确定性的 policy 测试进行重试,而不可重试的错误和最终 exception 的详细信息保持不变。

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

评估

技术栈
python
领域
backend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

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