Skip to content

Refactor Monitor API to public Alive API#229

Merged
NicolasFussberger merged 21 commits into
eclipse-score:mainfrom
etas-contrib:feature/rename-monitor-to-alive
Jun 22, 2026
Merged

Refactor Monitor API to public Alive API#229
NicolasFussberger merged 21 commits into
eclipse-score:mainfrom
etas-contrib:feature/rename-monitor-to-alive

Conversation

@NicolasFussberger

@NicolasFussberger NicolasFussberger commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Refactors the Launch Manager "Monitor" interface to the Alive API.

Example usage:

#include "score/mw/lifecycle/alive.h"

score::mw::lifecycle::Alive alive("instance-name");

while(!shutdownRequested) {
  // Do stuff 
  // ...

  alive.ReportAlive();
}
let alive = alive_rs::Alive::new("my instance").expect("Failed to create alive instance");
alive.report_alive();

Public bazel targets:
//score/launch_manager:alive_cc
//score/launch_manager:alive_rust

Changes:

  • Rename Monitor class to Alive
  • Remove the possibility to report different checkpoint ids from the public API
  • Since this is a public launch manager API, it is moved to new top-level score/launch_manager/alive folder

Open Questions:

  • Feature Architecture defines method "report_health_status" which seems odd if we are only reporting an alive notification. What was the intention of this interface definition?

Closes: #149

@github-actions

github-actions Bot commented Jun 5, 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.4.2) and connecting to it...
INFO: Invocation ID: 3e66a275-748b-423d-bdad-3b68b79af7cc
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 (24 packages loaded, 10 targets configured)

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

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

Analyzing: target //:license-check (138 packages loaded, 1862 targets configured)

Analyzing: target //:license-check (147 packages loaded, 4437 targets configured)

Analyzing: target //:license-check (151 packages loaded, 8079 targets configured)

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

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

INFO: Analyzed target //:license-check (163 packages loaded, 10268 targets configured).
[3 / 15] Creating runfiles tree bazel-out/k8-fastbuild/bin/license.check.license_check.runfiles; 0s local ... (2 actions, 1 running)
[14 / 16] [Prepa] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar
[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: 23.679s, Critical Path: 2.63s
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

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

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

Comment thread examples/rust_supervised_app/Cargo.toml
Comment thread score/launch_manager/alive/BUILD Outdated
Comment thread score/launch_manager/alive/src/details/BUILD Outdated
Comment thread score/health_monitor/src/Cargo.toml
Comment thread score/launch_manager/src/alive/src/alive.h
Comment thread score/launch_manager/src/alive/src/details/AliveImpl.h
@ramceb

ramceb commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

FT-Team meeting: 2026-06-10: The report_health_status api shall also provide the possibility to report "not ok" state to shorten FTTI times in some use-cases.

@NicolasFussberger

Copy link
Copy Markdown
Contributor Author

FT-Team meeting: 2026-06-10: The report_health_status api shall also provide the possibility to report "not ok" state to shorten FTTI times in some use-cases.

Okay understood. Then I guess the C++ API would look like this:

enum class HealthStatus : uint8_t {
  kOk,
  kNotOk
};

class Alive {
  public:
    void ReportHealthStatus(HealthStatus status);
};

Though I am also wondering if having a separate method for the failure reporting would be more explicit.
Something like:

class Alive {
  public:
    void ReportAlive();
    void ReportFailure();
};

What do you think @pawelrutkaq @ramceb ?

Comment thread score/launch_manager/alive/src/alive.cpp Outdated
Comment thread score/launch_manager/src/alive/src/alive.h
@NicolasFussberger NicolasFussberger merged commit 3c65e9f into eclipse-score:main Jun 22, 2026
20 of 22 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in LCM - Lifecycle & Health FT Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Rename current "HealthMonitor" API in LaunchManager to "Alive"

5 participants