Skip to content

Conversation

@famarting
Copy link

@famarting famarting commented Aug 28, 2025

adds a new unit test that reproduces a bug I'm troubleshooting

the handling of execution started event is not idempotent and it doesn't guarantee that the orchestrator is actually executed when retried

my expectation is that when ProcessWorkItem returns an error, it is expected that ProcessWorkItem can be retried in the future with the same WorkItem, then the source of problems is when the state passed inside of the WorkItem is the same as the state used for the first ProcessWorkItem invocation. In that case ProcessWorkItem doesn't have an idempotent behavior and in the second invocation doesn't call w.executor.ExecuteOrchestrator

So the sequence of events I would expect are:

  • WorkItem is provided in NextWorkItem
  • WorkItem is processed in ProcessWorkItem, it invokes executor.ExecuteOrchestrator but it fails and ProcessWorkItem returns an error
  • Same WorkItem (with same state) is provided again in NextWorkItem
  • WorkItem is processed in ProcessWorkItem , it SHOULD invoke executor.ExecuteOrchestrator

Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com>
@famarting famarting force-pushed the orchestration-idempotency-test branch from 33721a2 to 1bb5ccb Compare August 28, 2025 10:29
Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com>
@JoshVanL JoshVanL merged commit 4c008c7 into dapr:main Aug 28, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants