Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: |
6.0.x
8.0.x
10.0.x

- name: NuGet Restore
run: dotnet restore -v n
Expand All @@ -41,6 +41,6 @@ jobs:
shell: pwsh

- name: Durable framework tests
run: dotnet test --no-build --verbosity normal --filter Category!=Stress ./test/DurableTask.SqlServer.Tests/DurableTask.SqlServer.Tests.csproj
run: dotnet test --no-build --verbosity normal --filter Category!=Stress -p:TestTfmsInParallel=false ./test/DurableTask.SqlServer.Tests/DurableTask.SqlServer.Tests.csproj
- name: Functions runtime tests
run: dotnet test --no-build --verbosity normal ./test/DurableTask.SqlServer.AzureFunctions.Tests/DurableTask.SqlServer.AzureFunctions.Tests.csproj
run: dotnet test --no-build --verbosity normal -p:TestTfmsInParallel=false ./test/DurableTask.SqlServer.AzureFunctions.Tests/DurableTask.SqlServer.AzureFunctions.Tests.csproj
1 change: 1 addition & 0 deletions DurableTask.SqlServer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
src\common.props = src\common.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
global.json = global.json
nuget.config = nuget.config
README.md = README.md
sign.snk = sign.snk
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ steps:
version: '2.1.x'

- task: UseDotNet@2
displayName: 'Use the .NET 6 SDK'
displayName: 'Use the .NET 10 SDK'
inputs:
packageType: 'sdk'
version: '6.0.x'
version: '10.0.x'

- task: UseDotNet@2
displayName: 'Use the .NET 8 SDK'
Expand Down
4 changes: 2 additions & 2 deletions eng/templates/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- task: UseDotNet@2
displayName: 'Use the .NET 6 SDK'
displayName: 'Use the .NET 10 SDK'
inputs:
packageType: 'sdk'
version: '6.0.x'
version: '10.0.x'

- task: UseDotNet@2
displayName: 'Use the .NET 8 SDK'
Expand Down
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "10.0.302",
"rollForward": "latestFeature"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
<Import Project="../common.props" />

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

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);FUNCTIONS_V4</DefineConstants>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/DurableTask.SqlServer/DurableTask.SqlServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="../common.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net10.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
16 changes: 12 additions & 4 deletions src/DurableTask.SqlServer/SqlUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
public static OrchestrationStatus GetRuntimeStatus(DbDataReader reader)
{
int ordinal = reader.GetOrdinal("RuntimeStatus");
return (OrchestrationStatus)Enum.Parse(typeof(OrchestrationStatus), GetStringOrNull(reader, ordinal));

Check warning on line 364 in src/DurableTask.SqlServer/SqlUtils.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'value' in 'object Enum.Parse(Type enumType, string value)'.
}

public static Guid? GetPayloadId(this DbDataReader reader)
Expand Down Expand Up @@ -391,8 +391,8 @@
{
return historyEvent.EventType switch
{
EventType.SubOrchestrationInstanceFailed => ((SubOrchestrationInstanceFailedEvent)historyEvent).Reason,

Check warning on line 394 in src/DurableTask.SqlServer/SqlUtils.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'x' in 'SqlString.implicit operator SqlString(string x)'.
EventType.TaskFailed => ((TaskFailedEvent)historyEvent).Reason,

Check warning on line 395 in src/DurableTask.SqlServer/SqlUtils.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'x' in 'SqlString.implicit operator SqlString(string x)'.
_ => SqlString.Null,
};
}
Expand Down Expand Up @@ -910,7 +910,8 @@
command,
traceHelper,
instanceId,
cmd => cmd.ExecuteReaderAsync(cancellationToken));
cmd => cmd.ExecuteReaderAsync(cancellationToken),
cancellationToken);
}

public static Task<int> ExecuteNonQueryAsync(
Expand All @@ -923,7 +924,8 @@
command,
traceHelper,
instanceId,
cmd => cmd.ExecuteNonQueryAsync(cancellationToken));
cmd => cmd.ExecuteNonQueryAsync(cancellationToken),
cancellationToken);
}

public static Task<object> ExecuteScalarAsync(
Expand All @@ -932,24 +934,30 @@
string? instanceId = null,
CancellationToken cancellationToken = default)
{
return ExecuteSprocAndTraceAsync(

Check warning on line 937 in src/DurableTask.SqlServer/SqlUtils.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in value of type 'Task<object?>' doesn't match target type 'Task<object>'.
command,
traceHelper,
instanceId,
cmd => cmd.ExecuteScalarAsync(cancellationToken));
cmd => cmd.ExecuteScalarAsync(cancellationToken),
cancellationToken);
}

static async Task<T> ExecuteSprocAndTraceAsync<T>(
DbCommand command,
LogHelper traceHelper,
string? instanceId,
Func<DbCommand, Task<T>> executor)
Func<DbCommand, Task<T>> executor,
CancellationToken cancellationToken)
{
var context = new SprocExecutionContext();
try
{
return await WithRetry(command, executor, context, traceHelper, instanceId);
}
catch (SqlException e) when (cancellationToken.IsCancellationRequested)
{
throw new OperationCanceledException("The SQL operation was canceled.", e, cancellationToken);
}
finally
{
context.LatencyStopwatch.Stop();
Expand Down Expand Up @@ -1007,7 +1015,7 @@
try
{
// Open connection if network blip caused it to close on a previous attempt
if (command.Connection.State != ConnectionState.Open)

Check warning on line 1018 in src/DurableTask.SqlServer/SqlUtils.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.
{
await command.Connection.OpenAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="../common.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net10.0</TargetFrameworks>
<AssemblyName>Microsoft.Azure.Functions.Worker.Extensions.DurableTask.SqlServer</AssemblyName>
</PropertyGroup>

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

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<LangVersion>9.0</LangVersion>
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>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<LangVersion>9.0</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public async Task PurgesMoreThanOneThousandInstances()
version: string.Empty,
implementation: (ctx, input) => Task.FromResult(input));

TimeSpan timeout = TimeSpan.FromSeconds(60);
TimeSpan timeout = TimeSpan.FromMinutes(2);
await Task.WhenAll(instances.Select(instance => instance.WaitForCompletion(timeout)));

var filter = new PurgeInstanceFilter(
Expand Down
2 changes: 1 addition & 1 deletion test/PerformanceTests/PerformanceTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions tools/TestDBGenerator/TestDBGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -20,7 +20,6 @@
<ItemGroup>
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Azure.Core" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>

</Project>
Loading