feat: Fail fast when insecure channel is not configured for .NET Core 3.1 with gRPC#2691
Conversation
… 3.1 Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
|
Finalizing running tests locally as well, but feel free to trigger the CI for this as well. |
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
I have not tested the HTTP protocol properly
Codecov Report
@@ Coverage Diff @@
## main #2691 +/- ##
=======================================
Coverage 83.81% 83.82%
=======================================
Files 250 251 +1
Lines 8817 8828 +11
=======================================
+ Hits 7390 7400 +10
- Misses 1427 1428 +1
|
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
|
This has not been my best PR, sorry @pellared 🤦♂️ |
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
|
@pellared As you can see the build directive is not respected in https://github.com/open-telemetry/opentelemetry-dotnet/runs/4350754547?check_suite_focus=true As per https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives#conditional-compilation you'll notice that |
I see but now it fails on .NET Core 3.1 🤦 |
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
|
Ok so I see the issue here, I think, is that while the Docker Compose file is getting the correct target framework & SDK version (https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/build/docker-compose.netcoreapp3.1.yml#L7-L8), it is using a .NET 6 base image:
So that means that the directive that I've switched back to per #2691 (comment) is not available and thus not running the new validation. So I'd suggest going back to using this:
|
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
|
Changed it already but of course the check is now failing for .NET Framework. Chatted with @pellared offline and he raised a valid concern - Given we use .NET 6 as a base image we might have other .NET Core 3.1 build directives that are being ignored. What I would propose, @cijothomas, would be to:
That way we explicitly target this to only run for .NET Core 3.1, and be able to test this. |
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
|
The test is still failing and I will check tomorrow; |
If I were to guess it's the enabling of the switch by this test that causes a conflict with the It's probably safe to just remove the |
|
This must have been my worst PR ever, but hey, it looks like we are ready :) Thanks for the help! |
pellared
left a comment
There was a problem hiding this comment.
Is it not worth creating an issue to remove this feature when .NET Core 3.1 is no longer supported?
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
|
PTAL @pellared, @alanwest and @cijothomas |
|
@pellared are those the final remarks or do you want to do a full review? I'm happy to keep on changing things but at some point we'll need to just complete the review. |
|
I made a full review. That is also why I approved the PR. |
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Thanks. |
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
|
Any thoughts on this @cijothomas ? |
Signed-off-by: Tom Kerkhove kerkhove.tom@gmail.com
Fixes #2690.
Changes
Fail fast when unsecure channel is not configured for .NET Core 3.1 which is required for the OTLP exporter to work correctly.
This was not configured correctly and costed me a few hours to remind myself to configure this.
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes[ ] Design discussion issue #[ ] Changes in public API reviewed