Skip to content

feat(rpcclient): pass the request message to rpc_call - #458

Merged
doronz88 merged 5 commits into
doronz88:masterfrom
eladciuraru:feat/rpc-call-message
Nov 16, 2026
Merged

doronz88 merged 5 commits into
doronz88:masterfrom
eladciuraru:feat/rpc-call-message

Conversation

@eladciuraru

Copy link
Copy Markdown
Collaborator

Summary

  • rpc_call takes the request message itself: rpc_call(RequestDlopen(filename=..., mode=...)) instead of rpc_call(MsgId.REQ_DLOPEN, filename=..., mode=...).
  • The msg_id and reply type come from the request's own .proto file (MsgId.REQ_X and ReplyX), so messages from other .proto files work without registering them.
  • Removes RpcMessageRegistry and RpcBridge's messages parameter.
  • Fixes test_push_pull_dir, which asserted on RemotePath.exists() without awaiting it.

No wire protocol or server changes.

Breaking changes

  • rpc_call(msg_id, **kwargs) is replaced by rpc_call(request).
  • RpcMessageRegistry and the messages parameter of RpcBridge / RpcBridge.connect are removed.

Testing

  • New tests/test_rpc_call.py.
  • Full suite against a local macOS server: 208 passed, 11 skipped. The only failures are test_dns_cache and test_dns_delete (marked local_only), because the macOS server build isn't signed with the mDNSResponder entitlement. That's unrelated to this change

exists() is an async method, so without await the assertion always passed,
even when the file didn't exist.
rpc_call now takes the request message itself, e.g.
rpc_call(RequestDlopen(filename=..., mode=...)), instead of a msg_id and
the request's fields. The msg_id and reply type come from the request's
.proto file (MsgId.REQ_X and ReplyX), so messages from other .proto files
work without registering them.
rpc_call no longer uses it, so remove it along with RpcBridge's messages
parameter.
A reply that doesn't answer the request means the stream is out of step
with the server, so every later call would read the previous call's reply.
Raise UnexpectedReplyError instead of a bare ValueError and close the
connection, as is done for a ConnectionError.
The generated *_pb2.py files refuse to load on an older runtime
(ValidateProtobufRuntimeVersion), so state that in the dependencies.
@doronz88
doronz88 force-pushed the feat/rpc-call-message branch from d2baa99 to f4a191c Compare November 16, 2026 10:51
@doronz88
doronz88 merged commit e61863a into doronz88:master Nov 16, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants