Azure / Azure/azure-functions-durable-python

Add regression coverage for None-returning orchestrations

Đang mở Phù hợp với người mới
#617 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Enhancement fixed-in-v2 P3
Ngôn ngữ chính
Python
Star
157
Fork
70
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
2

Mô tả

💡 **Feature description**

Add explicit regression tests for all supported `None`-return paths in orchestration replay:

- A sub-orchestrator whose completion event has `Result=None`.
- A top-level generator orchestrator that completes without an explicit return value.

Activity completion with `Result=None` is already covered by `test_call_activity_with_none_return`. The additional tests should verify that replay completes successfully, produces the expected `None` task value where applicable, and does not call JSON deserialization with `None`.

💭 **Describe alternatives you've considered**

Relying on the shared guard in `TaskOrchestrationExecutor.parse_history_event` and the existing activity test leaves the separate `SUB_ORCHESTRATION_INSTANCE_COMPLETED` branch without direct regression coverage. A top-level no-return test would also preserve the behavior that originally made issue #260 difficult to diagnose.

**Additional context**

Issue #260 reported the original failure. The root cause was isolated in #454 and fixed by #466, released in `azure-functions-durable` 1.2.9. Current code handles both task and sub-orchestration completion events with null results, but only the activity path has a focused regression test.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the existing test_call_activity_with_none_return regression test and inspect TaskOrchestrationExecutor.parse_history_event, especially the SUB_ORCHESTRATION_INSTANCE_COMPLETED path. Add focused coverage for a sub-orchestrator with Result=None and a top-level generator with no explicit return. Done means replay completes successfully, produces None where applicable, and does not attempt JSON deserialization with None.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
testing
Loại issue
Tính năng
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
72/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.