Skip to content

Commit

Permalink
Ignore deprecation warnings after grpc lib update
Browse files Browse the repository at this point in the history
See #3699
  • Loading branch information
mstoykov committed Jul 1, 2024
1 parent 022508f commit 2b6a049
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cloudapi/insights/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ func (c *Client) Dial(ctx context.Context) error {

ctx, cancel := context.WithTimeout(ctx, c.cfg.ConnectConfig.Timeout)
defer cancel()
//nolint:staticcheck // see https://github.com/grafana/k6/issues/3699
conn, err := grpc.DialContext(ctx, c.cfg.IngesterHost, opts...)
if err != nil {
return fmt.Errorf("failed to dial: %w", err)
Expand Down Expand Up @@ -207,10 +208,12 @@ func dialOptionsFromClientConfig(cfg ClientConfig) ([]grpc.DialOption, error) {
var opts []grpc.DialOption

if cfg.ConnectConfig.Block {
//nolint:staticcheck // see https://github.com/grafana/k6/issues/3699
opts = append(opts, grpc.WithBlock())
}

if cfg.ConnectConfig.FailOnNonTempDialError {
//nolint:staticcheck // see https://github.com/grafana/k6/issues/3699
opts = append(opts, grpc.FailOnNonTempDialError(true))
}

Expand Down
2 changes: 2 additions & 0 deletions lib/netext/grpcext/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func DefaultOptions(getState func() *lib.State) []grpc.DialOption {
return getState().Dialer.DialContext(ctx, "tcp", addr)
}

//nolint:staticcheck // see https://github.com/grafana/k6/issues/3699
return []grpc.DialOption{
grpc.WithBlock(),
grpc.FailOnNonTempDialError(true),
Expand All @@ -84,6 +85,7 @@ func DefaultOptions(getState func() *lib.State) []grpc.DialOption {

// Dial establish a gRPC connection.
func Dial(ctx context.Context, addr string, options ...grpc.DialOption) (*Conn, error) {
//nolint:staticcheck // see https://github.com/grafana/k6/issues/3699
conn, err := grpc.DialContext(ctx, addr, options...)
if err != nil {
return nil, err
Expand Down

0 comments on commit 2b6a049

Please sign in to comment.