-
Notifications
You must be signed in to change notification settings - Fork 36
added test cases for launch processes and conditional launching #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c464f9c
1c4ef2c
8824fc9
37ddbd4
fb31841
e966b70
76d44f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| { | ||
| "schema_version": 1, | ||
| "defaults": { | ||
| "deployment_config": { | ||
| "bin_dir": "/tmp/lifecycle_fit/bin", | ||
| "ready_timeout": 2.0, | ||
| "shutdown_timeout": 2.0, | ||
| "ready_recovery_action": { | ||
| "restart": { | ||
| "number_of_attempts": 0 | ||
| } | ||
| }, | ||
| "recovery_action": { | ||
| "switch_run_target": { | ||
| "run_target": "fallback_run_target" | ||
| } | ||
| }, | ||
| "sandbox": { | ||
| "uid": 1001, | ||
| "gid": 1001, | ||
| "scheduling_policy": "SCHED_OTHER", | ||
| "scheduling_priority": 0 | ||
| } | ||
| }, | ||
| "component_properties": { | ||
| "application_profile": { | ||
| "application_type": "Reporting", | ||
| "is_self_terminating": false, | ||
| "alive_supervision": { | ||
| "reporting_cycle": 0.1, | ||
| "min_indications": 1, | ||
| "max_indications": 3, | ||
| "failed_cycles_tolerance": 1 | ||
| } | ||
| }, | ||
| "ready_condition": { | ||
| "process_state": "Running" | ||
| } | ||
| } | ||
| }, | ||
| "components": { | ||
| "cpp_supervised_app": { | ||
| "component_properties": { | ||
| "binary_name": "cpp_supervised_app", | ||
| "application_profile": { | ||
| "application_type": "Reporting_And_Supervised" | ||
| }, | ||
| "process_arguments": [ | ||
| "-d50" | ||
| ] | ||
| }, | ||
| "deployment_config": { | ||
| "environmental_variables": { | ||
| "PROCESSIDENTIFIER": "cpp_supervised_app", | ||
| "IDENTIFIER": "cpp_supervised_app" | ||
| } | ||
| } | ||
| }, | ||
| "rust_supervised_app": { | ||
| "component_properties": { | ||
| "binary_name": "rust_supervised_app", | ||
| "depends_on": [ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This dependency serializes startup.
|
||
| "cpp_supervised_app" | ||
| ], | ||
| "application_profile": { | ||
| "application_type": "Reporting_And_Supervised" | ||
| }, | ||
| "process_arguments": [ | ||
| "-d50" | ||
| ] | ||
| }, | ||
| "deployment_config": { | ||
| "environmental_variables": { | ||
| "PROCESSIDENTIFIER": "rust_supervised_app", | ||
| "IDENTIFIER": "rust_supervised_app" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "run_targets": { | ||
| "Startup": { | ||
| "depends_on": [ | ||
| "cpp_supervised_app", | ||
| "rust_supervised_app" | ||
| ], | ||
| "recovery_action": { | ||
| "switch_run_target": { | ||
| "run_target": "fallback_run_target" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "initial_run_target": "Startup", | ||
| "alive_supervision": { | ||
| "evaluation_cycle": 0.05 | ||
| }, | ||
| "fallback_run_target": { | ||
| "depends_on": [ | ||
| "cpp_supervised_app", | ||
| "rust_supervised_app" | ||
| ] | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This entire 109-line config is unreferenced. It is not in |
||
| "schema_version": 1, | ||
| "defaults": { | ||
| "deployment_config": { | ||
| "bin_dir": "/tmp/lifecycle_fit/bin", | ||
| "ready_timeout": 2.0, | ||
| "shutdown_timeout": 2.0, | ||
| "ready_recovery_action": { | ||
| "restart": { | ||
| "number_of_attempts": 0 | ||
| } | ||
| }, | ||
| "recovery_action": { | ||
| "switch_run_target": { | ||
| "run_target": "fallback_run_target" | ||
| } | ||
| }, | ||
| "sandbox": { | ||
| "uid": 1001, | ||
| "gid": 1001, | ||
| "scheduling_policy": "SCHED_OTHER", | ||
| "scheduling_priority": 0 | ||
| } | ||
| }, | ||
| "component_properties": { | ||
| "application_profile": { | ||
| "application_type": "Reporting", | ||
| "is_self_terminating": false, | ||
| "alive_supervision": { | ||
| "reporting_cycle": 0.1, | ||
| "min_indications": 1, | ||
| "max_indications": 3, | ||
| "failed_cycles_tolerance": 1 | ||
| } | ||
| }, | ||
| "ready_condition": { | ||
| "process_state": "Running" | ||
| } | ||
| } | ||
| }, | ||
| "components": { | ||
| "cpp_supervised_app": { | ||
| "component_properties": { | ||
| "binary_name": "cpp_supervised_app", | ||
| "application_profile": { | ||
| "application_type": "Reporting_And_Supervised" | ||
| }, | ||
| "process_arguments": [ | ||
| "-d50" | ||
| ] | ||
| }, | ||
| "deployment_config": { | ||
| "environmental_variables": { | ||
| "PROCESSIDENTIFIER": "cpp_supervised_app", | ||
| "IDENTIFIER": "cpp_supervised_app" | ||
| } | ||
| } | ||
| }, | ||
| "cpp_retry_exhaustion_app": { | ||
| "component_properties": { | ||
| "binary_name": "cpp_retry_exhaustion_app", | ||
| "application_profile": { | ||
| "application_type": "Reporting" | ||
| }, | ||
| "process_arguments": [ | ||
| "-h" | ||
| ] | ||
| }, | ||
| "deployment_config": { | ||
| "ready_recovery_action": { | ||
| "restart": { | ||
| "number_of_attempts": 2 | ||
| } | ||
| }, | ||
| "recovery_action": { | ||
| "switch_run_target": { | ||
| "run_target": "fallback_run_target" | ||
| } | ||
| }, | ||
| "environmental_variables": { | ||
| "PROCESSIDENTIFIER": "cpp_retry_exhaustion_app", | ||
| "IDENTIFIER": "cpp_retry_exhaustion_app" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "run_targets": { | ||
| "Startup": { | ||
| "depends_on": [ | ||
| "cpp_supervised_app", | ||
| "cpp_retry_exhaustion_app" | ||
| ], | ||
| "recovery_action": { | ||
| "switch_run_target": { | ||
| "run_target": "fallback_run_target" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "initial_run_target": "Startup", | ||
| "alive_supervision": { | ||
| "evaluation_cycle": 0.05 | ||
| }, | ||
| "fallback_run_target": { | ||
| "depends_on": [ | ||
| "cpp_supervised_app" | ||
| ] | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
number_of_attempts: 0disables retries.test_supervised_app_recovery(test_process_launching_with_daemon.py:382-420) claimsfeat_req__lifecycle__retries_configurableagainst this config. With 0 attempts, recovery is entirely via theswitch_run_targetbranch below, so no retry behaviour is exercised.