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

[repo] Fix netcoreapp3.1 tests failing in CI #827

Merged
merged 14 commits into from
Dec 15, 2022

Conversation

CodeBlanch
Copy link
Member

@CodeBlanch CodeBlanch commented Dec 14, 2022

Additional changes:

  • Adds a global.json requiring .NET 7.0.101.
  • Updates code analysis rules for .NET 7 SDK + fixes for warnings that started to fire as a result.
  • Redis integration tests now build on .NET 7 SDK but run against target SDKs. Better mirrors how things actual work!

@CodeBlanch CodeBlanch requested a review from a team December 14, 2022 22:37
@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Merging #827 (ad7b128) into main (9e43648) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head ad7b128 differs from pull request most recent head 3ce3dd5. Consider uploading reports for the commit 3ce3dd5 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #827   +/-   ##
=======================================
  Coverage   77.87%   77.88%           
=======================================
  Files         176      176           
  Lines        5301     5303    +2     
=======================================
+ Hits         4128     4130    +2     
  Misses       1173     1173           
Impacted Files Coverage Δ
...er.Geneva/MsgPackExporter/MessagePackSerializer.cs 89.36% <ø> (ø)
...ons/Internal/ActivityEventAttachingLogProcessor.cs 93.33% <ø> (ø)
...ons/Internal/OpenTelemetryExtensionsEventSource.cs 50.00% <ø> (ø)
...xporter.Geneva/Internal/ConnectionStringBuilder.cs 95.83% <100.00%> (ø)
...entation.Process/MeterProviderBuilderExtensions.cs 100.00% <100.00%> (ø)
...elemetry.Instrumentation.Process/ProcessMetrics.cs 100.00% <100.00%> (ø)

@@ -89,6 +91,11 @@ public ProcessMetrics(ProcessInstrumentationOptions options)
description: "Process threads count.");
}

public void Dispose()
{
this.meterInstance.Dispose();
Copy link
Contributor

@utpilla utpilla Dec 15, 2022

Choose a reason for hiding this comment

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

I'm not sure if it's safe to do this in a scenario where you have multiple Sdks each with an instance of ProcessMetrics added since they would be using the same Meter name (even though each instance of ProcessMetrics would create a new instance of Meter).

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a test and yes, it does appear to be an issue 😭 Going to disable the test for now. I think multiple provider case is rare so it isn't super urgent that we fix this. But I'm going to spin up an issue and work with @Yun-Ting on it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Opened #831

@@ -40,7 +40,7 @@ public void AutoFlushActivityProcessor_FlushAfterLocalServerSideRootSpans_EndMat

using var source = new ActivitySource(sourceName);
using var activity = source.StartActivity("name", ActivityKind.Server);
activity.Dispose();
activity.Stop();
Copy link
Member Author

Choose a reason for hiding this comment

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

@utpilla FYI this change didn't help, but bumping the version of Moq actually seems to have finally stabilized this test. I looked through the CHANGELOG but nothing jumped out at me as an obvious fix 🤷

Relates to #814

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants