Skip to content

Conversation

@WhitWaldo
Copy link
Contributor

@WhitWaldo WhitWaldo commented Jan 26, 2026

Description

In the current version of Dapr.Workflow it's imperative that daprd load first and then the app load so that it's available when the app attempts to connect. All e2e tests are written to expect this.

This isn't always feasible though as it's perfectly possible that the application could load first and needs to be able to gracefully attempt to reconnect to daprd should it ever fail to connect properly. This PR accommodates this scenario, ensuring that the gRPC client in Dapr.Workflow will indefinitely attempt to connect (every 5 seconds) in case of a failure to connect. This should also handle a disconnection scenario that wasn't triggered by the cancellation token indicating that cancellation has been requested (e.g. the application gracefully closing).

Further, because this is a scenario that might be desirable to validate in an e2e testing scenario (e.g. not just for the purpose of validating here), this PR also extends the DaprTestApplicationBuilder in Dapr.Testcontainers to support the WithDaprStartupOrder method. By default, this has a true value meaning that daprd and the other resources on the test harness will be started up first and then the test application loaded. But by calling and passing false to this method, it'll result in the opposite order happening: start the test application and then load daprd and the other resources on the test harness.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1678 #1293

cc: @olitomlinson

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@WhitWaldo WhitWaldo added this to the v1.17 milestone Jan 26, 2026
@WhitWaldo WhitWaldo self-assigned this Jan 26, 2026
@WhitWaldo WhitWaldo requested a review from a team as a code owner January 26, 2026 01:06
@WhitWaldo WhitWaldo requested a review from a team as a code owner January 26, 2026 01:06
…ght of the indefinite retry configuration

Signed-off-by: Whit Waldo <[email protected]>
…hang following the changes to the indefinite reconnection logic

Signed-off-by: Whit Waldo <[email protected]>
@WhitWaldo WhitWaldo merged commit f1fac38 into dapr:master Jan 26, 2026
133 of 136 checks passed
@WhitWaldo WhitWaldo deleted the bidirectional-load branch January 26, 2026 03:02
@WhitWaldo WhitWaldo linked an issue Jan 26, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Workflows currently requires Dapr to load first before connecting properly Add E2E Workflow Tests in .NET SDK

1 participant