Are these APIs exposed externally (or have mirror implementations for an externally exposed one)? If so, there might not be a lot of value in converting these over.
Won't do:
git operations
/git/info/refs & /git/upload-pack: These routes are invoked by the git binary itself, so it doesn't make sense to convert these to gRPC since git can't speak it.
graphql
/graphql - Serves internal graphQL API that is [used in a few places](context:global repo:^github.com/sourcegraph/sourcegraph$ "internal/graphql").
This doesn't make sense to convert over to use gRPC since it uses the same transport mechanisms (JSON over HTTP) that our public-facing graphQL API uses.
Since we're not changing any public facing APIs to use gRPC as part of the scope of this project, I don't think it makes sense to use a gRPC implementation that is only used for the internal version of this API.
See the following for all routes:
https://github.com/sourcegraph/sourcegraph/blob/3d557128619e09d3c1fda226f44ba620fd4e0f1a/cmd/frontend/internal/httpapi/httpapi.go#L206-L262
Done:
/zoekt-indexserver/configuration
- Serves zoekt-indexserver configuration: https://github.com/sourcegraph/sourcegraph/pull/47710/zoekt-indexserver/repos
- Lists repos: https://github.com/sourcegraph/sourcegraph/pull/47710/zoekt-indexserver/repo-rank
- Ranks repos: https://github.com/sourcegraph/sourcegraph/pull/47710/zoekt-indexserver/document-ranks
- Ranks documents: https://github.com/sourcegraph/sourcegraph/pull/47710/zoekt-indexserver/update-index-status
- Handles index status updates: https://github.com/sourcegraph/sourcegraph/pull/47710Next
/external-services-configs
- Serves external service configuration/app-url
- Serves external URL/send-email
- Sends email/configuration
- Serves configurationStatus Unknown
telemetry
/telemetry
- Serves telemetry dataCode intel stuff
/lsif-upload
- Handles LSIF upload requests/scip-upload
- Handles SCIP upload requests/scip-upload-exists
- Handles SCIP upload exists requestsAre these APIs exposed externally (or have mirror implementations for an externally exposed one)? If so, there might not be a lot of value in converting these over.
Won't do:
git operations
/git/info/refs
&/git/upload-pack
: These routes are invoked by the git binary itself, so it doesn't make sense to convert these to gRPC since git can't speak it.graphql
/graphql
- Serves internal graphQL API that is [used in a few places](context:global repo:^github.com/sourcegraph/sourcegraph$ "internal/graphql").This doesn't make sense to convert over to use gRPC since it uses the same transport mechanisms (JSON over HTTP) that our public-facing graphQL API uses.
compute stream
.internal/compute/stream
: Handles compute stream requestsThis is a mirror image of the existing public facing compute-stream handler: https://github.com/sourcegraph/sourcegraph/blob/7503ac810ce42c7280fd39c2d6b07923c93a3d45/enterprise/cmd/frontend/internal/compute/streaming/stream.go#L29
So, it doesn't make sense to convert only the internal one to use gRPC.
ping
/ping
- Handles ping requestsThis doesn't appear to be used anymore. I didn't see any calls to
/ping
when I inspected 1 minute's worth of traffic on sourcegraph.com (https://sourcegraph.slack.com/archives/C04HCK4K3DL/p1676495299928659) .Cody and code search didn't reveal any references to this route.
This isn't used for health checks either, as sourcegraph-frontend's liveness / readiness endpoints use the logic from the debugserver package: https://github.com/sourcegraph/sourcegraph/blob/9b3d612bd257089cc73f3981990836241311066c/internal/debugserver/debug.go#L119-L120
streaming search
/.internal/search/stream
The internal stream search endpoint
/.internal/search/stream
is used by batch changes https://github.com/sourcegraph/sourcegraph/blob/43ebbb4021b803eb71e16ef3391797caf6d6d55c/enterprise/internal/batches/service/workspace_resolver.go#L405-L442It's also a mirror image of the public facing one that uses HTTP:
Since we're not changing any public facing APIs to use gRPC as part of the scope of this project, I don't think it makes sense to use a gRPC implementation that is only used for the internal version of this API.