Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow Failure with --resources-path parameter #7721

Open
Sbaia opened this issue May 7, 2024 · 1 comment
Open

Workflow Failure with --resources-path parameter #7721

Sbaia opened this issue May 7, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@Sbaia
Copy link

Sbaia commented May 7, 2024

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

  1. 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();

  1. run dapr application with
    dapr run --app-id test --dapr-http-port 3599 --dapr-grpc-port 4599 --resources-path ./components -- dotnet run
  2. 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

@Sbaia Sbaia added the kind/bug Something isn't working label May 7, 2024
@elena-kolevska
Copy link
Contributor

@Sbaia before looking deeper into this, can you please confirm there's indeed a components directory in the specified path, with the appropriate component files inside?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants