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
16 changes: 4 additions & 12 deletions .github/workflows/pr-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,14 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Setup .NET 8
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Setup .NET 10
uses: actions/setup-dotnet@v1
with:
dotnet-version: 10.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/publish-nugets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,14 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Setup .NET 8
Comment thread
mpKoczocik marked this conversation as resolved.
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Setup .NET 10
uses: actions/setup-dotnet@v1
with:
dotnet-version: 10.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
14 changes: 7 additions & 7 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@
</PropertyGroup>

<ItemGroup Label="UnitTest project references" Condition="'$(IsUnitTestProject)' == 'true'">
<PackageReference Include="coverlet.msbuild" Version="3.0.2">
<PackageReference Include="coverlet.msbuild" Version="10.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.0.2">
<PackageReference Include="coverlet.collector" Version="10.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>

<PackageReference Include="Moq" Version="4.16.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4"/>
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
<PackageReference Include="FluentAssertions" Version="5.7.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1"/>
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageReference Include="FluentAssertions" Version="7.2.2" />
</ItemGroup>

</Project>
7 changes: 7 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 5.8.0
- Added
- `net10.0` added as an additional target framework across `Ev.ServiceBus`, `Ev.ServiceBus.Abstractions`, `Ev.ServiceBus.Apm`, `Ev.ServiceBus.AsyncApi`, `Ev.ServiceBus.HealthChecks`, `Ev.ServiceBus.Mvc`, and `Ev.ServiceBus.Prometheus`, alongside the existing `net8.0` (and `netstandard2.0`/`netstandard2.1` on the core packages). Non-breaking — existing net8.0 consumers are unaffected.
- Changed
- `Ev.ServiceBus.Mvc` no longer references the legacy `Microsoft.AspNetCore.Mvc.Abstractions`/`Microsoft.AspNetCore.Mvc.Core` 2.2.x NuGet packages — it now uses a `FrameworkReference` to `Microsoft.AspNetCore.App`, matching the ASP.NET Core shared-framework model used since .NET Core 3.0.
- Bumped `Azure.Identity` to 1.17.1 (1.17.0 was deprecated), `Elastic.Apm` to 1.34.5, `AspNetCore.HealthChecks.AzureServiceBus` to 9.0.0.

## 5.7.5
- Fixed
- `ApmTransactionManager` now registers the APM error filter **at construction time** (application startup) instead of lazily inside `OnReceiveCancelled()`. The lazy approach lost a race: during pod graceful shutdown the APM agent flushes its internal buffer concurrently with Service Bus processor teardown, so error events could be sent to APM before `ReceiverWrapper.OnExceptionOccured` ran and had a chance to register the filter. Registering at construction time — before any message processing starts — closes this window.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.3.0"/>
<Sdk Name="Aspire.AppHost.Sdk" Version="13.4.6"/>

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>107e167e-5575-4f6e-8661-fe8d2c335f7a</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.3.0"/>
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.4.6"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireSharedProject>true</IsAspireSharedProject>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<SonarQubeExclude>true</SonarQubeExclude>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<SonarQubeExclude>true</SonarQubeExclude>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net8.0;net10.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>
Expand All @@ -14,7 +14,7 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.17.0" />
<PackageReference Include="Azure.Identity" Version="1.17.1" />
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.20.1" />
</ItemGroup>

Expand All @@ -27,4 +27,7 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.9" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/Ev.ServiceBus.Apm/Ev.ServiceBus.Apm.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>This package helps you add instrumentation to message handling with Elastic APM.</Description>
Expand All @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Elastic.Apm" Version="1.19.0" />
<PackageReference Include="Elastic.Apm" Version="1.34.5" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Ev.ServiceBus.AsyncApi/Ev.ServiceBus.AsyncApi.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>This package helps you generate an Async API Schema.
Expand Down
12 changes: 9 additions & 3 deletions src/Ev.ServiceBus.HealthChecks/Ev.ServiceBus.HealthChecks.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>This package links Ev.ServiceBus and Microsoft.Extensions.Diagnostics.HealthChecks NuGet packages.
Expand All @@ -12,8 +12,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.AzureServiceBus" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.AzureServiceBus" Version="9.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.11" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="10.0.9" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 2 additions & 3 deletions src/Ev.ServiceBus.Mvc/Ev.ServiceBus.Mvc.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>This NuGet contains helpers to better integrate Ev.ServiceBus with Mvc projects.</Description>
Expand All @@ -15,8 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

</Project>
10 changes: 8 additions & 2 deletions src/Ev.ServiceBus.Prometheus/Ev.ServiceBus.Prometheus.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>This package helps you add prometheus meters on top of servicebus messaging.</Description>
Expand All @@ -11,10 +11,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="prometheus-net" Version="8.2.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.9" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Ev.ServiceBus\Ev.ServiceBus.csproj" />
</ItemGroup>
Expand Down
7 changes: 6 additions & 1 deletion src/Ev.ServiceBus/Ev.ServiceBus.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net8.0;net10.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>This is a wrapper around Microsoft Azure Service Bus
Expand Down Expand Up @@ -31,6 +31,11 @@ Its goal to is make it the easiest possible to connect and handle an Azure Servi
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.9" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Ev.ServiceBus.Abstractions\Ev.ServiceBus.Abstractions.csproj" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions tests/Ev.ServiceBus.AsyncApi.UnitTests/DocumentFilterTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Net;
using System.Text.Json;
using System.Threading.Tasks;
using FluentAssertions;
using Microsoft.AspNetCore.Http;
using Xunit;

namespace Ev.ServiceBus.AsyncApi.UnitTests;
Expand All @@ -15,7 +15,7 @@ public async Task CheckStateOfSenderApp()
var client = factory.CreateClient();
var response = await client.GetAsync("/asyncapi/asyncapi.json");

response.StatusCode.Should().Be(StatusCodes.Status200OK);
response.StatusCode.Should().Be(HttpStatusCode.OK);
var json = await response.Content.ReadAsStringAsync();

var actualDoc = JsonDocument.Parse(json);
Expand Down Expand Up @@ -295,7 +295,7 @@ public async Task CheckStateOfReceiverApp()
var factory = new ReceiverAppFactory();
var client = factory.CreateClient();
var response = await client.GetAsync("/asyncapi/asyncapi.json");
response.StatusCode.Should().Be(StatusCodes.Status200OK);
response.StatusCode.Should().Be(HttpStatusCode.OK);

var json = await response.Content.ReadAsStringAsync();
var actualDoc = JsonDocument.Parse(json);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -10,7 +10,10 @@
<ProjectReference Include="..\Ev.ServiceBus.TestHelpers\Ev.ServiceBus.TestHelpers.csproj" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.9" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 deletions tests/Ev.ServiceBus.Mvc.UnitTests/DispatchTest.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Threading;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using Azure.Messaging.ServiceBus;
using Ev.ServiceBus.Samples.Sender;
using Ev.ServiceBus.UnitTests.Helpers;
using FluentAssertions;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.Logging;
Expand All @@ -23,7 +23,7 @@ public async Task EventsAreSentAtTheEndOfTheRequestExecution()
var client = factory.CreateClient();
var response = await client.GetAsync("weatherforecast/pushWeather");

response.StatusCode.Should().Be(StatusCodes.Status200OK);
response.StatusCode.Should().Be(HttpStatusCode.OK);
var queue = factory.Services.GetSenderMock("myqueue");
queue.Mock.Verify(o => o.SendMessagesAsync(It.IsAny<ServiceBusMessageBatch>(), It.IsAny<CancellationToken>()), Times.Once);

Expand All @@ -38,7 +38,7 @@ public async Task FailingRequestsDoNotSendEvents()
var client = factory.CreateClient();
var response = await client.GetAsync("failing/pushWeather");

response.StatusCode.Should().Be(StatusCodes.Status500InternalServerError);
response.StatusCode.Should().Be(HttpStatusCode.InternalServerError);
var queue = factory.Services.GetSenderMock("myqueue");
queue.Mock.Verify(o => o.SendMessagesAsync(It.IsAny<ServiceBusMessage[]>(), It.IsAny<CancellationToken>()), Times.Never);

Expand Down
Loading
Loading