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

   ### Describe the bug
   
   `AsyncRPCClient.get_worker_interface` in 
`amber/src/main/python/core/architecture/rpc/async_rpc_client.py` has no 
production callers, and it is the sole route into a whole helper that exists 
only to serve it.
   
   Evidence (repo-wide, excluding `target/`, `.git/`, `node_modules/`, and the 
generated `src/main/python/proto/`):
   
   ```
   grep -rn "get_worker_interface" .
   → async_rpc_client.py (definition)
   → test_async_rpc_client.py x3   (the only call sites)
   
   grep -rn "WorkerServiceStub" .
   → async_rpc_client.py only — the import, the return annotation, one 
argument. No .scala hit.
   
   grep -rn "_create_proxy" .
   → its definition, and one call inside get_worker_interface — its sole caller
   ```
   
   Python workers talk only to the coordinator: the one production construction 
of the Python `AsyncRPCClient` is `main_loop.py:114`, and it uses 
`coordinator_stub()` (lines 271, 651, 671, 817) and `receive` (line 475). There 
is no `getattr`-style dynamic access anywhere. Worker-to-worker RPC initiated 
from Python is unused.
   
   Note Scala's `workerInterface` (`AsyncRPCClient.scala:140`, 
`WorkerServiceFs2Grpc`) is a separate class and is unrelated to this Python 
method.
   
   The three tests that reference it — `test_stream_unary_blocked`, 
`test_unary_stream_blocked`, `test_stream_stream_blocked` — each begin by 
calling `get_worker_interface` and then assert on blockers that live only 
inside `_create_proxy`'s local `Proxy` class. They exist solely to exercise 
this method. The coordinator path goes through `_assign_context`, never had 
those blockers, and has its own tests.
   
   ### How to reproduce?
   
   Run the greps above.
   
   ### Version/Branch
   
   main
   
   ### Task Type
   
   - [x] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [ ] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other
   


-- 
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