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

Remove project names #4532

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions scripts/SlngenReferencing.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

<#
.SYNOPSIS
Create solution file that contains all packages referencing mentioned keywords.
Creates a solution file that contains all the packages referencing specific keywords.
.DESCRIPTION
This script will help you when changing public API of the package and would like to adjust all internal R9 usages.
It will generate a solution file with all packages that references a project matching given keywords.
This script will generate a solution file with all the packages that reference a project matching given keywords.
.EXAMPLE
PS> .\SlngenReferencing.ps1 AsyncState
#>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal static class FakeSslCertificateFactory
public static X509Certificate2 CreateSslCertificate()
{
var request = new CertificateRequest(
new X500DistinguishedName("CN=r9-self-signed-unit-test-certificate"),
new X500DistinguishedName("CN=dotnet-extensions-self-signed-unit-test-certificate"),
_rsa,
HashAlgorithmName.SHA256,
RSASignaturePadding.Pkcs1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static class TelemetryConstants
/// <summary>
/// Request metadata key that is used when storing request metadata object.
/// </summary>
public const string RequestMetadataKey = "R9-RequestMetadata";
public const string RequestMetadataKey = "Extensions-RequestMetadata";
Copy link
Member

Choose a reason for hiding this comment

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

I'm assuming we do want to make this change, yet we do expect this to cause breaks for teams currently depending on this. @geeknoid can you confirm?

Copy link
Member

Choose a reason for hiding this comment

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

This should be fine, it's something teams will have to deal with when upgrading.


/// <summary>
/// Represents the placeholder text for an unknown request name or dependency name in telemetry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@
{
"Member": "const string Microsoft.Extensions.Http.Diagnostics.TelemetryConstants.RequestMetadataKey",
"Stage": "Stable",
"Value": "R9-RequestMetadata"
"Value": "Extensions-RequestMetadata"
},
{
"Member": "const string Microsoft.Extensions.Http.Diagnostics.TelemetryConstants.ServerApplicationNameHeader",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@
{
"Member": "const string Microsoft.Extensions.Http.Diagnostics.TelemetryConstants.RequestMetadataKey",
"Stage": "Stable",
"Value": "R9-RequestMetadata"
"Value": "Extensions-RequestMetadata"
},
{
"Member": "const string Microsoft.Extensions.Http.Diagnostics.TelemetryConstants.ServerApplicationNameHeader",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public class EmitterTests
},
new ReportedMetricMethod
{
MetricName = "R9\\Test\\MemoryUsage",
MetricName = "Test\\MemoryUsage",
Summary = "MemoryUsage summary.",
Kind = InstrumentKind.Gauge,
Dimensions = new() { "Path"},
DimensionsDescriptions = new Dictionary<string, string>
{
{ "Path", "R9\\Test\\Description\\Path" }
{ "Path", "Test\\Description\\Path" }
},
}
}
Expand Down Expand Up @@ -166,11 +166,11 @@ public void EmitterShouldOutputInJSONFormat()
newLine + " \"InstrumentName\": \"Counter\"" +
newLine + " }," +
newLine + " {" +
newLine + " \"MetricName\": \"R9\\\\Test\\\\MemoryUsage\"," +
newLine + " \"MetricName\": \"Test\\\\MemoryUsage\"," +
newLine + " \"MetricDescription\": \"MemoryUsage summary.\"," +
newLine + " \"InstrumentName\": \"Gauge\"," +
newLine + " \"Dimensions\": {" +
newLine + " \"Path\": \"R9\\\\Test\\\\Description\\\\Path\"" +
newLine + " \"Path\": \"Test\\\\Description\\\\Path\"" +
newLine + " }" +
newLine + " }" +
newLine + " ]" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void Create_CreatesCertificate()
{
using var certificate = FakeSslCertificateFactory.CreateSslCertificate();

Assert.Equal("CN=r9-self-signed-unit-test-certificate", certificate.SubjectName.Name);
Assert.Equal("CN=dotnet-extensions-self-signed-unit-test-certificate", certificate.SubjectName.Name);
Assert.Equal("localhost", certificate.GetNameInfo(X509NameType.DnsFromAlternativeName, false));
Assert.True(DateTime.Now > certificate.NotBefore + TimeSpan.FromHours(1));
Assert.True(DateTime.Now < certificate.NotAfter - TimeSpan.FromHours(1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void RequestMetadata_ParameterizedConsrtuctor_HasProvidedValues()
[Fact]
public void Ensure_TelemetryConstantValuesAreNotChanged()
{
Assert.Equal("R9-RequestMetadata", TelemetryConstants.RequestMetadataKey);
Assert.Equal("Extensions-RequestMetadata", TelemetryConstants.RequestMetadataKey);
Assert.Equal("unknown", TelemetryConstants.Unknown);
Assert.Equal("REDACTED", TelemetryConstants.Redacted);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void Adding_Linux_Resource_Utilization_With_Section_Registers_SnapshotPro
Assert.Equal(104_767_488UL, provider.Resources.MaximumMemoryInBytes); // meminfo * 1024
}

[ConditionalFact(Skip = "Flaky test, see https://github.com/dotnet/r9/issues/406")]
[ConditionalFact(Skip = "Flaky test, see https://github.com/dotnet/extensions/issues/3997")]
[OSSkipCondition(OperatingSystems.Windows | OperatingSystems.MacOSX, SkipReason = "Linux specific package.")]
public Task ResourceUtilizationTracker_Reports_The_Same_Values_As_One_Can_Observe_From_Gauges()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public async Task ResourceUtilizationTracker_InitializedProperly_InvokesPublishe
Assert.True(publisherCalled);
}

[Fact(Skip = "Broken test, see https://github.com/dotnet/r9/issues/404")]
[Fact(Skip = "Broken test, see https://github.com/dotnet/extensions/issues/4529")]
public async Task ResourceUtilizationTracker_WhenInitializedWithZeroSnapshots_ReportsHighCpuSpikesThenConvergeInFewCycles()
{
// This test shows that initializing the internal buffer of the tracker with snapshots
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ public async Task HttpLoggingHandler_AllOptionsSendAsyncFailed_LogsRequestInform
Assert.DoesNotContain(logRecordState, kvp => kvp.Key.StartsWith(HttpClientLoggingTagNames.ResponseHeaderPrefix));
}

[Fact(Skip = "Flaky test, see https://github.com/dotnet/r9/issues/372")]
[Fact(Skip = "Flaky test, see https://github.com/dotnet/extensions/issues/4530")]
public async Task HttpLoggingHandler_ReadResponseThrows_LogsException()
{
var requestContent = _fixture.Create<string>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net462' ">
<!-- See https://github.com/dotnet/r9/issues/66 -->
<!-- See https://github.com/dotnet/extensions/issues/4531 -->
<SkipTests>true</SkipTests>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net462' ">
<!-- See https://github.com/dotnet/r9/issues/66 -->
<!-- See https://github.com/dotnet/extensions/issues/4531 -->
<SkipTests>true</SkipTests>
</PropertyGroup>

Expand Down