Single event notification is being yielded every time with `wait_for_external_event`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- backend, distributed-systems
Hướng nghiên cứu
Bắt đầu với entry point wait_for_external_event và tái hiện hành vi bằng repository mẫu được liên kết cùng OrchestrationHistory.csv. Xác minh rằng một event được phát ra trước khi chờ sẽ được tiêu thụ một lần, rằng wait thứ hai sẽ block để chờ một event trong tương lai, và rằng orchestrator không còn đệ quy cho đến khi vượt quá độ sâu đệ quy tối đa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🐛 Describe the bug
When an event notification is raised for an orchestrator that is not yet waiting, then using wait_for_external_event multiple times will always yield that same specific initial event.
A typical scenario when this might happen is when multiple event notifications are raised at the same time by other orchestrators and the main orchestrator would not be waiting during handling of the first event.
🤔 Expected behavior
The expected behavior is that a single event notification only yields a single wait_for_external_event. This does work as expected for event notifications that were submitted after an orchestrator already started to wait for the external event, but not for notification events that were scheduled before waiting for the external event.
☕ Steps to reproduce
I have been able to reproduce the issue in a small example as seen below.
Sample repository: https://github.com/arjendev/durable-functions-python-external-events-issue-sample
Sample orchestration history: https://github.com/arjendev/durable-functions-python-external-events-issue-sample/blob/main/OrchestrationHistory.csv
myApp = df.DFApp(http_auth_level=func.AuthLevel.ANONYMOUS)
@myApp.route(route="orchestrators/{functionName}")
@myApp.durable_client_input(client_name="client")
async def http_start(req: func.HttpRequest, client: DurableOrchestrationClient):
function_name = req.route_params.get('functionName')
instance_id = await client.start_new(function_name)
response = client.create_check_status_response(req, instance_id)
return response
# Orchestrator
@myApp.orchestration_trigger(context_name="context")
def hello_orchestrator(context: DurableOrchestrationContext):
yield context.call_activity("raise_my_durable_event", context.instance_id)
while True:
yield context.wait_for_external_event("my-durable-event")
# Activity
@myApp.activity_trigger(input_name="instance", activity="raise_my_durable_event")
@myApp.durable_client_input(client_name="client")
async def raise_my_durable_event(client: DurableOrchestrationClient, instance):
await client.raise_event(instance, "my-durable-event")
The expected behavior of execution of the orchestrator would be:
- Start the orchestrator through the http_trigger
- Main orchestrator starts and raises an event notification with name:
my-durable-event - Main orchestrator enters the while loop and starts waiting for external events and immediately yields the already scheduled event notification
- Main orchestrator halts in the second iteration of the while loop and waits for future events
However, on step 4, the wait_for_external_event keeps returning the initial event and thus the while loop runs forever with the eventual error: Orchestrator function 'hello_orchestrator' failed: maximum recursion depth exceeded in comparison.
- Ngôn ngữ chính
- Python
- Star
- 157
- Fork
- 70
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/azure-functions-durable-python
-
Enhancement fixed-in-v2 P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Azure/azure-functions-durable-python#617 · 1 bình luận ·
-
bug Debuggability fixed-in-v2 P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Azure/azure-functions-durable-python#587 · 2 bình luận · 1 reaction ·
-
Custom object serialization broken for orchestrator return valuesCó thể đã có người làm @andystaples đã nhận 68 ngày trước. Đang mởbug fixed-in-v2 P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Azure/azure-functions-durable-python#568 · 1 bình luận ·
-
bug fixed-in-v2 P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Azure/azure-functions-durable-python#475 · 1 bình luận ·
-
Enhancement fixed-in-v2 P3
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 62/100
Azure/azure-functions-durable-python#618 · 1 bình luận ·
Tất cả issue của Azure/azure-functions-durable-python
Issue tương tự
-
changelog investigate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ramnes/notion-sdk-py#409 ·
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
lindicaphxag-tech/kaggle#28 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
BSData/horus-heresy-3rd-edition#3211 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày