Skip to content

Conversation

@igorostrowskiq
Copy link
Contributor

No description provided.

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 adds a new integration test for verifying that multiple KVS (Key-Value Store) instances with different IDs can store and retrieve independent values without interference. The implementation includes both Rust test scenarios and Python test cases, along with necessary helper modules for KVS instance management and parameter handling.

Key changes:

  • New test scenario multiple_instance_ids to verify multiple KVS instances operate independently
  • Helper modules for KVS parameter parsing and instance creation
  • Refactored code organization by moving runtime helpers into a kyron subdirectory
  • Extracted common test property decorator into a shared module

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
feature_integration_tests/rust_test_scenarios/src/scenarios/persistency/multiple_kvs_per_app.rs Implements the Rust test scenario that creates two KVS instances, stores different values, and verifies they persist independently
feature_integration_tests/rust_test_scenarios/src/scenarios/persistency/mod.rs Defines the persistency scenario group containing the multiple instance IDs test
feature_integration_tests/rust_test_scenarios/src/scenarios/mod.rs Registers the new persistency scenario group with the root scenario group
feature_integration_tests/rust_test_scenarios/src/scenarios/basic/orchestration_with_persistency.rs Updates import path to reflect reorganized runtime helper location
feature_integration_tests/rust_test_scenarios/src/scenarios/basic/mod.rs Simplifies code by importing OrchestrationWithPersistency directly
feature_integration_tests/rust_test_scenarios/src/internals/persistency/mod.rs Exports KVS helper modules for test scenarios
feature_integration_tests/rust_test_scenarios/src/internals/persistency/kvs_parameters.rs Provides serde-compatible structure for deserializing KVS configuration parameters
feature_integration_tests/rust_test_scenarios/src/internals/persistency/kvs_instance.rs Helper function to create KVS instances from test parameters
feature_integration_tests/rust_test_scenarios/src/internals/mod.rs Reorganizes internals by adding kyron and persistency modules
feature_integration_tests/rust_test_scenarios/src/internals/kyron/mod.rs New module containing Kyron-related helpers including runtime helper
feature_integration_tests/python_test_cases/tests/persistency/multiple_kvs_per_app.py Python test case that verifies the multiple KVS instances scenario
feature_integration_tests/python_test_cases/tests/basic/test_orchestartion_with_persistency.py Refactors to use shared test properties decorator
feature_integration_tests/python_test_cases/test_properties.py Extracts test properties decorator into shared module for reuse
feature_integration_tests/python_test_cases/fit_scenario.py Adds ResultCode constants for better readability of exit codes
feature_integration_tests/python_test_cases/BUILD Updates build configuration to include new test_properties module

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 24 to 28
pub struct MultipleInstanceIds;

impl Scenario for MultipleInstanceIds {
fn name(&self) -> &str {
"multiple_instance_ids"
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The scenario name multiple_instance_ids doesn't clearly convey that this test verifies multiple KVS instances per application. Consider renaming to multiple_kvs_per_app to match the module name and better describe what's being tested.

Suggested change
pub struct MultipleInstanceIds;
impl Scenario for MultipleInstanceIds {
fn name(&self) -> &str {
"multiple_instance_ids"
pub struct MultipleKvsPerApp;
impl Scenario for MultipleKvsPerApp {
fn name(&self) -> &str {
"multiple_kvs_per_app"

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

done

Comment on lines 24 to 26
pub struct MultipleInstanceIds;

impl Scenario for MultipleInstanceIds {
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The struct name MultipleInstanceIds is inconsistent with its scenario name multiple_instance_ids and doesn't clearly indicate it's testing multiple KVS instances per application. Consider renaming to MultipleKvsPerApp to match the module name and improve clarity.

Suggested change
pub struct MultipleInstanceIds;
impl Scenario for MultipleInstanceIds {
pub struct MultipleKvsPerApp;
impl Scenario for MultipleKvsPerApp {

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

done

Comment on lines +22 to +24
/// Parse `KvsParameters` from `Value`.
/// `Value` is expected to contain `kvs_parameters` field.
pub fn from_value(value: &serde_json::Value) -> Result<Self, serde_json::Error> {
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The from_value method expects a nested kvs_parameters field within the provided value, which creates an inconsistent API. The method already receives a value parameter, so requiring another kvs_parameters key inside it is confusing. Consider either removing the nested access or renaming the method to clarify this expectation.

Suggested change
/// Parse `KvsParameters` from `Value`.
/// `Value` is expected to contain `kvs_parameters` field.
pub fn from_value(value: &serde_json::Value) -> Result<Self, serde_json::Error> {
/// Parse `KvsParameters` directly from a JSON `Value`.
///
/// The provided `value` is expected to contain the fields of `KvsParameters`
/// at its top level (i.e., it should serialize exactly as `KvsParameters`).
pub fn from_value(value: &serde_json::Value) -> Result<Self, serde_json::Error> {
serde_json::from_value(value.clone())
}
/// Parse `KvsParameters` from a JSON `Value` that wraps it in a
/// `kvs_parameters` field.
///
/// This is useful when the configuration JSON has a structure like:
///
/// `{ "kvs_parameters": { ...fields of KvsParameters... } }`
pub fn from_wrapped_value(value: &serde_json::Value) -> Result<Self, serde_json::Error> {

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

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

"test": {"key": kvs_key, "value_1": kvs_value_1, "value_2": kvs_value_2},
}

def test_ok(
Copy link
Contributor

Choose a reason for hiding this comment

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

test should also verify saved json file

let value1 = kvs1
.get_value_as::<f64>(&logic.key)
.expect("Failed to read kvs1 value");
info!(instance = "kvs1", key = logic.key, value = value1);
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick:

  info!(
        instance = field::debug(kvs1.parameters().instance_id),
        key = logic.key, 
        value = value1
    );

imho better to log real istance id, custom name to distinguish between two sounds too similar and can be misleading

@PiotrKorkus PiotrKorkus force-pushed the igorostrowskiq_add_persistency_fit branch from 9274265 to 28f255d Compare January 8, 2026 11:09
@PiotrKorkus PiotrKorkus force-pushed the igorostrowskiq_add_persistency_fit branch from 28f255d to d7a2238 Compare January 8, 2026 11:16
@pawelrutkaq pawelrutkaq merged commit 4a653b4 into eclipse-score:main Jan 8, 2026
8 checks passed
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.

3 participants