Summary
The user reports an issue with the SyncAgent gRPC client streaming to the gRPC server and has proposed a fix on GitHub, linking to the pull request and related issue. They express confusion about the implementation of streaming in the SyncAgentService and mention that the current setup does not support streaming agents yet, although it will in the future. The user clarifies the type of streaming they are referring to and explains that the server-side implementation is not completing the call due to the way requests are being sent. They suggest that their proposed change would help identify when the client has stopped sending data, allowing for proper processing.
rafaelraposo
Also <@UNZB4NW3S> it's not a critical bug per-se, it's just when implementing things ourselves things aren't properly done. We can work around it but would prefer to do it properly.
rafaelraposo
https://docs.python.org/3/library/collections.abc.html#collections.abc.AsyncIterator you're somewhat doing the same with typing, you just handle things straight away once you have both the templates and request https://github.com/flyteorg/flytekit/blob/61b58966188d5d33bc6ab4af209f647de0b51995/flytekit/extend/backend/agent_service.py#L164C17-L164C24. It would be best to have my change so we know when the client stopped sending data and we can process accordingly.
rafaelraposo
You're sending the ExecuteTaskSyncRequest in two different calls. So basically server side I'm using the onNext (Java implementation) to capture thoses but since the call never closes, it doesn't move over to the onCompleted.
rafaelraposo
This is the streaming I'm talking about https://grpc.io/docs/languages/go/basics/#client-side-streaming-rpc-1
eric901201
can you say more?>
rafaelraposo
We're probably talking about different streamings xD
eric901201
langchain will be supported in the future
eric901201
we didn;t support streaming agent yet
eric901201
rafaelraposo
I found out when trying to implement the SyncAgentService. I'm not sure how you folks implemented it in flytekit, it seems some magic iterating stuff happening there.
kumare
This is a bad big, but where do we use streaming
rafaelraposo
Hey folks, we found a problem on how the SyncAgent grpc client is streaming into the grpc server. I've proposed a fix here https://github.com/flyteorg/flyte/pull/5884 issue: https://github.com/flyteorg/flyte/issues/5885. cc: <@U05FFAF4FC2>