Skip to content

Add basic bazel build (S-Core Integration) - #348

Draft
theswiftfox wants to merge 15 commits into
mainfrom
feat/bazel
Draft

Add basic bazel build (S-Core Integration)#348
theswiftfox wants to merge 15 commits into
mainfrom
feat/bazel

Conversation

@theswiftfox

@theswiftfox theswiftfox commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds a basic bazel build for the cda. Some adaptions were made to the mbedtls build.rs to support building via bazel instead of during the rust build step.

Checklist

  • I have tested my changes locally
  • I have added or updated documentation
  • I have linked related issues or discussions
  • I have added or updated tests

Related

Notes for Reviewers


Elena Gantner elena.gantner@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH
Provider Information

Comment thread MODULE.bazel Outdated
)

# --- crate_universe: auto-generate Bazel targets for external Cargo dependencies ---
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate", isolate = True)

Eclipse S-CORE also has a "crates universe", defined here. I think this clashes with the universe defined here:

ERROR: /var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust+/crate_universe/extensions.bzl:941:21: Traceback (most recent call last):
        File "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust+/crate_universe/extensions.bzl", line 941, column 21, in _crate_impl
                fail("Defined two crate universes with the same name in different MODULE.bazel files (`{}`). Either give one a different name, or use `use_extension(isolate=True)`".format(
Error in fail: Defined two crate universes with the same name in different MODULE.bazel files (`crate_index`). Either give one a different name, or use `use_extension(isolate=True)`
ERROR: Analysis of target '@@classic-diagnostic-adapter+//:opensovd-cda' failed; build aborted: error evaluating module extension @@rules_rust+//crate_universe:extensions.bzl%crate
INFO: Elapsed time: 80.397s, Critical Path: 0.03s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
FAILED: 
    Fetching module extension @@rules_rust+//crate_universe:extensions.bzl%crate; Generating hub and spokes 73s

While having a multi-verse would be cool 😄 - maybe the solution is as simple as implementing the isolate = True proposal? Another (maybe more maintainable / long-term) solution could be to use the score-crates also here, but this introduces a dependency to S-CORE which may not really be wanted. Here, a Bazel expert should weigh in.

@theswiftfox theswiftfox May 21, 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.

Thanks for the hint! I added the flag and enabled the experimental support for it via .baselrc :)
🤞that it works! :)

As for using the score-crates. Thats something we could evaluate. But it might be a higher maintenance burden than we would want for now (on both sides). As we would need to align with score whenever we want to update our lock file (due to new rustsec advisories, etc.). I think its a great topic for the discussion on aligning releases and things though!

edit:
sorry, need to update the modules, as i had to rebase on main for gh to start the actions again. It dragged in a new dependency I had not noticed

@opajonk opajonk May 21, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

With the fix I am getting a bit further now:

   Compiling cargo-bazel v0.17.0 (/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust+/crate_universe)
    Finished `release` profile [optimized] target(s) in 50.58s
Error: Failed to splice workspace

Caused by:
    Some manifests are not being tracked.
    Please add the following labels to the `manifests` key:
     //cda-build:Cargo.toml
     //cda-comm-doip:Cargo.toml
     //cda-comm-uds:Cargo.toml
     //cda-core:Cargo.toml
     //cda-database:Cargo.toml
     //cda-extra:Cargo.toml
     //cda-health:Cargo.toml
     //cda-interfaces:Cargo.toml
     //cda-main:Cargo.toml
     //cda-plugin-security:Cargo.toml
     //cda-sovd:Cargo.toml
     //cda-sovd-interfaces:Cargo.toml
     //:cda-storage/Cargo.toml
     //cda-tracing:Cargo.toml
     //comm-mbedtls/mbedtls-rs:Cargo.toml
     //comm-mbedtls/mbedtls-sys:Cargo.toml
     //:integration-tests/Cargo.toml
     //opensovd-axum-extra:Cargo.toml.
ERROR: /var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust+/crate_universe/private/common_utils.bzl:55:13: Traceback (most recent call last):
        File "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust+/crate_universe/extensions.bzl", line 1009, column 37, in _crate_impl
                _generate_hub_and_spokes(
        File "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust+/crate_universe/extensions.bzl", line 633, column 51, in _generate_hub_and_spokes
                splice_outputs = splice_workspace_manifest(
        File "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust+/crate_universe/private/splicing_utils.bzl", line 174, column 19, in splice_workspace_manifest
                cargo_bazel_fn(
        File "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust+/crate_universe/private/common_utils.bzl", line 88, column 23, in _execute
                return execute(
        File "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust+/crate_universe/private/common_utils.bzl", line 55, column 13, in execute
                fail(_EXECUTE_ERROR_MESSAGE.format(
Error in fail: Command ["/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust++cu_nr+cargo_bazel_bootstrap/cargo-bazel", "splice", "--output-dir", "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/modextwd/rules_rust++_crate+classic-diagnostic-adapter++crate/crate_index/splicing-output", "--splicing-manifest", "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/modextwd/rules_rust++_crate+classic-diagnostic-adapter++crate/crate_index/splicing_manifest.json", "--config", "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/modextwd/rules_rust++_crate+classic-diagnostic-adapter++crate/crate_index/config.json", "--cargo-lockfile", "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/classic-diagnostic-adapter+/Cargo.lock", "--cargo", "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust++rust_host_tools+rust_host_tools/bin/cargo", "--rustc", "/var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/rules_rust++rust_host_tools+rust_host_tools/bin/rustc"] failed with exit code 1.
STDOUT ------------------------------------------------------------------------

STDERR ------------------------------------------------------------------------
Error: Failed to splice workspace

Caused by:
    Some manifests are not being tracked.
    Please add the following labels to the `manifests` key:
     //cda-build:Cargo.toml
     //cda-comm-doip:Cargo.toml
     //cda-comm-uds:Cargo.toml
     //cda-core:Cargo.toml
     //cda-database:Cargo.toml
     //cda-extra:Cargo.toml
     //cda-health:Cargo.toml
     //cda-interfaces:Cargo.toml
     //cda-main:Cargo.toml
     //cda-plugin-security:Cargo.toml
     //cda-sovd:Cargo.toml
     //cda-sovd-interfaces:Cargo.toml
     //:cda-storage/Cargo.toml
     //cda-tracing:Cargo.toml
     //comm-mbedtls/mbedtls-rs:Cargo.toml
     //comm-mbedtls/mbedtls-sys:Cargo.toml
     //:integration-tests/Cargo.toml
     //opensovd-axum-extra:Cargo.toml.

ERROR: Analysis of target '@@classic-diagnostic-adapter+//:opensovd-cda' failed; build aborted: error evaluating module extension @@rules_rust+//crate_universe:extensions.bzl%crate%classic-diagnostic-adapter@_+crate
INFO: Elapsed time: 72.528s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
FAILED:
    Fetching module extension @@rules_rust+//crate_universe:extensions.bzl%crate%classic-diagnostic-adapter@_+crate; Splicing Cargo workspace for `crate_index` 63s

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It is not really hard to run this, but just the workspace is a bit "hacked"... maybe you can have a look anyway. I will try to create a minimal reproducer as well.

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.

Did a 'best guess' fix and added the manifests into the root MODULE.bazel.
A minimal reproducer would be awesome though <3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

... aaand another step further! It seems to pick up the edition now. However, there is now yet another problem; I assume with the sysroot / SDK. I need to check if that header is really missing or what is going on here. Will update here!

bazel build --config eb-aarch64-rpi4b @classic-diagnostic-adapter//:opensovd-cda --experimental_isolated_extension_usages --@classic-diagnostic-adapter//:tls_backend=mbedtls
INFO: Invocation ID: cb03646c-512b-47cd-8f09-a93ef003f898
WARNING: For repository 'rules_shell', the root module requires module version rules_shell@0.6.0, but got rules_shell@0.6.1 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_cc', the root module requires module version rules_cc@0.2.16, but got rules_cc@0.2.17 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_python', the root module requires module version rules_python@1.8.3, but got rules_python@1.8.5 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'aspect_rules_lint', the root module requires module version aspect_rules_lint@2.0.0, but got aspect_rules_lint@2.3.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'buildifier_prebuilt', the root module requires module version buildifier_prebuilt@8.2.0.2, but got buildifier_prebuilt@8.5.1 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
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
INFO: Analyzed target @@classic-diagnostic-adapter+//:opensovd-cda (587 packages loaded, 63925 targets configured).
ERROR: /var/cache/bazel/976537d6d94a3965f1386b2d77b73fa0/external/classic-diagnostic-adapter+/comm-mbedtls/mbedtls-sys/BUILD.bazel:30:19: Running Cargo build script build_script failed: (Exit 1): runner failed: error executing CargoBuildScriptRun command (from target @@classic-diagnostic-adapter+//comm-mbedtls/mbedtls-sys:build_script) bazel-out/k8-opt-exec-ST-db392155ee03/bin/external/rules_rust+/cargo/cargo_build_script_runner/runner ... (remaining 10 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Build script process failed with exit code 101
--stdout:
cargo:rerun-if-changed=wrapper.h
cargo:rerun-if-changed=patches
cargo:rerun-if-changed=csrc
cargo:rerun-if-changed=build.rs
cargo:rerun-if-env-changed=MBEDTLS_WRAPPER_H

--stderr:
Skipping source patches as requested by MBEDTLS_SKIP_PATCH=1
Skipping cmake/cc build as requested by MBEDTLS_SKIP_BUILD=1
/usr/include/limits.h:26:10: fatal error: 'bits/libc-header-start.h' file not found

thread 'main' (133734) panicked at external/classic-diagnostic-adapter+/comm-mbedtls/mbedtls-sys/build.rs:192:10:
bindgen failed to generate bindings: ClangDiagnostic("/usr/include/limits.h:26:10: fatal error: 'bits/libc-header-start.h' file not found\n")
stack backtrace:
   0:     0x581cff6a7145 - <<std[ea9f4e93d12430d]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[d1bb96a9607206a1]::fmt::Display>::fmt
   1:     0x581cff6c1dd7 - core[d1bb96a9607206a1]::fmt::write
   2:     0x581cff674e16 - std[ea9f4e93d12430d]::io::default_write_fmt::<std[ea9f4e93d12430d]::sys::stdio::unix::Stderr>
   3:     0x581cff6a6e12 - <std[ea9f4e93d12430d]::sys::backtrace::BacktraceLock>::print
   4:     0x581cff6883de - std[ea9f4e93d12430d]::panicking::default_hook::{closure#0}
   5:     0x581cff689f68 - std[ea9f4e93d12430d]::panicking::default_hook
   6:     0x581cff68a12e - std[ea9f4e93d12430d]::panicking::panic_with_hook
   7:     0x581cff6a6b68 - std[ea9f4e93d12430d]::panicking::panic_handler::{closure#0}
   8:     0x581cff6a3dd9 - std[ea9f4e93d12430d]::sys::backtrace::__rust_end_short_backtrace::<std[ea9f4e93d12430d]::panicking::panic_handler::{closure#0}, !>
   9:     0x581cff68880d - __rustc[43d5200f6d4d6223]::rust_begin_unwind
  10:     0x581cff0c867c - core[d1bb96a9607206a1]::panicking::panic_fmt
  11:     0x581cff0c82a2 - core[d1bb96a9607206a1]::result::unwrap_failed
  12:     0x581cff0ce252 - build_script_[5bd22ae657791950]::generate_bindings
  13:     0x581cff0cfec6 - build_script_[5bd22ae657791950]::main
  14:     0x581cff0d5bd3 - std[ea9f4e93d12430d]::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
  15:     0x581cff0d4d79 - std[ea9f4e93d12430d]::rt::lang_start::<()>::{closure#0}
  16:     0x581cff689b24 - std[ea9f4e93d12430d]::rt::lang_start_internal
  17:     0x581cff0d1ca5 - main
  18:     0x7e50f75331ca - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  19:     0x7e50f753328b - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:360:3
  20:     0x581cff0c874a - _start
  21:                0x0 - <unknown>

Target @@classic-diagnostic-adapter+//cda-main:opensovd-cda failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 15.292s, Critical Path: 9.30s
INFO: 38 processes: 1284 action cache hit, 10 internal, 28 processwrapper-sandbox.
ERROR: Build did NOT complete successfully

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.

Slowly getting there 😅
that looks like the typical bindgen error I had when crosscompiling as well. can you try to set the env variable for the build script BINDGEN_SYSROOT=PATH/TO/SDK/SYSROOT. This causes bindgen to pass along the --sysroot={} flag to clang.
If that doesn't work / isn't feasible, the other option would be to check in the generated bindings here as a workaoround and skip the bindgen step.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I got a green build now - but it involves again quite some "hammering" on the cross-build. Some of it in the toolchain setup at S-CORE, but - unfortunately - also some of it in the mbedtls-build-scripts. I need to clean this up and create a minimal variant so we can take a real look at it and decide what to do next.

However, the good news is: I think that the CDA itself is building just fine. "Just" the cross-build (not really unexpected), and especially cross-building mbedtls, seem problematic. But I guess with a bit of Bazel expertise, this can be cleaned up.

@theswiftfox theswiftfox May 22, 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.

thats amazing news! :)

if you have a branch / repo in score where the hammering is setup, i'm happy to also take a look at it and see if / how we can improve the cross compile support in the cda here :) While bazel is not my expertise I have quite a bit of history with cross compiling rust (and to parts c/c++) projects :D

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Done!

eclipse-score/reference_integration#240 contains the working example - without cross-compilation, though; that requires a special variant of the EB corbos Toolkit (it will contain mandatory fixes), which I have to release first.

However, even with this stripped-down example we're making good progress, I think!


package(default_visibility = ["//visibility:public"])

cmake(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I tried it out in eclipse-score/inc_diagnostics#6 but got Linux CI failure caused by an include path mismatch in the mbedtls foreign_cc build. CMAKE_C_FLAGS currently uses -I$$EXT_BUILD_ROOT$$/comm-mbedtls/mbedtls-sys/csrc, but in the sandbox execroot the header is actually under $$EXT_BUILD_ROOT$$/external/classic-diagnostic-adapter+/comm-mbedtls/mbedtls-sys/csrc, so x509_crt.c cannot find ed25519_extract.h. Can you check?!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

theswiftfox and others added 8 commits July 10, 2026 11:15
Signed-off-by: Elena Gantner <elena.gantner@mercedes-benz.com>
Signed-off-by: Elena Gantner <elena.gantner@mercedes-benz.com>
add isolate=True for CDA crates universe
Thanks @opajonk!

Signed-off-by: Elena Gantner <elena.gantner@mercedes-benz.com>
Signed-off-by: Elena Gantner <elena.gantner@mercedes-benz.com>
Signed-off-by: Elena Gantner <elena.gantner@mercedes-benz.com>
Signed-off-by: Elena Gantner <elena.gantner@mercedes-benz.com>
Signed-off-by: Elena Gantner <elena.gantner@mercedes-benz.com>
Add missing cda-plugin-security dependency in cda-main, adjust ExtractHost import ordering for checkstyle, and configure reuse-annotate to skip unrecognized Bazel files.
Move com-params resolver usage to cda-main mdd module, add missing error docs and allow reasons, update FG operation tests to use ExtractHost, remove unsupported reuse-annotate arg, restore SPDX headers for Bazel files, and normalize trailing newline in bazel/rust_crate.bzl.
Exclude extensionless Bazel files from reuse-annotate, apply checkstyle formatting in config tests, and import resolve_com_params in mdd tests to fix unresolved symbol errors in Rust CI.
@FScholPer
FScholPer marked this pull request as ready for review July 13, 2026 11:36
@FScholPer
FScholPer requested a review from a team as a code owner July 13, 2026 11:36
@github-actions github-actions Bot added the changes requested Changes requested after a review label Jul 13, 2026
@FScholPer FScholPer changed the title Draft: add basic bazel build (S-Core Integration) Add basic bazel build (S-Core Integration) Jul 13, 2026
Restore DB_HEALTH_COMPONENT_KEY used by cda-main and apply end-of-file fixer update for cda-plugin-runtime-update/BUILD.bazel.
@github-actions github-actions Bot added needs review Waiting for a review and removed changes requested Changes requested after a review labels Jul 13, 2026
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

⚠️ 3 CRAP regression(s) detected

↑ 3 regressed · ★ 1 new · ↔ 48 moved · ↓ 1 improved · 1532 unchanged · — 0 removed
✓ = clean, ▲ = moderate, ✗ = crappy; Δ = change since baseline; CC = cyclomatic complexity; Cov % = line coverage percentage

CRAP Δ CC Cov % Function Location
12.0 +8.9 3 0.0 Connectivity::fmt cda-interfaces/src/ecumanager.rs:145
8.8 +1.4 7 66.7 resolve_com_params cda-main/src/lib.rs:991
7.9 +0.3 7 74.0 UdsManager::control_tester_present cda-comm-uds/src/tester_present.rs:26
1.0 NEW 1 100.0 resolve_com_params cda-main/src/mdd.rs:41
↓ 1 improved
CRAP Δ CC Cov % Function Location
5.1 -0.4 5 84.6 handle_send_pending cda-comm-doip/src/connection_receiver.rs:31
↔ 48 moved
CRAP Δ CC Cov % Function Location
85.5 16 35.2 service::executions::ecu_reset_handler cda-sovd/src/sovd/components/ecu/operations.rs:1343cda-sovd/src/sovd/components/ecu/operations.rs
22.4 17 73.4 diag_service::id::get cda-sovd/src/sovd/functions/functional_groups/operations.rs:792cda-sovd/src/sovd/functions/functional_groups/operations.rs
18.7 17 82.0 diag_service::post cda-sovd/src/sovd/functions/functional_groups/operations.rs:361cda-sovd/src/sovd/functions/functional_groups/operations.rs
17.0 17 96.0 service::executions::id::delete cda-sovd/src/sovd/components/ecu/operations.rs:1695cda-sovd/src/sovd/components/ecu/operations.rs
13.4 9 62.3 service::executions::handle_sync_post cda-sovd/src/sovd/components/ecu/operations.rs:1270cda-sovd/src/sovd/components/ecu/operations.rs
13.1 13 91.4 diag_service::delete cda-sovd/src/sovd/functions/functional_groups/operations.rs:566cda-sovd/src/sovd/functions/functional_groups/operations.rs
13.0 13 94.2 service::executions::ecu_operation_write_handler cda-sovd/src/sovd/components/ecu/operations.rs:949cda-sovd/src/sovd/components/ecu/operations.rs
12.0 3 0.0 service::executions::get_subschema cda-sovd/src/sovd/components/ecu/operations.rs:1509cda-sovd/src/sovd/components/ecu/operations.rs
11.9 7 53.6 load_mdd_paths_from_storage cda-main/src/mdd.rs:269cda-main/src/mdd.rs
10.4 5 40.0 insert_or_update_ecu cda-main/src/mdd.rs:633cda-main/src/mdd.rs
10.0 10 97.5 service::executions::id::get cda-sovd/src/sovd/components/ecu/operations.rs:1582cda-sovd/src/sovd/components/ecu/operations.rs
10.0 10 100.0 load_databases cda-main/src/mdd.rs:147cda-main/src/mdd.rs
7.6 7 77.5 seed_storage_from_database_path cda-main/src/mdd.rs:314cda-main/src/mdd.rs
7.0 6 69.2 load_single_mdd cda-main/src/mdd.rs:569cda-main/src/mdd.rs
7.0 7 97.3 service::executions::handle_async_post cda-sovd/src/sovd/components/ecu/operations.rs:1223cda-sovd/src/sovd/components/ecu/operations.rs
6.0 6 96.7 mark_duplicate_ecus_by_address cda-main/src/mdd.rs:398cda-main/src/mdd.rs
6.0 2 0.0 diag_service::executions::get cda-sovd/src/sovd/functions/functional_groups/operations.rs:313cda-sovd/src/sovd/functions/functional_groups/operations.rs
5.5 5 72.2 service::executions::validate_and_parse_write_request cda-sovd/src/sovd/components/ecu/operations.rs:928cda-sovd/src/sovd/components/ecu/operations.rs
5.5 5 73.7 resolve_mdd_paths cda-main/src/mdd.rs:238cda-main/src/mdd.rs
5.3 5 76.2 handle_ecu_config_keys cda-main/src/mdd.rs:371cda-main/src/mdd.rs
5.1 5 82.1 diag_service::check_if_async cda-sovd/src/sovd/functions/functional_groups/operations.rs:696cda-sovd/src/sovd/functions/functional_groups/operations.rs
5.0 5 92.9 load_ecu_from_file cda-main/src/mdd.rs:531cda-main/src/mdd.rs
5.0 5 100.0 service::executions::parse_json_response_params cda-sovd/src/sovd/components/ecu/operations.rs:1147cda-sovd/src/sovd/components/ecu/operations.rs
4.4 4 70.8 service::executions::send_start_request cda-sovd/src/sovd/components/ecu/operations.rs:1098cda-sovd/src/sovd/components/ecu/operations.rs
4.0 4 87.1 service::executions::id::get_operations_response cda-sovd/src/sovd/components/ecu/operations.rs:1542cda-sovd/src/sovd/components/ecu/operations.rs

…and 23 more, see CI artifact for the full report.

🔥 Top hot spots above threshold
CRAP CC Cov % Function Location
306.0 17 0.0 dop_variant_to_schema cda-core/src/diag_kernel/schema.rs:410
272.0 16 0.0 MbedtlsError::name comm-mbedtls/mbedtls-rs/src/error.rs:67
240.0 15 0.0 TlsStream::poll_read comm-mbedtls/mbedtls-rs/src/async_stream.rs:381
226.3 26 33.3 UdsManager::detect_variant cda-comm-uds/src/variant.rs:52
210.0 14 0.0 DoipDiagGateway::send_functional cda-comm-doip/src/lib.rs:647
210.0 14 0.0 UdsManager::send_functional_group cda-comm-uds/src/functional_group.rs:193
156.0 12 0.0 update_mdd_uncompressed cda-database/src/mdd_data/mod.rs:364
156.0 12 0.0 diag_service::functional_data_request cda-sovd/src/sovd/functions/functional_groups/data.rs:243
132.0 11 0.0 has_new_artifacts cda-storage/src/recovery.rs:263
110.0 10 0.0 DiagServiceError::from cda-comm-doip/src/connections.rs:73
110.0 10 0.0 comparams::executions::id::get cda-sovd/src/sovd/components/ecu/operations.rs:273
90.0 9 0.0 params_to_schema cda-core/src/diag_kernel/schema.rs:188
90.0 9 0.0 add_phys_constr_range cda-core/src/diag_kernel/schema.rs:306
90.0 9 0.0 establish_tls_ecu_connection cda-comm-doip/src/ecu_connection.rs:406
90.0 9 0.0 create_tls_stream cda-comm-doip/src/ecu_connection.rs:501
90.0 9 0.0 remove_descriptions_recursive cda-sovd/src/sovd/mod.rs:923
89.5 21 46.2 EcuManager::map_param_value_to_uds cda-core/src/diag_kernel/payload_encode.rs:218
72.0 8 0.0 TlsStream::async_handshake comm-mbedtls/mbedtls-rs/src/async_stream.rs:237
72.0 8 0.0 UdsManager::send_functional_to_gateway cda-comm-uds/src/functional_group.rs:39
72.0 8 0.0 UdsManager::set_functional_state cda-comm-uds/src/functional_group.rs:398
72.0 8 0.0 comparams::executions::id::put cda-sovd/src/sovd/components/ecu/operations.rs:401
72.0 8 0.0 generate_config_cmd cda-main/src/lib.rs:308
70.6 10 15.4 DiagDataValue::try_into cda-core/src/diag_kernel/mod.rs:211
66.6 13 31.8 load_config_with_storage_override cda-main/src/config/mod.rs:143
62.7 14 37.1 EcuManager::map_param_to_uds cda-core/src/diag_kernel/payload_encode.rs:173

…and 35 more, see CI artifact for the full report.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

📊 Coverage Report (unit + integration)

Total line coverage: 73.5%

Full build artifacts

Exclude extensionless legal docs from reuse-annotate and align SPDX header format on Bazel files/workflow to match hook expectations.
@FScholPer
FScholPer force-pushed the feat/bazel branch 2 times, most recently from 1069757 to 04fad49 Compare July 14, 2026 08:28
@theswiftfox theswiftfox added the don't merge yet When a PR shouldn't be merged yet, but also can't be in draft state label Jul 16, 2026
@theswiftfox

Copy link
Copy Markdown
Contributor Author

@FScholPer I'm not sure why there are code changes required beyond anything bazel related?
Overall this seems a bit very chaotic by now..
I created this issue #439 to track the bazel integration and I would suggest a fresh PR (alternatively we can reopen this one with a clean state that only introduces the bazel files, once it is ready).
That will make reviewing easier and keep it to the core feature.

Therefore setting this PR to draft again. I'd ask for any discussion / input to be done in the tracking issue.

@theswiftfox
theswiftfox marked this pull request as draft July 16, 2026 15:24
@github-actions github-actions Bot removed the needs review Waiting for a review label Jul 16, 2026
@FScholPer

Copy link
Copy Markdown

@FScholPer I'm not sure why there are code changes required beyond anything bazel related? Overall this seems a bit very chaotic by now.. I created this issue #439 to track the bazel integration and I would suggest a fresh PR (alternatively we can reopen this one with a clean state that only introduces the bazel files, once it is ready). That will make reviewing easier and keep it to the core feature.

Therefore setting this PR to draft again. I'd ask for any discussion / input to be done in the tracking issue.

Sure but we should reuse https://github.com/eclipse-opensovd/classic-diagnostic-adapter/pull/348/changes#diff-22a6ee78ead32a4a9cca3c945e6bd9aea9db3d814bfb77d414b2245ff70f568d

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

Labels

don't merge yet When a PR shouldn't be merged yet, but also can't be in draft state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants