You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example: With DAPR workflows hosted in an app that also listens to a binding or pubsub (i.e. it declares an appPort), there is a race condition between the DAPR sidecar detecting the appPort as open, and the actor runtime initializing. DAPR blocks until it detects all declared appPorts, and only initializes the actor runtime after this has completed.
Meanwhile, any app that tries to start a workflow after calling daprClient.WaitForSideAsync() -- which returns before the actor runtime is ready -- the call to ScheduleNewWorkflowAsync fails with an "actor runtime is not configured" error.
Retrying the ScheduleNewWorkflowAsync call after a few seconds generally succeeds, but it seems that WaitForSidecarAsync should not return until all declared services are truly ready.
I suggest allowing which services to wait for, along with a timeout (default timeout 30 seconds, perhaps.) I understand that the actor runtime is not a foundational service as it needs a dedicated statestore configured, but this is why we need this method parameterized.
e.g.
public async Task WaitForSidecarAsync(WaitForSidecarOptions options, CancellationToken token);
public record WaitForSidecarOptions(... RequireActorRuntime = false);
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered:
Describe the feature
Example: With DAPR workflows hosted in an app that also listens to a binding or pubsub (i.e. it declares an appPort), there is a race condition between the DAPR sidecar detecting the appPort as open, and the actor runtime initializing. DAPR blocks until it detects all declared appPorts, and only initializes the actor runtime after this has completed.
Meanwhile, any app that tries to start a workflow after calling daprClient.WaitForSideAsync() -- which returns before the actor runtime is ready -- the call to ScheduleNewWorkflowAsync fails with an "actor runtime is not configured" error.
Retrying the ScheduleNewWorkflowAsync call after a few seconds generally succeeds, but it seems that WaitForSidecarAsync should not return until all declared services are truly ready.
I suggest allowing which services to wait for, along with a timeout (default timeout 30 seconds, perhaps.) I understand that the actor runtime is not a foundational service as it needs a dedicated statestore configured, but this is why we need this method parameterized.
e.g.
public async Task WaitForSidecarAsync(WaitForSidecarOptions options, CancellationToken token);
public record WaitForSidecarOptions(... RequireActorRuntime = false);
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered: