Skip to content

feat: enhance retry configuration with exception filtering and delay options#1545

Open
mandel wants to merge 3 commits into
mainfrom
feat/retry-exception-filtering-and-delay
Open

feat: enhance retry configuration with exception filtering and delay options#1545
mandel wants to merge 3 commits into
mainfrom
feat/retry-exception-filtering-and-delay

Conversation

@mandel

@mandel mandel commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR enhances the retry configuration system with advanced exception filtering and delay management capabilities.

Changes

  • RetryConfiguration class: New configuration class with comprehensive retry options
  • Exception filtering: Support for filtering specific exception types (single or list)
  • Delay management: Added delay, max_delay, backoff, and jitter parameters
  • Backward compatibility: Maintains support for integer retry values
  • Comprehensive tests: Added extensive test coverage for all new features

Key Features

  1. Exception Filtering: Retry only on specific exception types
  2. Exponential Backoff: Configurable backoff multiplier between retries
  3. Max Delay: Cap on maximum delay between retries
  4. Jitter: Random or fixed jitter to prevent thundering herd
  5. Backward Compatible: Existing integer retry values continue to work

Testing

  • Added with 9 comprehensive test cases
  • Extended with delay and timing tests
  • All tests verify correct behavior of new features

Signed-off-by: Louis Mandel lmandel@us.ibm.com

mandel added 3 commits March 23, 2026 17:13
…options

- Add RetryConfiguration class with advanced retry options
- Support exception filtering (single exception or list of exceptions)
- Add delay, max_delay, backoff, and jitter parameters for retry timing
- Maintain backward compatibility with integer retry values
- Add comprehensive test coverage for exception filtering
- Add tests for delay, backoff, and jitter functionality
- Update AST types to support float expressions for delay configuration

Signed-off-by: Louis Mandel <lmandel@us.ibm.com>
Signed-off-by: Louis Mandel <lmandel@us.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant