eugenegujing opened a new issue, #7924:
URL: https://github.com/apache/texera/issues/7924

   ### What happened?
   
   The worker service and the transport envelope disagree about 
EvaluatePythonExpression's reply type, and the reply is silently discarded.
   
   `workerservice.proto:51` declares the worker's reply as `EvaluatedValue`:
   
   ```proto
   rpc EvaluatePythonExpression(EvaluatePythonExpressionRequest) returns 
(EvaluatedValue);
   ```
   
   but every worker reply must travel inside `ControlReturn`'s sealed oneof 
(`controlreturns.proto`), and that oneof does not register `EvaluatedValue` — 
it only registers the coordinator-side wrapper 
`EvaluatePythonExpressionResponse`. `EvaluatedValue` itself is defined at 
`controlreturns.proto:108` but never joins the oneof.
   
   On the Python engine the consequence is a silent drop, not an error: 
`set_one_of` ignores a type that is not a oneof member, so the worker's reply 
is packed into an **empty** `ControlReturn`.
   
   ```python
   packed = set_one_of(ControlReturn, 
EvaluatedValue(value=TypedValue(expression="1+1", value_str="2")))
   bytes(packed)      # b''  -- nothing on the wire
   get_one_of(packed) # None -- nothing to unpack
   ```
   
   A control case shows registered types survive the same path: 
`set_one_of(ControlReturn, WorkerStateResponse())` → `b'\x92\x03\x00'` and 
`get_one_of` returns the message. As a result, the Python worker's evaluation 
result never reaches the coordinator.
   
   **Expected:** the evaluated value reaches the coordinator.
   
   ### How to reproduce?
   
   Run against `amber/src/main/python`:
   
   ```python
   from core.util import set_one_of, get_one_of
   from proto.org.apache.texera.amber.engine.architecture.rpc import (
       ControlReturn,
       EvaluatedValue,
       TypedValue,
   )
   
   packed = set_one_of(
       ControlReturn, EvaluatedValue(value=TypedValue(expression="1+1", 
value_str="2"))
   )
   print(bytes(packed))       # b''
   print(get_one_of(packed))  # None
   ```
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   _No response_
   
   ### What browsers are you seeing the problem on?
   
   _No response_
   
   ### Relevant log output
   
   ```shell
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to