Skip to content

hmon: loom enablement#99

Merged
pawelrutkaq merged 1 commit intoeclipse-score:mainfrom
qorix-group:arkjedrz_loom-enablement
Mar 3, 2026
Merged

hmon: loom enablement#99
pawelrutkaq merged 1 commit intoeclipse-score:mainfrom
qorix-group:arkjedrz_loom-enablement

Conversation

@arkjedrz
Copy link
Contributor

@arkjedrz arkjedrz commented Mar 3, 2026

Enable loom in health monitor.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //: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: f83f0d93-29b2-46ff-8a69-7442e5019bfd
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'score_rust_policies', the root module requires module version score_rust_policies@0.0.3, but got score_rust_policies@0.0.5 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
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: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (41 packages loaded, 9 targets configured)

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

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

Analyzing: target //:license-check (140 packages loaded, 2614 targets configured)

Analyzing: target //:license-check (148 packages loaded, 5178 targets configured)

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

Analyzing: target //:license-check (160 packages loaded, 7814 targets configured)

Analyzing: target //:license-check (160 packages loaded, 7817 targets configured)

Analyzing: target //:license-check (160 packages loaded, 7817 targets configured)

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

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

INFO: Analyzed target //:license-check (165 packages loaded, 9955 targets configured).
[13 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 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: 28.173s, Critical Path: 2.46s
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>]

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enables building the health monitoring Rust crate under cfg(loom) by excluding existing unit tests from loom builds, wiring in the loom dependency, and adding a Bazel target intended for loom-based testing.

Changes:

  • Gate existing Rust unit-test modules behind #[cfg(all(test, not(loom)))] to avoid compiling them under loom.
  • Add loom as a dependency for cfg(loom) builds and whitelist cfg(loom) via workspace unexpected_cfgs lint configuration.
  • Add a Bazel loom_tests rust_test target and pin score_crates via git_override to obtain the needed Bazel crate(s).

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/health_monitoring_lib/rust/worker.rs Excludes this module’s unit tests from loom builds.
src/health_monitoring_lib/rust/tag.rs Excludes this module’s unit tests from loom builds.
src/health_monitoring_lib/rust/lib.rs Excludes crate-level unit tests from loom builds.
src/health_monitoring_lib/rust/ffi.rs Excludes FFI unit tests from loom builds.
src/health_monitoring_lib/rust/deadline/ffi.rs Excludes deadline FFI unit tests from loom builds.
src/health_monitoring_lib/rust/deadline/deadline_state.rs Excludes deadline state unit tests from loom builds.
src/health_monitoring_lib/rust/deadline/deadline_monitor.rs Excludes deadline monitor unit tests from loom builds.
src/health_monitoring_lib/rust/deadline/common.rs Excludes deadline common unit tests from loom builds.
src/health_monitoring_lib/Cargo.toml Adds loom dependency under cfg(loom).
src/health_monitoring_lib/BUILD Adds loom_tests Bazel target that builds with --cfg loom.
MODULE.bazel Pins score_crates to a specific commit via git_override.
Cargo.toml Whitelists cfg(loom) in workspace rust lints to avoid unexpected_cfgs warnings.
Cargo.lock Locks additional transitive deps introduced by loom.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +123 to +147
rust_test(
name = "loom_tests",
crate = ":health_monitoring_lib",
crate_features = ["stub_supervisor_api_client"],
rustc_flags = [
"--cfg",
"loom",
"-C",
"link-arg=-lm",
"-C",
"link-arg=-lc",
] + select({
"@platforms//os:qnx": [
"-Clink-arg=-lc++",
],
"@platforms//os:linux": [
"-Clink-arg=-lrt",
"-Clink-arg=-lstdc++",
],
}),
deps = [
"@score_baselibs_rust//src/log/stdout_logger",
"@score_crates//:loom",
],
)
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

loom_tests compiles the crate with --cfg loom, but all in-crate unit test modules are now gated behind #[cfg(all(test, not(loom)))] (and there are no #[cfg(all(test, loom))] tests in the crate). As a result this Bazel test target will run zero Rust tests and can give a false sense of coverage. Consider adding at least one loom-specific test module (or renaming this target to indicate it's a compile/link check rather than a test suite).

Copilot uses AI. Check for mistakes.
MODULE.bazel Outdated
Comment on lines 84 to 90
bazel_dep(name = "score_crates", version = "0.0.7")
git_override(
module_name = "score_crates",
commit = "c735d9fe12f255c2ae427eeb87b71f2cb46d015f",
remote = "https://github.com/eclipse-score/score-crates.git",
)

Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

The score_crates dependency is now pinned via git_override to a specific commit, but there’s no inline note explaining why the registry version (0.0.7) is insufficient. Since overrides affect reproducibility and upgradeability, add a short comment describing the required fix/feature (e.g., loom support) and, if possible, prefer bumping the bazel_dep version to a release that contains it instead of a raw commit pin.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

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

@arkjedrz arkjedrz force-pushed the arkjedrz_loom-enablement branch from 289b9bb to 16f80df Compare March 3, 2026 07:21
@arkjedrz arkjedrz had a problem deploying to workflow-approval March 3, 2026 07:21 — with GitHub Actions Failure
@arkjedrz arkjedrz force-pushed the arkjedrz_loom-enablement branch from 16f80df to 5e8e564 Compare March 3, 2026 07:23
@arkjedrz arkjedrz had a problem deploying to workflow-approval March 3, 2026 07:23 — with GitHub Actions Failure
@arkjedrz arkjedrz force-pushed the arkjedrz_loom-enablement branch from 5e8e564 to 4c9ca89 Compare March 3, 2026 09:14
@arkjedrz arkjedrz temporarily deployed to workflow-approval March 3, 2026 09:14 — with GitHub Actions Inactive
@arkjedrz arkjedrz temporarily deployed to workflow-approval March 3, 2026 09:14 — with GitHub Actions Inactive
Enable `loom` in health monitor.
@arkjedrz arkjedrz force-pushed the arkjedrz_loom-enablement branch from 4c9ca89 to e407f95 Compare March 3, 2026 09:24
@arkjedrz arkjedrz temporarily deployed to workflow-approval March 3, 2026 09:24 — with GitHub Actions Inactive
@arkjedrz arkjedrz temporarily deployed to workflow-approval March 3, 2026 09:24 — with GitHub Actions Inactive
@arkjedrz arkjedrz requested a review from pawelrutkaq March 3, 2026 09:26
@pawelrutkaq pawelrutkaq merged commit 3dc9164 into eclipse-score:main Mar 3, 2026
16 checks passed
@arkjedrz arkjedrz deleted the arkjedrz_loom-enablement branch March 3, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants