Skip to content

Processes construct their own supervision - #522

Open
WilliamRoebuck wants to merge 20 commits into
eclipse-score:mainfrom
etas-contrib:feature/process-makes-supervision
Open

Processes construct their own supervision#522
WilliamRoebuck wants to merge 20 commits into
eclipse-score:mainfrom
etas-contrib:feature/process-makes-supervision

Conversation

@WilliamRoebuck

@WilliamRoebuck WilliamRoebuck commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Continuation of the refactoring started in #477. This PR moves alive supervision construction to the ProcessInfoNode constructor.

In addition, it:

  • Resolves Alive monitor refactoring: Allow components to register their own alive supervision #486
  • Combines AliveMonitorThread & AliveMonitorImpl
  • Moves the supervision event buffer into the PHM daemon object
    • Previously, launch manager held a reference to the buffer to push supervision deactivation/activation events. With the SupervisionHandle, this is no longer needed
    • The buffer is now held by the ObservableEventReader
  • Corrected check in getTimeForReport
  • Removed most of supervision_control_client
    • Mostly made redundant by the alive monitor's ownership of the buffer

TODO

  • Simplify/Remove PhmDaemon::construct method. This really just needs to reserve the size of a vector and LM should calculate what size to reserve
  • Review constness on new methods/parameters (probably most can be made const)
  • Add brief docs for new methods, update docs where params have changed
  • Update UTs

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.7.0) and connecting to it...
INFO: Invocation ID: 532e1479-a65e-45cc-b39a-e3dfba4e28a8
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (65 packages loaded, 10 targets configured)

Analyzing: target //:license-check (145 packages loaded, 1147 targets configured)

Analyzing: target //:license-check (156 packages loaded, 6447 targets configured)

Analyzing: target //:license-check (158 packages loaded, 9359 targets configured)

Analyzing: target //:license-check (168 packages loaded, 9417 targets configured)

INFO: Analyzed target //:license-check (173 packages loaded, 11555 targets configured).
[7 / 15] [Prepa] Expanding template external/score_tooling+/dash/tool/formatters/_dash_format_converter_stage2_bootstrap.py [for tool]
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 19.834s, Critical Path: 0.25s
INFO: 16 processes: 4 disk cache hit, 12 internal.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@WilliamRoebuck
WilliamRoebuck force-pushed the feature/process-makes-supervision branch from 663cb89 to 2a5e575 Compare August 27, 2026 16:08
@WilliamRoebuck
WilliamRoebuck force-pushed the feature/process-makes-supervision branch from 2a5e575 to 5c1f0cc Compare August 28, 2026 08:56
@WilliamRoebuck
WilliamRoebuck force-pushed the feature/process-makes-supervision branch from 5c1f0cc to 8c2033c Compare August 28, 2026 08:59
@WilliamRoebuck
WilliamRoebuck marked this pull request as ready for review August 28, 2026 08:59
@WilliamRoebuck
WilliamRoebuck force-pushed the feature/process-makes-supervision branch from 8c2033c to 9e9809f Compare August 28, 2026 09:42

@danth danth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good cleanup, just a few small tweaks 😄

Comment thread score/launch_manager/src/daemon/src/alive_monitor/details/daemon/PhmDaemon.hpp Outdated
Comment thread score/launch_manager/src/daemon/src/process_group_manager/details/graph.cpp Outdated
@WilliamRoebuck
WilliamRoebuck force-pushed the feature/process-makes-supervision branch from 9e9809f to fdec3cd Compare August 28, 2026 11:45
Comment thread score/launch_manager/src/daemon/src/alive_monitor/details/daemon/PhmDaemon.cpp Outdated
Comment thread score/launch_manager/src/daemon/src/alive_monitor/details/daemon/PhmDaemon.hpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This interface does not describe an API which publishes anything. I need to think about what it is actually defining. Something like IProcessState? If you have better ideas, please go ahead.

@WilliamRoebuck WilliamRoebuck Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to "supervision state reporter", what do you think? 2290950

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A supervision state reporter means to me something where I can report that supervision checkpoints have been reached, but I understand your intention. How about supervision process state reporter?

LM_LOG_DEBUG() << "Setting up alive supervision for" << identifier_;

config_.deployment_config.environmental_variables.add(
"LCM_ALIVE_INTERFACE_PATH", aliveInterfacePath(identifier_));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we remove the env var? Should maybe the constructSupervision just take it as a param?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I can, the library still need to read the supervision path from somewhere. In #571 the factory will return the path to use though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Alive monitor refactoring: Allow components to register their own alive supervision

4 participants