… service connections (#199)
* feat/added-retries-for-platform-service-calls [FEAT] Added exponential backoff retry mechanism for platform service connections
- Implemented retry_utils module with configurable retry behavior
- Added @retry_on_connection_error decorator to platform service calls
- Supports exponential backoff with jitter to prevent thundering herd
- Configuration via environment variables for max retries, delays, and backoff factor
- Automatically retries on ConnectionError and errno 111 (Connection refused)
- Improved error handling and logging for better debugging
- Bumped SDK version to v0.78.0
* Delete mypy-errors.txt
Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
* UN-2793 Moved ConnectionError handling to allow the retry decorator as expected
* UN-2793 [FEAT] Refactor retry mechanism to use backoff library with configurable exceptions
- Replace custom retry implementation with battle-tested backoff library
- Add configurable exception types while preserving existing OSError errno logic
- Implement generic retry decorator factory supporting multiple service prefixes
- Maintain backward compatibility with existing platform service retry behavior
- Add comprehensive environment variable configuration for retry parameters
- Improve logging with structured backoff details and exception context
- Reduce codebase complexity from 236 lines to ~108 lines (55% reduction)
- Support custom retry configurations per service via prefix-based env vars
* Apply suggestion from @coderabbitai[bot]
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
* Apply suggestion from @chandrasekharan-zipstack
Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
* Apply suggestion from @chandrasekharan-zipstack
Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
* UN-2793 [FEAT] Added retry decorator for prompt service calls
* UN-2793 Removed use of backoff lib and added own decorator for retries
* minor: Removed a default argument to make calls to decorator explicit
* misc: Raised err to validate envs for retry
* Update src/unstract/sdk/utils/retry_utils.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
* Apply suggestion from @coderabbitai[bot]
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
* Apply suggestion from @coderabbitai[bot]
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
* Apply suggestion from @coderabbitai[bot]
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
---------
Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>