Add regression test for retry task ID reuse - #227
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e73254e2-627d-4165-8838-75369188a5a3
There was a problem hiding this comment.
Pull request overview
Adds a regression test to the Azure Functions Durable worker compatibility suite to reproduce the retry + fan-out sequence from Azure/azure-functions-durable-python#603 and assert correct task ID behavior through the 2.x worker transport path.
Changes:
- Added a new end-to-end-style worker test that simulates history event replays for an activity retry (with timer) followed by a 13-task fan-out.
- Validates retry task ID reuse and that subsequent fan-out tasks are assigned distinct IDs and complete successfully.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e73254e2-627d-4165-8838-75369188a5a3
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
tests/azure-functions-durable/test_worker_compat.py:188
- The test builds
timer_events(passed asnewEvents) includingnew_timer_created_event(...). In existing executor tests,TimerCreatedis treated as a past event (it reflects the prior CreateTimer action being committed to history) and onlyTimerFiredis a new event. KeepingTimerCreatedinnewEventscan make this test diverge from real host history ordering and potentially mask regressions.
timer_events = [
helpers.new_timer_created_event(2, retry_at),
helpers.new_orchestrator_started_event(retry_at),
helpers.new_timer_fired_event(2, retry_at),
]
berndverst
left a comment
There was a problem hiding this comment.
Reviewed the retry/timer replay and subsequent fan-out allocation through the Azure Functions worker transport. The test asserts reuse of the original activity ID, advances the timer/action sequence without collisions, completes the 13-task fan-out, and rejects a retry-ID reallocation mutation. No actionable issues found.
Summary
Validation
python -m pytest tests/azure-functions-durable/test_worker_compat.py -qpython -m flake8 tests/azure-functions-durable