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

[Feature]: Add targeted retries for retryable SerDes failures

Ouverte
#681 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement parity pkg:sdk
Langage dominant
Python
Étoiles
53
Forks
25
Merge moyen
1 j 19 h
PR mergées (30 j)
40

Description

## 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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par localiser la classification existante de RetryableSerDesError et l’appel SerDes configuré décrit dans l’issue ; comparez le comportement au niveau de l’étape dans aws/aws-durable-execution-sdk-java#648. Le travail est terminé lorsque seuls les échecs SerDes réessayables sont réessayés avec des tests de policy bornés et déterministes, tandis que les erreurs non réessayables et les détails de l’exception finale restent inchangés.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
backend
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
52/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.