Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Remove HTTP for inter-service RPC#59093

Merged
eseliger merged 16 commits into
mainfrom
es/grpc-cleanup
Jan 11, 2024
Merged

Remove HTTP for inter-service RPC#59093
eseliger merged 16 commits into
mainfrom
es/grpc-cleanup

Conversation

@eseliger

@eseliger eseliger commented Dec 18, 2023

Copy link
Copy Markdown
Member

In the upcoming release, we will only support gRPC going forward. This PR removes the old HTTP client and server implementations and a few leftovers from the transition.

Closes https://github.com/sourcegraph/sourcegraph/issues/59494

Test plan

CI and manual testing.

@cla-bot cla-bot Bot added the cla-signed label Dec 18, 2023
@github-actions github-actions Bot added the team/source Tickets under the purview of Source - the one Source to graph it all label Dec 18, 2023
Comment thread internal/gitserver/proxy.go Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused

Comment thread internal/gitserver/client.go Outdated
Comment thread cmd/worker/internal/embeddings/repo/document_ranks.go Outdated
Comment thread cmd/frontend/internal/httpapi/internal.go Outdated
Comment thread cmd/frontend/internal/httpapi/httpapi.go Outdated
Comment thread internal/search/searcher/search.go Outdated
Comment thread internal/search/searcher/search.go Outdated
Comment thread internal/search/backend/metered_searcher.go Outdated
Comment thread internal/gitserver/client_test.go Outdated
Comment thread internal/embeddings/client.go Outdated
Comment thread cmd/symbols/internal/api/handler.go Outdated
Comment thread cmd/searcher/shared/shared.go Outdated
Comment thread cmd/searcher/internal/search/search.go Outdated
Comment on lines 22 to 39

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was missing in gRPC but existed in HTTP. Found it while converting existing tests that exercised HTTP only.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @camdencheek @sourcegraph/search-platform FYI, found this while porting the HTTP test to gRPC.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is covered by the repoLookup test at the end of this file, no good use converting it to gRPC as there's no logic happening in the transport layer

Comment thread cmd/repo-updater/internal/repoupdater/server.go Outdated
Comment thread cmd/gitserver/internal/server.go Outdated

@eseliger eseliger Dec 19, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer expose an HTTP API so this is not needed anymore. CCing @sourcegraph/security-code-review just for visibility.

Comment thread cmd/gitserver/internal/server_test.go Outdated
Comment thread cmd/gitserver/internal/server_test.go Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to repo_info_test.go where the implementation of repoDelete lives, now tested without the transport layer in between.

@eseliger eseliger force-pushed the es/grpc-cleanup branch 2 times, most recently from c1f94fc to 06298ea Compare December 21, 2023 00:08
In the upcoming release, we will only support gRPC going forward. This PR removes the old HTTP client and server implementations and a few leftovers from the transition.
@ggilmore ggilmore mentioned this pull request Jan 10, 2024
17 tasks
@eseliger eseliger marked this pull request as ready for review January 10, 2024 19:16
@eseliger eseliger requested a review from a team January 10, 2024 19:16
@sourcegraph-bot

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 53a48d9...a0aa93e.

Notify File(s)
@bobheadxi monitoring/definitions/embeddings.go
monitoring/definitions/frontend.go
monitoring/definitions/git_server.go
monitoring/definitions/precise_code_intel_worker.go
monitoring/definitions/repo_updater.go
monitoring/definitions/searcher.go
monitoring/definitions/shared/BUILD.bazel
monitoring/definitions/shared/frontend.go
monitoring/definitions/symbols.go
monitoring/definitions/worker.go
@jtibshirani internal/search/alert/BUILD.bazel
internal/search/alert/observer.go
internal/search/backend/BUILD.bazel
internal/search/backend/grpc.go
internal/search/backend/horizontal.go
internal/search/backend/zoekt.go
internal/search/commit/commit.go
internal/search/job/jobutil/BUILD.bazel
internal/search/job/jobutil/alert.go
internal/search/job/jobutil/exhaustive_job.go
internal/search/job/jobutil/filter_file_contains.go
internal/search/job/jobutil/filter_file_contains_test.go
internal/search/job/jobutil/repo_pager_job.go
internal/search/job/jobutil/repos.go
internal/search/repos/BUILD.bazel
internal/search/repos/repos.go
internal/search/repos/repos_test.go
internal/search/searcher/BUILD.bazel
internal/search/searcher/client.go
internal/search/searcher/client_grpc.go
internal/search/searcher/search.go
internal/search/searcher/stream.go
internal/search/structural/structural.go
@keegancsmith cmd/searcher/internal/search/BUILD.bazel
cmd/searcher/internal/search/hybrid_test.go
cmd/searcher/internal/search/search.go
cmd/searcher/internal/search/search_grpc.go
cmd/searcher/internal/search/search_test.go
cmd/searcher/internal/search/store_test.go
cmd/searcher/shared/BUILD.bazel
cmd/searcher/shared/shared.go
cmd/symbols/internal/api/BUILD.bazel
cmd/symbols/internal/api/handler.go
cmd/symbols/internal/api/handler_cgo.go
cmd/symbols/internal/api/handler_nocgo.go
cmd/symbols/internal/api/handler_test.go
cmd/symbols/squirrel/BUILD.bazel
cmd/symbols/squirrel/http_handlers.go
internal/search/alert/BUILD.bazel
internal/search/alert/observer.go
internal/search/backend/BUILD.bazel
internal/search/backend/grpc.go
internal/search/backend/horizontal.go
internal/search/backend/zoekt.go
internal/search/commit/commit.go
internal/search/job/jobutil/BUILD.bazel
internal/search/job/jobutil/alert.go
internal/search/job/jobutil/exhaustive_job.go
internal/search/job/jobutil/filter_file_contains.go
internal/search/job/jobutil/filter_file_contains_test.go
internal/search/job/jobutil/repo_pager_job.go
internal/search/job/jobutil/repos.go
internal/search/repos/BUILD.bazel
internal/search/repos/repos.go
internal/search/repos/repos_test.go
internal/search/searcher/BUILD.bazel
internal/search/searcher/client.go
internal/search/searcher/client_grpc.go
internal/search/searcher/search.go
internal/search/searcher/stream.go
internal/search/structural/structural.go
internal/symbols/BUILD.bazel
internal/symbols/client.go
@slimsag monitoring/definitions/embeddings.go
monitoring/definitions/frontend.go
monitoring/definitions/git_server.go
monitoring/definitions/precise_code_intel_worker.go
monitoring/definitions/repo_updater.go
monitoring/definitions/searcher.go
monitoring/definitions/shared/BUILD.bazel
monitoring/definitions/shared/frontend.go
monitoring/definitions/symbols.go
monitoring/definitions/worker.go
@varungandhi-src cmd/symbols/squirrel/BUILD.bazel
cmd/symbols/squirrel/http_handlers.go

@pjlast pjlast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I've looked through most of this PR and nothing problematic jumps out at me 😅 a diff this large is obviously tricky though.

Also checked it out locally and played around and didn't encounter any shenanigans.

@eseliger

Copy link
Copy Markdown
Member Author

I am going to merge this, happy to address any additional feedback! It's probably prudent to do that in follow-up PRs given this diff is already massive 😬

@eseliger eseliger merged commit bb09a4a into main Jan 11, 2024
@eseliger eseliger deleted the es/grpc-cleanup branch January 11, 2024 18:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/source Tickets under the purview of Source - the one Source to graph it all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove HTTP endpoints for internal communications

3 participants