This change extracts the unrelated transitive upgrades of
https://github.com/sourcegraph/sourcegraph/pull/63171 (CORE-177) into a
separate PR. I'm making this because @unknwon ran into issues with the
exact same dependencies in
https://github.com/sourcegraph/sourcegraph/pull/63171#issuecomment-2157694545.
The change consists of upgrades to:
- `google.golang.org/grpc` - there's a deprecation of `grpc.DialContext`
that we agreed in #63171 to keep for now.
- removing our `replace` directive on `github.com/prometheus/common` and
upgrading it. This is safe to do because our Alertmanager version is
already way ahead, and the reason this has a `replace` is outdated now.
## Test plan
CI, nothing blows up on `sg start` and I can click around and do a bit
of searching
This PR is a result/followup of the improvements we've made in the [SAMS repo](https://github.com/sourcegraph/sourcegraph-accounts/pull/199) that allows call sites to pass down a context (primarily to indicate deadline, and of course, cancellation if desired) and collects the error returned from `background.Routine`s `Stop` method.
Note that I did not adopt returning error from `Stop` method because I realize in monorepo, the more common (and arguably the desired) pattern is to hang on the call of `Start` method until `Stop` is called, so it is meaningless to collect errors from `Start` methods as return values anyway, and doing that would also complicate the design and semantics more than necessary.
All usages of the the `background.Routine` and `background.CombinedRoutines` are updated, I DID NOT try to interpret the code logic and make anything better other than fixing compile and test errors.
The only file that contains the core change is the [`lib/background/background.go`](https://github.com/sourcegraph/sourcegraph/pull/62136/files#diff-65c3228388620e91f8c22d91c18faac3f985fc67d64b08612df18fa7c04fafcd).
* log: remove use of description paramter in Scoped
* temporarily point to sglog branch
* bazel configure + gazelle
* remove additional use of description param
* use latest versions of zoekt,log,mountinfo
* go.mod
Updates the BUILD.bazel files as well as various deps after main drifted
from our last working config.
Most notably the move from `proto` to `v1` in `internal/symbols`,
`internal/searcher` and `internal/own/codeowners`.
Gazelle fixed almost everything with the exception of a few things. I
ran `bazel run //:gazelle` again after `bazel run //:gazelle --
update-repos` which appended a bunch of new rules, instead of replacing
the old ones.
## Test plan
```bazel build //...```
https://buildkite.com/sourcegraph/sourcegraph/builds/198456
---------
Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
Now that we require go1.18, we can use a builtin type alias for
"interface{}": "any". I've updated all code except lib, which can be
imported by external modules. That is currently pinned at go1.16.
Additionally I had to rerun generate since rewriting generated go code
will fail CI.
find -name '*.go' | xargs gofmt -s -r 'interface{} -> any' -w
git checkout lib
go generate ./...
Test Plan: CI will exercise that the code still compiles. Otherwise this
is a noop.
* All services now export a Gauge, `src_service_metadata`, indicating their Sourcegraph version (and possibly other metadata in the future)
* Add a (currently disabled by default) annotation layer for each service that adds an annotation per version/instance when version labels change.
* Add a (currently disabled by default) annotation layer for each service that shows all service alerts
pprof which picks up IO. See README for motivation, seems very
useful. Adding it to debugserver so all our go services built in this
repo will get it for free.
These are mostly calls to Write that we can't do anything with if they
fail. Logging the failures is usually noisy since the most common reason for
failure is the client has gone away. This just marks us ignoring the error as
explicit.