Skip to content

Conversation

@barsnick
Copy link
Contributor

@barsnick barsnick commented Aug 27, 2025

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:

  • DC charging
  • TLS
  • API authentication

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

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

@barsnick barsnick force-pushed the feature/json-rpc-api branch 8 times, most recently from acd8932 to 9dc9ae4 Compare August 29, 2025 07:20
@barsnick barsnick marked this pull request as ready for review August 29, 2025 07:23
Copy link
Member

@hikinggrass hikinggrass left a 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

Copy link
Contributor Author

@barsnick barsnick left a 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.

@barsnick barsnick requested a review from james-ctc as a code owner September 5, 2025 15:04
@barsnick
Copy link
Contributor Author

barsnick commented Sep 5, 2025

This is pending a fix.

Fixed.

@barsnick barsnick force-pushed the feature/json-rpc-api branch from 6ac26d4 to f6d5ae4 Compare September 22, 2025 12:21
barsnick added a commit to EVerest/meta-everest that referenced this pull request Oct 1, 2025
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>
Copy link
Contributor

@Pietfried Pietfried Oct 20, 2025

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

@felix-ulonska
Copy link

⚠️ PR Affected by Security Incident

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:

  • Open a new PR from your branch to the target branch. You can use the following link to open a new PR: Open PR
  • Link back to this PR in the description to include previous discussions

We apologize for the inconvenience.

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.

9 participants