Skip to content

feat: with retry helper#390

Merged
wangyb-A merged 4 commits into
mainfrom
feat/withRetry
Jun 10, 2026
Merged

feat: with retry helper#390
wangyb-A merged 4 commits into
mainfrom
feat/withRetry

Conversation

@wangyb-A

@wangyb-A wangyb-A commented May 12, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available: #361

Ref pr: aws/aws-durable-execution-sdk-js#505

Description

  • Runs func(ctx, attempt) starting at attempt = 1.
  • On rejection → calls retryStrategy. If shouldRetry: true, context.waits for the returned delay, then re-runs the whole function.
  • On fulfillment → returns the value.
  • On the final failure → rethrows.
  • By default wraps the loop in context.runInChildContext for isolation and so all attempts + backoff waits appear as a single grouped operation in execution history. Opt out via wrap_with_run_in_child_context = false
iShot_2026-05-12_15 00 33

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@wangyb-A wangyb-A marked this pull request as ready for review May 12, 2026 22:37
@yaythomas yaythomas moved this from Backlog to In review in aws-durable-execution May 20, 2026
@wangyb-A wangyb-A self-assigned this May 20, 2026
Comment thread src/aws_durable_execution_sdk_python/retries.py Outdated
Comment thread tests/with_retry_test.py Outdated
Comment thread tests/with_retry_test.py Outdated
Comment thread tests/with_retry_test.py Outdated
Comment thread tests/with_retry_test.py Outdated
Comment thread packages/aws-durable-execution-sdk-python/tests/with_retry_test.py
Comment thread src/aws_durable_execution_sdk_python/retries.py Outdated
Comment thread src/aws_durable_execution_sdk_python/retries.py Outdated
@github-project-automation github-project-automation Bot moved this from In review to In progress in aws-durable-execution May 28, 2026
@zhongkechen

Copy link
Copy Markdown
Contributor

Please hold off this PR until the mono repo PR is merged. Pretty sure there will be conflicts between them

@wangyb-A wangyb-A moved this from In progress to In review in aws-durable-execution Jun 2, 2026
zhongkechen
zhongkechen previously approved these changes Jun 9, 2026
@wangyb-A wangyb-A requested a review from yaythomas June 9, 2026 22:42
yaythomas
yaythomas previously approved these changes Jun 9, 2026
@github-project-automation github-project-automation Bot moved this from In review to Pending merge in aws-durable-execution Jun 9, 2026
@wangyb-A wangyb-A dismissed stale reviews from yaythomas and zhongkechen via 5472a05 June 10, 2026 00:10
@wangyb-A wangyb-A merged commit dc543c4 into main Jun 10, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Pending merge to Done in aws-durable-execution Jun 10, 2026
@wangyb-A wangyb-A deleted the feat/withRetry branch June 10, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants