From 9a7414d467ce3fe221734e96cf7d6f1fdcef5b62 Mon Sep 17 00:00:00 2001 From: Piotr Korkus Date: Tue, 10 Feb 2026 14:35:11 +0100 Subject: [PATCH 1/2] bazel: bump dependencies - preparation for release 0.6 --- MODULE.bazel | 17 +++++++++++------ tests/test_cases/BUILD | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index e0983c5..10e33a7 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -12,7 +12,7 @@ # ******************************************************************************* module( name = "score_orchestrator", - version = "0.0.4", + version = "0.0.0", compatibility_level = 0, ) @@ -35,12 +35,17 @@ bazel_dep(name = "platforms", version = "1.0.0") # S-CORE process rules bazel_dep(name = "score_bazel_platforms", version = "0.0.4") -bazel_dep(name = "score_docs_as_code", version = "2.2.0") -bazel_dep(name = "score_tooling", version = "1.0.4") +bazel_dep(name = "score_docs_as_code", version = "3.0.0") +bazel_dep(name = "score_tooling", version = "1.1.0") -bazel_dep(name = "score_process", version = "1.4.0", dev_dependency = True) -bazel_dep(name = "score_platform", version = "0.4.2", dev_dependency = True) # This is main score repo bazel_dep(name = "score_virtualization", version = "0.0.1", dev_dependency = True) +bazel_dep(name = "score_process", version = "1.4.3", dev_dependency = True) +bazel_dep(name = "score_platform", version = "0.5.2", dev_dependency = True) # This is main score repo +git_override( + module_name = "score_platform", + commit = "6ef2b8c740eb538d9b9b44fabd3dea5e0a888da6", + remote = "https://github.com/qorix-group/score.git", +) # Toolchains and extensions bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.2", dev_dependency = True) @@ -127,4 +132,4 @@ use_repo(pip, "pip_score_venv_test") # Module deps bazel_dep(name = "score_crates", version = "0.0.7") -bazel_dep(name = "score_kyron", version = "0.0.3") +bazel_dep(name = "score_kyron", version = "0.1.0") diff --git a/tests/test_cases/BUILD b/tests/test_cases/BUILD index 5a51e3c..9b1dfe9 100644 --- a/tests/test_cases/BUILD +++ b/tests/test_cases/BUILD @@ -52,7 +52,7 @@ score_py_pytest( env = { "RUST_BACKTRACE": "1", }, - pytest_ini = ":pytest.ini", + pytest_config = ":pytest.ini", tags = [ "manual", ], @@ -75,7 +75,7 @@ score_py_pytest( env = { "RUST_BACKTRACE": "1", }, - pytest_ini = ":pytest.ini", + pytest_config = ":pytest.ini", tags = [ "manual", ], From 7dfb42e85ff703ddea06ae2c6d59e9a763177fb7 Mon Sep 17 00:00:00 2001 From: Piotr Korkus Date: Tue, 10 Feb 2026 15:11:31 +0100 Subject: [PATCH 2/2] format: fix copyrights and linting --- .github/workflows/lint_fmt.yml | 65 ----- .vscode/rustfmt.sh | 3 + .vscode/settings.json | 12 +- rustfmt.toml | 10 +- src/orchestration/examples/basic.rs | 6 +- src/orchestration/examples/branching.rs | 9 +- .../examples/camera_drv_object_det/build.rs | 6 +- .../src/camera_driver.rs | 6 +- .../camera_drv_object_det/src/main.rs | 23 +- .../src/object_detection.rs | 6 +- src/orchestration/examples/catch_error.rs | 14 +- src/orchestration/examples/common/mod.rs | 6 +- .../examples/common/signal_handler.rs | 10 +- src/orchestration/examples/dag.rs | 9 +- .../examples/events_across_local_programs.rs | 9 +- .../examples/inter_process_event/receiver.rs | 9 +- .../examples/inter_process_event/sender.rs | 9 +- .../examples/main_macro_basic.rs | 6 +- src/orchestration/examples/select_action.rs | 6 +- src/orchestration/examples/send_ipc_event.rs | 9 +- src/orchestration/examples/shutdown.rs | 12 +- .../examples/shutdown_using_signals.rs | 9 +- src/orchestration/src/actions/action.rs | 8 +- src/orchestration/src/actions/catch.rs | 77 ++++-- src/orchestration/src/actions/concurrency.rs | 61 +++-- src/orchestration/src/actions/graph.rs | 236 ++++++++++++++---- src/orchestration/src/actions/ifelse.rs | 28 ++- src/orchestration/src/actions/invoke.rs | 126 +++++++--- src/orchestration/src/actions/mod.rs | 6 +- src/orchestration/src/actions/select.rs | 101 ++++++-- src/orchestration/src/actions/sequence.rs | 56 ++++- src/orchestration/src/actions/sync.rs | 6 +- src/orchestration/src/actions/trigger.rs | 6 +- src/orchestration/src/api/deployment.rs | 22 +- src/orchestration/src/api/design.rs | 31 ++- src/orchestration/src/api/mod.rs | 18 +- src/orchestration/src/common/mod.rs | 10 +- src/orchestration/src/common/orch_tag.rs | 6 +- src/orchestration/src/common/tag.rs | 8 +- src/orchestration/src/core/metering.rs | 11 +- src/orchestration/src/core/mod.rs | 6 +- src/orchestration/src/core/orch_locks.rs | 14 +- src/orchestration/src/core/runtime_seq_acc.rs | 10 +- src/orchestration/src/events/event_traits.rs | 6 +- .../src/events/events_provider.rs | 143 ++++++++--- src/orchestration/src/events/iceoryx/event.rs | 27 +- .../src/events/iceoryx/global_events.rs | 11 +- src/orchestration/src/events/iceoryx/mod.rs | 6 +- src/orchestration/src/events/local_events.rs | 15 +- src/orchestration/src/events/mod.rs | 6 +- .../src/events/stub_global_events.rs | 6 +- src/orchestration/src/events/timer_events.rs | 12 +- src/orchestration/src/lib.rs | 6 +- src/orchestration/src/prelude.rs | 6 +- src/orchestration/src/program.rs | 18 +- src/orchestration/src/program_database.rs | 171 +++++++++---- src/orchestration/src/testing/mod.rs | 47 +++- src/orchestration_macros/src/lib.rs | 6 +- src/xtask/src/main.rs | 77 ++++-- .../test_scenarios/rust/src/internals/mod.rs | 12 + .../rust/src/internals/runtime_helper.rs | 20 +- tests/test_scenarios/rust/src/main.rs | 12 + .../rust/src/scenarios/basic/demo.rs | 16 +- .../rust/src/scenarios/basic/mod.rs | 12 + .../rust/src/scenarios/basic/program_runs.rs | 51 ++-- .../test_scenarios/rust/src/scenarios/mod.rs | 12 + .../rust/src/scenarios/orchestration/mod.rs | 39 ++- .../orchestration_concurrency.rs | 12 + .../orchestration_dedicated_worker.rs | 12 + .../orchestration_double_handler_catch.rs | 12 + .../orchestration/orchestration_graph.rs | 47 +++- .../orchestration/orchestration_if_else.rs | 35 ++- .../orchestration/orchestration_methods.rs | 22 +- .../orchestration/orchestration_sequence.rs | 12 + .../orchestration/orchestration_shutdown.rs | 54 +++- .../orchestration/orchestration_sleep.rs | 48 +++- .../orchestration_trigger_sync.rs | 28 ++- .../orchestration_user_error_catch.rs | 104 ++++++-- 78 files changed, 1605 insertions(+), 619 deletions(-) delete mode 100644 .github/workflows/lint_fmt.yml create mode 100644 .vscode/rustfmt.sh diff --git a/.github/workflows/lint_fmt.yml b/.github/workflows/lint_fmt.yml deleted file mode 100644 index 08e1ef0..0000000 --- a/.github/workflows/lint_fmt.yml +++ /dev/null @@ -1,65 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2025 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* -name: rustfmt and clippy check - -on: - pull_request: - branches: [main, development] - types: [opened, ready_for_review, reopened, synchronize] - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -jobs: - lint-fmt-clippy: - timeout-minutes: 6 # 6 minutes is the maximum allowed for a cold run - runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install protoc 26.1 - uses: arduino/setup-protoc@v3 - with: - version: 26.1 - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Cache Cargo registry, git deps & target - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-lint-fmt-clippy-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-lint-fmt-clippy- - - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.87.0 - override: true - components: rustfmt - - - name: check code format (rustfmt) - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check - - name: check code license header (custom) - uses: actions-rs/cargo@v1 - with: - command: xtask - args: check_lic diff --git a/.vscode/rustfmt.sh b/.vscode/rustfmt.sh new file mode 100644 index 0000000..b0481d5 --- /dev/null +++ b/.vscode/rustfmt.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +bazel run @score_tooling//format_checker:rustfmt_with_policies diff --git a/.vscode/settings.json b/.vscode/settings.json index 897ebb9..b1bb8d2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -101,10 +101,18 @@ "[rust]": { "editor.defaultFormatter": "rust-lang.rust-analyzer", "editor.formatOnSave": true, + "editor.rulers": [ + 150 + ] }, - "rust-analyzer.runnables.command": "cargo xtask", + "rust-analyzer.cargo.features": [ + "qm" + ], "rust-analyzer.cargo.cfgs": [ - "debug_assertions", "!miri" ], + "rust-analyzer.check.command": "clippy", + "rust-analyzer.rustfmt.overrideCommand": [ + "${workspaceFolder}/.vscode/rustfmt.sh" + ] } diff --git a/rustfmt.toml b/rustfmt.toml index 80ed606..6cff387 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,6 +1,4 @@ -# rust formatter rules. -# check configuration fields here: https://rust-lang.github.io/rustfmt/?version=v1.6.0&search= - - -tab_spaces = 4 -max_width = 150 \ No newline at end of file +# `rustfmt` should not be used with local configuration. +# Use Bazel target for formatting. +# E.g., `bazel run //:format.fix_Rust_with_rustfmt` +DO_NOT_USE_LOCAL_RUSTFMT_TOML = false diff --git a/src/orchestration/examples/basic.rs b/src/orchestration/examples/basic.rs index 40fdc63..f602e4c 100644 --- a/src/orchestration/examples/basic.rs +++ b/src/orchestration/examples/basic.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use core::time::Duration; diff --git a/src/orchestration/examples/branching.rs b/src/orchestration/examples/branching.rs index 3fe5248..646e25a 100644 --- a/src/orchestration/examples/branching.rs +++ b/src/orchestration/examples/branching.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use kyron::runtime::*; use kyron_foundation::prelude::*; @@ -84,7 +84,8 @@ fn main() { let mut program1 = program_manager.get_program("ExampleProgram1").unwrap(); let mut program2 = program_manager.get_program("ExampleProgram2").unwrap(); - let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); + let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new() + .with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); let mut runtime = builder.build().unwrap(); runtime.block_on(async move { info!("Running program 1"); diff --git a/src/orchestration/examples/camera_drv_object_det/build.rs b/src/orchestration/examples/camera_drv_object_det/build.rs index 028c34f..4cd7ceb 100644 --- a/src/orchestration/examples/camera_drv_object_det/build.rs +++ b/src/orchestration/examples/camera_drv_object_det/build.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* fn main() { let orchestration_macro_include = "../../../orchestration_macros/cpp/include"; diff --git a/src/orchestration/examples/camera_drv_object_det/src/camera_driver.rs b/src/orchestration/examples/camera_drv_object_det/src/camera_driver.rs index d2a5fe9..22e66a3 100644 --- a/src/orchestration/examples/camera_drv_object_det/src/camera_driver.rs +++ b/src/orchestration/examples/camera_drv_object_det/src/camera_driver.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use kyron_foundation::prelude::*; use orchestration::actions::invoke::InvokeResult; diff --git a/src/orchestration/examples/camera_drv_object_det/src/main.rs b/src/orchestration/examples/camera_drv_object_det/src/main.rs index 5349adc..8d166cc 100644 --- a/src/orchestration/examples/camera_drv_object_det/src/main.rs +++ b/src/orchestration/examples/camera_drv_object_det/src/main.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* pub mod camera_driver; pub mod object_detection; @@ -92,11 +92,16 @@ fn obj_det_design() -> Result { let mut design = Design::new("obj_det_design".into(), DesignConfig::default()); let obj_det = Arc::new(Mutex::new(ObjectDetection::new())); - let t1_tag = design.register_invoke_method("pre_processing".into(), obj_det.clone(), ObjectDetection::pre_processing)?; + let t1_tag = design.register_invoke_method( + "pre_processing".into(), + obj_det.clone(), + ObjectDetection::pre_processing, + )?; let t2_tag = design.register_invoke_method("drive_q1".into(), obj_det.clone(), ObjectDetection::drive_q1)?; let t3_tag = design.register_invoke_method("drive_q2".into(), obj_det.clone(), ObjectDetection::drive_q2)?; let t4_tag = design.register_invoke_method("drive_q3".into(), obj_det.clone(), ObjectDetection::drive_q3)?; - let t5_tag = design.register_invoke_method("object_fusion".into(), obj_det.clone(), ObjectDetection::object_fusion)?; + let t5_tag = + design.register_invoke_method("object_fusion".into(), obj_det.clone(), ObjectDetection::object_fusion)?; design.register_event("timer_event".into())?; design.register_event("trigger_obj_det".into())?; @@ -133,8 +138,8 @@ fn main() { .expect("Failed to build tracing library"); // Create runtime - let (builder, _engine_id) = - kyron::runtime::RuntimeBuilder::new().with_engine(runtime::ExecutionEngineBuilder::new().task_queue_size(256).workers(3)); + let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new() + .with_engine(runtime::ExecutionEngineBuilder::new().task_queue_size(256).workers(3)); let mut runtime = builder.build().unwrap(); // Build Orchestration @@ -149,7 +154,9 @@ fn main() { let mut deployment = orch.get_deployment_mut(); // Mark user events as local one. - deployment.bind_events_as_local(&["timer_event".into()]).expect("Failed to specify event"); + deployment + .bind_events_as_local(&["timer_event".into()]) + .expect("Failed to specify event"); deployment .bind_events_as_local(&["trigger_obj_det".into()]) diff --git a/src/orchestration/examples/camera_drv_object_det/src/object_detection.rs b/src/orchestration/examples/camera_drv_object_det/src/object_detection.rs index 482e9d6..f657009 100644 --- a/src/orchestration/examples/camera_drv_object_det/src/object_detection.rs +++ b/src/orchestration/examples/camera_drv_object_det/src/object_detection.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use orchestration_macros::import_from_cpp; diff --git a/src/orchestration/examples/catch_error.rs b/src/orchestration/examples/catch_error.rs index 26ea67e..73a51b1 100644 --- a/src/orchestration/examples/catch_error.rs +++ b/src/orchestration/examples/catch_error.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* #![allow(unused_imports)] use kyron::runtime::*; use kyron_foundation::prelude::*; @@ -54,7 +54,10 @@ fn catch_error_component_design() -> Result { ) .catch(|e| { // Handle the error, e.g., log it or take some action - error!("Caught error: {:?}. This is not recoverable and we will stop execution", e); + error!( + "Caught error: {:?}. This is not recoverable and we will stop execution", + e + ); }) .build(design_instance), ) @@ -89,7 +92,8 @@ fn main() { .expect("Failed to build tracing library"); // Create runtime - let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); + let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new() + .with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); let mut runtime = builder.build().unwrap(); // Build Orchestration diff --git a/src/orchestration/examples/common/mod.rs b/src/orchestration/examples/common/mod.rs index 5856c55..2b2b6d6 100644 --- a/src/orchestration/examples/common/mod.rs +++ b/src/orchestration/examples/common/mod.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* #![allow(dead_code)] use core::sync::atomic::{AtomicU32, Ordering}; diff --git a/src/orchestration/examples/common/signal_handler.rs b/src/orchestration/examples/common/signal_handler.rs index 6a39c21..a8195f3 100644 --- a/src/orchestration/examples/common/signal_handler.rs +++ b/src/orchestration/examples/common/signal_handler.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* #![allow(dead_code)] @@ -63,7 +63,9 @@ impl SignalHandler { } } -static SIGNAL_HANDLER: SignalHandler = SignalHandler { signal: AtomicI32::new(0) }; +static SIGNAL_HANDLER: SignalHandler = SignalHandler { + signal: AtomicI32::new(0), +}; extern "C" fn handler(sig: i32) { SIGNAL_HANDLER.signal.store(sig, Ordering::SeqCst); diff --git a/src/orchestration/examples/dag.rs b/src/orchestration/examples/dag.rs index dffe18e..870b4c6 100644 --- a/src/orchestration/examples/dag.rs +++ b/src/orchestration/examples/dag.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use core::time::Duration; @@ -92,7 +92,8 @@ fn main() { .expect("Failed to build tracing library"); // Create runtime - let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(4)); + let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new() + .with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(4)); let mut runtime = builder.build().unwrap(); // Build Orchestration diff --git a/src/orchestration/examples/events_across_local_programs.rs b/src/orchestration/examples/events_across_local_programs.rs index 6755381..ccba308 100644 --- a/src/orchestration/examples/events_across_local_programs.rs +++ b/src/orchestration/examples/events_across_local_programs.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use kyron::runtime::*; use kyron_foundation::prelude::*; @@ -71,7 +71,8 @@ fn main() { .expect("Failed to build tracing library"); // Create runtime - let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); + let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new() + .with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); let mut runtime = builder.build().unwrap(); // Build Orchestration diff --git a/src/orchestration/examples/inter_process_event/receiver.rs b/src/orchestration/examples/inter_process_event/receiver.rs index 84be067..e7d737e 100644 --- a/src/orchestration/examples/inter_process_event/receiver.rs +++ b/src/orchestration/examples/inter_process_event/receiver.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use kyron::runtime::*; use kyron_foundation::prelude::*; @@ -55,7 +55,8 @@ fn main() { .build() .expect("Failed to build tracing library"); // Create runtime - let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); + let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new() + .with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); let mut runtime = builder.build().unwrap(); diff --git a/src/orchestration/examples/inter_process_event/sender.rs b/src/orchestration/examples/inter_process_event/sender.rs index 517e6ab..3413abf 100644 --- a/src/orchestration/examples/inter_process_event/sender.rs +++ b/src/orchestration/examples/inter_process_event/sender.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use ::core::time::Duration; use kyron::{futures::sleep, runtime::*}; @@ -63,7 +63,8 @@ fn main() { .expect("Failed to build tracing library"); // Create runtime - let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); + let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new() + .with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); let mut runtime = builder.build().unwrap(); diff --git a/src/orchestration/examples/main_macro_basic.rs b/src/orchestration/examples/main_macro_basic.rs index 9b756fa..8a2c68b 100644 --- a/src/orchestration/examples/main_macro_basic.rs +++ b/src/orchestration/examples/main_macro_basic.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use core::time::Duration; diff --git a/src/orchestration/examples/select_action.rs b/src/orchestration/examples/select_action.rs index 9e32022..d432470 100644 --- a/src/orchestration/examples/select_action.rs +++ b/src/orchestration/examples/select_action.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use core::time::Duration; diff --git a/src/orchestration/examples/send_ipc_event.rs b/src/orchestration/examples/send_ipc_event.rs index 7717a2f..b9b99ce 100644 --- a/src/orchestration/examples/send_ipc_event.rs +++ b/src/orchestration/examples/send_ipc_event.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use kyron::runtime::*; use kyron_foundation::prelude::*; @@ -57,7 +57,8 @@ fn main() { .expect("Failed to build tracing library"); // Create runtime - let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(1)); + let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new() + .with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(1)); let mut runtime = builder.build().unwrap(); diff --git a/src/orchestration/examples/shutdown.rs b/src/orchestration/examples/shutdown.rs index 96121f3..a09d6ca 100644 --- a/src/orchestration/examples/shutdown.rs +++ b/src/orchestration/examples/shutdown.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use core::time::Duration; use kyron::runtime::*; @@ -26,7 +26,8 @@ mod common; fn example_component_design() -> Result { let mut design = Design::new("ExampleDesign".into(), DesignConfig::default()); - let run_tag = design.register_invoke_async("PendingIndefinitely".into(), async || ::core::future::pending().await)?; + let run_tag = + design.register_invoke_async("PendingIndefinitely".into(), async || ::core::future::pending().await)?; let start_tag = design.register_invoke_fn("StartAction".into(), || { info!("Start action executed."); Ok(()) @@ -59,7 +60,8 @@ fn main() { .expect("Failed to build tracing library"); // Create runtime - let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); + let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new() + .with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); let mut runtime = builder.build().unwrap(); // Build Orchestration diff --git a/src/orchestration/examples/shutdown_using_signals.rs b/src/orchestration/examples/shutdown_using_signals.rs index a319d4b..3e8b198 100644 --- a/src/orchestration/examples/shutdown_using_signals.rs +++ b/src/orchestration/examples/shutdown_using_signals.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use ::core::future; use kyron::runtime::*; @@ -50,7 +50,8 @@ fn main() { .expect("Failed to build tracing library"); // Create runtime - let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); + let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new() + .with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2)); let mut runtime = builder.build().unwrap(); // Build Orchestration diff --git a/src/orchestration/src/actions/action.rs b/src/orchestration/src/actions/action.rs index ce4272d..906e594 100644 --- a/src/orchestration/src/actions/action.rs +++ b/src/orchestration/src/actions/action.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use crate::{actions::invoke::InvokeResult, common::tag::Tag}; @@ -134,7 +134,7 @@ impl ActionMeta { other => { *self = other; None - } + }, } } diff --git a/src/orchestration/src/actions/catch.rs b/src/orchestration/src/actions/catch.rs index 1703db2..ad677b8 100644 --- a/src/orchestration/src/actions/catch.rs +++ b/src/orchestration/src/actions/catch.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* #![allow(dead_code)] use ::core::ops::BitOr; @@ -174,7 +174,10 @@ impl CatchBuilder { ), }, filters: self.filters, - action: self.action.take().expect("CatchBuilder: Action must be set before building"), + action: self + .action + .take() + .expect("CatchBuilder: Action must be set before building"), handler: self.handler.clone(), }) } @@ -219,7 +222,11 @@ impl Into for ErrorFilter { } impl Catch { - async fn execute_impl(action: ReusableBoxFuture, handler: HandlerType, filters: ErrorFilters) -> ActionResult { + async fn execute_impl( + action: ReusableBoxFuture, + handler: HandlerType, + filters: ErrorFilters, + ) -> ActionResult { // How does it work: // There are two cases for error source: Return error from user Invoke or Timeout from `Timeout` action.. // @@ -238,14 +245,14 @@ impl Catch { Ok(_) => Ok(()), Err(ActionExecError::UserError(user_error)) if filters.is_filter_enabled(ErrorFilter::UserErrors) => { Self::handle_user_action(handler, HandlerErrors::UserErr(user_error)) - } + }, Err(ActionExecError::Timeout) if filters.is_filter_enabled(ErrorFilter::Timeouts) => { Self::handle_user_action(handler, HandlerErrors::Timeout) - } + }, Err(e) => { error!("Catch: Not filtered error in action execution: {:?}, propagating.", e); Err(e) - } + }, } } @@ -259,12 +266,12 @@ impl Catch { } else { Err(ActionExecError::from(e)) // Keep the error as is, maybe someone below can handle it } - } + }, HandlerType::NonRecoverable(ref mut user_handler) => { let mut handler = user_handler.lock().unwrap(); handler(e); Err(ActionExecError::NonRecoverableFailure) - } + }, } } } @@ -363,7 +370,9 @@ mod tests { let action = Box::new(MockAction::<()>::default()); let builder = CatchBuilder::new(ErrorFilter::UserErrors.into(), action); - let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new().times(0).build(); + let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new() + .times(0) + .build(); let mut catch = builder .catch(move |_err| { @@ -388,7 +397,9 @@ mod tests { ); let builder = CatchBuilder::new(ErrorFilter::UserErrors.into(), action); - let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new().times(1).build(); + let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new() + .times(1) + .build(); let mut catch = builder .catch(move |_err| { @@ -407,10 +418,16 @@ mod tests { fn when_user_action_finished_with_not_filtered_error_catch_does_not_call_handler() { { let design = Design::new("Design".into(), DesignConfig::default()); - let action = Box::new(MockActionBuilder::<()>::new().will_once_return(Err(ActionExecError::Timeout)).build()); + let action = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Err(ActionExecError::Timeout)) + .build(), + ); let builder = CatchBuilder::new(ErrorFilter::UserErrors.into(), action); - let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new().times(0).build(); + let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new() + .times(0) + .build(); let mut catch = builder .catch(move |_err| { @@ -434,7 +451,9 @@ mod tests { ); let builder = CatchBuilder::new(ErrorFilter::Timeouts.into(), action); - let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new().times(0).build(); + let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new() + .times(0) + .build(); let mut catch = builder .catch(move |_err| { @@ -446,17 +465,26 @@ mod tests { let mut poller = OrchTestingPoller::new(f); - assert_eq!(poller.poll(), Poll::Ready(Err(ActionExecError::UserError(UserErrValue::from(64))))); + assert_eq!( + poller.poll(), + Poll::Ready(Err(ActionExecError::UserError(UserErrValue::from(64)))) + ); } } #[test] fn when_action_finished_with_internal_err_error_is_propagated() { let design = Design::new("Design".into(), DesignConfig::default()); - let action = Box::new(MockActionBuilder::<()>::new().will_once_return(Err(ActionExecError::Internal)).build()); + let action = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Err(ActionExecError::Internal)) + .build(), + ); let builder = CatchBuilder::new(ErrorFilter::UserErrors.into(), action); - let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new().times(0).build(); + let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new() + .times(0) + .build(); let mut catch = builder .catch(move |_err| { @@ -481,7 +509,9 @@ mod tests { ); let builder = CatchBuilder::new(ErrorFilter::UserErrors.into(), action); - let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new().times(1).build(); + let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new() + .times(1) + .build(); let mut catch = builder .catch_recoverable(move |_err| { @@ -507,7 +537,9 @@ mod tests { ); let builder = CatchBuilder::new(ErrorFilter::UserErrors.into(), action); - let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new().times(1).build(); + let mut handler_mock = kyron_testing::mock_fn::MockFnBuilder::<(), bool>::new() + .times(1) + .build(); let mut catch = builder .catch_recoverable(move |_err| { @@ -520,6 +552,9 @@ mod tests { let mut poller = OrchTestingPoller::new(f); - assert_eq!(poller.poll(), Poll::Ready(Err(ActionExecError::UserError(UserErrValue::from(64))))); + assert_eq!( + poller.poll(), + Poll::Ready(Err(ActionExecError::UserError(UserErrValue::from(64)))) + ); } } diff --git a/src/orchestration/src/actions/concurrency.rs b/src/orchestration/src/actions/concurrency.rs index af25315..d139b33 100644 --- a/src/orchestration/src/actions/concurrency.rs +++ b/src/orchestration/src/actions/concurrency.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use super::action::{ActionBaseMeta, ActionMeta, ActionResult, ActionTrait, ReusableBoxFutureResult}; use crate::actions::action::ActionExecError; @@ -76,10 +76,15 @@ impl ConcurrencyBuilder { Box::new(Concurrency { base: ActionBaseMeta { tag: "orch::internal::concurrency".into(), - reusable_future_pool: Concurrency::create_reusable_future_pool(design.config.max_concurrent_action_executions), + reusable_future_pool: Concurrency::create_reusable_future_pool( + design.config.max_concurrent_action_executions, + ), }, actions: actions.into(), - futures_vec_pool: ReusableVecPool::::new(design.config.max_concurrent_action_executions, |_| Vec::new_in_global(length)), + futures_vec_pool: ReusableVecPool::::new( + design.config.max_concurrent_action_executions, + |_| Vec::new_in_global(length), + ), }) } } @@ -128,7 +133,9 @@ impl ActionTrait for Concurrency { futures_vec.push(ActionMeta::new(action.try_execute()?)); } - self.base.reusable_future_pool.next(Self::execute_impl(self.base.tag, futures_vec)) + self.base + .reusable_future_pool + .next(Self::execute_impl(self.base.tag, futures_vec)) } fn name(&self) -> &'static str { @@ -191,25 +198,25 @@ impl ConcurrencyJoin { if execution_result.is_err() && hnd.0 >= self.action_execution_result.0 { self.action_execution_result = (hnd.0, execution_result); } - } + }, Poll::Pending => { is_done = false; // At least one handle is still pending if self.state == FutureState::Polled { // Exit loop, no need to poll others now since aborting is not required break; } - } + }, } - } + }, ActionMeta::Future(_) => { not_recoverable_error!("Join handle not available for the spawned future!"); - } + }, ActionMeta::Empty => { if self.state == FutureState::Polled { continue; // Already polled. } not_recoverable_error!("Join handle not available for the spawned future!"); - } + }, } } @@ -218,10 +225,10 @@ impl ConcurrencyJoin { } else { FutureInternalReturn::polled() } - } + }, FutureState::Finished => { not_recoverable_error!("Future polled after it finished!") - } + }, }; self.state.assign_and_propagate(result) } @@ -255,7 +262,9 @@ mod tests { // Create a concurrency builder using new() and add two branches. let design = Design::new("Design".into(), DesignConfig::default()); let mut concurrency_builder = ConcurrencyBuilder::new(); - concurrency_builder.with_branch(Box::new(mock1)).with_branch(Box::new(mock2)); + concurrency_builder + .with_branch(Box::new(mock1)) + .with_branch(Box::new(mock2)); let concurrency = concurrency_builder.build(&design); assert_eq!(concurrency.actions.len(), 2); assert_eq!(concurrency.name(), "Concurrency"); @@ -289,7 +298,9 @@ mod tests { let design = Design::new("Design".into(), DesignConfig::default()); let mut concurrency_builder = ConcurrencyBuilder::new(); - concurrency_builder.with_branch(Box::new(mock1)).with_branch(Box::new(mock2)); + concurrency_builder + .with_branch(Box::new(mock1)) + .with_branch(Box::new(mock2)); let mut concurrency = concurrency_builder.build(&design); let mut poller = OrchTestingPoller::new(concurrency.try_execute().unwrap()); @@ -338,7 +349,9 @@ mod tests { #[ensure_clear_mock_runtime] fn concurrency_execute_ok_and_err_actions() { let mock1 = MockActionBuilder::<()>::new().will_once_return(Ok(())).build(); - let mock2 = MockActionBuilder::<()>::new().will_once_return(Err(ActionExecError::Internal)).build(); + let mock2 = MockActionBuilder::<()>::new() + .will_once_return(Err(ActionExecError::Internal)) + .build(); let mock3 = MockActionBuilder::<()>::new().will_once_return(Ok(())).build(); let mock4 = MockActionBuilder::<()>::new() .will_once_return(Err(ActionExecError::NonRecoverableFailure)) @@ -378,7 +391,9 @@ mod tests { let design = Design::new("Design".into(), DesignConfig::default()); let mut concurrency_builder = ConcurrencyBuilder::new(); - concurrency_builder.with_branch(Box::new(mock1)).with_branch(Box::new(mock2)); + concurrency_builder + .with_branch(Box::new(mock1)) + .with_branch(Box::new(mock2)); let mut concurrency = concurrency_builder.build(&design); let mut poller = OrchTestingPoller::new(concurrency.try_execute().unwrap()); @@ -408,7 +423,9 @@ mod tests { let design = Design::new("Design".into(), DesignConfig::default()); let mut concurrency_builder = ConcurrencyBuilder::new(); - concurrency_builder.with_branch(Box::new(mock1)).with_branch(Box::new(mock2)); + concurrency_builder + .with_branch(Box::new(mock1)) + .with_branch(Box::new(mock2)); let mut concurrency = concurrency_builder.build(&design); let mut poller = OrchTestingPoller::new(concurrency.try_execute().unwrap()); @@ -437,7 +454,9 @@ mod tests { let design = Design::new("Design".into(), DesignConfig::default()); let mut concurrency_builder = ConcurrencyBuilder::new(); - concurrency_builder.with_branch(Box::new(mock1)).with_branch(Box::new(mock2)); + concurrency_builder + .with_branch(Box::new(mock1)) + .with_branch(Box::new(mock2)); let mut concurrency = concurrency_builder.build(&design); // Execute the concurrency twice to ensure it can handle multiple executions correctly. @@ -470,7 +489,9 @@ mod tests { let design = Design::new("Design".into(), DesignConfig::default()); let mut concurrency_builder = ConcurrencyBuilder::new(); - concurrency_builder.with_branch(Box::new(mock1)).with_branch(Box::new(mock2)); + concurrency_builder + .with_branch(Box::new(mock1)) + .with_branch(Box::new(mock2)); let mut concurrency = concurrency_builder.build(&design); // Execute the concurrency twice to ensure it can handle multiple executions correctly. diff --git a/src/orchestration/src/actions/graph.rs b/src/orchestration/src/actions/graph.rs index e99f11d..2513e6f 100644 --- a/src/orchestration/src/actions/graph.rs +++ b/src/orchestration/src/actions/graph.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use super::action::{ActionBaseMeta, ActionMeta, ActionResult, ActionTrait, ReusableBoxFutureResult}; use crate::actions::action::ActionExecError; @@ -112,20 +112,24 @@ impl LocalGraphActionBuilder { /// Panics if there are no nodes or if the graph contains a cycle. pub fn build(&mut self, design: &Design) -> Box { assert!(!self.nodes.is_empty(), "No nodes in the graph."); - let mut sorted_nodes = LocalGraphActionBuilder::sort(&mut self.nodes).expect("Graph contains a cycle, which is not allowed."); + let mut sorted_nodes = + LocalGraphActionBuilder::sort(&mut self.nodes).expect("Graph contains a cycle, which is not allowed."); let num_of_nodes = sorted_nodes.len(); let nodes_edges = LocalGraphActionBuilder::build_edges(&mut sorted_nodes); // Create and return the LocalGraphAction Box::new(LocalGraphAction { base: ActionBaseMeta { tag: "orch::internal::graph".into(), - reusable_future_pool: LocalGraphAction::create_reusable_future_pool(design.config.max_concurrent_action_executions), + reusable_future_pool: LocalGraphAction::create_reusable_future_pool( + design.config.max_concurrent_action_executions, + ), }, nodes: sorted_nodes, nodes_edges, - futures_vec_pool: ReusableVecPool::::new(design.config.max_concurrent_action_executions, |_| { - Vec::new_in_global(num_of_nodes) - }), + futures_vec_pool: ReusableVecPool::::new( + design.config.max_concurrent_action_executions, + |_| Vec::new_in_global(num_of_nodes), + ), }) } @@ -240,7 +244,11 @@ struct NodeFuture { } impl LocalGraphAction { - async fn execute_impl(meta: Tag, futures_vec: ReusableObject>, edges_arr: Arc<[Box<[NodeId]>]>) -> ActionResult { + async fn execute_impl( + meta: Tag, + futures_vec: ReusableObject>, + edges_arr: Arc<[Box<[NodeId]>]>, + ) -> ActionResult { tracing_adapter!(graph = ?meta, "Before executing nodes"); let executor = DagExecutor::spawn_graph(futures_vec, edges_arr); @@ -254,7 +262,10 @@ impl LocalGraphAction { let mut futures_vec_pool = ReusableVecPool::::new(pool_size, |_| Vec::new_in_global(1)); let futures_vec = futures_vec_pool.next_object().unwrap(); let edges_arr = Arc::new([]); - ReusableBoxFuturePool::::for_value(pool_size, Self::execute_impl("dummy".into(), futures_vec, edges_arr)) + ReusableBoxFuturePool::::for_value( + pool_size, + Self::execute_impl("dummy".into(), futures_vec, edges_arr), + ) } } @@ -384,7 +395,7 @@ impl DagExecutor { Ok(Ok(_)) => { self.spawn_edge_nodes(index); continue; // No error, continue to next handle - } + }, // In case of error, edge nodes are not spawned Ok(Err(err)) => Err(err), @@ -396,20 +407,20 @@ impl DagExecutor { if execution_result.is_err() && index >= self.action_execution_result.0 { self.action_execution_result = (index, execution_result); } - } + }, Poll::Pending => { is_done = false; // At least one handle is still pending - } + }, } - } + }, ActionMeta::Future(_) => { // Future not yet spawned - } + }, ActionMeta::Empty => { if self.state != FutureState::Polled { not_recoverable_error!("Join handle not available for the spawned future!"); } - } + }, } } @@ -418,11 +429,11 @@ impl DagExecutor { } else { FutureInternalReturn::polled() } - } + }, // In the Finished state, polling is an error. FutureState::Finished => { not_recoverable_error!("Future polled after it finished!") - } + }, }; self.state.assign_and_propagate(result) } @@ -574,11 +585,36 @@ mod tests { // Note: We use `in_sequence` here to enforce a deterministic, top-down execution order in tests. // In practice, nodes 2 and 3 could run in parallel, so this sequence does not reflect actual concurrency. // This approach ensures predictable test results, even though real execution may differ. - let action_1 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); - let action_2 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); - let action_3 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); - let action_4 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); - let action_5 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); + let action_1 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); + let action_2 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); + let action_3 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); + let action_4 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); + let action_5 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); // Create a design with default config and a graph builder let design = Design::new("Design".into(), DesignConfig::default()); @@ -687,14 +723,24 @@ mod tests { // Note: We use `in_sequence` here to enforce a deterministic, top-down execution order in tests. // In practice, nodes 2 and 3 could run in parallel, so this sequence does not reflect actual concurrency. // This approach ensures predictable test results, even though real execution may differ. - let action_1 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); + let action_1 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); let action_2 = Box::new( MockActionBuilder::<()>::new() .will_once_return(Err(ActionExecError::Internal)) .in_sequence(&seq) .build(), ); - let action_3 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); + let action_3 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); // Action 4 and 5 should not be executed as action 2 fails for the graph below // Graph structure from left to right: // 2 @@ -751,7 +797,12 @@ mod tests { // Note: We use `in_sequence` here to enforce a deterministic, top-down execution order in tests. // In practice, nodes 2 and 3 could run in parallel, so this sequence does not reflect actual concurrency. // This approach ensures predictable test results, even though real execution may differ. - let action_1 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); + let action_1 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); let action_2 = Box::new( MockActionBuilder::<()>::new() .will_once_return(Err(ActionExecError::Internal)) @@ -815,11 +866,36 @@ mod tests { // Note: We use `in_sequence` here to enforce a deterministic, top-down execution order in tests. // In practice, nodes 2 and 3 could run in parallel, so this sequence does not reflect actual concurrency. // This approach ensures predictable test results, even though real execution may differ. - let action_1 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); - let action_2 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); - let action_3 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); - let action_4 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); - let action_5 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); + let action_1 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); + let action_2 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); + let action_3 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); + let action_4 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); + let action_5 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); // Create a design with default config and a graph builder let design = Design::new("Design".into(), DesignConfig::default()); @@ -880,7 +956,12 @@ mod tests { .in_sequence(&seq) .build(), ); - let action_5 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq).build()); + let action_5 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq) + .build(), + ); // Create a design with default config and a graph builder let design = Design::new("Design".into(), DesignConfig::default()); @@ -939,19 +1020,84 @@ mod tests { // Note: We use `in_sequence` here to enforce a deterministic, top-down execution order in tests. // In practice, few nodes run in parallel, so this sequence does not reflect actual concurrency. // This approach ensures predictable test results, even though real execution may differ. - let action_1 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq1).build()); - let action_2 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq2).build()); - let action_3 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq3).build()); - let action_4 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq1).build()); - let action_5 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq2).build()); - let action_6 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq3).build()); - let action_7 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq1).build()); - let action_8 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq1).build()); - let action_9 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq3).build()); - let action_10 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq1).build()); - let action_11 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq3).build()); - let action_12 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq1).build()); - let action_13 = Box::new(MockActionBuilder::<()>::new().will_once_return(Ok(())).in_sequence(&seq1).build()); + let action_1 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq1) + .build(), + ); + let action_2 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq2) + .build(), + ); + let action_3 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq3) + .build(), + ); + let action_4 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq1) + .build(), + ); + let action_5 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq2) + .build(), + ); + let action_6 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq3) + .build(), + ); + let action_7 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq1) + .build(), + ); + let action_8 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq1) + .build(), + ); + let action_9 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq3) + .build(), + ); + let action_10 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq1) + .build(), + ); + let action_11 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq3) + .build(), + ); + let action_12 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq1) + .build(), + ); + let action_13 = Box::new( + MockActionBuilder::<()>::new() + .will_once_return(Ok(())) + .in_sequence(&seq1) + .build(), + ); // Create a design with default config and a graph builder let design = Design::new("Design".into(), DesignConfig::default()); diff --git a/src/orchestration/src/actions/ifelse.rs b/src/orchestration/src/actions/ifelse.rs index cce8d52..e8736ea 100644 --- a/src/orchestration/src/actions/ifelse.rs +++ b/src/orchestration/src/actions/ifelse.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use crate::{ api::design::Design, @@ -44,7 +44,12 @@ impl IfElse { } /// Create an if-else action out of a design. - pub fn from_design(name: &str, true_branch: Box, false_branch: Box, design: &Design) -> Box { + pub fn from_design( + name: &str, + true_branch: Box, + false_branch: Box, + design: &Design, + ) -> Box { let tag = design.get_orchestration_tag(name.into()); assert!(tag.is_ok(), "Failed to create ifelse with name \"{}\"", name); @@ -65,7 +70,10 @@ impl IfElse { Box::new(IfElseArc { base: ActionBaseMeta { tag: TAG.into(), - reusable_future_pool: IfElseArc::::create_future_pool(IfElseArc::::choose_branch, config.max_concurrent_action_executions), + reusable_future_pool: IfElseArc::::create_future_pool( + IfElseArc::::choose_branch, + config.max_concurrent_action_executions, + ), }, condition, true_branch, @@ -236,7 +244,10 @@ mod tests { let mut ifelse = IfElse::from_arc_condition(Arc::new(TestCond {}), true_branch, false_branch, &config); let mut mock = OrchTestingPoller::new(ifelse.try_execute().unwrap()); - assert_eq!(Poll::Ready(Err(ActionExecError::UserError(0xcafe_u64.into()))), mock.poll()); + assert_eq!( + Poll::Ready(Err(ActionExecError::UserError(0xcafe_u64.into()))), + mock.poll() + ); } #[test] @@ -260,6 +271,9 @@ mod tests { let mut ifelse = IfElse::from_arc_condition(Arc::new(TestCond {}), true_branch, false_branch, &config); let mut mock = OrchTestingPoller::new(ifelse.try_execute().unwrap()); - assert_eq!(Poll::Ready(Err(ActionExecError::UserError(0xbeef_u64.into()))), mock.poll()); + assert_eq!( + Poll::Ready(Err(ActionExecError::UserError(0xbeef_u64.into()))), + mock.poll() + ); } } diff --git a/src/orchestration/src/actions/invoke.rs b/src/orchestration/src/actions/invoke.rs index 26db43e..2298a27 100644 --- a/src/orchestration/src/actions/invoke.rs +++ b/src/orchestration/src/actions/invoke.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,16 +9,21 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* -use super::action::{ActionBaseMeta, ActionExecError, ActionResult, ActionTrait, ReusableBoxFutureResult, UserErrValue}; +use super::action::{ + ActionBaseMeta, ActionExecError, ActionResult, ActionTrait, ReusableBoxFutureResult, UserErrValue, +}; use crate::{ api::design::Design, common::{orch_tag::OrchestrationTag, tag::Tag, DesignConfig}, }; use ::core::future::Future; -use kyron::{core::types::UniqueWorkerId, futures::reusable_box_future::ReusableBoxFuture, futures::reusable_box_future::ReusableBoxFuturePool}; +use kyron::{ + core::types::UniqueWorkerId, futures::reusable_box_future::ReusableBoxFuture, + futures::reusable_box_future::ReusableBoxFuturePool, +}; use kyron_foundation::prelude::CommonErrors; use std::sync::{Arc, Mutex}; @@ -36,7 +41,10 @@ pub struct Invoke {} impl Invoke { /// Create an invoke action out of an orchestration tag. pub fn from_tag(tag: &OrchestrationTag, config: &DesignConfig) -> Box { - tag.action_provider().borrow_mut().provide_invoke(*tag.tag(), config).unwrap() + tag.action_provider() + .borrow_mut() + .provide_invoke(*tag.tag(), config) + .unwrap() } pub fn from_design(name: &str, design: &Design) -> Box { @@ -51,10 +59,18 @@ impl Invoke { Self::from_tag(&tag.unwrap(), design.config()) } - pub(crate) fn from_fn(tag: Tag, action: InvokeFunctionType, worker_id: Option, config: &DesignConfig) -> Box { + pub(crate) fn from_fn( + tag: Tag, + action: InvokeFunctionType, + worker_id: Option, + config: &DesignConfig, + ) -> Box { Box::new(InvokeFn { action, - action_future_pool: ReusableBoxFuturePool::for_value(config.max_concurrent_action_executions, InvokeFn::action_future(action)), + action_future_pool: ReusableBoxFuturePool::for_value( + config.max_concurrent_action_executions, + InvokeFn::action_future(action), + ), worker_id, base: ActionBaseMeta { tag, @@ -66,7 +82,12 @@ impl Invoke { }) } - pub(crate) fn from_async(tag: Tag, action: A, worker_id: Option, config: &DesignConfig) -> Box + pub(crate) fn from_async( + tag: Tag, + action: A, + worker_id: Option, + config: &DesignConfig, + ) -> Box where A: Fn() -> F + 'static + Send, F: Future + 'static + Send, @@ -75,7 +96,10 @@ impl Invoke { Box::new(InvokeAsync { action, - action_future_pool: ReusableBoxFuturePool::for_value(config.max_concurrent_action_executions, InvokeAsync::::action_future(future)), + action_future_pool: ReusableBoxFuturePool::for_value( + config.max_concurrent_action_executions, + InvokeAsync::::action_future(future), + ), worker_id, base: ActionBaseMeta { tag, @@ -171,7 +195,8 @@ impl InvokeFn { match instant_or_spawn { InstantOrSpawn::None => Ok(()), InstantOrSpawn::Instant(action) => invoke_result_into_action_result(action()), - InstantOrSpawn::Spawn(future, worker_id) => match spawn_from_reusable_on_dedicated(future, worker_id).await { + InstantOrSpawn::Spawn(future, worker_id) => match spawn_from_reusable_on_dedicated(future, worker_id).await + { Ok(result) => result, Err(_) => Err(ActionExecError::Internal), }, @@ -229,7 +254,8 @@ where match instant_or_spawn { InstantOrSpawn::None => Ok(()), InstantOrSpawn::Instant(action) => invoke_result_into_action_result(action.await), - InstantOrSpawn::Spawn(future, worker_id) => match spawn_from_reusable_on_dedicated(future, worker_id).await { + InstantOrSpawn::Spawn(future, worker_id) => match spawn_from_reusable_on_dedicated(future, worker_id).await + { Ok(result) => result, Err(_) => Err(ActionExecError::Internal), }, @@ -244,17 +270,25 @@ where { fn try_execute(&mut self) -> ReusableBoxFutureResult { if let Some(worker_id) = self.worker_id { - match self.action_future_pool.next(InvokeAsync::::action_future((self.action)())) { - Ok(future) => self - .base - .reusable_future_pool - .next(InvokeAsync::::spawn_action(InstantOrSpawn::Spawn(future, worker_id))), + match self + .action_future_pool + .next(InvokeAsync::::action_future((self.action)())) + { + Ok(future) => { + self.base + .reusable_future_pool + .next(InvokeAsync::::spawn_action(InstantOrSpawn::Spawn( + future, worker_id, + ))) + }, Err(_) => Err(CommonErrors::GenericError), } } else { self.base .reusable_future_pool - .next(InvokeAsync::::spawn_action(InstantOrSpawn::Instant((self.action)()))) + .next(InvokeAsync::::spawn_action(InstantOrSpawn::Instant((self + .action)( + )))) } } @@ -289,8 +323,9 @@ impl InvokeMethod { InstantOrSpawn::Instant((object, method)) => { let mut object = object.lock().unwrap(); invoke_result_into_action_result(method(&mut object)) - } - InstantOrSpawn::Spawn(future, worker_id) => match spawn_from_reusable_on_dedicated(future, worker_id).await { + }, + InstantOrSpawn::Spawn(future, worker_id) => match spawn_from_reusable_on_dedicated(future, worker_id).await + { Ok(result) => result, Err(_) => Err(ActionExecError::Internal), }, @@ -305,10 +340,13 @@ impl ActionTrait for InvokeMethod { .action_future_pool .next(InvokeMethod::::action_future(Arc::clone(&self.object), self.method)) { - Ok(future) => self - .base - .reusable_future_pool - .next(InvokeMethod::::spawn_action(InstantOrSpawn::Spawn(future, worker_id))), + Ok(future) => { + self.base + .reusable_future_pool + .next(InvokeMethod::::spawn_action(InstantOrSpawn::Spawn( + future, worker_id, + ))) + }, Err(_) => Err(CommonErrors::GenericError), } } else { @@ -357,7 +395,8 @@ where match instant_or_spawn { InstantOrSpawn::None => Ok(()), InstantOrSpawn::Instant(future) => invoke_result_into_action_result(future.await), - InstantOrSpawn::Spawn(future, worker_id) => match spawn_from_reusable_on_dedicated(future, worker_id).await { + InstantOrSpawn::Spawn(future, worker_id) => match spawn_from_reusable_on_dedicated(future, worker_id).await + { Ok(result) => result, Err(_) => Err(ActionExecError::Internal), }, @@ -375,20 +414,23 @@ where if let Some(worker_id) = self.worker_id { match self .action_future_pool - .next(InvokeMethodAsync::::action_future((self.method)(Arc::clone(&self.object)))) - { + .next(InvokeMethodAsync::::action_future((self.method)(Arc::clone( + &self.object, + )))) { Ok(future) => self .base .reusable_future_pool - .next(InvokeMethodAsync::::spawn_action(InstantOrSpawn::Spawn(future, worker_id))), + .next(InvokeMethodAsync::::spawn_action(InstantOrSpawn::Spawn( + future, worker_id, + ))), Err(_) => Err(CommonErrors::GenericError), } } else { self.base .reusable_future_pool - .next(InvokeMethodAsync::::spawn_action(InstantOrSpawn::Instant((self.method)( - Arc::clone(&self.object), - )))) + .next(InvokeMethodAsync::::spawn_action(InstantOrSpawn::Instant( + (self.method)(Arc::clone(&self.object)), + ))) } } fn name(&self) -> &'static str { @@ -457,8 +499,20 @@ mod tests { let object = Arc::new(Mutex::new(TestObject {})); // Capture the same action multiple times. - let mut action1 = super::Invoke::from_method("tag".into(), Arc::clone(&object), TestObject::test_method, None, &config); - let mut action2 = super::Invoke::from_method("tag".into(), Arc::clone(&object), TestObject::test_method, None, &config); + let mut action1 = super::Invoke::from_method( + "tag".into(), + Arc::clone(&object), + TestObject::test_method, + None, + &config, + ); + let mut action2 = super::Invoke::from_method( + "tag".into(), + Arc::clone(&object), + TestObject::test_method, + None, + &config, + ); // Execute the same invoke multiple times. assert!(action1.try_execute().is_ok()); assert!(action1.try_execute().is_ok()); @@ -481,8 +535,10 @@ mod tests { let object = Arc::new(Mutex::new(TestObject {})); // Capture the same action multiple times. - let mut action1 = super::Invoke::from_method_async("tag".into(), Arc::clone(&object), test_method, None, &config); - let mut action2 = super::Invoke::from_method_async("tag".into(), Arc::clone(&object), test_method, None, &config); + let mut action1 = + super::Invoke::from_method_async("tag".into(), Arc::clone(&object), test_method, None, &config); + let mut action2 = + super::Invoke::from_method_async("tag".into(), Arc::clone(&object), test_method, None, &config); // Execute the same invoke multiple times. assert!(action1.try_execute().is_ok()); assert!(action1.try_execute().is_ok()); diff --git a/src/orchestration/src/actions/mod.rs b/src/orchestration/src/actions/mod.rs index aa73273..70b604a 100644 --- a/src/orchestration/src/actions/mod.rs +++ b/src/orchestration/src/actions/mod.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* pub mod action; pub mod catch; diff --git a/src/orchestration/src/actions/select.rs b/src/orchestration/src/actions/select.rs index 7ca6c4e..0000b89 100644 --- a/src/orchestration/src/actions/select.rs +++ b/src/orchestration/src/actions/select.rs @@ -1,5 +1,5 @@ -// -// Copyright (c) 2025 Contributors to the Eclipse Foundation +// ******************************************************************************* +// Copyright (c) 2026 Contributors to the Eclipse Foundation // // See the NOTICE file(s) distributed with this work for additional // information regarding copyright ownership. @@ -9,7 +9,7 @@ // // // SPDX-License-Identifier: Apache-2.0 -// +// ******************************************************************************* use super::action::{ActionBaseMeta, ActionResult, ActionTrait, ReusableBoxFutureResult}; use crate::api::design::Design; @@ -51,10 +51,10 @@ impl SelectBuilder { pub fn build(&mut self, design: &Design) -> Box