LSIF: Use repository ids instead of names
Created by: efritz
Replace usages of repository names in lsif-server with the repository ID known by the frontend. Closes https://github.com/sourcegraph/sourcegraph/issues/6278.
-
schema changes: these changes will do a join on the
repo
table so that the repository ids are populated with the id of the repository that has the same name. If a repository id cannot be correlated (due to a rename that has already occurred), those uploads are removed.- rename lsif_uploads.repository to repository_name_at_upload
- add new field lsif_uploads.repository_id
- add new field lsif_commits.repository_id
- drop lsif_commits.repository
- remove all indexes/constraints from repository and add symmetric ones to repository_id (both tables)
-
lsif-server api changes:
- accept repository_id and (optionally) repository_name instead of repository for all query endpoints
- accept repository_id and (required, see see Slack thread) repository_name instead of repository for the upload endpoint
- lsif-server internal changes: use repository_id everywhere where repository was used before (except for gitserver interfacing, which needs to use the repository name value, if supplied to the API)
- lsif-server tests: this is where most of the diff is - but they're all trivial differences
- graphql api changes: remove InputRepoName, as we no longer have this data and recent changes to the uploads graphql api has made it an unnecessary datapoint (you must specify a repo in order to list uploads in the first place)
- web changes: update usage of the graphql api