This repository was archived by the owner on Sep 30, 2024. It is now read-only.
svcmain: Simplify service setup#61903
Merged
Merged
Conversation
Since we switched away from single binary, we always pass down a single service. So we can simplify this logic a little bit. Test plan: sg start still works and the E2E / integration test suites are still passing.
vdavid
approved these changes
Apr 16, 2024
vdavid
left a comment
Contributor
There was a problem hiding this comment.
Oh, that's nice and tidy.
I see no problems with the code 👍
unknwon
approved these changes
Apr 16, 2024
sqs
added a commit
that referenced
this pull request
Jun 24, 2024
This makes it easier to run Sourcegraph in local dev by compiling a few key services (frontend, searcher, repo-updater, gitserver, and worker) into a single Go binary and running that. Compared to `sg start` (which compiles and runs ~10 services), it's much faster to start up, has less log spam, and rebuilds faster. It is slower for changes to `frontend` because it needs to link in more code on each recompile. This is only intended for local dev as a convenience. There may be different behavior in this mode that could result in problems when your code runs in the normal deployment. Usually our e2e tests should catch this, but to be safe, you should run in the usual mode if you are making sensitive cross-service changes. Partially reverts "svcmain: Simplify service setup (#61903)" (commit 9541032).
sqs
added a commit
that referenced
this pull request
Jun 24, 2024
… for local dev (#63435) This makes it easier to run Sourcegraph in local dev by compiling a few key services (frontend, searcher, repo-updater, gitserver, and worker) into a single Go binary and running that. Compared to `sg start` (which compiles and runs ~10 services), it's faster to start up (by ~10% or a few seconds), takes a lot less memory and CPU when running, has less log noise, and rebuilds faster. It is slower to recompile for changes just to `frontend` because it needs to link in more code on each recompile, but it's faster for most other Go changes that require recompilation of multiple services. This is only intended for local dev as a convenience. There may be different behavior in this mode that could result in problems when your code runs in the normal deployment. Usually our e2e tests should catch this, but to be safe, you should run in the usual mode if you are making sensitive cross-service changes. Partially reverts "svcmain: Simplify service setup (#61903)" (commit 9541032). ## Test plan Existing tests cover any regressions to existing behavior. This new behavior is for local dev only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since we switched away from single binary, we always pass down a single service. So we can simplify this logic a little bit.
Test plan:
sg start still works and the E2E / integration test suites are still passing.