From 6110efedf889c19c8bd255bb96ee877b1a07ac66 Mon Sep 17 00:00:00 2001 From: shegazyy Date: Tue, 28 Jul 2026 18:41:57 +0300 Subject: [PATCH 1/2] Replace floating-point seconds with integer milliseconds in config --- .../lifecycle_demo_test.json | 2 +- .../config_schema/examples/example_conf.json | 2 +- .../config_schema/launch_manager.schema.json | 2 +- .../details/flatbuffer_config_loader_UT.cpp | 64 +++++----- .../details/flatbuffer_type_converters.cpp | 107 +++------------- .../details/flatbuffer_type_converters.hpp | 2 - .../details/flatbuffer_type_converters_UT.cpp | 114 +++++------------- .../src/configuration/details/lm_flatcfg.fbs | 32 ++--- .../flatbuffer_config_loader.hpp | 2 +- scripts/config_mapping/lifecycle_config.py | 34 ++++-- .../input/lm_config.json | 2 +- .../input/lm_config.json | 2 +- .../tests/smoke_test/input/lm_config.json | 2 +- .../complex_monitoring.json | 2 +- .../crash_on_startup/crash_on_startup.json | 2 +- .../non_reporting_config.json | 2 +- .../process_complex_rep_failure.json | 2 +- .../process_crash_monitoring.json | 2 +- .../process_fd_leak/process_fd_leak.json | 2 +- .../process_launch_args.json | 2 +- .../process_simple_rep_failure.json | 2 +- .../process_wrong_binary_failure.json | 2 +- .../smoke/lifecycle_smoketest.json | 2 +- .../switch_run_target/switch_run_target.json | 2 +- 24 files changed, 136 insertions(+), 253 deletions(-) diff --git a/examples/demo_verification/lifecycle_demo_test.json b/examples/demo_verification/lifecycle_demo_test.json index 0ad84cdb4..a43253be4 100644 --- a/examples/demo_verification/lifecycle_demo_test.json +++ b/examples/demo_verification/lifecycle_demo_test.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/examples", diff --git a/score/launch_manager/src/daemon/src/configuration/config_schema/examples/example_conf.json b/score/launch_manager/src/daemon/src/configuration/config_schema/examples/example_conf.json index ddb3bc7a9..92a216d86 100755 --- a/score/launch_manager/src/daemon/src/configuration/config_schema/examples/example_conf.json +++ b/score/launch_manager/src/daemon/src/configuration/config_schema/examples/example_conf.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "ready_timeout": 0.5, diff --git a/score/launch_manager/src/daemon/src/configuration/config_schema/launch_manager.schema.json b/score/launch_manager/src/daemon/src/configuration/config_schema/launch_manager.schema.json index 371630d73..b3481bbdf 100644 --- a/score/launch_manager/src/daemon/src/configuration/config_schema/launch_manager.schema.json +++ b/score/launch_manager/src/daemon/src/configuration/config_schema/launch_manager.schema.json @@ -373,7 +373,7 @@ "type": "integer", "description": "Specifies the schema version number that the Launch Manager uses to determine how to parse and validate this configuration file.", "enum": [ - 1 + 2 ] }, "defaults": { diff --git a/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_config_loader_UT.cpp b/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_config_loader_UT.cpp index 85c4e1b3c..fad631d1f 100644 --- a/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_config_loader_UT.cpp +++ b/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_config_loader_UT.cpp @@ -79,8 +79,8 @@ ::flatbuffers::Offset buildDefaultDeploymentConfig(::flatb auto sandbox = buildDefaultSandbox(fbb); return fb::CreateDeploymentConfig( fbb, - 1.0 /*ready_timeout*/, - 1.0 /*shutdown_timeout*/, + 1000 /*ready_timeout_ms*/, + 1000 /*shutdown_timeout_ms*/, 0 /*environmental_variables*/, bin_dir, work_dir, @@ -111,8 +111,9 @@ std::vector buildConfigWithComponents( ::flatbuffers::FlatBufferBuilder& fbb, ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> comps) { - auto fallback = fb::CreateFallbackRunTarget(fbb, 0 /*description*/, 0 /*depends_on*/, 1.0 /*transition_timeout*/); - auto alive_sup = fb::CreateAliveSupervision(fbb, 1.0 /*evaluation_cycle*/); + auto fallback = + fb::CreateFallbackRunTarget(fbb, 0 /*description*/, 0 /*depends_on*/, 1000 /*transition_timeout_ms*/); + auto alive_sup = fb::CreateAliveSupervision(fbb, 1000 /*evaluation_cycle_ms*/); auto rts = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto irt = fbb.CreateString("Startup"); auto config = fb::CreateLaunchManagerConfig( @@ -124,8 +125,9 @@ std::vector buildConfigWithRunTargets( ::flatbuffers::FlatBufferBuilder& fbb, ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> rts) { - auto fallback = fb::CreateFallbackRunTarget(fbb, 0 /*description*/, 0 /*depends_on*/, 1.0 /*transition_timeout*/); - auto alive_sup = fb::CreateAliveSupervision(fbb, 1.0 /*evaluation_cycle*/); + auto fallback = + fb::CreateFallbackRunTarget(fbb, 0 /*description*/, 0 /*depends_on*/, 1000 /*transition_timeout_ms*/); + auto alive_sup = fb::CreateAliveSupervision(fbb, 1000 /*evaluation_cycle_ms*/); auto comps = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto irt = fbb.CreateString("Startup"); auto config = fb::CreateLaunchManagerConfig( @@ -163,8 +165,8 @@ class FlatbufferConfigLoaderTest : public ::testing::Test ::flatbuffers::FlatBufferBuilder fbb; auto irt = fbb.CreateString(initial_run_target); auto fallback = - fb::CreateFallbackRunTarget(fbb, 0 /*description*/, 0 /*depends_on*/, 1.0 /*transition_timeout*/); - auto alive_sup = fb::CreateAliveSupervision(fbb, 1.0 /*evaluation_cycle*/); + fb::CreateFallbackRunTarget(fbb, 0 /*description*/, 0 /*depends_on*/, 1000 /*transition_timeout_ms*/); + auto alive_sup = fb::CreateAliveSupervision(fbb, 1000 /*evaluation_cycle_ms*/); auto comps = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto rts = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto config = fb::CreateLaunchManagerConfig(fbb, schema_version, comps, rts, irt, fallback, alive_sup); @@ -204,7 +206,7 @@ TEST_F(FlatbufferConfigLoaderTest, LoadSingleComponent) ::flatbuffers::FlatBufferBuilder fbb; auto alive_sup = fb::CreateComponentAliveSupervision( - fbb, 0.5 /*reporting_cycle*/, 2 /*failed_cycles_tolerance*/, 1 /*min_indications*/, 3 /*max_indications*/); + fbb, 500 /*reporting_cycle_ms*/, 2 /*failed_cycles_tolerance*/, 1 /*min_indications*/, 3 /*max_indications*/); auto app_profile = fb::CreateApplicationProfile( fbb, fb::ApplicationType::Reporting_And_Supervised, true /*is_self_terminating*/, alive_sup); auto bin_name = fbb.CreateString("my_binary"); @@ -220,8 +222,8 @@ TEST_F(FlatbufferConfigLoaderTest, LoadSingleComponent) auto sandbox = buildDefaultSandbox(fbb); auto deploy = fb::CreateDeploymentConfig( fbb, - 1.5 /*ready_timeout*/, - 2.5 /*shutdown_timeout*/, + 1500 /*ready_timeout_ms*/, + 2500 /*shutdown_timeout_ms*/, 0 /*environmental_variables*/, bin_dir, work_dir, @@ -277,7 +279,7 @@ TEST_F(FlatbufferConfigLoaderTest, LoadRunTargets) auto rt_desc = fbb.CreateString("Initial state"); auto rt_dep = fbb.CreateString("component_a"); auto rt_deps = fbb.CreateVector(std::vector<::flatbuffers::Offset<::flatbuffers::String>>{rt_dep}); - auto rt = fb::CreateRunTarget(fbb, rt_name, rt_desc, rt_deps, 5.0 /*transition_timeout*/, switch_action); + auto rt = fb::CreateRunTarget(fbb, rt_name, rt_desc, rt_deps, 5000 /*transition_timeout_ms*/, switch_action); auto rts = fbb.CreateVector(std::vector<::flatbuffers::Offset>{rt}); auto result = loadBuffer(buildConfigWithRunTargets(fbb, rts)); @@ -303,9 +305,9 @@ TEST_F(FlatbufferConfigLoaderTest, LoadFallbackRunTarget) auto fb_desc = fbb.CreateString("Fallback state"); auto fb_dep = fbb.CreateString("critical_comp"); auto fb_deps = fbb.CreateVector(std::vector<::flatbuffers::Offset<::flatbuffers::String>>{fb_dep}); - auto fallback = fb::CreateFallbackRunTarget(fbb, fb_desc, fb_deps, 10.0 /*transition_timeout*/); + auto fallback = fb::CreateFallbackRunTarget(fbb, fb_desc, fb_deps, 10000 /*transition_timeout_ms*/); - auto alive_sup = fb::CreateAliveSupervision(fbb, 1.0 /*evaluation_cycle*/); + auto alive_sup = fb::CreateAliveSupervision(fbb, 1000 /*evaluation_cycle_ms*/); auto comps = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto rts = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto irt = fbb.CreateString("Startup"); @@ -328,8 +330,9 @@ TEST_F(FlatbufferConfigLoaderTest, LoadAliveSupervision) ::flatbuffers::FlatBufferBuilder fbb; - auto alive_sup = fb::CreateAliveSupervision(fbb, 0.25 /*evaluation_cycle*/); - auto fallback = fb::CreateFallbackRunTarget(fbb, 0 /*description*/, 0 /*depends_on*/, 1.0 /*transition_timeout*/); + auto alive_sup = fb::CreateAliveSupervision(fbb, 250 /*evaluation_cycle_ms*/); + auto fallback = + fb::CreateFallbackRunTarget(fbb, 0 /*description*/, 0 /*depends_on*/, 1000 /*transition_timeout_ms*/); auto comps = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto rts = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto irt = fbb.CreateString("Startup"); @@ -350,10 +353,11 @@ TEST_F(FlatbufferConfigLoaderTest, LoadWatchdog) auto dev_path = fbb.CreateString("/dev/watchdog0"); auto watchdog = fb::CreateWatchdog( - fbb, dev_path, 30.0 /*max_timeout*/, true /*deactivate_on_shutdown*/, false /*require_magic_close*/); + fbb, dev_path, 30000 /*max_timeout_ms*/, true /*deactivate_on_shutdown*/, false /*require_magic_close*/); - auto fallback = fb::CreateFallbackRunTarget(fbb, 0 /*description*/, 0 /*depends_on*/, 1.0 /*transition_timeout*/); - auto alive_sup = fb::CreateAliveSupervision(fbb, 1.0 /*evaluation_cycle*/); + auto fallback = + fb::CreateFallbackRunTarget(fbb, 0 /*description*/, 0 /*depends_on*/, 1000 /*transition_timeout_ms*/); + auto alive_sup = fb::CreateAliveSupervision(fbb, 1000 /*evaluation_cycle_ms*/); auto comps = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto rts = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto irt = fbb.CreateString("Startup"); @@ -378,14 +382,14 @@ TEST_F(FlatbufferConfigLoaderTest, LoadRestartRecoveryAction) ::flatbuffers::FlatBufferBuilder fbb; - auto restart = fb::CreateRestartAction(fbb, 3 /*number_of_attempts*/, 1.5 /*delay_before_restart*/); + auto restart = fb::CreateRestartAction(fbb, 3 /*number_of_attempts*/, 1500 /*delay_before_restart_ms*/); auto bin_dir = fbb.CreateString("/opt"); auto work_dir = fbb.CreateString("/tmp"); auto sandbox = buildDefaultSandbox(fbb); auto deploy = fb::CreateDeploymentConfig( fbb, - 1.0 /*ready_timeout*/, - 1.0 /*shutdown_timeout*/, + 1000 /*ready_timeout_ms*/, + 1000 /*shutdown_timeout_ms*/, 0 /*environmental_variables*/, bin_dir, work_dir, @@ -417,7 +421,7 @@ TEST_F(FlatbufferConfigLoaderTest, LoadSwitchRunTargetAction) auto switch_action = fb::CreateSwitchRunTargetAction(fbb, target_name); auto rt_name = fbb.CreateString("Startup"); auto rt = fb::CreateRunTarget( - fbb, rt_name, 0 /*description*/, 0 /*depends_on*/, 1.0 /*transition_timeout*/, switch_action); + fbb, rt_name, 0 /*description*/, 0 /*depends_on*/, 1000 /*transition_timeout_ms*/, switch_action); auto rts = fbb.CreateVector(std::vector<::flatbuffers::Offset>{rt}); auto result = loadBuffer(buildConfigWithRunTargets(fbb, rts)); @@ -449,8 +453,8 @@ TEST_F(FlatbufferConfigLoaderTest, LoadSandbox) auto work_dir = fbb.CreateString("/tmp"); auto deploy = fb::CreateDeploymentConfig( fbb, - 0.5 /*ready_timeout*/, - 0.5 /*shutdown_timeout*/, + 500 /*ready_timeout_ms*/, + 500 /*shutdown_timeout_ms*/, 0 /*environmental_variables*/, bin_dir, work_dir, @@ -487,7 +491,7 @@ TEST_F(FlatbufferConfigLoaderTest, LoadComponentAliveSupervision) ::flatbuffers::FlatBufferBuilder fbb; auto comp_alive_sup = fb::CreateComponentAliveSupervision( - fbb, 1.0 /*reporting_cycle*/, 3 /*failed_cycles_tolerance*/, 2 /*min_indications*/, 5 /*max_indications*/); + fbb, 1000 /*reporting_cycle_ms*/, 3 /*failed_cycles_tolerance*/, 2 /*min_indications*/, 5 /*max_indications*/); auto app_profile = fb::CreateApplicationProfile( fbb, fb::ApplicationType::Reporting_And_Supervised, false /*is_self_terminating*/, comp_alive_sup); auto bin_name = fbb.CreateString("supervised_bin"); @@ -530,8 +534,8 @@ TEST_F(FlatbufferConfigLoaderTest, LoadEnvironmentalVariables) auto sandbox = buildDefaultSandbox(fbb); auto deploy = fb::CreateDeploymentConfig( fbb, - 0.5 /*ready_timeout*/, - 0.5 /*shutdown_timeout*/, + 500 /*ready_timeout_ms*/, + 500 /*shutdown_timeout_ms*/, env_vars, bin_dir, work_dir, @@ -682,8 +686,8 @@ TEST_F(FlatbufferConfigLoaderTest, MissingSchemaVersionReturnsInvalidFormat) ::flatbuffers::FlatBufferBuilder fbb; auto irt = fbb.CreateString("Startup"); - auto fallback = fb::CreateFallbackRunTarget(fbb, 0, 0, 1.0); - auto alive_sup = fb::CreateAliveSupervision(fbb, 1.0); + auto fallback = fb::CreateFallbackRunTarget(fbb, 0, 0, 1000); + auto alive_sup = fb::CreateAliveSupervision(fbb, 1000); auto comps = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto rts = fbb.CreateVector(std::vector<::flatbuffers::Offset>{}); auto config = fb::CreateLaunchManagerConfig(fbb, std::nullopt, comps, rts, irt, fallback, alive_sup); diff --git a/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters.cpp b/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters.cpp index 6c5c4f0fd..158a263af 100644 --- a/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters.cpp +++ b/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include @@ -57,29 +56,6 @@ std::optional optionalScalarValue(const ::flatbuffers::Optional& field) namespace details { -constexpr double kSecondsToMilliseconds = 1000.0; - -score::cpp::expected secondsToMs(double seconds) -{ - if (seconds < 0.0) - { - LM_LOG_ERROR() << "Negative time value " << seconds << " seconds is not supported"; - return score::cpp::make_unexpected(IConfigLoader::Error::InvalidFormat); - } - if (seconds * kSecondsToMilliseconds > static_cast(std::numeric_limits::max())) - { - LM_LOG_ERROR() << "Time value " << seconds << " seconds exceeds maximum representable milliseconds"; - return score::cpp::make_unexpected(IConfigLoader::Error::InvalidFormat); - } - const auto result = static_cast(seconds * kSecondsToMilliseconds); - if (seconds > 0.0 && result == 0U) - { - LM_LOG_ERROR() << "Sub-millisecond time value " << seconds << " seconds rounds to 0ms"; - return score::cpp::make_unexpected(IConfigLoader::Error::InvalidFormat); - } - return result; -} - ApplicationType convertApplicationType(fb::ApplicationType fb_type) { switch (fb_type) @@ -198,18 +174,13 @@ score::cpp::expected, IConfigLoader::Error> convert { return score::cpp::make_unexpected(number_of_attempts.error()); } - auto delay_before_restart = requireScalarValue(ra->delay_before_restart(), "RestartAction::delay_before_restart"); + auto delay_before_restart = + requireScalarValue(ra->delay_before_restart_ms(), "RestartAction::delay_before_restart_ms"); if (!delay_before_restart.has_value()) { return score::cpp::make_unexpected(delay_before_restart.error()); } - auto delay_ms = secondsToMs(*delay_before_restart); - if (!delay_ms.has_value()) - { - LM_LOG_ERROR() << "Invalid value for RestartAction::delay_before_restart"; - return score::cpp::make_unexpected(delay_ms.error()); - } - return std::optional{RestartAction{*number_of_attempts, *delay_ms}}; + return std::optional{RestartAction{*number_of_attempts, *delay_before_restart}}; } std::optional convertSwitchRunTargetAction(const fb::SwitchRunTargetAction* sa) @@ -237,7 +208,7 @@ score::cpp::expected convertCom if (fb_cas != nullptr) { auto reporting_cycle = - requireScalarValue(fb_cas->reporting_cycle(), "ComponentAliveSupervision::reporting_cycle"); + requireScalarValue(fb_cas->reporting_cycle_ms(), "ComponentAliveSupervision::reporting_cycle_ms"); if (!reporting_cycle.has_value()) { return score::cpp::make_unexpected(reporting_cycle.error()); @@ -248,13 +219,7 @@ score::cpp::expected convertCom { return score::cpp::make_unexpected(failed_cycles_tolerance.error()); } - auto reporting_cycle_ms = secondsToMs(*reporting_cycle); - if (!reporting_cycle_ms.has_value()) - { - LM_LOG_ERROR() << "Invalid value for ComponentAliveSupervision::reporting_cycle"; - return score::cpp::make_unexpected(reporting_cycle_ms.error()); - } - result.reporting_cycle_ms = *reporting_cycle_ms; + result.reporting_cycle_ms = *reporting_cycle; result.failed_cycles_tolerance = *failed_cycles_tolerance; result.min_indications = optionalScalarValue(fb_cas->min_indications()); result.max_indications = optionalScalarValue(fb_cas->max_indications()); @@ -419,30 +384,19 @@ score::cpp::expected convertDeploymentCo "DeploymentConfig::working_dir must never be nullptr as it is required in the schema"); SCORE_LANGUAGE_FUTURECPP_ASSERT_PRD_MESSAGE( fb_dc->sandbox(), "DeploymentConfig::sandbox must never be nullptr as it is required in the schema"); - auto ready_timeout = requireScalarValue(fb_dc->ready_timeout(), "DeploymentConfig::ready_timeout"); + auto ready_timeout = requireScalarValue(fb_dc->ready_timeout_ms(), "DeploymentConfig::ready_timeout_ms"); if (!ready_timeout.has_value()) { return score::cpp::make_unexpected(ready_timeout.error()); } - auto shutdown_timeout = requireScalarValue(fb_dc->shutdown_timeout(), "DeploymentConfig::shutdown_timeout"); + auto shutdown_timeout = + requireScalarValue(fb_dc->shutdown_timeout_ms(), "DeploymentConfig::shutdown_timeout_ms"); if (!shutdown_timeout.has_value()) { return score::cpp::make_unexpected(shutdown_timeout.error()); } - auto ready_timeout_ms = secondsToMs(*ready_timeout); - if (!ready_timeout_ms.has_value()) - { - LM_LOG_ERROR() << "Invalid value for DeploymentConfig::ready_timeout"; - return score::cpp::make_unexpected(ready_timeout_ms.error()); - } - auto shutdown_timeout_ms = secondsToMs(*shutdown_timeout); - if (!shutdown_timeout_ms.has_value()) - { - LM_LOG_ERROR() << "Invalid value for DeploymentConfig::shutdown_timeout"; - return score::cpp::make_unexpected(shutdown_timeout_ms.error()); - } - result.ready_timeout_ms = *ready_timeout_ms; - result.shutdown_timeout_ms = *shutdown_timeout_ms; + result.ready_timeout_ms = *ready_timeout; + result.shutdown_timeout_ms = *shutdown_timeout; result.environmental_variables = convertEnvironmentalVariables(fb_dc->environmental_variables()); result.bin_dir = fb_dc->bin_dir()->str(); result.working_dir = fb_dc->working_dir()->str(); @@ -506,7 +460,8 @@ score::cpp::expected convertRunTarget(con SCORE_LANGUAGE_FUTURECPP_ASSERT_PRD_MESSAGE( fb_rt->recovery_action(), "RunTarget::recovery_action must never be nullptr as it is required in the schema"); - auto transition_timeout = requireScalarValue(fb_rt->transition_timeout(), "RunTarget::transition_timeout"); + auto transition_timeout = + requireScalarValue(fb_rt->transition_timeout_ms(), "RunTarget::transition_timeout_ms"); if (!transition_timeout.has_value()) { return score::cpp::make_unexpected(transition_timeout.error()); @@ -514,13 +469,7 @@ score::cpp::expected convertRunTarget(con result.name = fb_rt->name()->str(); result.description = safeString(fb_rt->description()); result.depends_on = convertStringVector(fb_rt->depends_on()); - auto transition_timeout_ms = secondsToMs(*transition_timeout); - if (!transition_timeout_ms.has_value()) - { - LM_LOG_ERROR() << "Invalid value for RunTarget::transition_timeout"; - return score::cpp::make_unexpected(transition_timeout_ms.error()); - } - result.transition_timeout_ms = *transition_timeout_ms; + result.transition_timeout_ms = *transition_timeout; result.recovery_action = convertRequiredSwitchRunTargetAction(fb_rt->recovery_action()); } return result; @@ -533,20 +482,14 @@ score::cpp::expected convertFallb if (fb_frt != nullptr) { auto transition_timeout = - requireScalarValue(fb_frt->transition_timeout(), "FallbackRunTarget::transition_timeout"); + requireScalarValue(fb_frt->transition_timeout_ms(), "FallbackRunTarget::transition_timeout_ms"); if (!transition_timeout.has_value()) { return score::cpp::make_unexpected(transition_timeout.error()); } result.description = safeString(fb_frt->description()); result.depends_on = convertStringVector(fb_frt->depends_on()); - auto transition_timeout_ms = secondsToMs(*transition_timeout); - if (!transition_timeout_ms.has_value()) - { - LM_LOG_ERROR() << "Invalid value for FallbackRunTarget::transition_timeout"; - return score::cpp::make_unexpected(transition_timeout_ms.error()); - } - result.transition_timeout_ms = *transition_timeout_ms; + result.transition_timeout_ms = *transition_timeout; } return result; } @@ -558,18 +501,12 @@ score::cpp::expected convertAliveS { return AliveSupervisionConfig{}; } - auto evaluation_cycle = requireScalarValue(fb_as->evaluation_cycle(), "AliveSupervision::evaluation_cycle"); + auto evaluation_cycle = requireScalarValue(fb_as->evaluation_cycle_ms(), "AliveSupervision::evaluation_cycle_ms"); if (!evaluation_cycle.has_value()) { return score::cpp::make_unexpected(evaluation_cycle.error()); } - auto evaluation_cycle_ms = secondsToMs(*evaluation_cycle); - if (!evaluation_cycle_ms.has_value()) - { - LM_LOG_ERROR() << "Invalid value for AliveSupervision::evaluation_cycle"; - return score::cpp::make_unexpected(evaluation_cycle_ms.error()); - } - return AliveSupervisionConfig{*evaluation_cycle_ms}; + return AliveSupervisionConfig{*evaluation_cycle}; } score::cpp::expected, IConfigLoader::Error> convertWatchdog(const fb::Watchdog* fb_wd) @@ -580,7 +517,7 @@ score::cpp::expected, IConfigLoader::Error> conver } SCORE_LANGUAGE_FUTURECPP_ASSERT_PRD_MESSAGE( fb_wd->device_file_path(), "Watchdog::device_file_path must never be nullptr as it is required in the schema"); - auto max_timeout = requireScalarValue(fb_wd->max_timeout(), "Watchdog::max_timeout"); + auto max_timeout = requireScalarValue(fb_wd->max_timeout_ms(), "Watchdog::max_timeout_ms"); if (!max_timeout.has_value()) { return score::cpp::make_unexpected(max_timeout.error()); @@ -598,13 +535,7 @@ score::cpp::expected, IConfigLoader::Error> conver } WatchdogConfig result{}; result.device_file_path = fb_wd->device_file_path()->str(); - auto max_timeout_ms = secondsToMs(*max_timeout); - if (!max_timeout_ms.has_value()) - { - LM_LOG_ERROR() << "Invalid value for Watchdog::max_timeout"; - return score::cpp::make_unexpected(max_timeout_ms.error()); - } - result.max_timeout_ms = *max_timeout_ms; + result.max_timeout_ms = *max_timeout; result.deactivate_on_shutdown = *deactivate_on_shutdown; result.require_magic_close = *require_magic_close; return std::optional{std::move(result)}; diff --git a/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters.hpp b/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters.hpp index e22431ec7..549544499 100644 --- a/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters.hpp +++ b/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters.hpp @@ -63,8 +63,6 @@ score::cpp::expected validateRange(int64_t value, // --- Scalar and enum helpers --- -/// @brief Converts a time value from seconds to milliseconds. -[[nodiscard]] score::cpp::expected secondsToMs(double seconds); /// @brief Converts a FlatBuffer ApplicationType enum to the config ApplicationType. [[nodiscard]] ApplicationType convertApplicationType(fb::ApplicationType fb_type); /// @brief Converts a FlatBuffer ProcessState enum to the config ProcessState. diff --git a/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters_UT.cpp b/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters_UT.cpp index 0fb421246..181037160 100644 --- a/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters_UT.cpp +++ b/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters_UT.cpp @@ -63,64 +63,6 @@ class TypeConverterTestBase : public ::testing::Test } }; -// ============================================================================ -// secondsToMs tests -// ============================================================================ - -class SecondsToMsTest : public TypeConverterTestBase -{ -}; - -TEST_F(SecondsToMsTest, ConvertsPositiveValue) -{ - RecordProperty("Description", "A positive seconds value converts to milliseconds."); - - auto result = details::secondsToMs(1.5); - - ASSERT_THAT(result.has_value(), IsTrue()); - EXPECT_THAT(*result, Eq(1500U)); -} - -TEST_F(SecondsToMsTest, ConvertsZero) -{ - RecordProperty("Description", "Zero seconds converts to zero milliseconds."); - - auto result = details::secondsToMs(0.0); - - ASSERT_THAT(result.has_value(), IsTrue()); - EXPECT_THAT(*result, Eq(0U)); -} - -TEST_F(SecondsToMsTest, RejectsNegativeValue) -{ - RecordProperty("Description", "A negative seconds value returns InvalidFormat."); - - auto result = details::secondsToMs(-1.0); - - ASSERT_THAT(result.has_value(), IsFalse()); - EXPECT_THAT(result.error(), Eq(IConfigLoader::Error::InvalidFormat)); -} - -TEST_F(SecondsToMsTest, RejectsOverflow) -{ - RecordProperty("Description", "A value exceeding uint32_t max milliseconds returns InvalidFormat."); - - auto result = details::secondsToMs(5000000.0); - - ASSERT_THAT(result.has_value(), IsFalse()); - EXPECT_THAT(result.error(), Eq(IConfigLoader::Error::InvalidFormat)); -} - -TEST_F(SecondsToMsTest, RejectsSubMillisecond) -{ - RecordProperty("Description", "A positive value that rounds to 0ms returns InvalidFormat."); - - auto result = details::secondsToMs(0.0001); - - ASSERT_THAT(result.has_value(), IsFalse()); - EXPECT_THAT(result.error(), Eq(IConfigLoader::Error::InvalidFormat)); -} - // ============================================================================ // Enum conversion tests // ============================================================================ @@ -369,7 +311,7 @@ TEST_F(ConverterTest, ConvertRestartActionValid) { RecordProperty("Description", "convertRestartAction with valid fields returns correct values."); ::flatbuffers::FlatBufferBuilder fbb; - auto ra = fb::CreateRestartAction(fbb, 3 /*number_of_attempts*/, 1.5 /*delay_before_restart*/); + auto ra = fb::CreateRestartAction(fbb, 3 /*number_of_attempts*/, 1500 /*delay_before_restart_ms*/); fbb.Finish(ra); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -428,7 +370,7 @@ TEST_F(ConverterTest, ConvertComponentAliveSupervisionValid) RecordProperty("Description", "convertComponentAliveSupervision maps all fields correctly."); ::flatbuffers::FlatBufferBuilder fbb; auto cas = fb::CreateComponentAliveSupervision( - fbb, 0.5 /*reporting_cycle*/, 2 /*failed_cycles_tolerance*/, 1 /*min_indications*/, 3 /*max_indications*/); + fbb, 500 /*reporting_cycle_ms*/, 2 /*failed_cycles_tolerance*/, 1 /*min_indications*/, 3 /*max_indications*/); fbb.Finish(cas); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -447,7 +389,7 @@ TEST_F(ConverterTest, ConvertComponentAliveSupervisionMissingReportingCycleRetur RecordProperty("Description", "Missing reporting_cycle returns InvalidFormat."); ::flatbuffers::FlatBufferBuilder fbb; auto cas = fb::CreateComponentAliveSupervision( - fbb, ::flatbuffers::nullopt /*reporting_cycle*/, 3 /*failed_cycles_tolerance*/); + fbb, ::flatbuffers::nullopt /*reporting_cycle_ms*/, 3 /*failed_cycles_tolerance*/); fbb.Finish(cas); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -461,7 +403,7 @@ TEST_F(ConverterTest, ConvertComponentAliveSupervisionMissingToleranceReturnsErr RecordProperty("Description", "Missing failed_cycles_tolerance returns InvalidFormat."); ::flatbuffers::FlatBufferBuilder fbb; auto cas = fb::CreateComponentAliveSupervision( - fbb, 1.0 /*reporting_cycle*/, ::flatbuffers::nullopt /*failed_cycles_tolerance*/); + fbb, 1000 /*reporting_cycle_ms*/, ::flatbuffers::nullopt /*failed_cycles_tolerance*/); fbb.Finish(cas); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -474,7 +416,7 @@ TEST_F(ConverterTest, ConvertComponentAliveSupervisionBothIndicationsAbsentRetur { RecordProperty("Description", "Both min/max_indications absent returns InvalidFormat."); ::flatbuffers::FlatBufferBuilder fbb; - auto cas = fb::CreateComponentAliveSupervision(fbb, 1.0 /*reporting_cycle*/, 3 /*failed_cycles_tolerance*/); + auto cas = fb::CreateComponentAliveSupervision(fbb, 1000 /*reporting_cycle_ms*/, 3 /*failed_cycles_tolerance*/); fbb.Finish(cas); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -488,7 +430,7 @@ TEST_F(ConverterTest, ConvertComponentAliveSupervisionOnlyMinIndicationsPresent) RecordProperty("Description", "Only min_indications set is accepted, max_indications remains nullopt."); ::flatbuffers::FlatBufferBuilder fbb; auto cas = fb::CreateComponentAliveSupervision( - fbb, 1.0 /*reporting_cycle*/, 3 /*failed_cycles_tolerance*/, 2 /*min_indications*/); + fbb, 1000 /*reporting_cycle_ms*/, 3 /*failed_cycles_tolerance*/, 2 /*min_indications*/); fbb.Finish(cas); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -505,7 +447,7 @@ TEST_F(ConverterTest, ConvertComponentAliveSupervisionOnlyMaxIndicationsPresent) ::flatbuffers::FlatBufferBuilder fbb; auto cas = fb::CreateComponentAliveSupervision( fbb, - 1.0 /*reporting_cycle*/, + 1000 /*reporting_cycle_ms*/, 3 /*failed_cycles_tolerance*/, ::flatbuffers::nullopt /*min_indications*/, 5 /*max_indications*/); @@ -754,8 +696,8 @@ TEST_F(ConverterTest, ConvertDeploymentConfigValid) auto sandbox = buildDefaultSandbox(fbb); auto deploy = fb::CreateDeploymentConfig( fbb, - 1.5 /*ready_timeout*/, - 2.5 /*shutdown_timeout*/, + 1500 /*ready_timeout_ms*/, + 2500 /*shutdown_timeout_ms*/, 0 /*environmental_variables*/, bin_dir, work_dir, @@ -784,8 +726,8 @@ TEST_F(ConverterTest, ConvertDeploymentConfigMissingReadyTimeoutReturnsError) auto sandbox = buildDefaultSandbox(fbb); auto deploy = fb::CreateDeploymentConfig( fbb, - ::flatbuffers::nullopt /*ready_timeout*/, - 1.0 /*shutdown_timeout*/, + ::flatbuffers::nullopt /*ready_timeout_ms*/, + 1000 /*shutdown_timeout_ms*/, 0 /*environmental_variables*/, bin_dir, work_dir, @@ -809,8 +751,8 @@ TEST_F(ConverterTest, ConvertDeploymentConfigMissingShutdownTimeoutReturnsError) auto sandbox = buildDefaultSandbox(fbb); auto deploy = fb::CreateDeploymentConfig( fbb, - 1.0 /*ready_timeout*/, - ::flatbuffers::nullopt /*shutdown_timeout*/, + 1000 /*ready_timeout_ms*/, + ::flatbuffers::nullopt /*shutdown_timeout_ms*/, 0 /*environmental_variables*/, bin_dir, work_dir, @@ -841,8 +783,8 @@ TEST_F(ConverterTest, ConvertComponentValid) auto sandbox = buildDefaultSandbox(fbb); auto deploy = fb::CreateDeploymentConfig( fbb, - 1.0 /*ready_timeout*/, - 1.0 /*shutdown_timeout*/, + 1000 /*ready_timeout_ms*/, + 1000 /*shutdown_timeout_ms*/, 0 /*environmental_variables*/, bin_dir, work_dir, @@ -881,8 +823,8 @@ TEST_F(ConverterTest, ConvertComponentsValid) auto sandbox = buildDefaultSandbox(fbb); auto deploy = fb::CreateDeploymentConfig( fbb, - 1.0 /*ready_timeout*/, - 1.0 /*shutdown_timeout*/, + 1000 /*ready_timeout_ms*/, + 1000 /*shutdown_timeout_ms*/, 0 /*environmental_variables*/, bin_dir, work_dir, @@ -925,8 +867,8 @@ TEST_F(ConverterTest, ConvertComponentsWithInvalidComponentReturnsError) auto sandbox = buildDefaultSandbox(fbb); auto deploy = fb::CreateDeploymentConfig( fbb, - 1.0 /*ready_timeout*/, - 1.0 /*shutdown_timeout*/, + 1000 /*ready_timeout_ms*/, + 1000 /*shutdown_timeout_ms*/, 0 /*environmental_variables*/, bin_dir, work_dir, @@ -955,7 +897,7 @@ TEST_F(ConverterTest, ConvertRunTargetsValid) auto switch_action = fb::CreateSwitchRunTargetAction(fbb, switch_target); auto rt_name = fbb.CreateString(name); return fb::CreateRunTarget( - fbb, rt_name, 0 /*description*/, 0 /*depends_on*/, 1.0 /*transition_timeout*/, switch_action); + fbb, rt_name, 0 /*description*/, 0 /*depends_on*/, 1000 /*transition_timeout_ms*/, switch_action); }; auto rt_a = build_rt("Startup", "SafeState"); @@ -1010,7 +952,7 @@ TEST_F(ConverterTest, ConvertRunTargetValid) auto rt_desc = fbb.CreateString("Initial state"); auto rt_dep = fbb.CreateString("component_a"); auto rt_deps = fbb.CreateVector(std::vector<::flatbuffers::Offset<::flatbuffers::String>>{rt_dep}); - auto rt = fb::CreateRunTarget(fbb, rt_name, rt_desc, rt_deps, 5.0 /*transition_timeout*/, switch_action); + auto rt = fb::CreateRunTarget(fbb, rt_name, rt_desc, rt_deps, 5000 /*transition_timeout_ms*/, switch_action); fbb.Finish(rt); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -1036,7 +978,7 @@ TEST_F(ConverterTest, ConvertRunTargetMissingTransitionTimeoutReturnsError) rt_name, 0 /*description*/, 0 /*depends_on*/, - ::flatbuffers::nullopt /*transition_timeout*/, + ::flatbuffers::nullopt /*transition_timeout_ms*/, switch_action); fbb.Finish(rt); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -1053,7 +995,7 @@ TEST_F(ConverterTest, ConvertFallbackRunTargetValid) auto desc = fbb.CreateString("Fallback state"); auto dep = fbb.CreateString("critical_comp"); auto deps = fbb.CreateVector(std::vector<::flatbuffers::Offset<::flatbuffers::String>>{dep}); - auto frt = fb::CreateFallbackRunTarget(fbb, desc, deps, 10.0 /*transition_timeout*/); + auto frt = fb::CreateFallbackRunTarget(fbb, desc, deps, 10000 /*transition_timeout_ms*/); fbb.Finish(frt); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -1090,7 +1032,7 @@ TEST_F(ConverterTest, ConvertAliveSupervisionValid) { RecordProperty("Description", "convertAliveSupervision maps evaluation_cycle correctly."); ::flatbuffers::FlatBufferBuilder fbb; - auto as = fb::CreateAliveSupervision(fbb, 0.25 /*evaluation_cycle*/); + auto as = fb::CreateAliveSupervision(fbb, 250 /*evaluation_cycle_ms*/); fbb.Finish(as); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -1125,7 +1067,7 @@ TEST_F(ConverterTest, ConvertWatchdogValid) RecordProperty("Description", "convertWatchdog maps all fields correctly."); ::flatbuffers::FlatBufferBuilder fbb; auto dev_path = fbb.CreateString("/dev/watchdog0"); - auto wd = fb::CreateWatchdog(fbb, dev_path, 30.0 /*max_timeout*/, true /*deactivate*/, false /*magic_close*/); + auto wd = fb::CreateWatchdog(fbb, dev_path, 30000 /*max_timeout_ms*/, true /*deactivate*/, false /*magic_close*/); fbb.Finish(wd); const auto* ptr = ::flatbuffers::GetRoot(fbb.GetBufferPointer()); @@ -1146,7 +1088,7 @@ TEST_F(ConverterTest, ConvertWatchdogMissingMaxTimeoutReturnsError) auto wd = fb::CreateWatchdog( fbb, dev_path, - ::flatbuffers::nullopt /*max_timeout*/, + ::flatbuffers::nullopt /*max_timeout_ms*/, true /*deactivate_on_shutdown*/, false /*require_magic_close*/); fbb.Finish(wd); @@ -1165,7 +1107,7 @@ TEST_F(ConverterTest, ConvertWatchdogMissingDeactivateReturnsError) auto wd = fb::CreateWatchdog( fbb, dev_path, - 30.0 /*max_timeout*/, + 30000 /*max_timeout_ms*/, ::flatbuffers::nullopt /*deactivate_on_shutdown*/, false /*require_magic_close*/); fbb.Finish(wd); @@ -1184,7 +1126,7 @@ TEST_F(ConverterTest, ConvertWatchdogMissingMagicCloseReturnsError) auto wd = fb::CreateWatchdog( fbb, dev_path, - 30.0 /*max_timeout*/, + 30000 /*max_timeout_ms*/, true /*deactivate_on_shutdown*/, ::flatbuffers::nullopt /*require_magic_close*/); fbb.Finish(wd); diff --git a/score/launch_manager/src/daemon/src/configuration/details/lm_flatcfg.fbs b/score/launch_manager/src/daemon/src/configuration/details/lm_flatcfg.fbs index 83529b05c..4da5f3b15 100644 --- a/score/launch_manager/src/daemon/src/configuration/details/lm_flatcfg.fbs +++ b/score/launch_manager/src/daemon/src/configuration/details/lm_flatcfg.fbs @@ -35,8 +35,8 @@ enum SchedulingPolicy : byte { // Defines the configuration parameters used for alive monitoring of a component. table ComponentAliveSupervision { - // Duration in seconds of the time interval used to verify alive notifications. - reporting_cycle:double = null; // required + // Duration in milliseconds of the time interval used to verify alive notifications. + reporting_cycle_ms:uint32 = null; // required // Maximum number of consecutive reporting cycle failures before recovery is triggered. failed_cycles_tolerance:uint32 = null; // required // Minimum number of checkpoints that must be reported within each reporting_cycle. @@ -74,8 +74,8 @@ table ComponentProperties { table RestartAction { // Maximum number of restart attempts before recovery is considered failed. number_of_attempts:uint32 = null; // required - // Delay in seconds before initiating a restart attempt. - delay_before_restart:double = null; // required + // Delay in milliseconds before initiating a restart attempt. + delay_before_restart_ms:uint32 = null; // required } // Recovery action that switches to a specified Run Target. @@ -112,10 +112,10 @@ table Sandbox { // Deployment configuration for a component. table DeploymentConfig { - // Maximum time in seconds for the component to reach its ready state. - ready_timeout:double = null; // required - // Maximum time in seconds for the component to terminate after SIGTERM. - shutdown_timeout:double = null; // required + // Maximum time in milliseconds for the component to reach its ready state. + ready_timeout_ms:uint32 = null; // required + // Maximum time in milliseconds for the component to terminate after SIGTERM. + shutdown_timeout_ms:uint32 = null; // required // Environment variables passed to the component at startup. environmental_variables:[EnvironmentalVariable]; // optional // Absolute path to the directory where the component is installed. @@ -138,8 +138,8 @@ table RunTarget { description:string; // optional // Names of components and Run Targets that must be activated with this Run Target. depends_on:[string]; // optional - // Time limit in seconds for the Run Target transition. - transition_timeout:double = null; // required + // Time limit in milliseconds for the Run Target transition. + transition_timeout_ms:uint32 = null; // required // Recovery action when a component in this Run Target fails. recovery_action:SwitchRunTargetAction (required); } @@ -156,16 +156,16 @@ table Component { // Global alive supervision configuration. table AliveSupervision { - // Length in seconds of the time window used to assess alive supervision reports. - evaluation_cycle:double = null; // required + // Length in milliseconds of the time window used to assess alive supervision reports. + evaluation_cycle_ms:uint32 = null; // required } // External watchdog device configuration. table Watchdog { // Path to the external watchdog device file (e.g., /dev/watchdog). device_file_path:string (required); // required - // Maximum timeout in seconds configured on the external watchdog. - max_timeout:double = null; // required + // Maximum timeout in milliseconds configured on the external watchdog. + max_timeout_ms:uint32 = null; // required // Whether the watchdog is deactivated during shutdown. deactivate_on_shutdown:bool = null; // required // Whether the magic close sequence is performed on intentional shutdown. @@ -179,8 +179,8 @@ table FallbackRunTarget { description:string; // optional // Names of components and Run Targets that must be activated. depends_on:[string]; // optional - // Time limit in seconds for the Run Target transition. - transition_timeout:double = null; // required + // Time limit in milliseconds for the Run Target transition. + transition_timeout_ms:uint32 = null; // required } // Root configuration table for the S-CORE Launch Manager. diff --git a/score/launch_manager/src/daemon/src/configuration/flatbuffer_config_loader.hpp b/score/launch_manager/src/daemon/src/configuration/flatbuffer_config_loader.hpp index 3798668a0..062e9ad91 100644 --- a/score/launch_manager/src/daemon/src/configuration/flatbuffer_config_loader.hpp +++ b/score/launch_manager/src/daemon/src/configuration/flatbuffer_config_loader.hpp @@ -53,7 +53,7 @@ class FlatbufferConfigLoaderImpl : public IConfigLoader { public: /// @brief The configuration schema version supported by this loader. - static constexpr int32_t kExpectedSchemaVersion = 1; + static constexpr int32_t kExpectedSchemaVersion = 2; [[nodiscard]] score::cpp::expected load(const score::filesystem::Path& path) override { diff --git a/scripts/config_mapping/lifecycle_config.py b/scripts/config_mapping/lifecycle_config.py index ba1416c08..af2957ff7 100644 --- a/scripts/config_mapping/lifecycle_config.py +++ b/scripts/config_mapping/lifecycle_config.py @@ -106,6 +106,11 @@ def get_working_dir(deployment_config): return deployment_config.get("working_dir", deployment_config["bin_dir"]) +def sec_to_ms(sec: float) -> int: + """Convert a duration in seconds (float) to integer milliseconds.""" + return int(sec * 1000) + + def preprocess_defaults(global_defaults, config): """ This function takes the input configuration and fills in any missing fields with default values. @@ -272,7 +277,7 @@ def gen_config(output_dir, config, input_filename): if is_supervised(comp_props["application_profile"]["application_type"]): alive_sup = comp_props["application_profile"].get("alive_supervision", {}) app_profile["alive_supervision"] = { - "reporting_cycle": alive_sup["reporting_cycle"], + "reporting_cycle_ms": sec_to_ms(alive_sup["reporting_cycle"]), "failed_cycles_tolerance": alive_sup["failed_cycles_tolerance"], "min_indications": alive_sup["min_indications"], "max_indications": alive_sup["max_indications"], @@ -308,8 +313,8 @@ def gen_config(output_dir, config, input_filename): sandbox_out["max_cpu_usage"] = sandbox["max_cpu_usage"] deployment = { - "ready_timeout": depl_cfg["ready_timeout"], - "shutdown_timeout": depl_cfg["shutdown_timeout"], + "ready_timeout_ms": sec_to_ms(depl_cfg["ready_timeout"]), + "shutdown_timeout_ms": sec_to_ms(depl_cfg["shutdown_timeout"]), "bin_dir": depl_cfg["bin_dir"], # Default the working directory to bin_dir (the directory the # executable lives in) when not set explicitly. @@ -328,7 +333,7 @@ def gen_config(output_dir, config, input_filename): restart = rra.get("restart", rra) deployment["ready_recovery_action"] = { "number_of_attempts": restart.get("number_of_attempts", 0), - "delay_before_restart": restart.get("delay_before_restart", 0), + "delay_before_restart_ms": sec_to_ms(restart.get("delay_before_restart", 0)), } if "recovery_action" in depl_cfg: @@ -347,7 +352,7 @@ def gen_config(output_dir, config, input_filename): for rt_name, rt_config in config["run_targets"].items(): rt = { "name": rt_name, - "transition_timeout": rt_config.get("transition_timeout", 3), + "transition_timeout_ms": sec_to_ms(rt_config.get("transition_timeout", 3)), "recovery_action": { "run_target": rt_config.get("recovery_action", {}) .get("switch_run_target", {}) @@ -363,16 +368,19 @@ def gen_config(output_dir, config, input_filename): out["initial_run_target"] = config["initial_run_target"] fallback = config.get("fallback_run_target", {}) - out["fallback_run_target"] = { - key: fallback[key] - for key in ("transition_timeout", "description", "depends_on") - if key in fallback - } + fb_out = {} + if "transition_timeout" in fallback: + fb_out["transition_timeout_ms"] = sec_to_ms(fallback["transition_timeout"]) + if fallback.get("description"): + fb_out["description"] = fallback["description"] + if "depends_on" in fallback and fallback["depends_on"]: + fb_out["depends_on"] = fallback["depends_on"] + out["fallback_run_target"] = fb_out out["alive_supervision"] = { - "evaluation_cycle": config.get("alive_supervision", {}).get( + "evaluation_cycle_ms": sec_to_ms(config.get("alive_supervision", {}).get( "evaluation_cycle", 0.5 - ), + )), } watchdog_config = config.get("watchdog", {}) @@ -385,7 +393,7 @@ def gen_config(output_dir, config, input_filename): if watchdog_config and required_watchdog_fields.issubset(watchdog_config.keys()): out["watchdog"] = { "device_file_path": watchdog_config["device_file_path"], - "max_timeout": watchdog_config["max_timeout"], + "max_timeout_ms": sec_to_ms(watchdog_config["max_timeout"]), "deactivate_on_shutdown": watchdog_config["deactivate_on_shutdown"], "require_magic_close": watchdog_config["require_magic_close"], } diff --git a/scripts/config_mapping/tests/custom_validation_failures_test/input/lm_config.json b/scripts/config_mapping/tests/custom_validation_failures_test/input/lm_config.json index 66a511521..d0fbe6499 100644 --- a/scripts/config_mapping/tests/custom_validation_failures_test/input/lm_config.json +++ b/scripts/config_mapping/tests/custom_validation_failures_test/input/lm_config.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": {}, "components": { "test_app1": { diff --git a/scripts/config_mapping/tests/schema_validation_failure_test/input/lm_config.json b/scripts/config_mapping/tests/schema_validation_failure_test/input/lm_config.json index 488456ad1..af3201bb0 100644 --- a/scripts/config_mapping/tests/schema_validation_failure_test/input/lm_config.json +++ b/scripts/config_mapping/tests/schema_validation_failure_test/input/lm_config.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": {}, "components": { "test_app1": { diff --git a/scripts/config_mapping/tests/smoke_test/input/lm_config.json b/scripts/config_mapping/tests/smoke_test/input/lm_config.json index ab8402597..043ed9131 100644 --- a/scripts/config_mapping/tests/smoke_test/input/lm_config.json +++ b/scripts/config_mapping/tests/smoke_test/input/lm_config.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "ready_timeout": 0.5, diff --git a/tests/integration/complex_monitoring/complex_monitoring.json b/tests/integration/complex_monitoring/complex_monitoring.json index b8e3ed2cf..4b4d96461 100644 --- a/tests/integration/complex_monitoring/complex_monitoring.json +++ b/tests/integration/complex_monitoring/complex_monitoring.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/complex_monitoring", diff --git a/tests/integration/crash_on_startup/crash_on_startup.json b/tests/integration/crash_on_startup/crash_on_startup.json index 96685ae08..3db87a1fd 100644 --- a/tests/integration/crash_on_startup/crash_on_startup.json +++ b/tests/integration/crash_on_startup/crash_on_startup.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/crash_on_startup", diff --git a/tests/integration/incorrect_config_non_reporting/non_reporting_config.json b/tests/integration/incorrect_config_non_reporting/non_reporting_config.json index 4b5fa7514..2c1a0d72b 100644 --- a/tests/integration/incorrect_config_non_reporting/non_reporting_config.json +++ b/tests/integration/incorrect_config_non_reporting/non_reporting_config.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/incorrect_config_non_reporting", diff --git a/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json b/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json index cf53f9be8..49e1b310d 100644 --- a/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json +++ b/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_complex_rep_failure", diff --git a/tests/integration/process_crash_monitoring/process_crash_monitoring.json b/tests/integration/process_crash_monitoring/process_crash_monitoring.json index 70afc4f85..e620c1ba9 100644 --- a/tests/integration/process_crash_monitoring/process_crash_monitoring.json +++ b/tests/integration/process_crash_monitoring/process_crash_monitoring.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_crash_monitoring", diff --git a/tests/integration/process_fd_leak/process_fd_leak.json b/tests/integration/process_fd_leak/process_fd_leak.json index d16703e29..5c73fd206 100644 --- a/tests/integration/process_fd_leak/process_fd_leak.json +++ b/tests/integration/process_fd_leak/process_fd_leak.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_fd_leak", diff --git a/tests/integration/process_launch_args/process_launch_args.json b/tests/integration/process_launch_args/process_launch_args.json index 1d417bc3a..6f7ee58ea 100644 --- a/tests/integration/process_launch_args/process_launch_args.json +++ b/tests/integration/process_launch_args/process_launch_args.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_launch_args", diff --git a/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json b/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json index dd443d306..441f4ff50 100644 --- a/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json +++ b/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_simple_rep_failure", diff --git a/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json b/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json index a5e832b31..5fd5f2860 100644 --- a/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json +++ b/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_wrong_binary_failure", diff --git a/tests/integration/smoke/lifecycle_smoketest.json b/tests/integration/smoke/lifecycle_smoketest.json index 4d5e83010..02ca829c4 100644 --- a/tests/integration/smoke/lifecycle_smoketest.json +++ b/tests/integration/smoke/lifecycle_smoketest.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/smoke", diff --git a/tests/integration/switch_run_target/switch_run_target.json b/tests/integration/switch_run_target/switch_run_target.json index 1dd1ce0bd..98a04fc7e 100644 --- a/tests/integration/switch_run_target/switch_run_target.json +++ b/tests/integration/switch_run_target/switch_run_target.json @@ -1,5 +1,5 @@ { - "schema_version": 1, + "schema_version": 2, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/switch_run_target", From 31dcfb565e0440824483a72f9bac108b9b48ec91 Mon Sep 17 00:00:00 2001 From: shegazyy Date: Mon, 3 Aug 2026 14:43:26 +0300 Subject: [PATCH 2/2] Address review: _ms suffixes, revert schema version, fix warning --- .../demo_verification/lifecycle_demo_test.json | 2 +- .../config_schema/examples/example_conf.json | 2 +- .../config_schema/launch_manager.schema.json | 2 +- .../details/flatbuffer_type_converters_UT.cpp | 18 +++++++++--------- .../configuration/flatbuffer_config_loader.hpp | 2 +- .../input/lm_config.json | 2 +- .../input/lm_config.json | 2 +- .../tests/smoke_test/input/lm_config.json | 2 +- .../complex_monitoring/complex_monitoring.json | 2 +- .../crash_on_startup/crash_on_startup.json | 2 +- .../non_reporting_config.json | 2 +- .../process_complex_rep_failure.json | 2 +- .../process_crash_monitoring.json | 2 +- .../process_fd_leak/process_fd_leak.json | 2 +- .../process_launch_args.json | 2 +- .../process_simple_rep_failure.json | 2 +- .../process_wrong_binary_failure.json | 2 +- .../integration/smoke/lifecycle_smoketest.json | 2 +- .../switch_run_target/switch_run_target.json | 2 +- 19 files changed, 27 insertions(+), 27 deletions(-) diff --git a/examples/demo_verification/lifecycle_demo_test.json b/examples/demo_verification/lifecycle_demo_test.json index a43253be4..0ad84cdb4 100644 --- a/examples/demo_verification/lifecycle_demo_test.json +++ b/examples/demo_verification/lifecycle_demo_test.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/examples", diff --git a/score/launch_manager/src/daemon/src/configuration/config_schema/examples/example_conf.json b/score/launch_manager/src/daemon/src/configuration/config_schema/examples/example_conf.json index 92a216d86..ddb3bc7a9 100755 --- a/score/launch_manager/src/daemon/src/configuration/config_schema/examples/example_conf.json +++ b/score/launch_manager/src/daemon/src/configuration/config_schema/examples/example_conf.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "ready_timeout": 0.5, diff --git a/score/launch_manager/src/daemon/src/configuration/config_schema/launch_manager.schema.json b/score/launch_manager/src/daemon/src/configuration/config_schema/launch_manager.schema.json index b3481bbdf..371630d73 100644 --- a/score/launch_manager/src/daemon/src/configuration/config_schema/launch_manager.schema.json +++ b/score/launch_manager/src/daemon/src/configuration/config_schema/launch_manager.schema.json @@ -373,7 +373,7 @@ "type": "integer", "description": "Specifies the schema version number that the Launch Manager uses to determine how to parse and validate this configuration file.", "enum": [ - 2 + 1 ] }, "defaults": { diff --git a/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters_UT.cpp b/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters_UT.cpp index 181037160..a78b1410f 100644 --- a/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters_UT.cpp +++ b/score/launch_manager/src/daemon/src/configuration/details/flatbuffer_type_converters_UT.cpp @@ -386,7 +386,7 @@ TEST_F(ConverterTest, ConvertComponentAliveSupervisionValid) TEST_F(ConverterTest, ConvertComponentAliveSupervisionMissingReportingCycleReturnsError) { - RecordProperty("Description", "Missing reporting_cycle returns InvalidFormat."); + RecordProperty("Description", "Missing reporting_cycle_ms returns InvalidFormat."); ::flatbuffers::FlatBufferBuilder fbb; auto cas = fb::CreateComponentAliveSupervision( fbb, ::flatbuffers::nullopt /*reporting_cycle_ms*/, 3 /*failed_cycles_tolerance*/); @@ -719,7 +719,7 @@ TEST_F(ConverterTest, ConvertDeploymentConfigValid) TEST_F(ConverterTest, ConvertDeploymentConfigMissingReadyTimeoutReturnsError) { - RecordProperty("Description", "Missing ready_timeout returns InvalidFormat."); + RecordProperty("Description", "Missing ready_timeout_ms returns InvalidFormat."); ::flatbuffers::FlatBufferBuilder fbb; auto bin_dir = fbb.CreateString("/opt"); auto work_dir = fbb.CreateString("/tmp"); @@ -744,7 +744,7 @@ TEST_F(ConverterTest, ConvertDeploymentConfigMissingReadyTimeoutReturnsError) TEST_F(ConverterTest, ConvertDeploymentConfigMissingShutdownTimeoutReturnsError) { - RecordProperty("Description", "Missing shutdown_timeout returns InvalidFormat."); + RecordProperty("Description", "Missing shutdown_timeout_ms returns InvalidFormat."); ::flatbuffers::FlatBufferBuilder fbb; auto bin_dir = fbb.CreateString("/opt"); auto work_dir = fbb.CreateString("/tmp"); @@ -929,7 +929,7 @@ TEST_F(ConverterTest, ConvertRunTargetsWithInvalidRunTargetReturnsError) rt_name, 0 /*description*/, 0 /*depends_on*/, - ::flatbuffers::nullopt /*transition_timeout*/, + ::flatbuffers::nullopt /*transition_timeout_ms*/, switch_action); auto rts = fbb.CreateVector(std::vector<::flatbuffers::Offset>{rt}); fbb.Finish(rts); @@ -968,7 +968,7 @@ TEST_F(ConverterTest, ConvertRunTargetValid) TEST_F(ConverterTest, ConvertRunTargetMissingTransitionTimeoutReturnsError) { - RecordProperty("Description", "Missing transition_timeout returns InvalidFormat."); + RecordProperty("Description", "Missing transition_timeout_ms returns InvalidFormat."); ::flatbuffers::FlatBufferBuilder fbb; auto switch_target = fbb.CreateString("SafeState"); auto switch_action = fb::CreateSwitchRunTargetAction(fbb, switch_target); @@ -1009,7 +1009,7 @@ TEST_F(ConverterTest, ConvertFallbackRunTargetValid) TEST_F(ConverterTest, ConvertFallbackRunTargetMissingTimeoutReturnsError) { - RecordProperty("Description", "Missing transition_timeout returns InvalidFormat."); + RecordProperty("Description", "Missing transition_timeout_ms returns InvalidFormat."); ::flatbuffers::FlatBufferBuilder fbb; auto frt = fb::CreateFallbackRunTarget(fbb); fbb.Finish(frt); @@ -1030,7 +1030,7 @@ TEST_F(ConverterTest, ConvertAliveSupervisionNullReturnsDefault) TEST_F(ConverterTest, ConvertAliveSupervisionValid) { - RecordProperty("Description", "convertAliveSupervision maps evaluation_cycle correctly."); + RecordProperty("Description", "convertAliveSupervision maps evaluation_cycle_ms correctly."); ::flatbuffers::FlatBufferBuilder fbb; auto as = fb::CreateAliveSupervision(fbb, 250 /*evaluation_cycle_ms*/); fbb.Finish(as); @@ -1043,7 +1043,7 @@ TEST_F(ConverterTest, ConvertAliveSupervisionValid) TEST_F(ConverterTest, ConvertAliveSupervisionMissingCycleReturnsError) { - RecordProperty("Description", "Missing evaluation_cycle returns InvalidFormat."); + RecordProperty("Description", "Missing evaluation_cycle_ms returns InvalidFormat."); ::flatbuffers::FlatBufferBuilder fbb; auto as = fb::CreateAliveSupervision(fbb); fbb.Finish(as); @@ -1082,7 +1082,7 @@ TEST_F(ConverterTest, ConvertWatchdogValid) TEST_F(ConverterTest, ConvertWatchdogMissingMaxTimeoutReturnsError) { - RecordProperty("Description", "Missing max_timeout returns InvalidFormat."); + RecordProperty("Description", "Missing max_timeout_ms returns InvalidFormat."); ::flatbuffers::FlatBufferBuilder fbb; auto dev_path = fbb.CreateString("/dev/watchdog0"); auto wd = fb::CreateWatchdog( diff --git a/score/launch_manager/src/daemon/src/configuration/flatbuffer_config_loader.hpp b/score/launch_manager/src/daemon/src/configuration/flatbuffer_config_loader.hpp index 062e9ad91..3798668a0 100644 --- a/score/launch_manager/src/daemon/src/configuration/flatbuffer_config_loader.hpp +++ b/score/launch_manager/src/daemon/src/configuration/flatbuffer_config_loader.hpp @@ -53,7 +53,7 @@ class FlatbufferConfigLoaderImpl : public IConfigLoader { public: /// @brief The configuration schema version supported by this loader. - static constexpr int32_t kExpectedSchemaVersion = 2; + static constexpr int32_t kExpectedSchemaVersion = 1; [[nodiscard]] score::cpp::expected load(const score::filesystem::Path& path) override { diff --git a/scripts/config_mapping/tests/custom_validation_failures_test/input/lm_config.json b/scripts/config_mapping/tests/custom_validation_failures_test/input/lm_config.json index d0fbe6499..66a511521 100644 --- a/scripts/config_mapping/tests/custom_validation_failures_test/input/lm_config.json +++ b/scripts/config_mapping/tests/custom_validation_failures_test/input/lm_config.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": {}, "components": { "test_app1": { diff --git a/scripts/config_mapping/tests/schema_validation_failure_test/input/lm_config.json b/scripts/config_mapping/tests/schema_validation_failure_test/input/lm_config.json index af3201bb0..488456ad1 100644 --- a/scripts/config_mapping/tests/schema_validation_failure_test/input/lm_config.json +++ b/scripts/config_mapping/tests/schema_validation_failure_test/input/lm_config.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": {}, "components": { "test_app1": { diff --git a/scripts/config_mapping/tests/smoke_test/input/lm_config.json b/scripts/config_mapping/tests/smoke_test/input/lm_config.json index 043ed9131..ab8402597 100644 --- a/scripts/config_mapping/tests/smoke_test/input/lm_config.json +++ b/scripts/config_mapping/tests/smoke_test/input/lm_config.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "ready_timeout": 0.5, diff --git a/tests/integration/complex_monitoring/complex_monitoring.json b/tests/integration/complex_monitoring/complex_monitoring.json index 4b4d96461..b8e3ed2cf 100644 --- a/tests/integration/complex_monitoring/complex_monitoring.json +++ b/tests/integration/complex_monitoring/complex_monitoring.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/complex_monitoring", diff --git a/tests/integration/crash_on_startup/crash_on_startup.json b/tests/integration/crash_on_startup/crash_on_startup.json index 3db87a1fd..96685ae08 100644 --- a/tests/integration/crash_on_startup/crash_on_startup.json +++ b/tests/integration/crash_on_startup/crash_on_startup.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/crash_on_startup", diff --git a/tests/integration/incorrect_config_non_reporting/non_reporting_config.json b/tests/integration/incorrect_config_non_reporting/non_reporting_config.json index 2c1a0d72b..4b5fa7514 100644 --- a/tests/integration/incorrect_config_non_reporting/non_reporting_config.json +++ b/tests/integration/incorrect_config_non_reporting/non_reporting_config.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/incorrect_config_non_reporting", diff --git a/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json b/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json index 49e1b310d..cf53f9be8 100644 --- a/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json +++ b/tests/integration/process_complex_rep_failure/process_complex_rep_failure.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_complex_rep_failure", diff --git a/tests/integration/process_crash_monitoring/process_crash_monitoring.json b/tests/integration/process_crash_monitoring/process_crash_monitoring.json index e620c1ba9..70afc4f85 100644 --- a/tests/integration/process_crash_monitoring/process_crash_monitoring.json +++ b/tests/integration/process_crash_monitoring/process_crash_monitoring.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_crash_monitoring", diff --git a/tests/integration/process_fd_leak/process_fd_leak.json b/tests/integration/process_fd_leak/process_fd_leak.json index 5c73fd206..d16703e29 100644 --- a/tests/integration/process_fd_leak/process_fd_leak.json +++ b/tests/integration/process_fd_leak/process_fd_leak.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_fd_leak", diff --git a/tests/integration/process_launch_args/process_launch_args.json b/tests/integration/process_launch_args/process_launch_args.json index 6f7ee58ea..1d417bc3a 100644 --- a/tests/integration/process_launch_args/process_launch_args.json +++ b/tests/integration/process_launch_args/process_launch_args.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_launch_args", diff --git a/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json b/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json index 441f4ff50..dd443d306 100644 --- a/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json +++ b/tests/integration/process_simple_rep_failure/process_simple_rep_failure.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_simple_rep_failure", diff --git a/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json b/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json index 5fd5f2860..a5e832b31 100644 --- a/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json +++ b/tests/integration/process_wrong_binary_failure/process_wrong_binary_failure.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/process_wrong_binary_failure", diff --git a/tests/integration/smoke/lifecycle_smoketest.json b/tests/integration/smoke/lifecycle_smoketest.json index 02ca829c4..4d5e83010 100644 --- a/tests/integration/smoke/lifecycle_smoketest.json +++ b/tests/integration/smoke/lifecycle_smoketest.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/smoke", diff --git a/tests/integration/switch_run_target/switch_run_target.json b/tests/integration/switch_run_target/switch_run_target.json index 98a04fc7e..1dd1ce0bd 100644 --- a/tests/integration/switch_run_target/switch_run_target.json +++ b/tests/integration/switch_run_target/switch_run_target.json @@ -1,5 +1,5 @@ { - "schema_version": 2, + "schema_version": 1, "defaults": { "deployment_config": { "bin_dir": "/tmp/tests/switch_run_target",