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

Orleans v7 upgrade #37

Merged
merged 4 commits into from
Dec 16, 2022
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Install dotnet-format tool
run: dotnet tool install -g dotnet-format
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Restore dependencies
run: dotnet restore
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Install dotnet-format tool
run: dotnet tool install -g dotnet-format
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Restore dependencies
run: dotnet restore
Expand All @@ -58,4 +58,4 @@ jobs:
run: dotnet pack src/Orleans.SyncWork/Orleans.SyncWork.csproj -c Release --no-restore --no-build --include-symbols -p:SymbolPackageFormat=snupkg -o .

- name: Push to NuGet
run: dotnet nuget push *.nupkg --skip-duplicate -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}
run: dotnet nuget push *.nupkg --skip-duplicate -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}
7 changes: 2 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
dotnet-version: 7.0.x

- name: Restore dependencies
run: dotnet restore
Expand All @@ -36,4 +33,4 @@ jobs:
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/Orleans.SyncWork.Tests/TestResults/coverage.info
path-to-lcov: ./test/Orleans.SyncWork.Tests/TestResults/coverage.info
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Threading.Tasks;
using Orleans.Hosting;
using Orleans.SyncWork.Tests.TestClusters;
using Orleans.SyncWork.Tests.TestClusters;
using Orleans.TestingHost;

namespace Orleans.SyncWork.Demo.Api.Benchmark;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

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

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Server" Version="3.5.1" />
<PackageReference Include="OrleansDashboard" Version="3.6.1" />
<PackageReference Include="Microsoft.Orleans.Server" Version="7.0.0" />
<PackageReference Include="OrleansDashboard" Version="7.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public static ConfigureHostBuilder ConfigureOrleans(this ConfigureHostBuilder bu
options.ServiceId = "HelloWorldApp";
})
.Configure<EndpointOptions>(options => options.AdvertisedIPAddress = IPAddress.Loopback)
.ConfigureApplicationParts(parts =>
parts.AddApplicationPart(typeof(IHelloWorld).Assembly).WithReferences())
.ConfigureSyncWorkAbstraction(maxSyncWorkConcurrency)
.ConfigureLogging(logging => logging.AddConsole())
.ConfigureServices(collection =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@ protected override async Task<PasswordVerifierResult> PerformWork(PasswordVerifi
};
}
}

[GenerateSerializer]
Kritner marked this conversation as resolved.
Show resolved Hide resolved
public class PasswordVerifierRequest
{
[Id(0)]
public string Password { get; set; }
[Id(1)]
public string PasswordHash { get; set; }
}

[GenerateSerializer]
public class PasswordVerifierResult
{
[Id(0)]
public bool IsValid { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>10</LangVersion>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>11</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BCrypt.Net-Next" Version="4.0.2" />
<PackageReference Include="Microsoft.Orleans.Core.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.Orleans.CodeGenerator.MSBuild" Version="3.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@

namespace Orleans.SyncWork.Demo.Services.TestGrains;

[GenerateSerializer]
public class TestGrainException : Exception
{
public TestGrainException(string message) : base(message) { }
}

[GenerateSerializer]
public class TestDelayExceptionRequest
{
[Id(0)]
public int MsDelayPriorToResult { get; set; }
}

[GenerateSerializer]
public class TestDelayExceptionResult
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@

namespace Orleans.SyncWork.Demo.Services.TestGrains;

[GenerateSerializer]
public class TestDelaySuccessRequest
{
[Id(0)]
public DateTime Started { get; set; }
[Id(1)]
public int MsDelayPriorToResult { get; set; }
}

[GenerateSerializer]
public class TestDelaySuccessResult
{
[Id(0)]
public DateTime Started { get; set; }
[Id(1)]
public DateTime Ended { get; set; }
}

Expand Down
1 change: 1 addition & 0 deletions src/Orleans.SyncWork/Exceptions/InvalidStateException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace Orleans.SyncWork.Exceptions;
/// from the <see cref="ISyncWorker{TRequest, TResult}"/>, when the grain
/// is not in a valid state to return the requested data.
/// </summary>
[GenerateSerializer]
public class InvalidStateException : Exception
{
/// <summary>
Expand Down
19 changes: 0 additions & 19 deletions src/Orleans.SyncWork/ExtensionMethods/ClientBuilderExtensions.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Orleans.SyncWork.ExtensionMethods;
public static class SiloBuilderExtensions
{
/// <summary>
/// Configures assembly scanning against this assembly containing the <see cref="ISyncWorker{TRequest, TResult}"/>.
/// Adds <see cref="LimitedConcurrencyLevelTaskScheduler"/> to service provider.
/// </summary>
/// <param name="builder">The <see cref="ISiloBuilder"/> instance.</param>
/// <param name="maxSyncWorkConcurrency">
Expand All @@ -24,8 +24,6 @@ public static class SiloBuilderExtensions
/// <returns>The <see cref="ISiloBuilder"/> to allow additional fluent API chaining.</returns>
public static ISiloBuilder ConfigureSyncWorkAbstraction(this ISiloBuilder builder, int maxSyncWorkConcurrency = 4)
{
builder.ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(ISyncWorkAbstractionMarker).Assembly).WithReferences());

builder.ConfigureServices(services =>
{
services.AddSingleton(_ => new LimitedConcurrencyLevelTaskScheduler(maxSyncWorkConcurrency));
Expand Down
37 changes: 0 additions & 37 deletions src/Orleans.SyncWork/ExtensionMethods/SiloHostBuilderExtensions.cs

This file was deleted.

16 changes: 5 additions & 11 deletions src/Orleans.SyncWork/Orleans.SyncWork.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>10</LangVersion>
<TargetFramework>net7.0</TargetFramework>
Kritner marked this conversation as resolved.
Show resolved Hide resolved
<LangVersion>11</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
Expand Down Expand Up @@ -32,14 +32,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.Orleans.CodeGenerator.MSBuild" Version="3.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Orleans.Core" Version="3.1.0" />
<PackageReference Include="Microsoft.Orleans.Core.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.Orleans.Runtime.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Orleans.Server" Version="7.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

Expand Down

This file was deleted.

Loading