Skip to content

Commit 8393106

Browse files
committed
fix: Extend Npgsql version coverage to 10.x and update compatibility docs
Test latest 8.x on net8.0/net481 and latest 10.x on net10.0; drop the redundant net471/net48 Postgres fixtures. Cap .NET Framework at npgsql 8.x in the compatibility doc (npgsql 9+ dropped .NET Framework support) and pin the Dotty framework TFM accordingly.
1 parent cf19fcf commit 8393106

13 files changed

Lines changed: 16 additions & 135 deletions

File tree

build/CompatibilityDocs/compatibility.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ categories:
203203
minVersion: "4.0.0"
204204
notes:
205205
- { type: freeform, text: "Prior versions of Npgsql may also be instrumented, but duplicate and/or missing metrics are possible." }
206+
- { type: freeform, text: "Npgsql 9.0 and later dropped .NET Framework support; on .NET Framework the agent supports Npgsql 8.x and earlier.", tabs: [framework] }
206207

207208
- name: ServiceStack.Redis
208209
packages:

build/Dotty/packageInfo.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@
160160
{
161161
"packageName": "nlog.extensions.logging"
162162
},
163+
{
164+
"packageName": "npgsql",
165+
"ignoreTFMs": "net481",
166+
"ignoreReason": "net481 (.NET Framework) is capped at npgsql 8.x; npgsql 9+ dropped .NET Framework support."
167+
},
163168
{
164169
"packageName": "nservicebus",
165170
"ignoreTFMs": "net481",

docs/net-agent-compatibility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The .NET agent automatically instruments the performance of .NET application cal
3232
| MySQL | [MySql.Data](https://www.nuget.org/packages/MySql.Data/) | 6.10.7 – 9.7.0 || <ul><li>Versions 9.7.0+ supported since agent v10.51.1.</li></ul> |
3333
| MySQL | [MySqlConnector](https://www.nuget.org/packages/MySqlConnector/) | 1.0.1 – 2.5.0 || |
3434
| Oracle | [Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core/) | 23.4.0 – 23.26.200 || <ul><li>Older versions may be instrumented but are not tested or supported.</li></ul> |
35-
| PostgreSQL | [Npgsql](https://www.nuget.org/packages/Npgsql/) | 4.0.0 – 7.0.7 || <ul><li>Prior versions of Npgsql may also be instrumented, but duplicate and/or missing metrics are possible.</li></ul> |
35+
| PostgreSQL | [Npgsql](https://www.nuget.org/packages/Npgsql/) | 4.0.0 – 10.0.3 || <ul><li>Prior versions of Npgsql may also be instrumented, but duplicate and/or missing metrics are possible.</li></ul> |
3636
| StackExchange.Redis | [StackExchange.Redis](https://www.nuget.org/packages/StackExchange.Redis/) | 1.0.488 – 2.13.17 || <ul><li>The strong-named `StackExchange.Redis.StrongName` package is also instrumented.</li></ul> |
3737
| Elasticsearch | [Elastic.Clients.Elasticsearch](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch/) | 8.0.0 – 9.0.7 || <ul><li>Versions 8.10.0+ supported since agent v10.20.1.</li><li>Versions 8.12.1+ supported since agent v10.23.0.</li><li>Versions later than 8.15.10 are supported only when [OpenTelemetry API support](https://docs.newrelic.com/docs/apm/agents/manage-apm-agents/opentelemetry-api-support/) is enabled.</li></ul> |
3838
| Elasticsearch | [NEST](https://www.nuget.org/packages/NEST/) | 7.0.0 – 7.17.5 || |
@@ -141,7 +141,7 @@ The .NET agent automatically instruments the performance of .NET application cal
141141
| MySQL | [MySql.Data](https://www.nuget.org/packages/MySql.Data/) | 6.10.7 – 9.7.0 || <ul><li>Versions 9.7.0+ supported since agent v10.51.1.</li></ul> |
142142
| MySQL | [MySqlConnector](https://www.nuget.org/packages/MySqlConnector/) | 1.0.1 – 2.5.0 || |
143143
| Oracle | [Oracle.ManagedDataAccess](https://www.nuget.org/packages/Oracle.ManagedDataAccess/) | 12.1.2400 – 23.26.200 || |
144-
| PostgreSQL | [Npgsql](https://www.nuget.org/packages/Npgsql/) | 4.0.0 – 7.0.7 || <ul><li>Prior versions of Npgsql may also be instrumented, but duplicate and/or missing metrics are possible.</li></ul> |
144+
| PostgreSQL | [Npgsql](https://www.nuget.org/packages/Npgsql/) | 4.0.0 – 8.0.9 || <ul><li>Prior versions of Npgsql may also be instrumented, but duplicate and/or missing metrics are possible.</li><li>Npgsql 9.0 and later dropped .NET Framework support; on .NET Framework the agent supports Npgsql 8.x and earlier.</li></ul> |
145145
| ServiceStack.Redis | [ServiceStack.Redis](https://www.nuget.org/packages/ServiceStack.Redis/) | 4.0.40 || <ul><li>Known incompatible versions: 4.0.44 or higher.</li></ul> |
146146
| StackExchange.Redis | [StackExchange.Redis](https://www.nuget.org/packages/StackExchange.Redis/) | 1.0.488 – 2.13.17 || <ul><li>The strong-named `StackExchange.Redis.StrongName` package is also instrumented.</li></ul> |
147147
| Elasticsearch | [Elastic.Clients.Elasticsearch](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch/) | 8.0.0 – 8.18.3 || <ul><li>Versions 8.10.0+ supported since agent v10.20.1.</li><li>Versions 8.12.1+ supported since agent v10.23.0.</li><li>Versions later than 8.15.10 are supported only when [OpenTelemetry API support](https://docs.newrelic.com/docs/apm/agents/manage-apm-agents/opentelemetry-api-support/) is enabled.</li></ul> |

tests/Agent/IntegrationTests/SharedApplications/Common/MFALatestPackages/MFALatestPackages.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
<PackageReference Include="NLog" Version="6.1.3" Condition="'$(TargetFramework)' == 'net10.0'" />
6161
<PackageReference Include="NLog.Extensions.Logging" Version="6.1.3" Condition="'$(TargetFramework)' == 'net481'" />
6262
<PackageReference Include="NLog.Extensions.Logging" Version="6.1.3" Condition="'$(TargetFramework)' == 'net10.0'" />
63-
<!-- npgsql 8.x is the last major with a netstandard2.0 target, so it is usable from both net481 and net10.0. v9+ dropped .NET Framework support. -->
63+
<!-- net481 (.NET Framework) is capped at npgsql 8.x, the last major with a netstandard2.0 target; npgsql 9+ dropped .NET Framework support. net10.0 tests the latest 10.x. -->
6464
<PackageReference Include="npgsql" Version="8.0.9" Condition="'$(TargetFramework)' == 'net481'" />
65-
<PackageReference Include="npgsql" Version="8.0.9" Condition="'$(TargetFramework)' == 'net10.0'" />
65+
<PackageReference Include="npgsql" Version="10.0.3" Condition="'$(TargetFramework)' == 'net10.0'" />
6666
<!-- NServiceBus v9+ only supports .NET8+, so constrain FW target to the latest 8.x version -->
6767
<PackageReference Include="NServiceBus" Version="8.2.4" Condition="'$(TargetFramework)' == 'net481'" />
6868
<PackageReference Include="NServiceBus" Version="10.2.5" Condition="'$(TargetFramework)' == 'net10.0'" />

tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/MultiFunctionApplicationHelpers.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<PackageReference Include="npgsql" Version="5.0.18" Condition="'$(TargetFramework)' == 'net471'" />
3434
<PackageReference Include="npgsql" Version="6.0.11" Condition="'$(TargetFramework)' == 'net48'" />
3535

36-
<!-- Postgres SQL .NET core references -->
37-
<PackageReference Include="npgsql" Version="4.1.13" Condition="'$(TargetFramework)' == 'net8.0'" />
36+
<!-- Postgres SQL .NET core references - net8.0 tests the latest 8.x; net10.0 (latest 10.x) is pinned in MFALatestPackages.csproj -->
37+
<PackageReference Include="npgsql" Version="8.0.9" Condition="'$(TargetFramework)' == 'net8.0'" />
3838

3939
<!--Microsoft.Data.SqlClient-->
4040
<PackageReference Include="Microsoft.Data.SqlClient" Version="1.0.19239.1" Condition="'$(TargetFramework)' == 'net462'" />

tests/Agent/IntegrationTests/UnboundedIntegrationTests/Postgres/PostgresExecuteScalarAsyncTests.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,22 +131,6 @@ public PostgresSqlExecuteScalarAsyncTestsFW462(ConsoleDynamicMethodFixtureFW462
131131
}
132132
}
133133

134-
public class PostgresSqlExecuteScalarAsyncTestsFW471 : PostgresSqlExecuteScalarAsyncTestsBase<ConsoleDynamicMethodFixtureFW471>
135-
{
136-
public PostgresSqlExecuteScalarAsyncTestsFW471(ConsoleDynamicMethodFixtureFW471 fixture, ITestOutputHelper output) : base(fixture, output)
137-
{
138-
139-
}
140-
}
141-
142-
public class PostgresSqlExecuteScalarAsyncTestsFW48 : PostgresSqlExecuteScalarAsyncTestsBase<ConsoleDynamicMethodFixtureFW48>
143-
{
144-
public PostgresSqlExecuteScalarAsyncTestsFW48(ConsoleDynamicMethodFixtureFW48 fixture, ITestOutputHelper output) : base(fixture, output)
145-
{
146-
147-
}
148-
}
149-
150134
public class PostgresSqlExecuteScalarAsyncTestsFWLatest : PostgresSqlExecuteScalarAsyncTestsBase<ConsoleDynamicMethodFixtureFWLatest>
151135
{
152136
public PostgresSqlExecuteScalarAsyncTestsFWLatest(ConsoleDynamicMethodFixtureFWLatest fixture, ITestOutputHelper output) : base(fixture, output)

tests/Agent/IntegrationTests/UnboundedIntegrationTests/Postgres/PostgresExecuteScalarTests.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,6 @@ public PostgresSqlExecuteScalarTestsFW462(ConsoleDynamicMethodFixtureFW462 fixtu
130130
}
131131
}
132132

133-
public class PostgresSqlExecuteScalarTestsFW471 : PostgresSqlExecuteScalarTestsBase<ConsoleDynamicMethodFixtureFW471>
134-
{
135-
public PostgresSqlExecuteScalarTestsFW471(ConsoleDynamicMethodFixtureFW471 fixture, ITestOutputHelper output) : base(fixture, output)
136-
{
137-
138-
}
139-
}
140-
141-
public class PostgresSqlExecuteScalarTestsFW48 : PostgresSqlExecuteScalarTestsBase<ConsoleDynamicMethodFixtureFW48>
142-
{
143-
public PostgresSqlExecuteScalarTestsFW48(ConsoleDynamicMethodFixtureFW48 fixture, ITestOutputHelper output) : base(fixture, output)
144-
{
145-
146-
}
147-
}
148-
149133
public class PostgresSqlExecuteScalarTestsFWLatest : PostgresSqlExecuteScalarTestsBase<ConsoleDynamicMethodFixtureFWLatest>
150134
{
151135
public PostgresSqlExecuteScalarTestsFWLatest(ConsoleDynamicMethodFixtureFWLatest fixture, ITestOutputHelper output) : base(fixture, output)

tests/Agent/IntegrationTests/UnboundedIntegrationTests/Postgres/PostgresIteratorAsyncTests.cs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public abstract class PostgresSqlIteratorAsyncTestsBase<TFixture> : NewRelicInte
2121
// Iterate metrics roll up from NpgsqlDataReader Read/NextResult calls. Through Npgsql 7 the async read
2222
// loop over a single-row result yields 3 (read row, internal NextResult, final read returning false).
2323
// Npgsql 8 refactored the async path so the result-set teardown no longer surfaces through an instrumented
24-
// method, yielding 2; the Latest fixtures (which pin Npgsql 8.x) override this.
24+
// method, yielding 2; fixtures that pin Npgsql 8.x or later override this.
2525
protected virtual int ExpectedIterationCount => 3;
2626

2727
public PostgresSqlIteratorAsyncTestsBase(TFixture fixture, ITestOutputHelper output) : base(fixture)
@@ -110,22 +110,6 @@ public PostgresSqlIteratorAsyncTestsFW462(ConsoleDynamicMethodFixtureFW462 fixtu
110110
}
111111
}
112112

113-
public class PostgresSqlIteratorAsyncTestsFW471 : PostgresSqlIteratorAsyncTestsBase<ConsoleDynamicMethodFixtureFW471>
114-
{
115-
public PostgresSqlIteratorAsyncTestsFW471(ConsoleDynamicMethodFixtureFW471 fixture, ITestOutputHelper output) : base(fixture, output)
116-
{
117-
118-
}
119-
}
120-
121-
public class PostgresSqlIteratorAsyncTestsFW48 : PostgresSqlIteratorAsyncTestsBase<ConsoleDynamicMethodFixtureFW48>
122-
{
123-
public PostgresSqlIteratorAsyncTestsFW48(ConsoleDynamicMethodFixtureFW48 fixture, ITestOutputHelper output) : base(fixture, output)
124-
{
125-
126-
}
127-
}
128-
129113
public class PostgresSqlIteratorAsyncTestsFWLatest : PostgresSqlIteratorAsyncTestsBase<ConsoleDynamicMethodFixtureFWLatest>
130114
{
131115
// Npgsql 8.x async read path yields 2 Iterate rollups instead of 3 (see base class).
@@ -139,6 +123,9 @@ public PostgresSqlIteratorAsyncTestsFWLatest(ConsoleDynamicMethodFixtureFWLatest
139123

140124
public class PostgresSqlIteratorAsyncTestsCoreOldest : PostgresSqlIteratorAsyncTestsBase<ConsoleDynamicMethodFixtureCoreOldest>
141125
{
126+
// Npgsql 8.x async read path yields 2 Iterate rollups instead of 3 (see base class).
127+
protected override int ExpectedIterationCount => 2;
128+
142129
public PostgresSqlIteratorAsyncTestsCoreOldest(ConsoleDynamicMethodFixtureCoreOldest fixture, ITestOutputHelper output) : base(fixture, output)
143130
{
144131

tests/Agent/IntegrationTests/UnboundedIntegrationTests/Postgres/PostgresIteratorTests.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,22 +106,6 @@ public PostgresSqlIteratorTestsFW462(ConsoleDynamicMethodFixtureFW462 fixture, I
106106
}
107107
}
108108

109-
public class PostgresSqlIteratorTestsFW471 : PostgresSqlIteratorTestsBase<ConsoleDynamicMethodFixtureFW471>
110-
{
111-
public PostgresSqlIteratorTestsFW471(ConsoleDynamicMethodFixtureFW471 fixture, ITestOutputHelper output) : base(fixture, output)
112-
{
113-
114-
}
115-
}
116-
117-
public class PostgresSqlIteratorTestsFW48 : PostgresSqlIteratorTestsBase<ConsoleDynamicMethodFixtureFW48>
118-
{
119-
public PostgresSqlIteratorTestsFW48(ConsoleDynamicMethodFixtureFW48 fixture, ITestOutputHelper output) : base(fixture, output)
120-
{
121-
122-
}
123-
}
124-
125109
public class PostgresSqlIteratorTestsFWLatest : PostgresSqlIteratorTestsBase<ConsoleDynamicMethodFixtureFWLatest>
126110
{
127111
public PostgresSqlIteratorTestsFWLatest(ConsoleDynamicMethodFixtureFWLatest fixture, ITestOutputHelper output) : base(fixture, output)

tests/Agent/IntegrationTests/UnboundedIntegrationTests/Postgres/PostgresSimpleQueryAsyncTests.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,6 @@ public PostgresSqlSimpleQueryAsyncTestsFW462(ConsoleDynamicMethodFixtureFW462 fi
130130
}
131131
}
132132

133-
public class PostgresSqlSimpleQueryAsyncTestsFW471 : PostgresSqlSimpleQueryAsyncTestsBase<ConsoleDynamicMethodFixtureFW471>
134-
{
135-
public PostgresSqlSimpleQueryAsyncTestsFW471(ConsoleDynamicMethodFixtureFW471 fixture, ITestOutputHelper output) : base(fixture, output)
136-
{
137-
138-
}
139-
}
140-
141-
public class PostgresSqlSimpleQueryAsyncTestsFW48 : PostgresSqlSimpleQueryAsyncTestsBase<ConsoleDynamicMethodFixtureFW48>
142-
{
143-
public PostgresSqlSimpleQueryAsyncTestsFW48(ConsoleDynamicMethodFixtureFW48 fixture, ITestOutputHelper output) : base(fixture, output)
144-
{
145-
146-
}
147-
}
148-
149133
public class PostgresSqlSimpleQueryAsyncTestsFWLatest : PostgresSqlSimpleQueryAsyncTestsBase<ConsoleDynamicMethodFixtureFWLatest>
150134
{
151135
public PostgresSqlSimpleQueryAsyncTestsFWLatest(ConsoleDynamicMethodFixtureFWLatest fixture, ITestOutputHelper output) : base(fixture, output)

0 commit comments

Comments
 (0)