Added exponential backoff capabilities #219
Open
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.
We're seeing a number of connection issues with the Serper API that resolve themselves when retrying. Instead of requiring the agent to do this and handling it in the Runbook, we should handle it in the action.
Here's the filled-out PR template for the retry logic addition:
Description
This PR adds exponential backoff retry logic to the
search_googleaction to handle intermittentRemoteDisconnectedexceptions that occur when the Serper API connection is unexpectedly closed.Problem: The action was experiencing indeterminate
RemoteDisconnected("Remote end closed connection without response")exceptions that would resolve themselves when retrying, causing unreliable search operations.Solution: Implemented a retry mechanism with exponential backoff (1s, 2s, 4s, 5s max) that automatically retries connection-related failures up to 3 times before failing.
Dependencies: No new dependencies required - uses existing
timemodule and string pattern matching for error detection.How can (was) this tested?
The retry logic can be tested by:
Test configuration:
Screenshots (if needed)
N/A - This is a backend reliability improvement without UI changes.
Checklist:
Note: The retry logic is designed to be transparent to users - no changes to the action's public API or behavior, only improved reliability for connection failures.