mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:51:50 +00:00
[debug] codeintel: print uploads IDs where possible (#38748)
This commit is contained in:
parent
c742e22ab6
commit
eb58e18c0e
@ -28,9 +28,9 @@ pushd dev/codeintel-qa || exit 1
|
||||
echo '--- downloading test data from GCS'
|
||||
./scripts/download.sh
|
||||
echo '--- integration test ./dev/codeintel-qa/cmd/upload'
|
||||
go build ./cmd/upload
|
||||
go build ./cmd/upload -- -verbose
|
||||
./upload --timeout=5m
|
||||
echo '--- integration test ./dev/codeintel-qa/cmd/query'
|
||||
go build ./cmd/query
|
||||
go build ./cmd/query -- -verbose
|
||||
./query
|
||||
popd || exit 1
|
||||
|
||||
@ -102,7 +102,7 @@ loop:
|
||||
break loop
|
||||
|
||||
case <-time.After(time.Second):
|
||||
if verbose {
|
||||
if !verbose {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ func monitor(ctx context.Context, repoNames []string, uploads []uploadMeta) erro
|
||||
}
|
||||
|
||||
if oldState != "COMPLETED" {
|
||||
fmt.Printf("[%5s] %s Finished processing index for %s@%s\n", internal.TimeSince(start), internal.EmojiSuccess, repoName, uploadState.upload.commit[:7])
|
||||
fmt.Printf("[%5s] %s Finished processing index for %s@%s - ID %s\n", internal.TimeSince(start), internal.EmojiSuccess, repoName, uploadState.upload.commit[:7], uploadState.upload.id)
|
||||
}
|
||||
} else if uploadState.state != "QUEUED" && uploadState.state != "PROCESSING" {
|
||||
var payload struct {
|
||||
@ -86,7 +86,7 @@ func monitor(ctx context.Context, repoNames []string, uploads []uploadMeta) erro
|
||||
}
|
||||
|
||||
if err := internal.GraphQLClient().GraphQL(internal.SourcegraphAccessToken, uploadsQueryFragment, nil, &payload); err != nil {
|
||||
return errors.Newf("unexpected state '%s' for %s@%s\nAudit Logs:\n%s", uploadState.state, uploadState.upload.repoName, uploadState.upload.commit[:7], errors.Wrap(err, "error getting audit logs"))
|
||||
return errors.Newf("unexpected state '%s' for %s@%s - ID %s\nAudit Logs:\n%s", uploadState.state, uploadState.upload.repoName, uploadState.upload.commit[:7], &uploadState.upload.id, errors.Wrap(err, "error getting audit logs"))
|
||||
}
|
||||
|
||||
fmt.Printf("RAW PAYLOAD DUMP:\n%+v\n", payload)
|
||||
@ -100,7 +100,7 @@ func monitor(ctx context.Context, repoNames []string, uploads []uploadMeta) erro
|
||||
}
|
||||
}
|
||||
|
||||
return errors.Newf("unexpected state '%s' for %s@%s\nAudit Logs:\n%s", uploadState.state, uploadState.upload.repoName, uploadState.upload.commit[:7], logs)
|
||||
return errors.Newf("unexpected state '%s' for %s@%s - ID %s\nAudit Logs:\n%s", uploadState.state, uploadState.upload.repoName, uploadState.upload.commit[:7], uploadState.upload.id, logs)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ func uploadAll(ctx context.Context, commitsByRepo map[string][]string, limiter *
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Printf("[%5s] %s Finished uploading index for %s@%s\n", internal.TimeSince(start), internal.EmojiSuccess, repoName, commit[:7])
|
||||
fmt.Printf("[%5s] %s Finished uploading index for %s@%s - ID %s\n", internal.TimeSince(start), internal.EmojiSuccess, repoName, commit[:7], graphqlID)
|
||||
|
||||
uploadCh <- uploadMeta{
|
||||
id: graphqlID,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user