osv.dev icon indicating copy to clipboard operation
osv.dev copied to clipboard

OSV query API does not support querying by Linux versions.

Open hyperlyz opened this issue 2 years ago • 4 comments

I use the api to analyze all the version for linux, but none worked. A failure example is as follows. cmd: curl -X POST -d '{"version": "v6.0-rc6", "package": {"name": "Kernel", "ecosystem": "Linux"}}' "https://api.osv.dev/v1/query" result: {"code":504,"message":"upstream request timeout"}

hyperlyz avatar Jan 30 '23 09:01 hyperlyz

Thanks for reporting this! We'll take a closer look into tomorrow Sydney hours as this appears to be limited to querying for Linux kernel issues with a version only.

At a cursory glance, this may be because the number of Linux kernel matches for v6.0-rc6 is too numerous, and we need to come up with a more efficient indexing mechanism for this.

oliverchang avatar Jan 30 '23 10:01 oliverchang

To validate this theory a bit more:

  • Querying in our version index for v6.0-rc6 returns 1000+ entries.
  • Querying the API for the latest versions (e.g. v6.2-rc6) returns an empty result instantly.

There are two issues blocking this:

  1. #1001 - to make the initial matching/querying more efficient
  2. #151 - an older issue around making sure we can return large paginated responses. In this case there are 1000+ results to return which likely will run into some issues.

oliverchang avatar Jan 30 '23 10:01 oliverchang

Thanks for reporting this! We'll take a closer look into tomorrow Sydney hours as this appears to be limited to querying for Linux kernel issues with a version only.

At a cursory glance, this may be because the number of Linux kernel matches for v6.0-rc6 is too numerous, and we need to come up with a more efficient indexing mechanism for this.

None of Linux kernel worked, whichever version I use.

hyperlyz avatar Feb 01 '23 08:02 hyperlyz

Sorry about that. This will take some time to properly resolve. We'll also see if there are any temporary workarounds we can provide to support Linux in the meantime also.

oliverchang avatar Feb 02 '23 04:02 oliverchang

This issue has not had any activity for 60 days and will be automatically closed in two weeks

github-actions[bot] avatar Jul 26 '24 18:07 github-actions[bot]

Automatically closing stale issue

github-actions[bot] avatar Aug 09 '24 18:08 github-actions[bot]