Single event notification is being yielded every time with `wait_for_external_event`
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- python
- Área
- backend, distributed-systems
Línea de trabajo
Comienza con el punto de entrada wait_for_external_event y reproduce el comportamiento utilizando el repositorio de ejemplo enlazado y OrchestrationHistory.csv. Verifica que un evento emitido antes de esperar se consuma una sola vez, que el segundo wait se bloquee a la espera de un evento futuro y que el orquestador ya no recurra hasta que se supere la profundidad máxima de recursión.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🐛 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.
- Lenguaje dominante
- Python
- Estrellas
- 157
- Forks
- 70
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/azure-functions-durable-python
-
Enhancement fixed-in-v2 P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Azure/azure-functions-durable-python#617 · 1 comentario ·
-
bug Debuggability fixed-in-v2 P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Azure/azure-functions-durable-python#587 · 2 comentarios · 1 reacción ·
-
Custom object serialization broken for orchestrator return valuesPosiblemente ocupada @andystaples la tomó hace 68 días. Abiertobug fixed-in-v2 P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Azure/azure-functions-durable-python#568 · 1 comentario ·
-
bug fixed-in-v2 P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Azure/azure-functions-durable-python#475 · 1 comentario ·
-
Enhancement fixed-in-v2 P3
Dificultad 4/5 3-5 días Aptitud para principiantes 62/100
Azure/azure-functions-durable-python#618 · 1 comentario ·
Todos los issues de Azure/azure-functions-durable-python
Issues similares
-
changelog investigate
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ramnes/notion-sdk-py#409 ·
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
lindicaphxag-tech/kaggle#28 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
BSData/horus-heresy-3rd-edition#3211 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Unreachable-proxy mount test depends on fixed port 9999Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día