Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ include("//:score_modules.MODULE.bazel")
include("//:score_toolchains.MODULE.bazel")

## Python
bazel_dep(name = "rules_python", version = "1.4.1")
bazel_dep(name = "rules_python", version = "1.5.1")

PYTHON_VERSION = "3.12"

Expand Down Expand Up @@ -62,6 +62,6 @@ git_override(
)

# imports for the feature showcase module
bazel_dep(name = "rules_rust", version = "0.61.0")
bazel_dep(name = "rules_rust", version = "0.67.0")
bazel_dep(name = "score_itf", version = "0.1.0")
bazel_dep(name = "score_crates", version = "0.0.4")
bazel_dep(name = "score_crates", version = "0.0.6")
2 changes: 1 addition & 1 deletion feature_integration_tests/test_cases/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ score_py_pytest(
env = {
"RUST_BACKTRACE": "1",
},
pytest_ini = ":pytest.ini",
pytest_config = ":pytest.ini",
deps = all_requirements,
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! KVS instance test helpers.

use crate::internals::persistency::kvs_parameters::KvsParameters;
use rust_kvs::json_backend::JsonBackendBuilder;
use rust_kvs::prelude::{ErrorCode, Kvs, KvsBuilder};

/// Create KVS instance based on provided parameters.
Expand All @@ -16,11 +17,21 @@ pub fn kvs_instance(kvs_parameters: KvsParameters) -> Result<Kvs, ErrorCode> {
}

if let Some(dir) = kvs_parameters.dir {
builder = builder.dir(dir.to_string_lossy().to_string());
}

if let Some(snapshot_max_count) = kvs_parameters.snapshot_max_count {
builder = builder.snapshot_max_count(snapshot_max_count);
// Use JsonBackendBuilder to configure directory and snapshot_max_count
// (these methods not available directly on KvsBuilder in Rust)
// change back to dir, if https://github.com/eclipse-score/persistency/issues/222 is resolved.
let backend = JsonBackendBuilder::new()
.working_dir(dir)
.snapshot_max_count(kvs_parameters.snapshot_max_count.unwrap_or(1))
.build();
builder = builder.backend(Box::new(backend));
} else if let Some(snapshot_max_count) = kvs_parameters.snapshot_max_count {
// Configure snapshot_max_count via backend
// change back to snapshot_max_count, if https://github.com/eclipse-score/persistency/issues/222 is resolved.
let backend = JsonBackendBuilder::new()
.snapshot_max_count(snapshot_max_count)
.build();
builder = builder.backend(Box::new(backend));
}

let kvs: Kvs = builder.build()?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ use orchestration::{
common::DesignConfig,
};

use rust_kvs::json_backend::JsonBackendBuilder;
use rust_kvs::kvs_api::KvsApi;
use rust_kvs::Kvs;
use rust_kvs::KvsBuilder;
use rust_kvs::prelude::{Kvs, KvsBuilder};
use serde_json::Value;

use test_scenarios_rust::scenario::Scenario;
Expand Down Expand Up @@ -76,10 +76,19 @@ async fn kvs_save_cycle_number(path: String) -> Result<(), UserErrValue> {
builder = builder.kvs_load(flag);
}
if let Some(dir) = params.dir {
builder = builder.dir(dir.to_string_lossy().to_string());
}
if let Some(max_count) = params.snapshot_max_count {
builder = builder.snapshot_max_count(max_count);
// Use JsonBackendBuilder to configure directory (dir() method not available in Rust KvsBuilder)
// change back to dir, if https://github.com/eclipse-score/persistency/issues/222 is resolved.
let backend = JsonBackendBuilder::new()
.working_dir(dir)
.snapshot_max_count(params.snapshot_max_count.unwrap_or(1))
.build();
builder = builder.backend(Box::new(backend));
} else if let Some(max_count) = params.snapshot_max_count {
// Configure snapshot_max_count via backend even without custom dir
let backend = JsonBackendBuilder::new()
.snapshot_max_count(max_count)
.build();
builder = builder.backend(Box::new(backend));
}

// Create KVS.
Expand Down
11 changes: 10 additions & 1 deletion feature_showcase/rust/orchestration_persistency/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//

use std::path::PathBuf;
use std::time::Duration;

use kyron::runtime::*;
Expand All @@ -25,6 +26,7 @@ use orchestration::{
prelude::InvokeResult,
};

use rust_kvs::json_backend::JsonBackendBuilder;
use rust_kvs::prelude::*;

// Example Summary:
Expand Down Expand Up @@ -56,8 +58,15 @@ async fn on_shutdown() -> InvokeResult {

// Instance ID for KVS object instances.
let instance_id = InstanceId(0);

// Configure backend with directory path (workaround: KvsBuilder::dir() not available in Rust)
// change back to dir, if https://github.com/eclipse-score/persistency/issues/222 is resolved.
let backend = JsonBackendBuilder::new()
.working_dir(PathBuf::from("./"))
.build();

let builder = KvsBuilder::new(instance_id)
.dir("./")
.backend(Box::new(backend))
.kvs_load(KvsLoad::Optional);
let kvs = builder.build().unwrap();

Expand Down
64 changes: 23 additions & 41 deletions known_good.json
Original file line number Diff line number Diff line change
@@ -1,76 +1,58 @@
{
"timestamp": "2025-08-13T12:55:10Z",
"modules": {
"score_baselibs": {
"version": "0.2.2",
"hash": "a3557b809406289a3bf0bc6c447a1d646ee67ba0",
"repo": "https://github.com/eclipse-score/baselibs.git",
"branch": "release_v0_2_2"
"hash": "ccfe7dc563bedc77fe6e19bd7050104e80fdf7e1"
},
"score_communication": {
"version": "0.1.2",
"repo": "https://github.com/eclipse-score/communication.git",
"hash": "d5414f75bfd4fc116572091ccca305d9e4b39338"
"hash": "1d3e115e953de771cfb6c780cf677cf3fe5e8bee"
},
"score_logging": {
"version": "0.0.4",
"hash": "d3624d52151fcde9c8351867353a8baf59a269cd",
"repo": "https://github.com/eclipse-score/logging.git",
"branch": "score_05_beta"
"hash": "cddfb10832cf384ee5c3f8553fb898f56c1d1def"
},
"score_persistency": {
"version": "0.2.2",
"hash": "9101956287a94d37ac34c29e94fa6f8d96879a73",
"repo": "https://github.com/eclipse-score/persistency.git"
"repo": "https://github.com/eclipse-score/persistency.git",
"hash": "652f78a822dac698dcb60f80adbc3aea488ebee5"
},
"score_orchestrator": {
"version": "0.0.4",
"hash": "92ee5ff22e571f2180a44edddcb81474e1ec68db",
"repo": "https://github.com/eclipse-score/orchestrator.git"
"repo": "https://github.com/eclipse-score/orchestrator.git",
"hash": "dcf5518ac78d01cc06ed8a7ffe9e476c2fa43bd6"
},
"score_kyron": {
"version": "0.0.3",
"hash": "558c5b5d8cd142baeafbfce15185c03b97e08eeb",
"repo": "https://github.com/eclipse-score/kyron.git"
"repo": "https://github.com/eclipse-score/kyron.git",
"hash": "ed312bdc6a50abc73f97b8c7e2ad4726fed06e81"
},
"score_feo": {
"version": "1.0.2",
"hash": "4841281ab81aad114cfc86a19a69c029a274f28d",
"repo": "https://github.com/eclipse-score/feo.git",
"hash": "4841281ab81aad114cfc86a19a69c029a274f28d",
"branch": "candidate_v0.5"
},
"score_tooling": {
"version": "1.0.4",
"hash": "905d1feb00f4ffb586d781f6420423855f802a4c",
"repo": "https://github.com/eclipse-score/tooling.git"
"repo": "https://github.com/eclipse-score/tooling.git",
"hash": "092d229dbc671febe87ddce5c9763b1f62e2dbaf"
},
"score_platform": {
"version": "0.5.2",
"hash": "754ef0ddf4cbc68667c1e54c3212a58ecda7837e",
"repo": "https://github.com/eclipse-score/score.git"
"repo": "https://github.com/eclipse-score/score.git",
"hash": "dafe356f60f725ff77941c220200e1df28965d2d"
},
"score_bazel_platforms": {
"version": "0.0.3",
"hash": "c4813d5b65be9cec1d3a2b4d56cce2cf334fad27",
"repo": "https://github.com/eclipse-score/bazel_platforms.git"
"repo": "https://github.com/eclipse-score/bazel_platforms.git",
"hash": "2286de89c35d5660ad183906a6f010b33fcac8db"
},
"score_test_scenarios": {
"version": "0.3.1",
"hash": "55280e1376922aead6e09f32542f4e2d0b90cc51",
"repo": "https://github.com/eclipse-score/testing_tools.git"
"repo": "https://github.com/eclipse-score/testing_tools.git",
"hash": "6b5e85863e8fb5687251c19f5bb81e0a3afdf581"
},
"score_docs_as_code": {
"version": "2.2.0",
"hash": "c87cd898ef63ce15daec434dc5ea161651cefe97",
"repo": "https://github.com/eclipse-score/docs-as-code.git"
"repo": "https://github.com/eclipse-score/docs-as-code.git",
"hash": "d9f95fd2fdf2df494a8d499b5f061a84f320b53b"
},
"score_process": {
"version": "1.4.0",
"hash": "d0570797b22649be2d2cdb603f2d70bdbff304ed",
"repo": "https://github.com/eclipse-score/process_description.git"
"repo": "https://github.com/eclipse-score/process_description.git",
"hash": "86f77b5514e32694efed3541558041b653830380"
}
},
"manifest_sha256": "4c9b7f...",
"suite": "full",
"duration_s": 742
"timestamp": "2026-01-21T08:46:20+00:00Z"
}
69 changes: 41 additions & 28 deletions score_modules.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,83 +11,96 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

# Generated from known_good.json at 2025-08-13T12:55:10Z
# Do not edit manually - use tools/update_module_from_known_good.py
# Generated from known_good.json at 2026-01-21T08:46:20+00:00Z
# Do not edit manually - use scripts/known_good/update_module_from_known_good.py

bazel_dep(name = "score_baselibs")
single_version_override(
git_override(
module_name = "score_baselibs",
version = "0.2.2",
remote = "https://github.com/eclipse-score/baselibs.git",
commit = "ccfe7dc563bedc77fe6e19bd7050104e80fdf7e1",
)

bazel_dep(name = "score_communication")
single_version_override(
git_override(
module_name = "score_communication",
version = "0.1.2",
remote = "https://github.com/eclipse-score/communication.git",
commit = "1d3e115e953de771cfb6c780cf677cf3fe5e8bee",
)

bazel_dep(name = "score_logging")
single_version_override(
git_override(
module_name = "score_logging",
version = "0.0.4",
remote = "https://github.com/eclipse-score/logging.git",
commit = "cddfb10832cf384ee5c3f8553fb898f56c1d1def",
)

bazel_dep(name = "score_persistency")
single_version_override(
git_override(
module_name = "score_persistency",
version = "0.2.2",
remote = "https://github.com/eclipse-score/persistency.git",
commit = "652f78a822dac698dcb60f80adbc3aea488ebee5",
)

bazel_dep(name = "score_orchestrator")
single_version_override(
git_override(
module_name = "score_orchestrator",
version = "0.0.4",
remote = "https://github.com/eclipse-score/orchestrator.git",
commit = "dcf5518ac78d01cc06ed8a7ffe9e476c2fa43bd6",
)

bazel_dep(name = "score_kyron")
single_version_override(
git_override(
module_name = "score_kyron",
version = "0.0.3",
remote = "https://github.com/eclipse-score/kyron.git",
commit = "ed312bdc6a50abc73f97b8c7e2ad4726fed06e81",
)

bazel_dep(name = "score_feo")
single_version_override(
git_override(
module_name = "score_feo",
version = "1.0.2",
remote = "https://github.com/eclipse-score/feo.git",
commit = "4841281ab81aad114cfc86a19a69c029a274f28d",
)

bazel_dep(name = "score_tooling")
single_version_override(
git_override(
module_name = "score_tooling",
version = "1.0.4",
remote = "https://github.com/eclipse-score/tooling.git",
commit = "092d229dbc671febe87ddce5c9763b1f62e2dbaf",
)

bazel_dep(name = "score_platform")
single_version_override(
git_override(
module_name = "score_platform",
version = "0.5.2",
remote = "https://github.com/eclipse-score/score.git",
commit = "dafe356f60f725ff77941c220200e1df28965d2d",
)

bazel_dep(name = "score_bazel_platforms")
single_version_override(
git_override(
module_name = "score_bazel_platforms",
version = "0.0.3",
remote = "https://github.com/eclipse-score/bazel_platforms.git",
commit = "2286de89c35d5660ad183906a6f010b33fcac8db",
)

bazel_dep(name = "score_test_scenarios")
single_version_override(
git_override(
module_name = "score_test_scenarios",
version = "0.3.1",
remote = "https://github.com/eclipse-score/testing_tools.git",
commit = "6b5e85863e8fb5687251c19f5bb81e0a3afdf581",
)

bazel_dep(name = "score_docs_as_code")
single_version_override(
git_override(
module_name = "score_docs_as_code",
version = "2.2.0",
remote = "https://github.com/eclipse-score/docs-as-code.git",
commit = "d9f95fd2fdf2df494a8d499b5f061a84f320b53b",
)

bazel_dep(name = "score_process")
single_version_override(
git_override(
module_name = "score_process",
version = "1.4.0",
remote = "https://github.com/eclipse-score/process_description.git",
commit = "86f77b5514e32694efed3541558041b653830380",
)
15 changes: 13 additions & 2 deletions scripts/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ def build_group(group_name: str, targets: str, config: str, log_file: Path) -> T

# Run build and capture output
with open(log_file, 'w') as f:
# Write command to log file
f.write(f"Command: {' '.join(cmd)}\n")
f.write("-" * 80 + "\n\n")

process = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
Expand Down Expand Up @@ -288,8 +292,15 @@ def main():
summary_file.parent.mkdir(parents=True, exist_ok=True)

# Load modules from known_good files
old_modules = load_known_good(Path('known_good.json')).modules if Path('known_good.json').exists() else {}
new_modules = load_known_good(known_good_file).modules if known_good_file else {}
try:
old_modules = load_known_good(Path('known_good.json')).modules if Path('known_good.json').exists() else {}
except FileNotFoundError:
old_modules = {}

try:
new_modules = load_known_good(known_good_file).modules if known_good_file else {}
except FileNotFoundError as e:
raise SystemExit(f"ERROR: {e}")

# Start summary
timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
Expand Down
8 changes: 7 additions & 1 deletion scripts/known_good/known_good_to_workspace_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ def main():
args = parser.parse_args()

# Load known_good using KnownGood dataclass
known_good = load_known_good(Path(args.known_good))
try:
known_good = load_known_good(Path(args.known_good))
except FileNotFoundError as e:
raise SystemExit(f"ERROR: {e}")
except ValueError as e:
raise SystemExit(f"ERROR: {e}")

modules = list(known_good.modules.values())

gita_metadata = []
Expand Down
Loading