sourcegraph/cmd/frontend
Noah S-C 19d9cfc73b
bazel: native go-mockgen in Bazel (#60386)
Adds a new:
- gazelle generator
- rule + rule targets + catchall target
for generating go-mockgen mocks & testing for their being up-to-date.

Each go_mockgen macro invocation adds targets for generating mocks, copying to the source tree, as well as testing whether the current source tree mocks are up-to-date.

How to use this: `bazel run //dev:go_mockgen` for the catch-all, or `bazel run //some/target:generate_mocks` for an individual package, and `bazel test //some/target:generate_mocks_tests` to test for up-to-date-ness. There is no catch-all for testing

This currently uses a fork of go-mockgen, with an open PR for upstream here: https://github.com/derision-test/go-mockgen/pull/50.

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

## Test plan

Extensive testing during development, including the following cases:
- Deleting a generated file and its entry in a go_library/go_test `srcs` attribute list and then re-running `sg bazel configure`
- Adding a non-existent output directory to mockgen.test.yaml and running the bash one-liner emitted to prepare the workspace for rerunning `sg bazel configure`

The existing config tests a lot of existing paths anyway (creating mocks for a 3rd party library's interface, entries for a given output file in >1 config file etc)
2024-02-16 13:26:48 +00:00
..
auth auth: append random suffix when derive username from email (#60339) 2024-02-08 18:08:11 -05:00
backend bazel: native go-mockgen in Bazel (#60386) 2024-02-16 13:26:48 +00:00
enterprise search jobs: serve logs (#56725) 2023-09-18 17:43:40 +02:00
envvar Docs: update links to point to new site (#60381) 2024-02-13 00:23:47 +00:00
external Remove deprecated license features and tags (#58674) 2023-12-05 11:38:19 +01:00
globals bazel: first pass at moving moving logging linting into nogo (#58910) 2024-01-02 10:07:25 -08:00
graphqlbackend Add exclude repo functionality for azure devops and gerrit (#60509) 2024-02-16 11:39:59 +02:00
hubspot bazel: first pass at moving moving logging linting into nogo (#58910) 2024-01-02 10:07:25 -08:00
internal bazel: native go-mockgen in Bazel (#60386) 2024-02-16 13:26:48 +00:00
oneclickexport Remove references to user_id and org_id fields on external services and repos (#56804) 2023-10-04 15:52:31 +02:00
registry Tracing: final cleanups (#54694) 2023-07-13 10:16:11 +02:00
shared Move GItHub App creation routes to HTTP API (#59978) 2024-02-01 10:32:09 +02:00
webhooks bazel: first pass at moving moving logging linting into nogo (#58910) 2024-01-02 10:07:25 -08:00
BUILD.bazel bazel: don't build most oci_tarball targets with bazel build //... by tagging them all manual (#60529) 2024-02-15 09:02:50 +00:00
image_test.yaml Switch to OCI/Wolfi based image (#52693) 2023-06-02 12:12:52 +02:00
main.go remove more remannts of OSS build (#58253) 2023-11-10 07:59:03 +00:00
README.md

frontend

The frontend serves our web application and hosts our GraphQL API.

Typically there are multiple replicas running in production to scale with load.

Application data is stored in our PostgreSQL database.

Session data is stored in the Redis store, and non-persistent data is stored in the Redis cache.