-
Notifications
You must be signed in to change notification settings - Fork 531
test: test_update is hanging #4680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@terriko Hey! I’d like to look into this issue. I’ll start by investigating potential causes, including data changes and API behavior. Let me know if there are any specific pointers or past occurrences I should check. Thanks! |
It may be related to #4710 -- I can't remember if test_update runs everything or just NVD, but it's not impossible that it might run into memory issues as well. |
@terriko I checked the NVD API by running a curl request (https://services.nvd.nist.gov/rest/json/cves/2.0), and it returned a 200 OK status, so the API itself is functional. Possible causes I’ve considered: Since the API is responding as expected, it seems like an internal issue within cve-bin-tool. Do you have any insights or suggestions on debugging this further? |
The NVD API is under heavy load and has a bunch of rate limiting applied, plus thanks to staffing and budget issues there I'm not going to be shocked if it's just offline randomly now or in future. So yeah, this is known to be a slightly random problem, and it's going to require some creativity to work around it. In short:
Some potential options:
We've already got a PR for some of the other parts of the nvd api tests, so you may want to look and see what's already covered in that and focus on timeouts as a way to avoid the hanging. |
I went through the test failures, and it looks like the NVD API is either down or not responding correctly, which is causing issues. Based on your suggestions, I’m thinking of the following approach to improve test reliability: 1️⃣ Mock API responses instead of relying on live API calls, so tests don’t fail due to NVD API downtime. Does this approach make sense, or would you suggest any modifications? Also, is there already a PR that addresses some of these issues? |
Any of those would work, yes. You likely don't need to do all of them to address the issue. |
Hey! @Shrishti1701, Here's my follow-up from IRC, I really think the suggestion already given will do the job..
and for http requests..
I think this should be a good start (and sorry if i messed-up the formatting) |
Hi! I'm interested in working on this issue as part of my GSoC 2025 preparation. Would it be okay if I took this on? |
You can find the pr for mock tests for nvd_api here #4934 Also this issue is assigned to @Shrishti1701 so, you need to ask if she has done any work |
Hi, I am currently working on this issue and have submitted multiple PRs. There were some issues along the way, but I am resolving them. |
Looks like test_update (which performs the NVD update) is hanging in the long tests. Not sure if that's due to data changes, network issues at NVD, old API stuff being turned off, or what. It could use some investigation.
The text was updated successfully, but these errors were encountered: