feat: make fetch timeout for chunks configurable - #1031
Merged
cybermaggedon merged 3 commits intoJul 7, 2026
Merged
Conversation
Contributor License Agreement ✅All contributors have signed the CLA. Thank you! |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
cybermaggedon
self-requested a review
July 7, 2026 09:36
cybermaggedon
approved these changes
Jul 7, 2026
cybermaggedon
left a comment
Contributor
There was a problem hiding this comment.
Clean, small change. Two commits: tests first, then the feature — Ninja 🥷
Contributor
|
@kworathur this is in draft state, is it ready to merge? |
kworathur
marked this pull request as ready for review
July 7, 2026 13:59
Contributor
Author
|
@cybermaggedon all good to merge! |
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.
Summary
Addresses part of #874. The timeout for fetching chunks from the librarian is currently hardcoded. This PR makes the fetch timeout configurable through a new parameter called
fetch_chunk_timeout.Changes
All changes are in the constructor of the
Processorclass intrustgraph-flow/trustgraph/retrieval/document_rag/rag.py. The parameterfetch_chunk_timeoutis threaded through the constructor's existingparamsargument, which mirrors howfetch_limitand other parameters for document RAG are passed. The default value of 120 seconds has been preserved from before.Configuring the parameter: An operator can configure
fetch_chunk_timeoutby setting its value indev-tools/proc-group/groups/rag.yaml:Tests
Three unit tests have been added to
tests/unit/test_retrieval/test_document_rag_service.py:fetch_chunk_timeoutis not inparamsfetch_chunk_timeoutis overridden.fetch_chunk_timeoutis passed as a parameter tolibrarian.fetch_document_text()Notes
fetch_chunk_timeout, similar to the remaining parameters initialized in the same constructor.