codeintel: Revert codeintel-qa bucket until SCIP tests are relevant (#46578)

This commit is contained in:
Eric Fritz 2023-01-17 09:54:04 -06:00 committed by GitHub
parent 0a7967bb1c
commit 8a2ee34ae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -26,7 +26,7 @@ func main() {
}
const (
bucketName = "codeintel-qa-indexes"
bucketName = "precise-code-intel-integration-testdata"
relativeIndexesDir = "dev/codeintel-qa/testdata/indexes"
)
@ -89,7 +89,7 @@ func downloadAll(ctx context.Context, bucket *storage.BucketHandle, paths []stri
}
func downloadIndex(ctx context.Context, bucket *storage.BucketHandle, indexesDir, name string) (err error) {
targetFile := filepath.Join(indexesDir, strings.TrimSuffix(name, ".gz"))
targetFile := filepath.Join(indexesDir, "sourcegraph-testing."+strings.TrimSuffix(name, ".gz"))
if ok, err := internal.FileExists(targetFile); err != nil {
return err

View File

@ -40,6 +40,11 @@ func newHandler(
return uploads.UploadMetadata{}, statusCode, err
}
contentType := r.Header.Get("Content-Type")
if contentType == "" {
contentType = "application/x-ndjson+lsif"
}
// Populate state from request
return uploads.UploadMetadata{
RepositoryID: repositoryID,
@ -48,7 +53,7 @@ func newHandler(
Indexer: getQuery(r, "indexerName"),
IndexerVersion: getQuery(r, "indexerVersion"),
AssociatedIndexID: getQueryInt(r, "associatedIndexId"),
ContentType: r.Header.Get("Content-Type"),
ContentType: contentType,
}, 0, nil
}