-
Notifications
You must be signed in to change notification settings - Fork 123
RpcApi: add new JSON RPC API module #1324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
acd8932 to
9dc9ae4
Compare
hikinggrass
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a first quick review, I haven't look into it in detail yet
barsnick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discovery of json-rpc-cxx in non-EDM builds (e.g. Yocto) is broken.
This is pending a fix.
Fixed. |
modules/API/RpcApi/tools/python-client-gui/everest-json-rpc-websocket-client.py
Outdated
Show resolved
Hide resolved
6ac26d4 to
f6d5ae4
Compare
This library is required for the RpcApi module from everest-core PR EVerest/everest-core#1324. Also provide a minimal json-rpc-cxxConfig.cmake with INTERFACE target for the header-only library. This allows CMake to resolve and include the json-rpc-cxx target using find_package(json-rpc-cxx REQUIRED). Signed-off-by: Fabian Hartung <fabian.hartung@chargebyte.com> Signed-off-by: Moritz Barsnick <moritz.barsnick@chargebyte.com> Co-authored-by: Fabian Hartung <fabian.hartung@chargebyte.com>
types/json_rpc_api.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo these types should not be defined as part of the EVerest type system, because they are specific to the module, not used as part of the EVerest internal interfaces and not supposed to be used within any other EVerest module. This couples the internal YAML definitions / type system to this external API. At the same time, it would introduce quite some duplicates of existing YAML types.
The best way would probably to re(use) the EVerest API types for the translation layer: https://github.com/EVerest/everest-core/tree/main/lib/everest/everest_api_types
603c414 to
4a45a43
Compare
|
This PR was affected by a security incident where a compromised account force-pushed to this branch and closed the PR. ✅ Branch History Restored We've run an automation that restored the complete history of this branch to the time before the attack. All your commits are preserved. Nothing has been updated in the respective branch in case someone force-pushed after the attack but before our automation. 🔄 Action Required GitHub won't allow reopening this PR after the close and force-push. Please:
We apologize for the inconvenience. |
Describe your changes
This introduces a new API module RpcApi, which uses JSON RPC, and WebSockets as a transport layer.
It uses both RPC Methods and Notifications.
This is the implementation according to the proposal with was discussed here on Zulip and documented here. The original proposal what slightly modified, as several details proved inconsistent, impractical, or just mis-specified.
Documentation of the current state of implementation is included in the module's
docs/subdirectory. The current (or the final merged) state will be manifested as API version 1.0.0. Future updates to the external API definition will require version bumps.A Python GUI test client is included under
modules/API/RpcApi/tools/python-client-gui/.Not implemented in the current state of the API:
This will be added later, with corresponding bumps of the API version (where applicable).
A non-squashed version of this work is found in the branch feature/json-rpc-api-nosquash. for reference regarding small change steps, commit messages with motivations, and so on.
Co-authored-by: Fabian Hartung fabian.hartung@chargebyte.com
Co-authored-by: Moritz Barsnick moritz.barsnick@chargebyte.com
Issue ticket number and link
Checklist before requesting a review