mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
This change extracts `monitoring` into a submodule for import in `sourcegraph/controller` (https://github.com/sourcegraph/controller/pull/195) so that we can generate dashboards for Cloud instances. These steps were required: 1. Initialize a `go.mod` in `monitoring` 2. Extract `dev/sg/internal/cliutil` into `lib` to avoid illegal imports from `monitoring` 3. Add local replaces to both `sourcegraph/sourcegraph` and `monitoring` 4. `go mod tidy` on all submodules 5. Update `go generate ./monitoring` commands to use `sg`, since the `go generate` command no longer works 6. Update `grafana/build.sh`, `prometheus/build.sh` to build the submodule 7. Amend linters to check for multiple `go.mod` files and ban imports of `github.com/sourcegraph/sourcegraph` 8. Update `sg generate go` to run in directories rather than from root The only caveat is that if you use VS code, you will now need to open `monitoring` in a separate workspace or similar, like with `lib`. Co-authored-by: Joe Chen <joe@sourcegraph.com> |
||
|---|---|---|
| .. | ||
| generate.go | ||