Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
41f99ca
Basic python setup for mapping script
NicolasFussberger Feb 12, 2026
f396729
Add latest example configuration
NicolasFussberger Feb 12, 2026
c49be75
Merging of default values
NicolasFussberger Feb 12, 2026
c0bcd08
Basic smoketest for defaults preprocessing
NicolasFussberger Feb 16, 2026
19776f9
Start to map PHM configuration
NicolasFussberger Feb 16, 2026
646f0c2
Separate unit and integration tests
NicolasFussberger Feb 16, 2026
5d2c385
Document mapping decisions and initial known limitations
NicolasFussberger Feb 16, 2026
c4afbb9
Copy dict only internally when merging defaults
NicolasFussberger Feb 16, 2026
160a624
Initial mapping of hm configuration
NicolasFussberger Feb 16, 2026
c0686fc
Treat StateManager supervision same as other supervisions
NicolasFussberger Feb 16, 2026
a326e02
Fix time unit and some flatbuffer schema violations
NicolasFussberger Feb 16, 2026
385f47d
basic Integration test for health configuration
NicolasFussberger Feb 17, 2026
1473e90
Better nameing of env vars in unit test
NicolasFussberger Feb 17, 2026
0214f86
Configs for health integration test
NicolasFussberger Feb 17, 2026
6bcdeb8
Start work
Feb 18, 2026
55aa619
Merge branch 'feature/config_mapper-unverified' into feature/lm_confi…
Feb 18, 2026
ee10cbc
Almost done
Feb 18, 2026
0251016
Add validation and update sample configs
NicolasFussberger Feb 18, 2026
05e9758
Add health test for empty config
NicolasFussberger Feb 18, 2026
22446ec
Update Readme file with validation info
NicolasFussberger Feb 18, 2026
061ccc4
Merge branch 'feature/config_mapper-unverified' into feature/lm_confi…
Feb 19, 2026
f0c8f08
Continue config mapping script
Feb 19, 2026
bc751d1
Cleanup
Feb 19, 2026
619b50e
Fix error in mapping script
Feb 19, 2026
839caef
Minor fixes
Feb 19, 2026
625eff4
Cleanup
Feb 19, 2026
58cc48e
Prevent cyclic dependencies
Feb 19, 2026
08c2665
First changes
Feb 24, 2026
ddd00a4
Cleanup
Feb 24, 2026
3c89940
Undo some changes
Feb 24, 2026
ac51264
Undo some changes
Feb 24, 2026
1fb95cd
Bazel command for lifecylce config gen
NicolasFussberger Feb 20, 2026
1a23798
Undo more changes, fix out of range
Feb 24, 2026
39901a1
Config generation working without pip dependency
NicolasFussberger Feb 23, 2026
703c05b
More cleanup
Feb 24, 2026
afd2c7d
Export jsonschema python dependency
NicolasFussberger Feb 23, 2026
5bb5fba
Fix python formatting
Feb 24, 2026
fa7b279
Merge branch 'main' into feature/merge_main
Feb 20, 2026
2811a9e
Merge pull request #27 from etas-eng/feature/lm_config_mapper
eelcoem Feb 19, 2026
44a5c4e
Adapt expected output to file renaming
NicolasFussberger Feb 23, 2026
5969a52
Make shortName required
Feb 24, 2026
5e63bbb
Merge pull request #28 from etas-eng/feature/merge_main
eelcoem Feb 20, 2026
411402a
Update Readme file with bazel interface
NicolasFussberger Feb 23, 2026
2861314
Move script to tests folder
Feb 24, 2026
0df67b7
Initial version of the new API
SimonKozik Feb 23, 2026
00f027b
Remove flatbuffer script
NicolasFussberger Feb 23, 2026
c0d63ba
Address reviewer comments
Feb 24, 2026
196527b
Adapt ControlClient implementation to new API
NicolasFussberger Feb 24, 2026
0ce9867
Update health config integration test
NicolasFussberger Feb 25, 2026
5dabce9
Merge pull request #31 from etas-eng/feature/adapt-example-config
eelcoem Feb 25, 2026
17bede7
Merge pull request #29 from etas-eng/lifecylce_bazel_config_gen
NicolasFussberger Feb 25, 2026
c713d44
Merge remote-tracking branch 'upstream/main' into feature/config_mapp…
NicolasFussberger Feb 25, 2026
4c91432
Fix merge error in MODULE.bazel
NicolasFussberger Feb 25, 2026
0330b8b
Adapt examples to use the bazel config generation
NicolasFussberger Feb 25, 2026
b483f37
Start demo via bazel target
Mar 2, 2026
0528ab5
Merge pull request #32 from etas-eng/feature/migrate-example-setup-to…
NicolasFussberger Feb 26, 2026
030c16d
Merge pull request #34 from etas-eng/feature/add_bazel_target
eelcoem Mar 3, 2026
3821f21
Merge different pip environments
NicolasFussberger Feb 27, 2026
35d7581
Add some custom validation rules
NicolasFussberger Mar 3, 2026
ae6da75
Migrate smoketest to new configuration
NicolasFussberger Feb 27, 2026
edcf3a7
More integration tests
NicolasFussberger Mar 3, 2026
f2e6e86
Revert debugging changes
NicolasFussberger Mar 5, 2026
2854564
Fix example scenario configuration
NicolasFussberger Mar 3, 2026
761d397
Correct smoketest configuration
NicolasFussberger Mar 5, 2026
44d8961
Merge pull request #35 from etas-eng/feature/config-validation
NicolasFussberger Mar 3, 2026
d88b0ec
Revert more debugging changes
NicolasFussberger Mar 5, 2026
a78c449
Fix crash
Mar 4, 2026
8141ef2
Remove temporary schema file
NicolasFussberger Mar 5, 2026
28a9e3d
Update readme file
NicolasFussberger Mar 5, 2026
e4569e7
Clarify that certain attributes will be ignored
NicolasFussberger Mar 6, 2026
651c011
Merge pull request #33 from etas-eng/feature/migrate-smoketests-new-c…
NicolasFussberger Mar 5, 2026
abf6b28
Use lowercase name for watchdog
NicolasFussberger Mar 6, 2026
ac7ec06
Merge remote-tracking branch 'upstream/main' into feature/config_mapp…
NicolasFussberger Mar 5, 2026
cba3709
Run config tests via bazel
NicolasFussberger Mar 6, 2026
edb6573
Merge pull request #36 from etas-eng/feature/sync-json-schema
NicolasFussberger Mar 6, 2026
4e968b9
Define central lifecycle bazel rules
NicolasFussberger Mar 9, 2026
32dd742
Merge pull request #37 from etas-eng/feature/config-tests-as-pytest
NicolasFussberger Mar 6, 2026
1a11c9d
Merge pull request #38 from etas-eng/feature/move-bazel-script
NicolasFussberger Mar 9, 2026
821f0c8
Add progress message to bazel function
NicolasFussberger Mar 9, 2026
f05f28a
Make pip environment a proper dependency
NicolasFussberger Mar 9, 2026
adad974
Improve error message
NicolasFussberger Mar 10, 2026
c8fcb3b
Remove obsolete config scripts
NicolasFussberger Mar 10, 2026
71a7b31
Fix formatting
NicolasFussberger Mar 10, 2026
370afa6
Fix copyright headers
NicolasFussberger Mar 10, 2026
c1f4391
Tidy MODULE.bazel file
NicolasFussberger Mar 10, 2026
e538003
Improve schema validation error message
NicolasFussberger Mar 11, 2026
7882e2b
Fix formatting
NicolasFussberger Mar 11, 2026
eb4b42f
Merge remote-tracking branch 'upstream/main' into feature/config_mapp…
NicolasFussberger Mar 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ python.toolchain(
python_version = PYTHON_VERSION,
)

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency = True)
# Python pip dependencies
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pip_score_venv_test",
hub_name = "score_lifecycle_pip",
python_version = PYTHON_VERSION,
requirements_lock = "//tests/integration:requirements.lock",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pip_score_venv_test")
use_repo(pip, "score_lifecycle_pip")

bazel_dep(name = "score_baselibs_rust", version = "0.1.0")
bazel_dep(name = "score_baselibs", version = "0.2.4")
Expand Down
14 changes: 7 additions & 7 deletions examples/config/gen_common_cfg.py → defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
def get_process_index_range(process_count: int, process_group_index: int):
# Every ProcessGroup gets the same number of processes
# The Process Index is a globally unique increasing number
return range(
process_group_index * process_count,
(process_group_index * process_count) + process_count,
)

"""Unified entrypoint for lifecycle Bazel macros & rules."""

# --- Launch Manager Configuration ---
load("//scripts/config_mapping:config.bzl", _launch_manager_config = "launch_manager_config")

launch_manager_config = _launch_manager_config
49 changes: 49 additions & 0 deletions examples/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# *******************************************************************************
# Copyright (c) 2026 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
# *******************************************************************************
load("//:defs.bzl", "launch_manager_config")
load(":run_examples.bzl", "run_examples")

launch_manager_config(
name = "example_config",
config = "//examples/config:lifecycle_demo_config",
)

filegroup(
name = "example_apps",
srcs = [
"//examples:example_config",
"//examples/control_application:control_daemon",
"//examples/control_application:lmcontrol",
"//examples/cpp_lifecycle_app",
"//examples/cpp_supervised_app",
"//examples/rust_supervised_app",
],
)

filegroup(
name = "lm_binaries",
srcs = [
"//src/control_client_lib",
"//src/launch_manager_daemon:launch_manager",
"//src/launch_manager_daemon/lifecycle_client_lib:lifecycle_client",
"//src/launch_manager_daemon/process_state_client_lib:process_state_client",
],
)

run_examples(
name = "run_examples",
deps = [
":example_apps",
":lm_binaries",
],
)
13 changes: 5 additions & 8 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@

## Building & Running the demo setup

1. Build launch_manager and health_monitor, in the parent folder, first.
2. Then start run.sh script in this folder: `cd demo && ./run.sh`
Execute `bazel run //examples:run_examples --config=<...>`. This will build all dependences and run the run.sh script

The run.sh script will:

- Copy the required binaries to a temporary directory demo/tmp
- Compile the json configuration to flatbuffer using flatc
- Build a docker image for execution with the required artifacts inside
- Start the docker container that runs launch_manager

## Interacting with the Demo

### Changing ProcessGroup States
### Changing RunTargets

There is a CLI application that allows to request transition to a certain ProcessGroup State.
There is a CLI application that allows to request transition to a certain RunTarget.

Example: `lmcontrol ProcessGroup1/Startup`
Example: `lmcontrol Startup`

### Triggering Supervision Failure

Expand All @@ -31,4 +28,4 @@ Example: `fail <PID>`
There is an interactive mode that walks you through two demo scenarios.
This mode requires the run.sh script to be executed **in an active tmux** session.

`cd demo && ./run.sh tmux`
`bazel run //examples:run_examples --config=<...> -- tmux`
22 changes: 22 additions & 0 deletions examples/config/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# *******************************************************************************
# Copyright (c) 2026 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
# *******************************************************************************
exports_files(
["lifecycle_demo.json"],
visibility = ["//examples:__subpackages__"],
)

filegroup(
name = "lifecycle_demo_config",
srcs = ["lifecycle_demo.json"],
visibility = ["//examples:__subpackages__"],
)
Loading
Loading