Skip to content

Initial Implementation of the CPP KVS#20

Merged
vinodreddy-g merged 4 commits intoeclipse-score:mainfrom
joshualicht:cpp_implementation
Jun 25, 2025
Merged

Initial Implementation of the CPP KVS#20
vinodreddy-g merged 4 commits intoeclipse-score:mainfrom
joshualicht:cpp_implementation

Conversation

@joshualicht
Copy link
Contributor

@joshualicht joshualicht commented Jun 20, 2025

Initial Implementation of CPP KVS

Features:
-Supports Score Filesystem
-Supports Score JSON (Notice: Score JSON (nlohmann) has a problem with serializing Bool types)
-Supports Score Result and Errorcodes
-Behavior Unittests with 100% Line Coverage, 100% Function Coverage and 100% Branch Coverage
(except for brackets that are reported incorrectly),
Command to generate Coverage and create html results:
bazel coverage test_kvs_cpp --collect_code_coverage --instrument_test_targets --combined_report=lcov --experimental_generate_llvm_lcov --nocache_test_results --nostamp; genhtml --branch-coverage --output genhtml "$(find "$(bazel info output_path)" -name _coverage_report.dat)"
-Supports Bazel Build
-Doxygen Documentation

Not yet implemented/ To Dos:
-Set Default Value Handling TBD
-Add Score Logging
-Replace std libs with baselibs where possible
-Versioning of the CPP KVS (needs to be solved for CPP in general, not only for KVS)

@github-actions
Copy link

github-actions bot commented Jun 20, 2025

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 242a143c-86e3-4a4c-bd6c-7263f2bef32d
Computing main repo mapping: 
Computing main repo mapping: 
INFO: Repository score-baselibs~ instantiated at:
  <builtin>: in <toplevel>
Repository rule git_repository defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/git.bzl:189:33: in <toplevel>
ERROR: /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/git_worker.bzl:210:9: An error occurred during the fetch of repository 'score-baselibs~':
   Traceback (most recent call last):
	File "/home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/git.bzl", line 180, column 35, in _git_repository_implementation
		update = _clone_or_update_repo(ctx)
	File "/home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/git.bzl", line 43, column 20, in _clone_or_update_repo
		git_ = git_repo(ctx, directory)
	File "/home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 98, column 12, in git_repo
		_update(ctx, git_repo)
	File "/home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 116, column 10, in _update
		fetch(ctx, git_repo)
	File "/home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 150, column 13, in fetch
		_git(
	File "/home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 186, column 15, in _git
		_error(ctx.name, ["git"] + start + list(args), st.stderr)
	File "/home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 210, column 9, in _error
		fail("error running '%s' while working with @%s:
%s" % (command_text, name, stderr))
Error in fail: error running 'git fetch origin refs/heads/*:refs/remotes/origin/* refs/tags/*:refs/tags/*' while working with @score-baselibs~:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
ERROR: Error computing the main repository mapping: error during computation of main repo mapping: error running 'git fetch origin refs/heads/*:refs/remotes/origin/* refs/tags/*:refs/tags/*' while working with @score-baselibs~:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Implementation of initial CPP KVS PoC done, Unittests implemented:
100% Line Coverage, 100% Function Coverage and 100% Branch Coverage
Copyright notice was updated to the format expected by score copyright.check
Add preprocessor directives to implement include guard behavior
Co-authored-by: Uwe <uwe.maucher@bmw.de>
Signed-off-by: Joshua Licht <148043864+joshualicht@users.noreply.github.com>

Rename kvs_helper.h

Rename kvs_helper.h to kvs_helper.hpp
@guysagnes guysagnes self-requested a review June 25, 2025 11:29
Copy link

@guysagnes guysagnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Offline local review

@vinodreddy-g
Copy link
Contributor

vinodreddy-g commented Jun 25, 2025

Ci breaks because of other dependent libs as i understood . Should we merge it? @guysagnes

@guysagnes
Copy link

Ci breaks because of other dependent libs as i understood . Should we merge it? @guysagnes

Yes, Agree to merge in the next step until generic fix of CD is available.

@vinodreddy-g vinodreddy-g merged commit 437ce85 into eclipse-score:main Jun 25, 2025
6 of 9 checks passed
@guysagnes
Copy link

guysagnes commented Jun 26, 2025

html report - code coverage
genhtml.tar.gz

Report from build
test_kvs_cpp.tar.gz

atarekra pushed a commit to Valeo-S-CORE-Organization/persistency that referenced this pull request Nov 9, 2025
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.

4 participants

Comments