Skip to content

Conversation

@vinodreddy-g
Copy link
Contributor

No description provided.

@vinodreddy-g vinodreddy-g force-pushed the vinod_support_basic_types branch from 1afa640 to 4149339 Compare July 15, 2025 14:12
@guysagnes guysagnes requested a review from joshualicht July 15, 2025 14:12
@github-actions
Copy link

github-actions bot commented Jul 15, 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: 81b06c4c-ffa8-413c-aa9a-a9280fbde09b
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
DEBUG: Rule 'rules_boost~' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-aSViuHoOdF32Ue/Cx02/mOzyEebHMFuifjZs4GNWjsE="
DEBUG: Repository rules_boost~ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:387:31: in <toplevel>
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'googletest', the root module requires module version googletest@1.14.0, but got googletest@1.15.0 in the resolved dependency graph.
WARNING: For repository 'aspect_rules_lint', the root module requires module version aspect_rules_lint@1.0.3, but got aspect_rules_lint@1.4.2 in the resolved dependency graph.
Computing main repo mapping: 
Loading: 
Loading: 1 packages loaded
Analyzing: target //:license-check (2 packages loaded, 0 targets configured)
Analyzing: target //:license-check (2 packages loaded, 0 targets configured)

Analyzing: target //:license-check (58 packages loaded, 10 targets configured)

Analyzing: target //:license-check (106 packages loaded, 10 targets configured)

Analyzing: target //:license-check (156 packages loaded, 966 targets configured)

Analyzing: target //:license-check (165 packages loaded, 2141 targets configured)

Analyzing: target //:license-check (165 packages loaded, 2810 targets configured)

Analyzing: target //:license-check (168 packages loaded, 3776 targets configured)

Analyzing: target //:license-check (170 packages loaded, 5056 targets configured)

Analyzing: target //:license-check (170 packages loaded, 5060 targets configured)

Analyzing: target //:license-check (170 packages loaded, 5060 targets configured)

INFO: Analyzed target //:license-check (171 packages loaded, 6979 targets configured).
[9 / 13] JavaToolchainCompileClasses external/rules_java~/toolchains/platformclasspath_classes; 0s disk-cache
ERROR: /home/runner/work/inc_mw_per/inc_mw_per/BUILD:30:21: Generating Dash formatted dependency file ... failed: missing input file '//:cargo_lock'
ERROR: /home/runner/work/inc_mw_per/inc_mw_per/BUILD:30:21: Generating Dash formatted dependency file ... failed: 1 input file(s) do not exist
Target //:license.check.license_check failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /home/runner/work/inc_mw_per/inc_mw_per/BUILD:30:21 Generating Dash formatted dependency file ... failed: 1 input file(s) do not exist
INFO: Elapsed time: 187.149s, Critical Path: 0.34s
INFO: 12 processes: 2 disk cache hit, 10 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@github-actions
Copy link

The created documentation from the pull request is available at: docu-html

- Add basic types to kvsvalue
- Add type info into the json format
- Added tests for all the basic types
@vinodreddy-g vinodreddy-g force-pushed the vinod_support_basic_types branch from 4149339 to 54e67a6 Compare July 22, 2025 08:51
@vinodreddy-g vinodreddy-g marked this pull request as ready for review July 22, 2025 08:52
- Rebase to main and take json-backend changes
@vinodreddy-g vinodreddy-g force-pushed the vinod_support_basic_types branch from 54e67a6 to 2bdefbc Compare July 22, 2025 08:53
- add eclipse license header
@joshualicht
Copy link
Contributor

joshualicht commented Jul 23, 2025

@vinodreddy-g Do you want to reduce the storage-space in the written json-files like mentioned in the FT?
So e.g. instead of

// Example of how KvsValue is stored in the JSON file (type-tagged format):
// {
//   "my_int": { "type": "I32", "value": 42 },
//   "my_float": { "type": "F64", "value": 3.1415 },
//   "my_bool": { "type": "Boolean", "value": true },
//   "my_string": { "type": "String", "value": "hello" },
//   "my_array": { "type": "Array", "value": [ ... ] },
//   "my_object": { "type": "Object", "value": { ... } },
//   "my_null": { "type": "Null", "value": null }
// }

Something like this maybe:

// Example of how KvsValue is stored in the JSON file (type-tagged format):
// {
//   "my_int": { "t": "i32", "v": 42 },
//   "my_float": { "t": "f64", "v": 3.1415 },
//   "my_bool": { "t": "bool", "v": true },
//   "my_string": { "t": "str", "v": "hello" },
//   "my_array": { "t": "arr", "v": [ ... ] },
//   "my_object": { "t": "obj", "v": { ... } },
//   "my_null": { "t": "null", "v": null }
// }

When you first see this you probably need to open a documentation to understand the t and v, but i think they are mostly self explaining.

Also additional info from @vbogdanb : Please use lowercase letters for the types (I32 -> i32)

@@ -1,46 +1,197 @@
// Copyright (c) 2025 Contributors to the Eclipse Foundation
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated to this change: maybe missing license headers can be prevented with pre-commit hook, or at least CI task?

Copy link
Contributor Author

@vinodreddy-g vinodreddy-g Jul 31, 2025

Choose a reason for hiding this comment

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

Ci task has to merged from central repo .I will ask dan.

}
}
"Null" => {
if let JsonValue::Null = value {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can just return KvsValue::Null. But this raises a question - how can null be distinguished from erroneous condition?

Copy link
Contributor Author

@vinodreddy-g vinodreddy-g Jul 31, 2025

Choose a reason for hiding this comment

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

Will fix the error handling and few things are missing as new PR.

- Chnaged the "type" to "t" and "value" to "v"
- And used smaller case for type info in json
- Fixed the review comments on kvs_value
- Fixed the parsing in backend
- Fixed the tests
@vinodreddy-g vinodreddy-g force-pushed the vinod_support_basic_types branch from bfd259b to 072f9c9 Compare July 31, 2025 12:14
@vinodreddy-g vinodreddy-g requested a review from arkjedrz July 31, 2025 12:32
(_, _) => false,
_ => false,
}
// ...existing code...
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the meaning of this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed it.

.map(|(k, v)| (k.clone(), KvsValue::from(v)))
.collect(),
),
JsonValue::Number(_)
Copy link
Contributor

Choose a reason for hiding this comment

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

Remaining types can be handled with _ => KvsValue::Null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

JsonValue::Boolean(b) => KvsValue::Boolean(b),
JsonValue::String(s) => KvsValue::String(s),
JsonValue::Null => KvsValue::Null,
JsonValue::Object(mut obj) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

No mut would be preferred, but it's ok.

- Taking ownership of JsonValue and KvsValue in backend file.
@vinodreddy-g vinodreddy-g force-pushed the vinod_support_basic_types branch from e26aba4 to d08963c Compare August 1, 2025 11:04
- changed the kvsvalue structure
- changed the json_backend default matching arm
@vinodreddy-g vinodreddy-g requested a review from arkjedrz August 1, 2025 11:46
- error message checks in kvs_value.rs
@vinodreddy-g vinodreddy-g force-pushed the vinod_support_basic_types branch from b4bd6e7 to bd0d88d Compare August 1, 2025 11:56
@vinodreddy-g
Copy link
Contributor Author

@arkjedrz fixed the comments

@vinodreddy-g vinodreddy-g requested a review from qor-lb August 1, 2025 13:14
@vinodreddy-g vinodreddy-g merged commit c3e0baf into eclipse-score:main Aug 1, 2025
11 checks passed
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