Skip to content

Commit

Permalink
Update gRPC implementation used by out-of-proc v2 SDKs (#2312)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgillum authored Nov 15, 2022
1 parent f57386b commit 7a4e0a6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
4 changes: 3 additions & 1 deletion release_notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## Updates

* Added V2 middleware support for custom handlers
* Added V2 middleware support for custom handlers
* Added suspend, resume, and rewind operation handling for V2 out-of-proc
* Updated Microsoft.DurableTask.Sidecar.Protobuf dependency to v1.0.0
18 changes: 18 additions & 0 deletions src/WebJobs.Extensions.DurableTask/LocalGrpcListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,24 @@ await this.durabilityProvider.ForceTerminateTaskOrchestrationAsync(
return new P.TerminateResponse();
}

public override async Task<P.SuspendResponse> SuspendInstance(P.SuspendRequest request, ServerCallContext context)
{
await this.durabilityProvider.SuspendTaskOrchestrationAsync(request.InstanceId, request.Reason);
return new P.SuspendResponse();
}

public override async Task<P.ResumeResponse> ResumeInstance(P.ResumeRequest request, ServerCallContext context)
{
await this.durabilityProvider.ResumeTaskOrchestrationAsync(request.InstanceId, request.Reason);
return new P.ResumeResponse();
}

public override async Task<P.RewindInstanceResponse> RewindInstance(P.RewindInstanceRequest request, ServerCallContext context)
{
await this.durabilityProvider.RewindAsync(request.InstanceId, request.Reason);
return new P.RewindInstanceResponse();
}

public override async Task<P.GetInstanceResponse> GetInstance(P.GetInstanceRequest request, ServerCallContext context)
{
OrchestrationState state = await this.durabilityProvider.GetOrchestrationStateAsync(request.InstanceId, executionId: null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.12.2" />
<!-- Explicitly pinned transitive dependencies with CVE vulnerabilities.-->
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" Version="2.2.1" />
<!-- The gRPC dependencies are not compatible with .NET Standard 2.0 and will fail at runtime -->
<PackageReference Include="Grpc" Version="2.38.0" />
<PackageReference Include="Microsoft.DurableTask.Sidecar.Protobuf" Version="0.3.1" />
<!-- The gRPC dependencies in this package are not compatible with older frameworks, like .NET Core 2.x -->
<PackageReference Include="Microsoft.DurableTask.Sidecar.Protobuf" Version="1.0.0" />
</ItemGroup>


Expand Down

0 comments on commit 7a4e0a6

Please sign in to comment.