codeintel: Remove bundle manager hop from query path
Created by: efritz
This PR removes an internal service hope when communicating with the codeintel database in the query path. We move the call to the code intel database from the bundle manager server and move it into the client, which is called from the frontend. This should make code intel requests faster, but the real impetus for this change is to eventually remove the bundle manager entirely (at least from latency-sensitive paths).
How to review
By commit, as follows:
Move database package moves the precise-code-intel-bundle-manager/internal/database package
into enterprise/internal/codeintel/bundles/database
. We will be calling this method from another service shortly.
Extract types from bundle client moves the types defined in enterprise/internal/codeintel/bundles/client
into a package enterprise/internal/codeintel/bundles/client_types
, and forward aliases are left where the original definitions were. This new types will soon be used in the api layer as well.
Extract types from bundle client package (
(Skeleton) Query codeintel db directly from bundle manager client does some non-behavior-changing refactoring for the next commits. This modifies the request
method of the client to read meta from postgres, and if it exists will create a local database instance and answer the query directly. The behavior for each method is currently blank (hence the skeleton and will be filled in in the following commit). This also updates the existing tests so they pass with the new call to ReadMeta
.
Fill out codeintel db request handler logic fills out the query behavior for each client method and updates tests.
The remaining commits all repair app startup, tests, mocks, and lint errors.