danielgtaylor / danielgtaylor/python-betterproto
unary_stream message issue
- Lingua principale
- Python
- Stelle
- 1.8k
- Fork
- 234
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I'm currently facing the issue that a unary_stream connection does not behave as I would expect. (betterproto version b5)
## Client code:

## Server code:


Opening the connection works fine, the server receives the request and begins its job.
The task the server performs is taking 1 min +/-, during that time it sends multiple responses to the client.
While debugging I could see that subroutines have been executed and sending data (server side).
But nothing arrives at the client, the red X located at the client if statement is a breakpoint that never executes until after the server method returns. If I breakpoint the server at its last statement (red X) the client is idle. Only after continuing, allowing the server to complete the method (closing the connection?), within the client program the subroutines trigger:

All messages then are 'spammed' to the waiting client. At first glance, nothing is missing, but I expected the stream to work like in the default google implementation. Receiving the messages one after another when sent from the server.
Is this intended behavior?
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riprodurre l’esempio unary_stream del client e del server mostrato nell’issue con betterproto b5, quindi osservare quando il client riceve i messaggi mentre il server è ancora in esecuzione. Confrontare questo comportamento con la semantica di streaming prevista e determinare se la consegna prima del ritorno del metodo del server sia intenzionale; completato quando il comportamento è spiegato e sono chiari la modifica appropriata al progetto o l’ambito dei test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- grpc, python
- Ambito
- backend-api-design
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100