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

support fast, simple sg start single-program-experimental-blame-sqs for local dev#63435

Merged
sqs merged 1 commit into
mainfrom
sqs/single-program-dev
Jun 24, 2024
Merged

support fast, simple sg start single-program-experimental-blame-sqs for local dev#63435
sqs merged 1 commit into
mainfrom
sqs/single-program-dev

Conversation

@sqs

@sqs sqs commented Jun 23, 2024

Copy link
Copy Markdown
Member

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.

@sqs sqs requested a review from eseliger June 23, 2024 23:00
@cla-bot cla-bot Bot added the cla-signed label Jun 23, 2024
@sqs sqs force-pushed the sqs/single-program-dev branch 3 times, most recently from e60deb2 to 6e1eba9 Compare June 23, 2024 23:45

@emidoots emidoots left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

neat; I wish we could go further with this && make our deployments way simpler

@sqs

sqs commented Jun 24, 2024

Copy link
Copy Markdown
Member Author

neat; I wish we could go further with this && make our deployments way simpler

Yeah -- we absolutely can!

@sqs sqs force-pushed the sqs/single-program-dev branch 3 times, most recently from 494543b to 268c9ba Compare June 24, 2024 20:52
@sqs sqs changed the title support fast, simple sg start single-program for local dev support fast, simple sg start single-program-experimental-blame-sqs for local dev Jun 24, 2024
@sqs

sqs commented Jun 24, 2024

Copy link
Copy Markdown
Member Author

I renamed it to single-program-experimental-blame-sqs and added a disclaimer about it. I’m going to merge it since it makes my own local development significantly smoother and faster. If I can prove that it helps other people too, then I’ll propose to promote it to a non-experimental-blame-sqs way of running it. :P

@sqs sqs force-pushed the sqs/single-program-dev branch from 268c9ba to 8290bf0 Compare June 24, 2024 20:54
@sqs sqs enabled auto-merge (squash) June 24, 2024 20:54
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 sqs force-pushed the sqs/single-program-dev branch from 8290bf0 to e263029 Compare June 24, 2024 21:08
@sqs sqs merged commit 91bc23d into main Jun 24, 2024
@sqs sqs deleted the sqs/single-program-dev branch June 24, 2024 21:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants