Closed dependabot[bot] closed 4 months ago
grpc.Dial
and grpc.DialContext
are deprecated, although they will be supported throughout v1.x.x
.
We use this to dial the API gRPC server during the agent initialization. The suggested way to do this is to replace this: https://github.com/grafana/synthetic-monitoring-agent/blob/83f8603977c4785e611fa381a14eea933b80826b/cmd/synthetic-monitoring-agent/grpc.go#L43 With something such as:
return grpc.NewClient(addr, opts...)
Or:
con, err := grpc.NewClient(addr, opts...)
if err != nil {
return nil, fmt.Errorf("building client: %w", err)
}
con.Connect() // Although this does not block waiting for conn, and therefore never returns error
return con, nil
But this modifies our current behavior where we block and force the connection with the API before returning from the dialAPIServer
function. This seems to be an anti pattern and we should just expect the connection to be established during the first rpc call, and be able to handle connection errors as a result of that call, which I believe we already do.
So, we can probably remove the blocking behavior from main and just expect the first gRPC service call to connect, because the agent will try to fetch data from the API when starting, that will happen early when initializing also, but I'm keeping this PR open by now to review this better.
Superseded by #678.
Bumps google.golang.org/grpc from 1.62.1 to 1.63.0.
Release notes
Sourced from google.golang.org/grpc's releases.
Commits
c68f456
Change version to 1.63.0 (#7050)6369167
*: update http2 dependency (#7082)8854761
cherry-pick: channelz: fix race accessing channelMap without lock (#7079) (#7...e62770d
channelz: add LocalAddr to listen sockets and test (#7062) (#7063)4ffccf1
googlec2p: use xdstp style template for client LDS resource name (#7048)faf9964
gracefulswitch: add ParseConfig and make UpdateClientConnState call SwitchTo ...800a8e0
channelz: re-add state for subchannels (#7046)dadbbfa
channelz: re-add target and state (#7042)55cd7a6
channelz: major cleanup / reorganization (#6969)a1033b1
xds: add LRS named metrics support (#7027)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show