Repository navigation
Conversation
|
The created documentation from the pull request is available at: docu-html |
alexmohr
commented
Nov 14, 2026
alexmohr
force-pushed
the
feat/add-diagnostics
branch
2 times, most recently
from
November 14, 2026 20:55
f5c7891 to
92a5da1
Compare
3 tasks done
alexmohr
force-pushed
the
feat/add-diagnostics
branch
4 times, most recently
from
November 15, 2026 08:06
f31a10b to
a7f467a
Compare
alexmohr
commented
Nov 16, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The diagnostics probe can hang indefinitely or fail before both apps are ready, while lifecycle cleanup can terminate the diagnostics service and exhaust its restart attempts.
3 open issues
What changed in this PR
Integrates the OpenSOVD gateway and classic diagnostic adapter from inc_diagnostics into S-CORE’s Linux-based images, while keeping these components out of QNX bundles.
Changes:
- Registers diagnostics dependencies, patches and documentation, and adjusts module-test pin handling.
- Packages the binaries, adds a supervised diagnostics showcase and integration test, and enables EB boot startup.
- Adds an EB Raspberry Pi 4B image with offline deployment tooling.
| File | Description |
|---|---|
showcases/diagnostics/service.sh |
Waits for networking and starts the diagnostics supervisor. |
showcases/diagnostics/launch_manager_config.json |
Configures CDA and gateway startup and supervision. |
showcases/diagnostics/diagnostics.score.json |
Registers the Diagnostics Stack showcase. |
showcases/diagnostics/check.sh |
Checks gateway responses and CDA forwarding. |
showcases/diagnostics/cda-paths.toml |
Defines CDA storage, database and network settings. |
showcases/diagnostics/BUILD |
Packages showcase scripts, configuration and databases. |
showcases/BUILD |
Includes diagnostics in the showcase tar. |
scripts/tests/test_module_tests.py |
Tests parsing of nonexistent-module override errors. |
scripts/module_tests.py |
Removes pins for dependencies absent after graph resolution. |
platform_integration_tests/diagnostics/test_diagnostics_showcase.py |
Asserts diagnostics-specific showcase success. |
platform_integration_tests/diagnostics/BUILD |
Defines the Linux x86_64 diagnostics test target. |
platform_integration_tests/BUILD |
Adds diagnostics to the integration-test suite. |
patches/diagnostics/opensovd-core-expose-deps.patch |
Adds aliases for gateway dependencies. |
patches/diagnostics/opensovd-core-expose-client.patch |
Adds a Bazel target for the client library. |
patches/diagnostics/classic-diagnostic-adapter-test-databases.patch |
Exposes simulator databases through Bazel. |
patches/diagnostics/classic-diagnostic-adapter-resource-ids.patch |
Populates resource identifiers in CDA responses. |
patches/diagnostics/classic-diagnostic-adapter-linkme.patch |
Retains linker sections used for service registration. |
patches/diagnostics/BUILD |
Establishes the diagnostics patch package. |
MODULE.bazel |
Adds root-level OpenSOVD dependency pins and patches. |
known_good.json |
Registers diagnostics and its module-test settings. |
images/ebclfsa_rpi4b/README.md |
Documents image building, flashing and requirements. |
images/ebclfsa_rpi4b/build/build_image.sh |
Deploys archives into the board image using debugfs. |
images/ebclfsa_rpi4b/build/BUILD |
Assembles the deployed Raspberry Pi image. |
images/ebclfsa_rpi4b/BUILD |
Exposes the board-image target. |
images/ebclfsa_aarch64/build/config-overlay/etc/crinit/crinit.d/diagnostics.crinit |
Defines diagnostics boot startup and restart policy. |
images/ebclfsa_aarch64/build/config-overlay/BUILD |
Exports the diagnostics init task. |
images/ebclfsa_aarch64/build/BUILD |
Packages diagnostics startup for EB QEMU. |
deploy/README.md |
Documents diagnostics deployment and Raspberry Pi usage. |
deploy/diagnostics/BUILD |
Packages the gateway and CDA under /usr/bin/diagnostics. |
deploy/BUILD |
Adds diagnostics binaries to the platform tar only. |
bazel_common/score_modules_target_sw.MODULE.bazel |
Adds the generated diagnostics module pin. |
bazel_common/score_images.MODULE.bazel |
Registers the Raspberry Pi base-image archive. |
bazel_common/docs_bundles.bzl |
Mounts the diagnostics documentation bundle. |
.bazelrc |
Enables isolated extension usages required by OpenSOVD. |
Review effort: Balanced
alexmohr
force-pushed
the
feat/add-diagnostics
branch
from
November 19, 2026 11:12
0349769 to
c08f756
Compare
alexmohr
force-pushed
the
feat/add-diagnostics
branch
from
November 23, 2026 11:21
7d6f5c3 to
73ab804
Compare
alexmohr
force-pushed
the
feat/add-diagnostics
branch
3 times, most recently
from
November 25, 2026 13:53
9e0bb5f to
ed53b85
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A failed HTTP probe can start a duplicate diagnostics manager while the boot-started service is still initializing, requiring coordinated startup, readiness waiting, and ownership-aware shutdown.
1 open issue
3 resolved since last review
Review effort: Balanced
This was referenced Nov 25, 2026
alexmohr
force-pushed
the
feat/add-diagnostics
branch
from
November 25, 2026 20:26
6dc82eb to
d0dd3f4
Compare
alexmohr
marked this pull request as ready for review
November 25, 2026 20:30
Build host tools in GNU C mode so the pkg-config bootstrap can compile its bundled GLib without patching rules_foreign_cc. Apply the option to both integration configurations and unified module tests. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Pin OpenSOVD core to its upstream build-stamp interface and select the integration's generated revision metadata through its public setting. Apply the same setting in isolated module tests. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Pin CDA to the merge that exports its requirements documentation. Drop the local patch reference and refresh the resolved Bazel lockfile. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Both pinned upstream revisions now provide the required interfaces, and neither patch is referenced by the integration. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Pin classic-diagnostic-adapter to afb0621d (eclipse-opensovd/classic-diagnostic-adapter#779), which carries the systemd fix, the QNX platform settings and the QNX crate patches with their crate_universe annotations upstream. It also raises the main thread stack of the CDA binary on QNX (-N8192K): the default 512 KiB is too small while the CDA loads its configuration. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Pin opensovd_core to 6c01ccb5 (eclipse-opensovd/opensovd-core#304), which carries the QNX platform settings and the QNX crate patches with their crate_universe annotations upstream, and update the gateway build stamp commit to match. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Pin score_diagnostics to 3fc08e71 (eclipse-score/diagnostics#104). It overrides the CDA and opensovd_core at the same commits that reference_integration repeats in the root module, and packages the OpenSOVD example client sovd-client with a list-apps command. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
The diagnostics showcase uses /run for the CDA Unix domain socket that the gateway forwards to, and for the service lock. QNX images have no /run, so link it to /tmp_ram like /data. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Store the CDA flash and storage state under /data/diagnostics, which is writable on Linux and points into the RAM disk on QNX, instead of /var/lib/opensovd-cda. Put /proc/boot first in PATH, where QNX images install sh, mkdir and the networking tools. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Run the diagnostics stack on demand like the other showcases: check.sh starts service.sh, which waits for an address and becomes the showcase's own launch manager, and stops it at exit. No image starts it at boot, so the lock and the join of a running service are gone. As the showcase CLI runs one showcase at a time, the stack never runs next to another showcase, so it no longer needs a launch manager name of its own, and the platform integration test that ran it alongside Platform Run is gone. check.sh queries the gateway with the OpenSOVD example client sovd-client, which the platform now ships in /usr/bin/diagnostics: it passes only if the gateway lists sovd2uds next to score-diagnostics. This replaces the hand-written HTTP over Bash's /dev/tcp. An unexpected exit under set -e is reported with its status. Both scripts are POSIX sh with the same code on Linux and QNX. The check keeps its logs in /data/diagnostics, since /tmp is /dev/shmem on QNX. Its cleanup function is not named stop, which QNX ksh predefines as an alias. The address wait uses ip, ifconfig or hostname -I, whichever the image has. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
QNX images provide ksh as /bin/sh and no Bash, so the showcase runs its now POSIX check script with /bin/sh on both Linux and QNX. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Move the gateway and CDA binaries from platform_tar into platform_bundle, which the QNX images consume as well. The CDA and opensovd_core pins now support QNX, so the Linux-only exception is no longer needed. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Add the Diagnostics Stack showcase and its ECU databases to showcases_bundle, which the QNX images consume, so the showcase can run in the QNX image. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Backport upstream rules_rust behaviour to the S-CORE 0.68.2-score fork: crate_universe trusts the lockfile shipped by a non-root crate universe and skips its digest check. Upstream made this change in bazelbuild/rules_rust commit 2f690546 (bazelbuild/rules_rust#4109), released in rules_rust 0.71.1. This is a partial backport. Upstream also fails hard for non-root crate universes without a lockfile; that part is deliberately left out, so those universes keep repinning as before. The lockfile digest covers the cargo-bazel, rustc and cargo versions and the manifest labels, which differ between producer and consumer. Dependencies such as mbedtls-rs that ship lockfiles for rules_rust >= 0.71.1 consumers therefore fail the digest check on 0.68.x. Drop the patch once S-CORE's rules_rust fork contains the change or S-CORE moves to rules_rust >= 0.71.1. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Pin mbedtls-rs to e13c4f4d, which builds mbedtls with Bazel-native cc_library targets instead of rules_foreign_cc cmake(). Under the QNX toolchain the cmake() build ran qcc from a build directory in which the cwd-relative QNX_HOST did not resolve, so the license check failed. mbedtls-rs ships a crate-universe lockfile for rules_rust >= 0.71.1. The rules_rust backport patch lets the 0.68.2-score fork use it. The rules_foreign_cc 0.15.1 pin stays, score_crypto still needs it. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Add an S-CORE rules_rust patch, not an upstream backport: upstream
rules_rust up to 0.75 does not do this. cargo_build_script rewrites a
leading /proc/self/cwd in each ':'-separated element of the cc
toolchain env passed to build scripts to ${pwd}, which the build
script runner resolves to the absolute exec root.
Build scripts run with cwd = CARGO_MANIFEST_DIR. The S-CORE QNX
toolchain sets QNX_HOST and QNX_TARGET relative to /proc/self/cwd, so
qcc called by cc-rs in build scripts such as aws-lc-sys fails its
license check. Only the cc toolchain env from get_linker_and_args is
changed, not the user build_script_env.
The change is intended to be proposed to bazelbuild/rules_rust and
eclipse-score/rules_rust; drop the patch once it is available there.
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Run //platform_integration_tests/diagnostics on QNX x86_64 too, with the same test implementation as on Linux: only the ITF target differs (QEMU with the QNX image instead of Docker with the Linux image), as for the other platform integration tests. Run it exclusively: it boots its own target with the whole diagnostics stack, and the extra load next to other PITs made the timing-sensitive lifecycle PIT miss its supervision deadlines on QNX twice. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
alexmohr
force-pushed
the
feat/add-diagnostics
branch
from
November 29, 2026 09:14
94b0452 to
633dc48
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Add the OpenSOVD gateway and the classic diagnostic adapter (CDA) from
eclipse-score/diagnosticsto the platform, so they end up in the Linux, EB and AutoSD images, and add a showcase that starts them.score_diagnosticsinknown_good.json(and regenerate the Bazel fragments); its docs bundle is mounted.opensovd_core,classic-diagnostic-adapterandmbedtls-rsfrom thediagnostics_depsgroup inknown_good.json, because overrides are only honoured in the root module.opensovd-gateway --versionand/sovd/version-inforeport that revision;//deploy/diagnostics:gateway_stamp_testchecks it against the pin inMODULE.bazel. The CDA requirements exports and gateway stamp support are consumed upstream, without the former local patches.//deploy/diagnosticsand install the gateway and CDA under/usr/bin/diagnosticsvia//deploy:platform_tar.Diagnostics Stackand start the stack as a service (//showcases/diagnostics):service.shwaits for a network address and runs the launch manager, which starts the CDA with the ECU simulator's databases and settings, then starts the gateway. The EB QEMU image starts the service at boot with acrinittask; the showcase check uses a running service or starts one. A shared lock prevents duplicate startup, and the check leaves an existing service running. HTTP probes have a timeout and retry until both apps are available.//platform_integration_tests/diagnostics(Linux x86_64) to thepitsuite; it also checks that the diagnostics service keeps running while Platform Run runs.--experimental_isolated_extension_usages, which the currentopensovd_corepin needs.--host_conlyopt=-std=gnu11for integration and unified module-test host tools, so the pkg-config bootstrap's bundled GLib can compile without applying the localrules_foreign_ccpatch.Raspberry Pi image support is separate in draft PR #522 and is not included here.
The diagnostics dependency is pinned to
0152801c524c4af8d718ed03915703e8ef632131on diagnostics main. The gateway uses the upstreamSOVD_*settings and placeholder token authentication; this is a development setup, not production authentication.Checklist
Related
Includes the merged work in eclipse-score/diagnostics#70, eclipse-score/diagnostics#86 and eclipse-score/diagnostics#97. Refs eclipse-score/diagnostics#69.
Raspberry Pi images: #522.
Notes for Reviewers
Previously verified locally (not rerun as part of this description cleanup):
bazel build --config=linux-aarch64 //deploy:platform_tar //showcases:showcases_pkg_tarsucceeds; the tars contain the gateway and the CDA (aarch64 ELF), the showcase, its launch manager configuration and the databases./showcases/bin/cli --examples="Diagnostics Stack"passes.crinitstarts the diagnostics service at boot, and through the gateway on the VM's address the six simulated ECUs are listed and the VIN offlxc1000is read. The CDA's port is not reachable from the network (dev.sh run-qemu,ecu-sim.sh test-vmin https://github.com/alexmohr/score-diagnostics-quickstart).bazel queryresolves@score_diagnostics//:docs_bundleand the new targets.rules_foreign_ccis dropped forscore_kyronand Bazel gets past the graph step.Design choices to review:
platform_taronly, not toplatform_bundle. The QNX images consumeplatform_bundle, and the OpenSOVD components do not support QNX. For the same reason the showcase is in//showcases:showcasesbut not inshowcases_bundle.deploy/README.mdsays the platform stays free of that).gateway_stamp_testfails when the commit differs.Alexander Mohr alexander.m.mohr@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH
Provider Information