Skip to content

Process monitor refactor - #392

Draft
WilliamRoebuck wants to merge 13 commits into
eclipse-score:mainfrom
etas-contrib:feature/process-mon-refactor-2
Draft

Process monitor refactor#392
WilliamRoebuck wants to merge 13 commits into
eclipse-score:mainfrom
etas-contrib:feature/process-mon-refactor-2

Conversation

@WilliamRoebuck

Copy link
Copy Markdown
Contributor

The description below is not AI generated. It includes some key information needed to begin a review.


Overview

This is the completion of the refactor started in #370. With these changes, the following is achieved:

  • Transitions now activate run targets instead of states and operate on the component level, rather than processes. See IComponent. This means that different types of component can now be implemented, such as containers.
  • Ready conditions implemented in code.
  • Graph now processes events sequentially rather than in parallel. See ComponentEventQueue.
  • ProcessInfoNode is no longer responsible for dependency resolution. This responsibility is moved to Transition.
  • ProcessInfoNode & Graph coupling resolved - ProcessInfoNode no longer has access to Graph.

New components

  • DependencyGraph - Data structure for storing and traversing component dependencies
  • Transition - Resolves run target activation logic. Activates and deactivates components as required.

Behavioral change

Processes are now managed based on component state, rather than process state. This means that once a component is activated, the underlying process shall not be started again until the component becomes inactive (either due to an error or a run target activation). Previously, a self-terminating process would be restarted on every run target activation that included it.

Minor changes

  • kLaunchManager comms type removed. This was legacy and no longer needed.
  • Configuration now generates an "Off" run target if none is configured
  • Several new interfaces have been added to allow for unit testing of existing components

WIP (while this PR is a draft)

  • Unit tests for Graph & ProcessInfoNode
  • Some remaining outdated documentation

Review strategy

As this PR is quite large, it may be necessary for reviewers each to tackle subsections of the changes. In terms of line numbers, these sections are roughly equal:

  • graph.cpp + graph.hpp (+ unit tests)
  • processinfonode.cpp + processinfonode.hpp (+ unit tests)
  • transition.hpp + transition_UT.hpp
  • dependency_graph.hpp + dependency_graph_UT.cpp + process_group_manager.cpp + process_group_manager.hpp
  • Any remaining unreviewed changes

WilliamRoebuck and others added 5 commits July 29, 2026 14:27
Introduce Run Target handling in refactoring

* Run Target exploration

* Small improvements

* Restore table format

* Make active flag atomic

Proposal for component event queue

* Proposal for central event queue

* Introduce MPSC queue for event queue

* Make use of concurrency error domain

* Remove atomics/mutexes that now obsolete

* Apply review findings

* Move doxyen above the line

* Remove blocking push behavior

* Change queue push API

* EventQueue only accepting r-value refs

* Fixes after rebase

Fixes after rebase

Fix transition to Off states during shutdown

* Fix transition to Off

* Fix transition to off v2

* Fix test flakyness

* RunTarget optimization

* Fix copyright

Fix race condition for self-term proc

Integrate recoveryclient with event queue

* Integrate recoveryclient with event queue

* Fix include header

Fix build with new config

Fix concurrency build file

Fix compiler errors & warnings

Fix component event queue

Separate transition bookkeeping from DependencyGraph topology

* poc

* Improve the transition design

* Rollout to production code

* Improve documentation

* Remove graph poc folder

* Improvements and more testing

* fix compiler errors

* Traverse whole graph on deactivate

* Remove initial transition special case

* Remove special case for Off

* Improve documentation

* Cleanup

* Remove unneeded file

* Cleanup documentation

* Remove private inheritance

* Reduce component states to minimum

* Remove redundant checks

* Replace component state with flag

* Simply tryReportState method
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

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.6.0) and connecting to it...
INFO: Invocation ID: 58945471-42e6-414b-94d4-1a2761372d06
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: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

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

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

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

Analyzing: target //:license-check (139 packages loaded, 2370 targets configured)

Analyzing: target //:license-check (152 packages loaded, 5482 targets configured)

Analyzing: target //:license-check (153 packages loaded, 7256 targets configured)

Analyzing: target //:license-check (161 packages loaded, 8241 targets configured)

Analyzing: target //:license-check (164 packages loaded, 8271 targets configured)

Analyzing: target //:license-check (164 packages loaded, 8271 targets configured)

Analyzing: target //:license-check (164 packages loaded, 8271 targets configured)

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

INFO: Analyzed target //:license-check (169 packages loaded, 10409 targets configured).
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
[15 / 16] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
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: 24.800s, Critical Path: 2.76s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
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>]

@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

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.

2 participants