fix(search): bound external provider requests - #2217
Open
RerankerGuo wants to merge 1 commit into
Open
Conversation
Collaborator
🤖 Open Code ReviewTarget: PR #2217 ✅ OpenCodeReview: No comments generated. Looks good to me. Generated by cloud-assistant via Open Code Review. |
Collaborator
✅ Automated Test Results: PASSEDAll tests passed (2/2 executed). memos_python_core/changed-repo-python: 2/2. Duration: 5s Branch: |
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.
Description
The Google Custom Search and Bocha search clients issued external HTTP requests without a timeout. A stalled provider could therefore hold a retrieval worker indefinitely and delay or exhaust the search pipeline.
This change applies a 30-second request timeout to both provider clients. Existing error handling remains unchanged: request failures still return the providers current empty-result fallback.
Related Issue (Required): N/A — network-boundary regression reproduced on current
main.Type of change
How Has This Been Tested?
requests.get/postcalls omittedtimeout..venv/bin/pytest tests/memories/textual/test_internet_search_timeouts.py -q(2 passed).Impact