Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Existing ServerCertificateValidation Classes to Shared #1550

Conversation

anoopbabu29
Copy link
Contributor

Attempt to move the ServerCertificateValidtion Classes to the Shared folder. This use case is very generic and has potential to be used for multiple ResourceDetector Projects. It was also intended to be used in the ResourceDetectors.Container Project in #1529.

One reservation I have for this is the ideal location for the test cases, as they currently just exist in the ResourceDetectors.AWS.Tests Test project.

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.77%. Comparing base (71655ce) to head (fa08aa6).
Report is 178 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1550      +/-   ##
==========================================
- Coverage   73.91%   73.77%   -0.14%     
==========================================
  Files         267      256      -11     
  Lines        9615     9415     -200     
==========================================
- Hits         7107     6946     -161     
+ Misses       2508     2469      -39     
Flag Coverage Δ
unittests-Exporter.Geneva 58.21% <ø> (?)
unittests-Exporter.OneCollector 89.72% <ø> (?)
unittests-Extensions 82.75% <ø> (?)
unittests-Instrumentation.AspNet 75.82% <ø> (?)
unittests-Instrumentation.EventCounters 75.92% <ø> (?)
unittests-Instrumentation.Owin 85.71% <ø> (?)
unittests-Instrumentation.Process 100.00% <ø> (?)
unittests-Instrumentation.Runtime 100.00% <ø> (?)
unittests-Instrumentation.StackExchangeRedis 71.00% <ø> (?)
unittests-Instrumentation.Wcf 78.47% <ø> (?)
unittests-PersistentStorage 65.78% <ø> (?)
unittests-ResourceDetectors.Azure 81.53% <ø> (?)
unittests-ResourceDetectors.Host 40.00% <ø> (?)
unittests-ResourceDetectors.Process 100.00% <ø> (?)
unittests-ResourceDetectors.ProcessRuntime 76.08% <ø> (?)
unittests-Solution 79.92% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ry.ResourceDetectors.AWS/AWSEKSResourceDetector.cs 58.62% <100.00%> (ø)
...y.ResourceDetectors.AWS/AWSResourcesEventSource.cs 62.50% <ø> (ø)

... and 200 files with indirect coverage changes


namespace OpenTelemetry.ResourceDetectors;

[EventSource(Name = "OpenTelemetry-ResourceDetectors-Http")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenTelemetry-ResourceDetectors-Http -- is there a component with this name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I have created that as a separate name as a placeholder.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not use shared name for the eventsources. It'll cause issues like open-telemetry/opentelemetry-dotnet#4516 (comment)

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1550/files#r1468194982

Each component should own its own logging, with unique eventsource name, else troubleshooting will be difficult.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added Stale and removed Stale labels Feb 15, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added Stale and removed Stale labels Feb 26, 2024
Copy link
Contributor

github-actions bot commented Mar 5, 2024

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added Stale and removed Stale labels Mar 5, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Mar 13, 2024
@github-actions github-actions bot removed the Stale label Mar 19, 2024
@vishweshbankwar
Copy link
Member

@srprash @atshaw43 @ppittle - Could you please review?

@utpilla
Copy link
Contributor

utpilla commented Mar 20, 2024

Attempt to move the ServerCertificateValidtion Classes to the Shared folder. This use case is very generic and has potential to be used for multiple ResourceDetector Projects. It was also intended to be used in the ResourceDetectors.Container Project in #1529.

@srprash @atshaw43 @ppittle This PR intends to move ServerCertificateValidation related code from OpenTelemetry.ResourceDetectors.AWS to src/Shared as that code is a good candidate to be shared by other components as well. If moved to the shared folder, OpenTelemetry.ResourceDetectors.Container would like to use them for #1529. Could you please review this change?

One reservation I have for this is the ideal location for the test cases, as they currently just exist in the ResourceDetectors.AWS.Tests Test project.

I think individual components that end up using the ServerCertificateValidation code can test the functionality in their own test projects.

@utpilla utpilla added the comp:resources.aws Things related to OpenTelemetry.Resources.AWS label Mar 20, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Mar 27, 2024
{
public static HttpClientHandler? Create(string certificateFile)
public static HttpClientHandler? Create(string certificateFile, IServerCertificateValidationEventSource? log = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging wasn't really optional before; I'm thinking log should be a required parameter.

I don't want future maintainers to think that log is optional, unless there is a clear (and documented) usecase as to when it doesn't need to be provided.

@github-actions github-actions bot removed the Stale label Mar 28, 2024
Copy link
Contributor

github-actions bot commented Apr 4, 2024

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added Stale and removed Stale labels Apr 4, 2024
@joegoldman2
Copy link
Contributor

As @anoopbabu29 is not really active, I'm ready to help on this PR (especially to unblock #1562/#1529). If it's ok for you, you can close this PR and I'll open a new one then.

@Kielek
Copy link
Contributor

Kielek commented Apr 8, 2024

Closing, per #1550 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:resources.aws Things related to OpenTelemetry.Resources.AWS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants