Skip to content

Add regression test for retry task ID reuse - #227

Merged
andystaples merged 2 commits into
mainfrom
andystaples-test-retry-task-id-regression
Jul 29, 2026
Merged

Add regression test for retry task ID reuse#227
andystaples merged 2 commits into
mainfrom
andystaples-test-retry-task-id-regression

Conversation

@andystaples

Copy link
Copy Markdown
Contributor

Summary

Validation

  • python -m pytest tests/azure-functions-durable/test_worker_compat.py -q
  • python -m flake8 tests/azure-functions-durable

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e73254e2-627d-4165-8838-75369188a5a3
Copilot AI review requested due to automatic review settings July 29, 2026 04:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/azure-functions-durable/test_worker_compat.py Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e73254e2-627d-4165-8838-75369188a5a3
Copilot AI review requested due to automatic review settings July 29, 2026 05:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 as newEvents) including new_timer_created_event(...). In existing executor tests, TimerCreated is treated as a past event (it reflects the prior CreateTimer action being committed to history) and only TimerFired is a new event. Keeping TimerCreated in newEvents can 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 berndverst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@andystaples
andystaples merged commit 9ea339f into main Jul 29, 2026
25 checks passed
@andystaples
andystaples deleted the andystaples-test-retry-task-id-regression branch July 29, 2026 05:05
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.

3 participants