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
4 changes: 2 additions & 2 deletions src/Dapr.Workflow/Dapr.Workflow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DurableTask.Client.Grpc" Version="1.0.0-rc.1" />
<PackageReference Include="Microsoft.DurableTask.Worker.Grpc" Version="1.0.0-rc.1" />
<PackageReference Include="Microsoft.DurableTask.Client.Grpc" Version="1.0.0" />
<PackageReference Include="Microsoft.DurableTask.Worker.Grpc" Version="1.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions src/Dapr.Workflow/WorkflowEngineClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ namespace Dapr.Workflow
using Microsoft.DurableTask;
using Microsoft.DurableTask.Client;

// TODO: This will be replaced by the official Dapr Workflow management client.
/// <summary>
/// Defines client operations for managing Dapr Workflow instances.
/// </summary>
/// <remarks>
/// This is an alternative to the general purpose Dapr client. It uses a gRPC connection to send
/// commands directly to the workflow engine, bypassing the Dapr API layer.
/// </remarks>
public sealed class WorkflowEngineClient : IAsyncDisposable
{
readonly DurableTaskClient innerClient;
Expand Down Expand Up @@ -70,7 +73,7 @@ public Task<string> ScheduleNewWorkflowAsync(
/// </param>
public async Task<WorkflowState> GetWorkflowStateAsync(string instanceId, bool getInputsAndOutputs = false)
{
OrchestrationMetadata? metadata = await this.innerClient.GetInstanceMetadataAsync(
OrchestrationMetadata? metadata = await this.innerClient.GetInstancesAsync(
instanceId,
getInputsAndOutputs);
return new WorkflowState(metadata);
Expand Down
6 changes: 6 additions & 0 deletions src/Dapr.Workflow/WorkflowServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ static bool TryGetGrpcAddress(out string address)
string? daprPortStr = Environment.GetEnvironmentVariable("DAPR_GRPC_PORT");
if (int.TryParse(Environment.GetEnvironmentVariable("DAPR_GRPC_PORT"), out int daprGrpcPort))
{
// There is a bug in the Durable Task SDK that requires us to change the format of the address
// depending on the version of .NET that we're targeting. For now, we work around this manually.
#if NET6_0_OR_GREATER
address = $"http://localhost:{daprGrpcPort}";
#else
address = $"localhost:{daprGrpcPort}";
#endif
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion test/Dapr.E2E.Test/Dapr.E2E.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.9.0" />
<PackageReference Include="Google.Protobuf" Version="3.15.8" />
<PackageReference Include="Google.Protobuf" Version="3.21.12" />
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.47.0" />
<PackageReference Include="Grpc.Tools" Version="2.47.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
Expand Down