Skip to content

Commit

Permalink
Update .NET SDK (temporalio#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz authored Aug 6, 2024
1 parent f67fbc5 commit bdfe567
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
typescript_latest: '1.10.3'
java_latest: '1.24.0'
python_latest: '1.6.0'
csharp_latest: '1.1.2'
csharp_latest: '1.2.0'
steps:
- run: 'echo noop'

Expand Down
2 changes: 1 addition & 1 deletion cmd/run_dotnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (p *Preparer) BuildDotNetProgram(ctx context.Context) (sdkbuild.Program, er
CsprojContents: `<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\dotnet.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/cs.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build in a full featured container
FROM mcr.microsoft.com/dotnet/sdk:7.0-jammy as build
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy as build

# Install protobuf compiler and build tools
RUN apt-get update \
Expand Down Expand Up @@ -43,7 +43,7 @@ COPY ./${REPO_DIR_OR_PLACEHOLDER} ./${REPO_DIR_OR_PLACEHOLDER}
RUN CGO_ENABLED=0 ./temporal-features prepare --lang cs --dir prepared --version "$SDK_VERSION"

# Copy the CLI and prepared feature to a distroless "run" container
FROM mcr.microsoft.com/dotnet/sdk:7.0-jammy
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy

COPY --from=build /app/temporal-features /app/temporal-features
COPY --from=build /app/features /app/features
Expand Down
8 changes: 4 additions & 4 deletions dotnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<Nullable>enable</Nullable>
Expand All @@ -20,10 +20,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="Temporalio" Version="1.1.2">
<PackageReference Include="Temporalio" Version="1.2.0">
<!--
We have to make sure this isn't included transitively so it can be
overridden.
Expand Down
2 changes: 1 addition & 1 deletion features/update/async_accepted/feature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void ConfigureWorker(Runner runner, TemporalWorkerOptions options) =>
// Wait for result only for 100ms
using var tokenSource = new CancellationTokenSource();
tokenSource.CancelAfter(TimeSpan.FromMilliseconds(100));
await Assert.ThrowsAsync<OperationCanceledException>(() =>
await Assert.ThrowsAsync<WorkflowUpdateRpcTimeoutOrCanceledException>(() =>
updateHandle3.GetResultAsync(new() { CancellationToken = tokenSource.Token }));

await handle.SignalAsync(wf => wf.ShutdownAsync());
Expand Down
13 changes: 9 additions & 4 deletions harness/dotnet/Temporalio.Features.Harness/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,15 @@ private static async Task RunCommandAsync(InvocationContext ctx)

if (failures.Count > 0)
{
throw new InvalidOperationException(
$"{failures.Count} feature(s) failed: {string.Join(", ", failures)}");
Environment.ExitCode = 1;
logger.LogError(
"{FailureCount} feature(s) failed: {Features}",
failures.Count,
string.Join(", ", failures));
}
else
{
logger.LogInformation("All features passed");
}

logger.LogInformation("All features passed");
}
}

0 comments on commit bdfe567

Please sign in to comment.