Skip to content

Conversation

@arkjedrz
Copy link
Contributor

@arkjedrz arkjedrz commented Oct 7, 2025

  • Added KvsBackendRegistry.
  • KvsBuilder accepts backend params through KvsMap.
  • Built-in backend access is now hidden.

@arkjedrz arkjedrz self-assigned this Oct 7, 2025
@github-actions
Copy link

github-actions bot commented Oct 7, 2025

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

@github-actions
Copy link

github-actions bot commented Oct 7, 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 (8.3.0) and connecting to it...
INFO: Invocation ID: 56d73444-79a7-4f60-b79a-c3d46035fbf9
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
DEBUG: Rule 'rust_qnx8_toolchain+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-oEubHgeZDdT0svMmBKJx7c3/2TdSI/vfwRUyDn+TPGA="
DEBUG: Repository rust_qnx8_toolchain+ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:394:31: in <toplevel>
Computing main repo mapping: 
DEBUG: Rule 'rules_boost+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-iKHWUIBrUN/fFOCltkTmHfDcKw0h4ZVmP7NVSoc8zBs="
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:394:31: in <toplevel>
Computing main repo mapping: 
WARNING: For repository 'rules_cc', the root module requires module version [email protected], but got [email protected] in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'googletest', the root module requires module version [email protected], but got [email protected] in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'platforms', the root module requires module version [email protected], but got [email protected] in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Loading: 
Loading: 2 packages loaded
Loading: 2 packages loaded
    currently loading: 
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)

Analyzing: target //:license-check (77 packages loaded, 9 targets configured)

Analyzing: target //:license-check (78 packages loaded, 9 targets configured)

Analyzing: target //:license-check (138 packages loaded, 2531 targets configured)

Analyzing: target //:license-check (143 packages loaded, 2564 targets configured)

Analyzing: target //:license-check (143 packages loaded, 2564 targets configured)

Analyzing: target //:license-check (146 packages loaded, 4571 targets configured)

Analyzing: target //:license-check (146 packages loaded, 4571 targets configured)

DEBUG: Rule 'toolchains_llvm++llvm+llvm_toolchain_llvm' indicated that a canonical reproducible form can be obtained by modifying arguments _action_listener = <unknown object com.google.devtools.build.lib.packages.Attribute$LabelListLateBoundDefault>, _config_dependencies = [], _configure = False, _environ = [], _original_name = "llvm_toolchain_llvm"
DEBUG: Repository toolchains_llvm++llvm+llvm_toolchain_llvm instantiated at:
  <builtin>: in <toplevel>
Repository rule llvm defined at:
  /home/runner/.bazel/external/toolchains_llvm+/toolchain/rules.bzl:27:23: in <toplevel>
INFO: Analyzed target //:license-check (147 packages loaded, 6506 targets configured).
[5 / 13] checking cached actions
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 65 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 198.107s, Critical Path: 0.43s
INFO: 14 processes: 5 disk cache hit, 9 internal.
INFO: Build completed successfully, 14 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@arkjedrz arkjedrz force-pushed the arkjedrz_backend-registry branch 2 times, most recently from caa96d6 to 5038467 Compare October 9, 2025 12:56
@arkjedrz
Copy link
Contributor Author

arkjedrz commented Oct 9, 2025

obraz

@arkjedrz arkjedrz force-pushed the arkjedrz_backend-registry branch 2 times, most recently from bf13745 to e34c09b Compare October 16, 2025 09:07
- New `KvsBackend` API - independent from filesystem.
- Make `JsonBackend` explicitly default, allow others.
- Add `JsonBackendBuilder`.
  - This is required to allow for defaults override without setters.
  - E.g., `snapshot_max_count` can be set, but shouldn't change after
    init.
- Update tests.
@arkjedrz arkjedrz force-pushed the arkjedrz_backend-registry branch from e34c09b to f44a127 Compare October 19, 2025 16:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the KVS backend architecture to support pluggable backends through a registry pattern. The key changes include:

  • Introduction of KvsBackendRegistry for managing backend factories
  • Modified KvsBuilder to accept backend parameters via KvsMap instead of direct method calls
  • Removed public API methods for retrieving KVS and hash file paths (get_kvs_filename, get_hash_filename)

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/rust/rust_kvs/src/kvs_backend_registry.rs Introduces registry for backend factories with registration and retrieval functionality
src/rust/rust_kvs/src/kvs_backend.rs Refactors backend interface to use instance-aware methods instead of static path resolution
src/rust/rust_kvs/src/json_backend.rs Implements new backend interface with factory pattern and builder for JSON backend
src/rust/rust_kvs/src/kvs_builder.rs Replaces direct configuration methods with backend_parameters accepting KvsMap
src/rust/rust_kvs/src/kvs.rs Removes file path retrieval methods and delegates backend operations to backend instance
src/rust/rust_kvs/src/kvs_api.rs Removes get_kvs_filename and get_hash_filename from public API
tests/rust_test_scenarios/src/helpers/kvs_instance.rs Updates helper to construct backend parameters as KvsMap
src/rust/rust_kvs_tool/src/kvs_tool.rs Removes operations for getting KVS and hash filenames, updates to use backend parameters
tests/python_test_cases/tests/test_cit_snapshots.py Updates test assertions to check file existence directly instead of API calls
src/rust/rust_kvs/examples/*.rs Updates all examples to use new backend parameter pattern

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

builder.dir(dir)
let backend_parameters = KvsMap::from([
("name".to_string(), KvsValue::String("json".to_string())),
("name".to_string(), KvsValue::String(dir)),
Copy link

Copilot AI Oct 19, 2025

Choose a reason for hiding this comment

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

The key "name" is inserted twice in the map, which will overwrite the first entry with value "json". The second insertion should use "working_dir" as the key instead of "name".

Suggested change
("name".to_string(), KvsValue::String(dir)),
("working_dir".to_string(), KvsValue::String(dir)),

Copilot uses AI. Check for mistakes.
- Added `KvsBackendRegistry`.
- `KvsBuilder` accepts backend params through `KvsMap`.
- Built-in backend access is now hidden.
- `backend_registration` example.
- PlantUML-based class diagram.
@arkjedrz arkjedrz force-pushed the arkjedrz_backend-registry branch from f44a127 to 5ef20f7 Compare October 19, 2025 16:05
@arkjedrz
Copy link
Contributor Author

Merged changes with other PR, moved here #150

@arkjedrz arkjedrz closed this Oct 19, 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.

1 participant