Rewrite LSIF upload command
Created by: efritz
This PR introduces behavior that will only be available in Sourcegraph 3.16 (via https://github.com/sourcegraph/sourcegraph/pull/10456).
Behavioral changes:
- Moved reading the indexer name from the precise-code-intel-api-server to here so we don't have to write to disk in the upload path (before re-proxying to the bundle manager). Users can still specify the indexer name via a flag.
- Added
-json
flag to output a machine-readable to aid in integration tests. This will become more popular as we add additional precise-code-intel actions that will help indexing monorepos. - Removed
-get-curl
for the lsif upload action as we can't guarantee a bounded number of HTTP requests anymore. - Added support for chunking the LSIF index into parts and making several requests when the file size is too large. This threshold is default 100Mb, but is configurable with a flag for environments that are more or less constrained.
Code changes:
- Introduced internal/codeintel package
- Added tests
Build changes:
- New tests require they be run inside a git root, so the
shallow_clone
option has been removed from the appveyor config.
Notes to reviewers:
- Don't try to read the diff for lsif_upload.go, just read the new code.