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

Making sure that Wolverine.HTTP can flush cascading messages when usi… #1189

Merged
merged 2 commits into from
Dec 28, 2024
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
8 changes: 4 additions & 4 deletions build/build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
Target("compile", DependsOn("restore"), () =>
{
Run("dotnet",
"build wolverine.sln --no-restore --framework net8.0");
"build wolverine.sln --no-restore --framework net9.0");
});

Target("clean", () => { Run("dotnet", "clean wolverine.sln --framework net8.0"); });
Target("clean", () => { Run("dotnet", "clean wolverine.sln --framework net9.0"); });

TestTarget("test-core", "CoreTests");
TestTarget("test-policy", "PolicyTests");
Expand Down Expand Up @@ -198,7 +198,7 @@

private static void RunCurrentProject(string args)
{
Run("dotnet", $"run --framework net8.0 --no-build --no-restore -- {args}");
Run("dotnet", $"run --framework net9.0 --no-build --no-restore -- {args}");
}

private static void CopyFilesRecursively(string sourcePath, string targetPath)
Expand Down Expand Up @@ -262,7 +262,7 @@
}


Run("dotnet", "test --no-build --no-restore --logger GitHubActions --framework net8.0 " + path);
Run("dotnet", "test --no-build --no-restore --logger GitHubActions --framework net9.0 " + path);
}

private static string GetEnvironmentVariable(string variableName)
Expand All @@ -279,12 +279,12 @@

Console.WriteLine(val);

return val;

Check warning on line 282 in build/build.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference return.
}

private static string GetFramework()
{
var frameworkName = Assembly.GetEntryAssembly().GetCustomAttribute<TargetFrameworkAttribute>().FrameworkName;

Check warning on line 287 in build/build.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'element' in 'TargetFrameworkAttribute? CustomAttributeExtensions.GetCustomAttribute<TargetFrameworkAttribute>(Assembly element)'.

Check warning on line 287 in build/build.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.
var version = float.Parse(frameworkName.Split('=')[1].Replace("v", ""), InvariantCulture.NumberFormat);

return version < 5.0
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Wolverine.Http.Tests/Wolverine.Http.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Alba" Version="7.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="Npgsql" Version="8.0.6" />
<PackageReference Include="Npgsql" Version="9.0.2" />
<PackageReference Include="Refit" Version="8.0.0" />
<PackageReference Include="Refit.HttpClientFactory" Version="8.0.0" />
<PackageReference Include="xunit" Version="2.9.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Wolverine.Http/HttpChain.Codegen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ internal IEnumerable<Frame> DetermineFrames(GenerationRules rules)
.Select(x => x.ReturnAction(this)).SelectMany(x => x.Frames()).ToArray();
foreach (var frame in actionsOnOtherReturnValues) yield return frame;

if (Postprocessors.Any(x => x.MaySendMessages()))
if (Postprocessors.Concat(actionsOnOtherReturnValues).Any(x => x.MaySendMessages()))
{
var flush = Postprocessors.OfType<FlushOutgoingMessages>().FirstOrDefault();
if (flush != null)
Expand Down
2 changes: 1 addition & 1 deletion src/Persistence/RavenDbTests/RavenDbTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

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

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>

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

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Samples/EFCoreSample/ItemService.Tests/end_to_end.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ await host.Scenario(x =>
x.Post.Json(command).ToUrl("/items/create4");
x.StatusCodeShouldBe(204);
});
});
});

tracked.FindSingleTrackedMessageOfType<ItemCreated>()
.ShouldNotBeNull();
Expand Down
18 changes: 16 additions & 2 deletions src/Samples/EFCoreSample/ItemService/ItemService.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.1"/>
</ItemGroup>

<ItemGroup>
Expand All @@ -11,4 +13,16 @@
<ProjectReference Include="..\..\..\Persistence\Wolverine.SqlServer\Wolverine.SqlServer.csproj"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[7.0.1, 9.0.0)"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.11"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0"/>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Samples/PingPongWithRabbitMq/Pinger/Pinger.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">
<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Transports\RabbitMQ\Wolverine.RabbitMQ\Wolverine.RabbitMQ.csproj"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Samples/PingPongWithRabbitMq/Ponger/Ponger.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Transports/Kafka/BatchMessaging/BatchMessaging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,6 +18,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Alba" Version="8.1.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -33,7 +34,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Alba" Version="8.0.0" />
<PackageReference Include="Alba" Version="8.1.0" />
</ItemGroup>

</Project>
Loading