Skip to content

Commit

Permalink
Updates for v1.2.3 release. (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgillum authored Mar 28, 2024
1 parent 00f218c commit d9e4a74
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Changelog

## Unreleased
## v1.2.3

### Updates

* Bump Microsoft.Data.SqlClient from 3.0.0 to 3.1.5 ([#204](https://github.com/microsoft/durabletask-mssql/pull/204))
* Bump Microsoft.Azure.Functions.Worker.Extensions.Abstractions from 1.1.0 to 1.3.0

## v1.2.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions" Version="1.3.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PropertyGroup>
<MajorVersion>1</MajorVersion>
<MinorVersion>2</MinorVersion>
<PatchVersion>2</PatchVersion>
<PatchVersion>3</PatchVersion>
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<VersionSuffix></VersionSuffix>
<AssemblyVersion>$(MajorVersion).$(MinorVersion).0.0</AssemblyVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ async Task ValidateDatabaseSchemaAsync(TestDatabase database, string schemaName
schemaName);
Assert.Equal(1, currentSchemaVersion.Major);
Assert.Equal(2, currentSchemaVersion.Minor);
Assert.Equal(2, currentSchemaVersion.Patch);
Assert.Equal(3, currentSchemaVersion.Patch);
}

sealed class TestDatabase : IDisposable
Expand Down
37 changes: 37 additions & 0 deletions test/DurableTask.SqlServer.Tests/Integration/Orchestrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,43 @@ public async Task RecreateRunningInstance()
Assert.NotEqual(oldExecutionId, instance.ExecutionId);
}

[Theory]
//[InlineData(true)] // BUG: https://github.com/microsoft/durabletask-mssql/issues/148
[InlineData(false)]
public async Task RetryFailedSubOrchestration(bool userSpecifiedInstanceId)
{
string subOrchestrationName = "FlakeySubOrchestration";

bool firstTime = true;
this.testService.RegisterInlineOrchestration<bool, string>(
subOrchestrationName, implementation: (ctx, input) =>
{
if (firstTime)
{
firstTime = false;
throw new ApplicationException("Kah-BOOOOOM!!!");
}
return Task.FromResult(!firstTime);
});

string subOrchestratorInstanceIdOrNull = userSpecifiedInstanceId ? Guid.NewGuid().ToString("N") : null;

TestInstance<string> parentInstance = await this.testService.RunOrchestration<bool, string>(
null,
"ParentOrchestration",
implementation: async (ctx, input) =>
{
return await ctx.CreateSubOrchestrationInstanceWithRetry<bool>(
name: subOrchestrationName,
version: null,
instanceId: subOrchestratorInstanceIdOrNull,
new RetryOptions(TimeSpan.FromMilliseconds(1), maxNumberOfAttempts: 2),
input: null);
});
await parentInstance.WaitForCompletion(expectedOutput: true);
}

[Fact]
public async Task TraceContextFlowCorrectly()
{
Expand Down
9 changes: 6 additions & 3 deletions test/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ param(
[string]$tag="2019-latest",
[int]$port=1433,
[string]$dbname="DurableDB",
[string]$collation="Latin1_General_100_BIN2_UTF8",
[string]$additinalRunFlags=""
[string]$collation="Latin1_General_100_BIN2_UTF8"
)

Write-Host "Pulling down the mcr.microsoft.com/mssql/server:$tag image..."
docker pull mcr.microsoft.com/mssql/server:$tag

# Start the SQL Server docker container with the specified edition
Write-Host "Starting SQL Server $tag $sqlpid docker container on port $port" -ForegroundColor DarkYellow
docker run $additinalRunFlags --name mssql-server -e 'ACCEPT_EULA=Y' -e "MSSQL_SA_PASSWORD=$pw" -e "MSSQL_PID=$sqlpid" -p ${port}:1433 -d mcr.microsoft.com/mssql/server:$tag
docker run --name mssql-server -e ACCEPT_EULA=Y -e "MSSQL_SA_PASSWORD=$pw" -e "MSSQL_PID=$sqlpid" -p ${port}:1433 -d mcr.microsoft.com/mssql/server:$tag

if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

# The container needs a bit more time before it can start accepting commands
Write-Host "Sleeping for 30 seconds to let the container finish initializing..." -ForegroundColor Yellow
Expand Down

0 comments on commit d9e4a74

Please sign in to comment.