NVIDIA / NVIDIA/NeMo-Retriever
[BUG]: Incorrect behavior with REST client's 'fetch_message' API when a job ID does not exist.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3k
- Forks
- 349
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 116
Description
Version
24.10
Which installation method(s) does this occur on?
No response
Describe the bug.
When using the REST Client to fetch a message from FastAPI, if the job ID does not exist, the Rest proxy will immediately return a '404', and the client will immediately re-issue the fetch request. This results in 'spamming' the log outputs, with something similar to the snippet below.
This is incorrect behaviorally: we should engage in some kind of exponential backoff to avoid flooding the user, and recognize that there is a failure if the job ID does not exist after some grace period.
This is also incorrect technically: the 404 isn't a timeout, its an HTTP request failure.
DEBUG:nv_ingest_client.util.processing:Error processing future result: Timeout: No response within 10 seconds for job ID 0
DEBUG:nv_ingest_client.message_clients.rest.rest_client:Invoking fetch_message http endpoint @ 'http://localhost:7670/v1/fetch_job/'
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:7670
Minimum reproducible example
No direct reproducer, this behavior was discovered when diagnosing another issue where a submit_message call to the FastAPI service was failing and silently failing job creation.
Relevant log output
Other/Misc.
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the REST client's fetch_message API and its handling of responses from the FastAPI service, focusing on the path for a nonexistent job ID. Reproduce the 404 case if possible, then inspect related timeout and retry behavior; done means 404 failures no longer loop immediately, retries are bounded with backoff, and the failure is surfaced clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fastapi, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100