Skip to content

Commit

Permalink
Remove .NET Core 3.1 support and standardize on .NET 6
Browse files Browse the repository at this point in the history
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
  • Loading branch information
yash-nisar committed Aug 18, 2023
1 parent 667dcaf commit 6e8f406
Show file tree
Hide file tree
Showing 47 changed files with 60 additions and 81 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/itests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['3.1', '6.0', '7.0']
dotnet-version: ['6.0', '7.0']
include:
- dotnet-version: '3.1'
install-3: true
display-name: '.NET Core 3.1'
framework: 'netcoreapp3.1'
prefix: 'netcoreapp31'
install-version: '3.1.x' # We always need a new .NET
- dotnet-version: '6.0'
install-3: false
display-name: '.NET 6.0'
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/sdk_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['3.1', '6.0', '7.0']
dotnet-version: ['6.0', '7.0']
include:
- dotnet-version: '3.1'
install-3: true
display-name: '.NET Core 3.1'
framework: 'netcoreapp3.1'
prefix: 'netcoreapp31'
install-version: '3.1.x' # We always need a new .NET
- dotnet-version: '6.0'
install-3: false
display-name: '.NET 6.0'
Expand Down
2 changes: 1 addition & 1 deletion examples/Actor/ActorClient/ActorClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>

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

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>

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

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</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>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/AspNetCore/ControllerSample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The application also registers for pub/sub with the `deposit`, `multideposit` an

## Prerequisitess

- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion examples/AspNetCore/GrpcServiceSample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The application also registers for pub/sub with the `deposit` and `withdraw` top

## Prerequisitess

- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)
Expand Down
2 changes: 1 addition & 1 deletion examples/AspNetCore/RoutingSample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The application also registers for pub/sub with the `deposit`, `multideposit`, a

## Prerequisites

- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>

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

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>


Expand Down
2 changes: 1 addition & 1 deletion examples/Client/ConfigurationApi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It demonstrates the following APIs:
## Prerequisites

- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)
Expand Down
2 changes: 1 addition & 1 deletion examples/Client/DistributedLock/DistributedLock.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</ItemGroup>

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>


Expand Down
2 changes: 1 addition & 1 deletion examples/Client/DistributedLock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
<RootNamespace>Samples.Client</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
<RootNamespace>Samples.Client</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/Client/ServiceInvocation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)
Expand Down
2 changes: 1 addition & 1 deletion examples/Client/ServiceInvocation/ServiceInvocation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
<RootNamespace>Samples.Client</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/Client/StateManagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

- [.NET Core 3.1 or .NET 5+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)
Expand Down
2 changes: 1 addition & 1 deletion examples/Client/StateManagement/StateManagement.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
<RootNamespace>Samples.Client</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
3 changes: 1 addition & 2 deletions properties/IsExternalInit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ namespace System.Runtime.CompilerServices
internal static class IsExternalInit
{
}

// This is a polyfill for init only properties in netcoreapp3.1

}
2 changes: 1 addition & 1 deletion src/Dapr.Actors.AspNetCore/Dapr.Actors.AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
Expand Down
2 changes: 1 addition & 1 deletion src/Dapr.Actors/Communication/ActorInvokeException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ internal static bool TryDeserialize(Stream stream, out Exception result, ILogger
catch (Exception e)
{
// swallowing the exception
logger?.LogWarning("RemoteException", "DeSerialization failed : Reason {0}", e);
logger?.LogWarning("RemoteException: DeSerialization failed : Reason {0}", e);
}

result = null;
Expand Down
2 changes: 1 addition & 1 deletion src/Dapr.Actors/Dapr.Actors.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>

<!-- Additional Nuget package properties. -->
Expand Down
2 changes: 1 addition & 1 deletion src/Dapr.AspNetCore/Dapr.AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>

<!-- Additional Nuget package properties. -->
Expand Down
2 changes: 1 addition & 1 deletion src/Dapr.Client/Dapr.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
32 changes: 14 additions & 18 deletions src/Dapr.Client/DaprClientGrpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,10 @@ public override HttpRequestMessage CreateInvokeMethodRequest(HttpMethod httpMeth
//
// This approach avoids some common pitfalls that could lead to undesired encoding.
var path = $"/v1.0/invoke/{appId}/method/{methodName.TrimStart('/')}";
var request = new HttpRequestMessage(httpMethod, new Uri(this.httpEndpoint, path))
{
Properties =
{
{ AppIdKey, appId },
{ MethodNameKey, methodName },
}
};
var request = new HttpRequestMessage(httpMethod, new Uri(this.httpEndpoint, path));

request.Options.Set(new HttpRequestOptionsKey<string>(AppIdKey), appId);
request.Options.Set(new HttpRequestOptionsKey<string>(MethodNameKey), methodName);

if (this.apiTokenHeader is not null)
{
Expand Down Expand Up @@ -399,8 +395,8 @@ public override async Task<HttpResponseMessage> InvokeMethodWithResponseAsync(Ht
{
// Our code path for creating requests places these keys in the request properties. We don't want to fail
// if they are not present.
request.Properties.TryGetValue(AppIdKey, out var appId);
request.Properties.TryGetValue(MethodNameKey, out var methodName);
request.Options.TryGetValue(new HttpRequestOptionsKey<string>(AppIdKey), out var appId);
request.Options.TryGetValue(new HttpRequestOptionsKey<string>(MethodNameKey), out var methodName);

throw new InvocationException(
appId: appId as string,
Expand All @@ -423,8 +419,8 @@ public async override Task InvokeMethodAsync(HttpRequestMessage request, Cancell
{
// Our code path for creating requests places these keys in the request properties. We don't want to fail
// if they are not present.
request.Properties.TryGetValue(AppIdKey, out var appId);
request.Properties.TryGetValue(MethodNameKey, out var methodName);
request.Options.TryGetValue(new HttpRequestOptionsKey<string>(AppIdKey), out var appId);
request.Options.TryGetValue(new HttpRequestOptionsKey<string>(MethodNameKey), out var methodName);

throw new InvocationException(
appId: appId as string,
Expand All @@ -447,8 +443,8 @@ public async override Task<TResponse> InvokeMethodAsync<TResponse>(HttpRequestMe
{
// Our code path for creating requests places these keys in the request properties. We don't want to fail
// if they are not present.
request.Properties.TryGetValue(AppIdKey, out var appId);
request.Properties.TryGetValue(MethodNameKey, out var methodName);
request.Options.TryGetValue(new HttpRequestOptionsKey<string>(AppIdKey), out var appId);
request.Options.TryGetValue(new HttpRequestOptionsKey<string>(MethodNameKey), out var methodName);

throw new InvocationException(
appId: appId as string,
Expand All @@ -465,8 +461,8 @@ public async override Task<TResponse> InvokeMethodAsync<TResponse>(HttpRequestMe
{
// Our code path for creating requests places these keys in the request properties. We don't want to fail
// if they are not present.
request.Properties.TryGetValue(AppIdKey, out var appId);
request.Properties.TryGetValue(MethodNameKey, out var methodName);
request.Options.TryGetValue(new HttpRequestOptionsKey<string>(AppIdKey), out var appId);
request.Options.TryGetValue(new HttpRequestOptionsKey<string>(MethodNameKey), out var methodName);

throw new InvocationException(
appId: appId as string,
Expand All @@ -476,8 +472,8 @@ public async override Task<TResponse> InvokeMethodAsync<TResponse>(HttpRequestMe
}
catch (JsonException ex)
{
request.Properties.TryGetValue(AppIdKey, out var appId);
request.Properties.TryGetValue(MethodNameKey, out var methodName);
request.Options.TryGetValue(new HttpRequestOptionsKey<string>(AppIdKey), out var appId);
request.Options.TryGetValue(new HttpRequestOptionsKey<string>(MethodNameKey), out var methodName);

throw new InvocationException(
appId: appId as string,
Expand Down
2 changes: 1 addition & 1 deletion src/Dapr.Client/InvocationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
}

// Internal for testing
internal bool TryRewriteUri(Uri uri, [NotNullWhen(true)] out Uri? rewritten)
internal bool TryRewriteUri(Uri? uri, [NotNullWhen(true)] out Uri? rewritten)
{
// For now the only invalid cases are when the request URI is missing or just silly.
// We may support additional cases for validation in the future (like an allow-list of App-Ids).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Dapr.Workflow/Dapr.Workflow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- NuGet configuration -->
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
<TargetFrameworks>net6;net7</TargetFrameworks>
<Nullable>enable</Nullable>
<PackageId>Dapr.Workflow</PackageId>
<Title>Dapr Workflow Authoring SDK</Title>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
<TargetFrameworks>net6;net7</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
<TargetFrameworks>net6;net7</TargetFrameworks>
</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>
<TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
<TargetFrameworks>net6;net7</TargetFrameworks>
<BaseNamespace>Dapr.Actors.AspNetCore</BaseNamespace>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion test/Dapr.Actors.Test/Dapr.Actors.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
<TargetFrameworks>net6;net7</TargetFrameworks>
<RootNamespace>Dapr.Actors</RootNamespace>
<DefineConstants>$(DefineConstants);ACTORS</DefineConstants>
</PropertyGroup>
Expand Down
Loading

0 comments on commit 6e8f406

Please sign in to comment.