Skip to content

Commit

Permalink
Upgrade to .NET 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenBond committed Feb 9, 2024
1 parent 9b9a87e commit 37d4d25
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
<PackageProjectUrl>https://github.com/OrleansContrib/OrleansDashboard</PackageProjectUrl>
<PackageTags>orleans dashboard metrics monitor</PackageTags>
<RepositoryUrl>https://github.com/OrleansContrib/OrleansDashboard</RepositoryUrl>
<Version>7.2.2</Version>
<Version>8.0.0</Version>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions OrleansDashboard.Core/Model/StatCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace OrleansDashboard.Model
{
[GenerateSerializer]
[Immutable]
public readonly struct StatCounter
{
[Id(0)]
Expand Down
6 changes: 3 additions & 3 deletions OrleansDashboard.Core/OrleansDashboard.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>OrleansDashboard</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Runtime" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Runtime" Version="8.0.0" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="8.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>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion OrleansDashboard/BasicAuthMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ internal sealed class BasicAuthMiddleware
private const string BasicAuthorizationPrefix = "Basic ";
private readonly RequestDelegate next;
private readonly DashboardOptions options;
internal static readonly string[] WWWAuthenticateHeaderValue = ["Basic realm=\"OrleansDashboard\""];

public BasicAuthMiddleware(RequestDelegate next, IOptions<DashboardOptions> options)
{
Expand Down Expand Up @@ -42,7 +43,7 @@ public Task Invoke(HttpContext context)

context.Response.StatusCode = StatusCodes.Status401Unauthorized;
context.Response.HttpContext.Features.Get<IHttpResponseFeature>().ReasonPhrase = ReasonPhrases.GetReasonPhrase(context.Response.StatusCode);
context.Response.Headers.Add(HeaderNames.WWWAuthenticate, new[] { "Basic realm=\"OrleansDashboard\"" });
context.Response.Headers[HeaderNames.WWWAuthenticate] = WWWAuthenticateHeaderValue;

return Task.CompletedTask;
}
Expand Down
8 changes: 4 additions & 4 deletions OrleansDashboard/OrleansDashboard.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
Expand All @@ -25,9 +25,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Reminders" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="7.2.0" />
<PackageReference Include="OpenTelemetry" Version="1.5.1" />
<PackageReference Include="Microsoft.Orleans.Reminders" Version="8.0.0" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="8.0.0" />
<PackageReference Include="OpenTelemetry" Version="1.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion OrleansDashboard/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -75,7 +76,7 @@ public static class ServiceCollectionExtensions
else
{
// Make sure there is a leading slash
if (!basePath.StartsWith("/"))
if (!basePath.StartsWith('/'))
{
basePath = $"/{options.BasePath}";
}
Expand Down
2 changes: 1 addition & 1 deletion OrleansDashboard/SiloGrainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private async Task CollectStatistics(bool canDeactivate)
{
var siloAddress = SiloAddress.FromParsableString(this.GetPrimaryKeyString());

var results = (await managementGrain.GetRuntimeStatistics(new[] {siloAddress})).FirstOrDefault();
var results = (await managementGrain.GetRuntimeStatistics([siloAddress])).FirstOrDefault();

statistics.Enqueue(results);

Expand Down
5 changes: 3 additions & 2 deletions Tests/PerformanceTests/PerformanceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Tests/TestGrains/TestGrains.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Core" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Reminders" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Core" Version="8.0.0" />
<PackageReference Include="Microsoft.Orleans.Reminders" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Tests/TestHosts/TestHost/TestHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Client" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Persistence.Memory" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Client" Version="8.0.0" />
<PackageReference Include="Microsoft.Orleans.Persistence.Memory" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Tests/TestHosts/TestHostCohosted2/TestHostCohosted2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Client" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Persistence.Memory" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Client" Version="8.0.0" />
<PackageReference Include="Microsoft.Orleans.Persistence.Memory" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Tests/TestHosts/TestHostSeparate/TestHostSeparate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Client" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Persistence.Memory" Version="7.2.0" />
<PackageReference Include="Microsoft.Orleans.Client" Version="8.0.0" />
<PackageReference Include="Microsoft.Orleans.Persistence.Memory" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions Tests/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="Microsoft.Orleans.TestingHost" Version="7.2.0" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.Orleans.TestingHost" Version="8.0.0" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 37d4d25

Please sign in to comment.