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

Update to Orleans 8.2.0 #426

Merged
merged 1 commit into from
Jul 13, 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
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
</PropertyGroup>

<PropertyGroup>
<OrleansPackageVersion>8.0.0</OrleansPackageVersion>
<OrleansPackageVersion>8.2.0</OrleansPackageVersion>
</PropertyGroup>
</Project>
16 changes: 8 additions & 8 deletions OrleansDashboard/Implementation/Grains/DashboardGrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public override Task OnActivateAsync(CancellationToken cancellationToken)
{
var interval = TimeSpan.FromMinutes(1);

RegisterTimer(async x =>
this.RegisterGrainTimer(async x =>
{
var timeSinceLastQuery = DateTimeOffset.UtcNow - lastQuery;

Expand All @@ -72,7 +72,7 @@ public override Task OnActivateAsync(CancellationToken cancellationToken)
isEnabled = false;
await BroadcaseEnabled();
}
}, null, interval, interval);
}, new() { DueTime = interval, Period = interval, Interleave = true, KeepAlive = true });
}

return base.OnActivateAsync(cancellationToken);
Expand Down Expand Up @@ -241,9 +241,9 @@ GrainMethodAggregate[] GetErrors()

var result = new Dictionary<string, GrainMethodAggregate[]>
{
{"calls", GetTotalCalls()},
{"latency", GetLatency()},
{"errors", GetErrors()},
{ "calls", GetTotalCalls() },
{ "latency", GetLatency() },
{ "errors", GetErrors() },
};

return result.AsImmutable();
Expand Down Expand Up @@ -286,9 +286,9 @@ public async Task<Immutable<string>> GetGrainState(string id, string grainType)
{
object[] grainMethodParameters;
if (string.IsNullOrWhiteSpace(keyExtension))
grainMethodParameters = new object[] {interfaceType, grainId};
grainMethodParameters = new object[] { interfaceType, grainId };
else
grainMethodParameters = new object[] {interfaceType, grainId, keyExtension};
grainMethodParameters = new object[] { interfaceType, grainId, keyExtension };

var grain = getGrainMethod.Invoke(GrainFactory, grainMethodParameters);

Expand Down Expand Up @@ -346,7 +346,7 @@ public Task<Immutable<string[]>> GetGrainTypes()
return Task.FromResult(GrainStateHelper.GetGrainTypes()
.Select(s => s.Namespace + "." + s.Name)
.ToArray()
.AsImmutable());
.AsImmutable());
}
}
}
2 changes: 1 addition & 1 deletion OrleansDashboard/OrleansDashboard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Reminders" Version="$(OrleansPackageVersion)" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="$(OrleansPackageVersion)" />
<PackageReference Include="OpenTelemetry" Version="1.7.0" />
<PackageReference Include="OpenTelemetry" Version="1.9.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Tests/PerformanceTests/PerformanceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions Tests/UnitTests/GrainStateTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Xunit;
using OrleansDashboard;
using Orleans.TestingHost;
Expand Down Expand Up @@ -38,7 +39,7 @@ public void TestGetGrainsTypes()
}

[Fact]
public async void TestWithGetStateMethod()
public async Task TestWithGetStateMethod()
{
var dashboardGrain = _cluster.GrainFactory.GetGrain<IDashboardGrain>(1);
var stateGrain = _cluster.GrainFactory.GetGrain<ITestStateInMemoryGrain>(123);
Expand All @@ -53,7 +54,7 @@ public async void TestWithGetStateMethod()
}

[Fact]
public async void TestWithIStorageField()
public async Task TestWithIStorageField()
{
var dashboardGrain = _cluster.GrainFactory.GetGrain<IDashboardGrain>(1);
var stateGrain = _cluster.GrainFactory.GetGrain<ITestStateGrain>(123);
Expand Down
6 changes: 3 additions & 3 deletions Tests/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Microsoft.Orleans.TestingHost" Version="$(OrleansPackageVersion)" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
Loading