Open
Conversation
Signed-off-by: Eric Marcoux <eric.marcoux@ibm.com>
* updates verison to 1.12.1 * fix(developer-edition): hardcodes langflow version * release of 1.12.2 --------- Signed-off-by: Eric Marcoux <eric.marcoux@ibm.com>
- Add retry_handler.py with exponential backoff and jitter - Integrate retry decorator into BaseAPIClient for all HTTP methods - Support environment variable configuration (ADK_MAX_RETRIES, ADK_RETRY_INTERVAL, ADK_TIMEOUT) - Smart error classification for retryable vs non-retryable errors - Special handling for rate limits (HTTP 429) with extended backoff BREAKING CHANGE: None - fully backward compatible with existing code
- Add retry_handler.py with configurable retry logic - Support environment variables (ADK_MAX_RETRIES, ADK_RETRY_INTERVAL, etc.) - Implement exponential backoff with jitter to prevent thundering herd - Classify retryable vs non-retryable errors (including connection errors) - Handle rate limits with extended backoff - Integrate retry mechanism into all BaseAPIClient HTTP methods - Add comprehensive unit tests (48 test cases) - Add integration tests with mock server - Add extensive documentation and configuration guides - Add example usage in examples/client/ - Update README with retry functionality section
bfdc530 to
d5e3cc6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Automatic Retry Mechanism with Exponential Backoff
Description
This PR implements automatic retry functionality at the HTTP transport layer to handle transient failures gracefully, improving the reliability of the IBM watsonx Orchestrate ADK.
Problem Solved
Implementation Details
retry_handler.pywith configurable retry logic using exponential backoffTesting
Documentation
docs/RETRY_CONFIGURATION.md)docs/RETRY_COMPARISON.md)examples/client/retry_configuration_example.py.env.examplewith all retry configuration optionsConfiguration
All retry behavior is configurable via environment variables:
ADK_MAX_RETRIES- Maximum retry attempts (default: 3)ADK_RETRY_INTERVAL- Initial retry interval in milliseconds (default: 1000)ADK_TIMEOUT- Request timeout in seconds (default: 300)ADK_BACKOFF_MULTIPLIER- Exponential backoff multiplier (default: 2.0)ADK_JITTER_PERCENTAGE- Jitter percentage to add randomness (default: 0.2)Retryable Errors
requests.Timeout)requests.ConnectionError,ChunkedEncodingError)Non-Retryable Errors (Fail Fast)
Backwards Compatibility
ADK_MAX_RETRIES=0Code Quality