Skip to content
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
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
"version": "2026.2.0.2",
"version": "2026.2.1",
"commands": [
"jb"
],
Expand All @@ -17,7 +17,7 @@
"rollForward": false
},
"dotnet-coverage": {
"version": "18.9.0",
"version": "18.11.0",
"commands": [
"dotnet-coverage"
],
Expand Down
3 changes: 2 additions & 1 deletion Steeltoe.Debug.ruleset
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Steeltoe Debug" Description="Code quality rules for Steeltoe debug builds" ToolsVersion="17.0">
<RuleSet Name="Steeltoe Debug" Description="Code quality rules for Steeltoe debug builds" ToolsVersion="18.0">
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.NetAnalyzers" RuleNamespace="Microsoft.CodeAnalysis.CSharp.NetAnalyzers">
<Rule Id="CA1865" Action="Warning" />
<Rule Id="CA1866" Action="Warning" />
Expand Down Expand Up @@ -128,6 +128,7 @@
<Rule Id="S6798" Action="None" />
<Rule Id="S6800" Action="None" />
<Rule Id="S881" Action="Warning" />
<Rule Id="S8969" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1000" Action="None" />
Expand Down
3 changes: 2 additions & 1 deletion Steeltoe.Release.ruleset
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Steeltoe Release" Description="Code quality rules for Steeltoe release builds" ToolsVersion="17.0">
<RuleSet Name="Steeltoe Release" Description="Code quality rules for Steeltoe release builds" ToolsVersion="18.0">
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.NetAnalyzers" RuleNamespace="Microsoft.CodeAnalysis.CSharp.NetAnalyzers">
<Rule Id="CA1865" Action="Warning" />
<Rule Id="CA1866" Action="Warning" />
Expand Down Expand Up @@ -113,6 +113,7 @@
<Rule Id="S6798" Action="None" />
<Rule Id="S6800" Action="None" />
<Rule Id="S881" Action="Warning" />
<Rule Id="S8969" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1000" Action="None" />
Expand Down
4 changes: 2 additions & 2 deletions shared-test.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<PackageReference Include="coverlet.collector" Version="$(CoverletVersion)" PrivateAssets="All" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="$(MatchTargetFrameworkVersion)" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="$(FoundationalVersion)" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="$(TimeProviderTestingVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="NSubstitute" Version="$(NSubstituteVersion)" />
<PackageReference Include="xunit.v3" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVisualStudioVersion)" />
<PackageReference Include="xunit.v3" Version="$(XunitVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="$(MatchTargetFrameworkVersion)" />
<PackageReference Include="MongoDB.Driver" Version="$(MongoDbDriverVersion)" />
<PackageReference Include="MySqlConnector" Version="$(MySqlConnectorVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageReference Include="Npgsql" Version="$(EntityFrameworkCoreTestVersion)" />
<PackageReference Include="RabbitMQ.Client" Version="$(RabbitClientTestVersion)" />
</ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/Common/src/Hosting/HostBuilderWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ public void ConfigureLogging(Action<HostBuilderContextWrapper, ILoggingBuilder>
}
else
{
#pragma warning disable S4792 // Configuring loggers is security-sensitive
_configureServicesActions.Add((contextWrapper, collection) => collection.AddLogging(builder => configureAction(contextWrapper, builder)));
#pragma warning restore S4792 // Configuring loggers is security-sensitive
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/Common/src/Logging/BootstrapLoggerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ public sealed class BootstrapLoggerFactory : ILoggerFactory
private static readonly Action<ILoggingBuilder> ConfigureConsole = loggingBuilder =>
{
loggingBuilder.SetMinimumLevel(LogLevel.Trace);
#pragma warning disable S4792 // Configuring loggers is security-sensitive
loggingBuilder.AddConsole(options => options.MaxQueueLength = 1);
#pragma warning restore S4792 // Configuring loggers is security-sensitive

var appSettings = new Dictionary<string, string?>
{
Expand Down Expand Up @@ -81,9 +79,7 @@ public static BootstrapLoggerFactory CreateEmpty(Action<ILoggingBuilder> configu
{
ArgumentNullException.ThrowIfNull(configure);

#pragma warning disable S4792 // Configuring loggers is security-sensitive
return new BootstrapLoggerFactory(configure);
#pragma warning restore S4792 // Configuring loggers is security-sensitive
}

/// <inheritdoc />
Expand Down
2 changes: 2 additions & 0 deletions src/Connectors/src/Connectors/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,5 @@ Steeltoe.Connectors.SqlServer.SqlServerHostApplicationBuilderExtensions
Steeltoe.Connectors.SqlServer.SqlServerOptions
Steeltoe.Connectors.SqlServer.SqlServerOptions.SqlServerOptions() -> void
Steeltoe.Connectors.SqlServer.SqlServerServiceCollectionExtensions
virtual Steeltoe.Connectors.ConnectorCreateConnection.Invoke(System.IServiceProvider! serviceProvider, string! serviceBindingName) -> object!
virtual Steeltoe.Connectors.ConnectorCreateHealthContributor.Invoke(System.IServiceProvider! serviceProvider, string! serviceBindingName) -> Steeltoe.Common.HealthChecks.IHealthContributor!
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ public async Task PostgreSQL_Not_Connected_Returns_Down_Status()
result.Description.Should().Be("PostgreSQL health check failed");
result.Details.Should().Contain("host", "localhost");
result.Details.Should().Contain("service", "Example");
result.Details.Should().ContainKey("error").WhoseValue.As<string>().Should().StartWith("NpgsqlException: ");

string errorMessage = result.Details.Should().ContainKey("error").WhoseValue.As<string>();

errorMessage.Should().Match(error =>
error.StartsWith("NpgsqlException: Failed to connect", StringComparison.Ordinal) ||
error.StartsWith("TimeoutException: ", StringComparison.Ordinal));
}

[Fact(Skip = "Integration test - Requires local PostgreSQL server")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
</PropertyGroup>
Expand All @@ -7,15 +7,16 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Cosmos" Version="$(MicrosoftAzureCosmosVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemSqlClientVersion)" />
<PackageReference Include="System.Text.Json" Version="$(FoundationalVersion)" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="$(MicrosoftSqlClientVersion)" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="$(MatchTargetFrameworkVersion)" />
<PackageReference Include="MongoDB.Driver" Version="$(MongoDbDriverVersion)" />
<PackageReference Include="MySqlConnector" Version="$(MySqlConnectorVersion)" />
<PackageReference Include="MySql.Data" Version="$(MySqlDataVersion)" />
<PackageReference Include="MySqlConnector" Version="$(MySqlConnectorVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageReference Include="Npgsql" Version="$(EntityFrameworkCoreTestVersion)" />
<PackageReference Include="RabbitMQ.Client" Version="$(RabbitClientTestVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemSqlClientVersion)" />
<PackageReference Include="System.Text.Json" Version="$(FoundationalVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EntityFrameworkCoreTestVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(EntityFrameworkCoreTestVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="$(EntityFrameworkCoreTestVersion)" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(EntityFrameworkCoreTestVersion)" />
<PackageReference Include="Microting.EntityFrameworkCore.MySql" Condition="'$(TargetFramework)' != 'net9.0' And '$(TargetFramework)' != 'net8.0'" Version="$(EntityFrameworkCoreTestVersion)" />
<PackageReference Include="MySql.EntityFrameworkCore" Version="$(EntityFrameworkCoreTestVersion)" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(EntityFrameworkCoreTestVersion)" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Condition="'$(TargetFramework)' == 'net9.0' Or '$(TargetFramework)' == 'net8.0'" Version="$(EntityFrameworkCoreTestVersion)" />
<PackageReference Include="System.Text.Json" Version="$(FoundationalVersion)" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Logging/src/Abstractions/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ Steeltoe.Logging.MessageProcessingLogger.MessageProcessors.get -> System.Collect
virtual Steeltoe.Logging.DynamicLoggerProvider.CreateMessageProcessingLogger(string! categoryName) -> Steeltoe.Logging.MessageProcessingLogger!
virtual Steeltoe.Logging.DynamicLoggerProvider.Dispose(bool disposing) -> void
virtual Steeltoe.Logging.MessageProcessingLogger.Log<TState>(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception? exception, System.Func<TState, System.Exception?, string!>! formatter) -> void
virtual Steeltoe.Logging.LoggerFilter.Invoke(Microsoft.Extensions.Logging.LogLevel level) -> bool
2 changes: 0 additions & 2 deletions src/Logging/src/DynamicConsole/LoggingBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ private static void EnsureConsoleLoggingIsRegistered(ILoggingBuilder builder)
{
if (builder.Services.All(descriptor => descriptor.SafeGetImplementationType() != typeof(ConsoleLoggerProvider)))
{
#pragma warning disable S4792 // Configuring loggers is security-sensitive
builder.AddConsole();
#pragma warning restore S4792 // Configuring loggers is security-sensitive
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/Logging/src/DynamicSerilog/SerilogOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ internal void SetSerilogOptions(IConfiguration configuration)
MinimumLevel.Default = defaultLevel;
}

#pragma warning disable S4792 // Configuring loggers is security-sensitive
_serilogConfiguration = new LoggerConfiguration().ReadFrom.Configuration(configuration).ClearLevels(MinimumLevel);
#pragma warning restore S4792 // Configuring loggers is security-sensitive
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<Import Project="..\..\..\..\shared.props" />

<ItemGroup>
<PackageReference Include="Serilog.Extensions.Logging" Version="$(SerilogVersion)" />
<PackageReference Include="Serilog.Settings.Configuration" Version="$(SerilogVersion)" />
<PackageReference Include="Serilog.Extensions.Logging" Version="$(SerilogExtensionsLoggingVersion)" />
<PackageReference Include="Serilog.Settings.Configuration" Version="$(SerilogSettingsConfigurationVersion)" />
<PackageReference Include="Serilog.Sinks.Console" Version="$(SerilogSinksConsoleVersion)" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ public static IServiceCollection AddLoggersActuator(this IServiceCollection serv
{
ArgumentNullException.ThrowIfNull(services);

#pragma warning disable S4792 // Configuring loggers is security-sensitive
services.AddLogging(loggingBuilder => loggingBuilder.AddDynamicConsole());
#pragma warning restore S4792 // Configuring loggers is security-sensitive

services.AddCoreActuatorServices<LoggersEndpointOptions, ConfigureLoggersEndpointOptions, LoggersEndpointMiddleware, ILoggersEndpointHandler,
LoggersEndpointHandler, LoggersRequest, LoggersResponse?>(configureMiddleware);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ public static class CoreActuatorServiceCollectionExtensions

private static void AddCommonActuatorServices(IServiceCollection services, bool configureMiddleware)
{
#pragma warning disable S4792 // Configuring loggers is security-sensitive
services.AddLogging();
#pragma warning restore S4792 // Configuring loggers is security-sensitive

services.AddRouting();
services.TryAddSingleton<ActuatorRouteMapper>();
services.TryAddSingleton<ActuatorEndpointMapper>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ public static IServiceCollection AddTracingLogProcessor(this IServiceCollection
ArgumentNullException.ThrowIfNull(services);

services.AddApplicationInstanceInfo();
#pragma warning disable S4792 // Configuring loggers is security-sensitive
services.AddLogging(loggingBuilder => loggingBuilder.AddDynamicConsole());
#pragma warning restore S4792 // Configuring loggers is security-sensitive
services.TryAddEnumerable(ServiceDescriptor.Singleton<IDynamicMessageProcessor, TracingLogProcessor>());

return services;
Expand Down
29 changes: 16 additions & 13 deletions versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,29 @@
<AspNetCoreHealthChecksVersion>9.0.*</AspNetCoreHealthChecksVersion>
<CoverletVersion>10.0.*</CoverletVersion>
<FluentAssertionsVersion>7.2.*</FluentAssertionsVersion>
<MicrosoftAzureCosmosVersion>3.58.*</MicrosoftAzureCosmosVersion>
<MicrosoftBuildUtilitiesCoreVersion>18.7.*</MicrosoftBuildUtilitiesCoreVersion>
<MicrosoftCodeAnalysisVersion>5.0.*</MicrosoftCodeAnalysisVersion>
<MicrosoftAzureCosmosVersion>3.62.*</MicrosoftAzureCosmosVersion>
<MicrosoftBuildUtilitiesCoreVersion>18.9.*</MicrosoftBuildUtilitiesCoreVersion>
<MicrosoftCodeAnalysisVersion>5.9.*</MicrosoftCodeAnalysisVersion>
<MicrosoftSqlClientVersion>7.0.*</MicrosoftSqlClientVersion>
<MockHttpVersion>7.0.*</MockHttpVersion>
<MongoDbDriverVersion>3.8.*</MongoDbDriverVersion>
<MockHttpVersion>7.1.*</MockHttpVersion>
<MongoDbDriverVersion>3.11.*</MongoDbDriverVersion>
<MySqlConnectorVersion>2.6.*</MySqlConnectorVersion>
<MySqlDataVersion>9.7.*</MySqlDataVersion>
<MySqlDataVersion>26.7.*</MySqlDataVersion>
<NewtonsoftJsonVersion>13.0.*</NewtonsoftJsonVersion>
<NSubstituteVersion>6.2.*</NSubstituteVersion>
<PublicApiAnalyzersVersion>3.3.*</PublicApiAnalyzersVersion>
<PublicApiAnalyzersVersion>5.6.*</PublicApiAnalyzersVersion>
<RabbitClientTestVersion>7.2.*</RabbitClientTestVersion>
<SerilogEnrichersThreadVersion>4.0.*</SerilogEnrichersThreadVersion>
<SerilogExceptionsVersion>8.4.*</SerilogExceptionsVersion>
<SonarAnalyzerVersion>10.25.0.139117</SonarAnalyzerVersion>
<SonarAnalyzerVersion>10.33.0.1635</SonarAnalyzerVersion>
<StyleCopVersion>1.2.0-beta.556</StyleCopVersion>
<SystemCommandLineVersion>2.0.*</SystemCommandLineVersion>
<SystemIdentityModelVersion>8.15.*</SystemIdentityModelVersion>
<SystemIdentityModelVersion>8.22.*</SystemIdentityModelVersion>
<SystemSqlClientVersion>4.9.*</SystemSqlClientVersion>
<TestSdkVersion>18.5.*</TestSdkVersion>
<TestSdkVersion>18.9.*</TestSdkVersion>
<TimeProviderTestingVersion>10.9.*</TimeProviderTestingVersion>
<XunitVersion>3.2.*</XunitVersion>
<XunitVisualStudioVersion>3.1.*</XunitVisualStudioVersion>
<XunitVisualStudioVersion>4.0.*</XunitVisualStudioVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
Expand All @@ -53,7 +54,7 @@
-->

<BouncyCastleVersion>2.2.*</BouncyCastleVersion>
<ConsulVersion>1.7.14.*</ConsulVersion>
<ConsulVersion>1.8.*</ConsulVersion>
<DotnetGCDumpVersion>9.0.652701</DotnetGCDumpVersion>
<EntityFrameworkCoreVersion>8.0.*</EntityFrameworkCoreVersion>
<FoundationalVersion>
Expand All @@ -67,8 +68,10 @@
<MicrosoftDiagnosticsTracingTraceEventVersion>3.1.23</MicrosoftDiagnosticsTracingTraceEventVersion>
<OpenTelemetryExporterPrometheusVersion>1.15.*-*</OpenTelemetryExporterPrometheusVersion>
<OpenTelemetryVersion>1.15.*</OpenTelemetryVersion>
<SerilogVersion>9.0.*</SerilogVersion>
<SerilogExtensionsLoggingVersion>10.0.*</SerilogExtensionsLoggingVersion>
<SerilogSettingsConfigurationVersion>10.0.*</SerilogSettingsConfigurationVersion>
<SerilogSinksConsoleVersion>6.1.*</SerilogSinksConsoleVersion>
<SerilogVersion>9.0.*</SerilogVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
Expand Down
Loading