Workflow Failure with --resources-path parameter
Sbaia opened this issue · comments
When registering a workflow in an application and then running the application with the --resources-path parameter in Dapr, the workflow fails to function. Instead, Dapr returns the following error:
{ "errorCode": "ERR_GET_WORKFLOW", "message": "error while getting workflow info on instance 'xxx': failed to get workflow metadata for 'xxx': Failed to fetch orchestration metadata: did not find address for actor dapr.internal.default.test.workflow/xxx" }
However, when the resources-path parameter is not used, the workflow functions correctly.
In what area(s)?
/area runtime
What version of Dapr?
1.13.2
Expected Behavior
The workflow should function properly when running the application with the --resources-path parameter.
Actual Behavior
The workflow fails to function, and Dapr returns an error regarding orchestration metadata.
Steps to Reproduce the Problem
- Create this simple .NET project with Dapr.Workflow NuGet Package
using Dapr.Workflow;
using Microsoft.AspNetCore.Builder;
var builder = WebApplication.CreateBuilder();
var services = builder.Services;
services.AddDaprWorkflow(options =>
{
options.RegisterWorkflow<object, object>(
"test",
async (context, input) =>
{
await Task.Delay(TimeSpan.FromSeconds(10)).ConfigureAwait(false);
return null;
});
});
if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DAPR_GRPC_PORT")))
{
throw new Exception("DAPR_GRPC_PORT environment variable is not set");
}
var app = builder.Build();
app.Run();
- run dapr application with
dapr run --app-id test --dapr-http-port 3599 --dapr-grpc-port 4599 --resources-path ./components -- dotnet run
- start workflow with
`POST http://localhost:3599/v1.0-beta1/workflows/dapr/test/start?instanceID=xxx
Content-Type: application/json
{}
`
4. the workflow will fail.
5. if re-run dapr application without --resources-path ./components , the workflow start