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

svcmain: Simplify service setup#61903

Merged
eseliger merged 1 commit into
mainfrom
es/single-service
Apr 16, 2024
Merged

svcmain: Simplify service setup#61903
eseliger merged 1 commit into
mainfrom
es/single-service

Conversation

@eseliger

Copy link
Copy Markdown
Member

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.

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.
@cla-bot cla-bot Bot added the cla-signed label Apr 16, 2024
@github-actions github-actions Bot added team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all labels Apr 16, 2024
@eseliger eseliger marked this pull request as ready for review April 16, 2024 06:48
@eseliger eseliger requested a review from a team April 16, 2024 06:48

@vdavid vdavid 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.

Oh, that's nice and tidy.
I see no problems with the code 👍

@eseliger eseliger merged commit 9541032 into main Apr 16, 2024
@eseliger eseliger deleted the es/single-service branch April 16, 2024 20:04
sqs added a commit that referenced this pull request Jun 23, 2024
Revert "svcmain: Simplify service setup (#61903)" (commit 9541032).
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/product-platform 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.

3 participants