From cb94c42bb9ebeddbe50fcc8e0b97a3493058b692 Mon Sep 17 00:00:00 2001 From: Alex Kats Date: Wed, 30 Oct 2024 10:09:57 -0400 Subject: [PATCH 1/7] updated configgrpc to use DialContext --- config/configgrpc/configgrpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index 07d6c8c7675..fbb93f61166 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -261,7 +261,7 @@ func (gcs *ClientConfig) ToClientConn( if err != nil { return nil, err } - return grpc.NewClient(gcs.sanitizedEndpoint(), grpcOpts...) + return grpc.DialContext(ctx, gcs.sanitizedEndpoint(), grpcOpts...) } func (gcs *ClientConfig) getGrpcDialOptions( From 6a1a80706484be130010fec93b9e45d118a75659 Mon Sep 17 00:00:00 2001 From: Alex Kats Date: Wed, 30 Oct 2024 12:53:31 -0400 Subject: [PATCH 2/7] added changelog for grpc client update --- .chloggen/configgrpc-client-update.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .chloggen/configgrpc-client-update.yaml diff --git a/.chloggen/configgrpc-client-update.yaml b/.chloggen/configgrpc-client-update.yaml new file mode 100644 index 00000000000..60423bd4f28 --- /dev/null +++ b/.chloggen/configgrpc-client-update.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug-fix + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: config/configgrpc + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Patch for bug in the grpc-go NewClient that makes the way the hostname is resolved incompatible with the way proxy setting are applied. + +# One or more tracking issues or pull requests related to the change +issues: [11537] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] From 0edd5f3b3da1399370a69472802a5f8ab588ef3e Mon Sep 17 00:00:00 2001 From: Alex Kats Date: Wed, 30 Oct 2024 13:09:52 -0400 Subject: [PATCH 3/7] typo in chlog --- .chloggen/configgrpc-client-update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/configgrpc-client-update.yaml b/.chloggen/configgrpc-client-update.yaml index 60423bd4f28..d85b4a28ffb 100644 --- a/.chloggen/configgrpc-client-update.yaml +++ b/.chloggen/configgrpc-client-update.yaml @@ -1,7 +1,7 @@ # Use this changelog template to create an entry for release notes. # One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug-fix +change_type: bug_fix # The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) component: config/configgrpc From 29d6e0a7b0640f1918bc672c0638550cf960b0de Mon Sep 17 00:00:00 2001 From: Yang Song Date: Thu, 31 Oct 2024 16:52:28 -0400 Subject: [PATCH 4/7] Update config/configgrpc/configgrpc.go --- config/configgrpc/configgrpc.go | 1 + 1 file changed, 1 insertion(+) diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index fbb93f61166..4094bc25210 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -261,6 +261,7 @@ func (gcs *ClientConfig) ToClientConn( if err != nil { return nil, err } + //lint:ignore SA1019 see https://github.com/open-telemetry/opentelemetry-collector/pull/11575 return grpc.DialContext(ctx, gcs.sanitizedEndpoint(), grpcOpts...) } From e7d3ca5fb3827f57de5ae4b1d0f6b77a7cef37e8 Mon Sep 17 00:00:00 2001 From: Alex Kats Date: Thu, 31 Oct 2024 22:51:26 -0400 Subject: [PATCH 5/7] updated nolint --- config/configgrpc/configgrpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index 4094bc25210..168cbc381aa 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -261,7 +261,7 @@ func (gcs *ClientConfig) ToClientConn( if err != nil { return nil, err } - //lint:ignore SA1019 see https://github.com/open-telemetry/opentelemetry-collector/pull/11575 + //nolint:staticcheck return grpc.DialContext(ctx, gcs.sanitizedEndpoint(), grpcOpts...) } From 726d8032dd64eab448a913ce7d949e26f4eb5c4f Mon Sep 17 00:00:00 2001 From: Alex Kats Date: Thu, 31 Oct 2024 23:50:01 -0400 Subject: [PATCH 6/7] updated nolint comment --- config/configgrpc/configgrpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index 168cbc381aa..12a29de15ef 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -261,7 +261,7 @@ func (gcs *ClientConfig) ToClientConn( if err != nil { return nil, err } - //nolint:staticcheck + //nolint:staticcheck SA1019 see https://github.com/open-telemetry/opentelemetry-collector/pull/11575 return grpc.DialContext(ctx, gcs.sanitizedEndpoint(), grpcOpts...) } From 92e413e80a7d5f0a71bdfef7b82c4e3f33be4067 Mon Sep 17 00:00:00 2001 From: Alex Kats Date: Thu, 31 Oct 2024 23:52:13 -0400 Subject: [PATCH 7/7] updated nolint comment --- config/configgrpc/configgrpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index 12a29de15ef..1b1b15963ca 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -261,7 +261,7 @@ func (gcs *ClientConfig) ToClientConn( if err != nil { return nil, err } - //nolint:staticcheck SA1019 see https://github.com/open-telemetry/opentelemetry-collector/pull/11575 + //nolint:staticcheck //SA1019 see https://github.com/open-telemetry/opentelemetry-collector/pull/11575 return grpc.DialContext(ctx, gcs.sanitizedEndpoint(), grpcOpts...) }