Skip to content

codeintel: Gracefully fall back on queries to missing bundles

Warren Gifford requested to merge missing-bundles into master

Created by: efritz

Bundles can be removed from disk but do not (yet) update the database with this information. Currently, requests to bundles that have been deleted will result in a 404 which is an error condition from the precise-code-intel API.

This PR makes 404 responses a unique error which can be checked at all call sites. When this error is encountered, we return no results but swallow the error. This stops a 500-level error from being returned by the API and allows the code intel extensions to fall back to search-based results.

This check will remain indefinitely, but we will additionally introduce a janitor process (in a later PR) that will ensure that any records in the DB have a valid on the bundle manager's disk (and any records that do not have this property will be marked so they are not used for queries). This check should still remain so that any bundles deleted before the janitor process runs do not affect user queries in a negative way (no results).

Merge request reports

Loading