From 7b1166e037004eff6a3c3eca1ff1ce24489a5b40 Mon Sep 17 00:00:00 2001 From: qxz6ezp Date: Wed, 12 Aug 2026 16:46:40 +0530 Subject: [PATCH 1/3] Run all unit tests via Bazel wildcards instead of acceptlist Replace the acceptlist-JSON-driven test/clang-tidy/coverage target lists in test.yml, static-analysis.yml and coverage_report.yml with wildcard //score/config_management/... invocations, excluding the known non-OSS-buildable factory unit_tests_mw_com target and the dependability safety-metadata targets. Remove the now-unused deps-acceptlist-check.yml workflow and deps_acceptlist.json. Wildcard testing surfaced that score/config_management/config_provider is currently broken against its own pinned score_communication dependency (OptionalProxyData collapsed to a plain Optional alias, replaced by ProxyFuture) and references internal-only targets/packages that don't exist in the OSS tree. Since score/config_management/** is synced from an internal source and can't be edited directly here, these fixes are shipped as bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch and applied transiently in CI (git apply, with a --check guard so it becomes a no-op once the fix syncs in for real), mirroring the existing wire_unit_test_to_lobster.patch pattern in docs.yml. Locally verified with the patch applied: bazel build and bazel test both succeed for //score/config_management/... with the same exclusions used in CI (20/20 tests pass). --- .github/workflows/coverage_report.yml | 18 +- .github/workflows/deps-acceptlist-check.yml | 96 ---------- .github/workflows/static-analysis.yml | 47 ++--- .github/workflows/test.yml | 59 ++---- ...roxy-api-and-remove-internal-targets.patch | 171 ++++++++++++++++++ score/config_management/deps_acceptlist.json | 53 ------ 6 files changed, 213 insertions(+), 231 deletions(-) delete mode 100644 .github/workflows/deps-acceptlist-check.yml create mode 100644 bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch delete mode 100644 score/config_management/deps_acceptlist.json diff --git a/.github/workflows/coverage_report.yml b/.github/workflows/coverage_report.yml index 4526af2..c094f65 100644 --- a/.github/workflows/coverage_report.yml +++ b/.github/workflows/coverage_report.yml @@ -42,11 +42,23 @@ jobs: uses: eclipse-score/cicd-actions/setup-bazel-cache@659dcbed63f6b7fbde88c7850125ea0a0a92f939 with: unique-cache-name: ${{ github.workflow }}-${{ github.job }} + - name: Apply OSS-only patches + # TEMPORARY WORKAROUND (patch): score/config_management/** is synced from an internal source and cannot be + # edited directly from OSS. bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch adapts the + # config_provider proxy wiring to the OSS score_communication ProxyFuture API and drops internal-only + # (non-OSS) targets. The --check guard makes this a no-op once the change lands via sync. + run: | + git apply --check bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch 2>/dev/null && \ + git apply bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch || true - name: Run Bazel Coverage run: | - readarray -t TARGETS < <(python3 -c \ - "import json; [print(t) for t in json.load(open('score/config_management/deps_acceptlist.json'))['test_targets']]") - bazel coverage --config=host_gcc "${TARGETS[@]}" + bazel coverage \ + --config=host_gcc \ + --test_tag_filters=-mw_com \ + //score/config_management/... \ + -- \ + -//score/config_management/config_provider/code/config_provider/factory:unit_tests_mw_com \ + -//score/config_management/dependability/... - name: Generate HTML Coverage Report run: | genhtml "$(bazel info output_path)/_coverage/_coverage_report.dat" \ diff --git a/.github/workflows/deps-acceptlist-check.yml b/.github/workflows/deps-acceptlist-check.yml deleted file mode 100644 index c7d50d7..0000000 --- a/.github/workflows/deps-acceptlist-check.yml +++ /dev/null @@ -1,96 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2025 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -# Builds the CfgD & CfgP targets listed in the acceptlist -# (score/config_management/deps_acceptlist.json) and fails if any previously -# known-good target no longer builds — detecting regressions in the CI setup. - -name: Build Acceptlist Check - -on: - pull_request: - types: [opened, reopened, synchronize] - paths: - - "score/**" - - "MODULE.bazel" - - "score/config_management/deps_acceptlist.json" - - ".github/workflows/deps-acceptlist-check.yml" - push: - branches: - - main - paths: - - "score/**" - - "MODULE.bazel" - - "score/config_management/deps_acceptlist.json" - merge_group: - types: [checks_requested] - -permissions: - contents: read - pull-requests: read - -jobs: - build-acceptlist-check: - name: Build acceptlisted CfgD & CfgP targets - runs-on: ubuntu-24.04 - env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Bazel - uses: bazel-contrib/setup-bazel@0.18.0 - with: - bazelisk-cache: true - disk-cache: true - repository-cache: true - cache-save: ${{ github.event_name == 'push' }} - - - name: Build all acceptlisted targets - run: | - python3 - <<'EOF' - import json, subprocess, sys - - ACCEPTLIST = "score/config_management/deps_acceptlist.json" - - with open(ACCEPTLIST) as f: - targets = json.load(f)["buildable_targets"] - - failures = [] - for target in targets: - try: - result = subprocess.run( - ["bazel", "build", target], - capture_output=True, text=True, - timeout=600, - ) - except subprocess.TimeoutExpired: - failures.append(target) - print(f" TIMEOUT {target}") - continue - if result.returncode == 0: - print(f" OK {target}") - else: - failures.append(target) - print(f" FAIL {target}") - print(result.stderr[-2000:]) - - print(f"\n{len(targets) - len(failures)}/{len(targets)} targets built successfully.") - - if failures: - print("\nRegression detected — the following targets no longer build:") - for t in failures: - print(f" {t}") - sys.exit(1) - EOF diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 6e3f1f8..5459ae2 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -42,40 +42,17 @@ jobs: repository-cache: true cache-save: ${{ github.event_name == 'push' }} - - name: Run clang-tidy checks from deps_acceptlist.json + - name: Apply OSS-only patches + # TEMPORARY WORKAROUND (patch): score/config_management/** is synced from an internal source and cannot be + # edited directly from OSS. bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch adapts the + # config_provider proxy wiring to the OSS score_communication ProxyFuture API and drops internal-only + # (non-OSS) targets. The --check guard makes this a no-op once the change lands via sync. run: | - python3 - <<'PYEOF' - import json, subprocess, sys + git apply --check bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch 2>/dev/null && \ + git apply bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch || true - ACCEPTLIST = "score/config_management/deps_acceptlist.json" - - with open(ACCEPTLIST) as f: - targets = json.load(f)["clang_tidy_targets"] - - failures = [] - for target in targets: - try: - result = subprocess.run( - ["bazel", "build", target], - capture_output=True, text=True, - timeout=600, - ) - except subprocess.TimeoutExpired: - failures.append(target) - print(f" TIMEOUT {target}") - continue - if result.returncode == 0: - print(f" OK {target}") - else: - failures.append(target) - print(f" FAIL {target}") - print(result.stderr[-2000:]) - - print(f"\n{len(targets) - len(failures)}/{len(targets)} clang-tidy targets passed.") - - if failures: - print("\nStatic analysis failed for the following targets:") - for t in failures: - print(f" {t}") - sys.exit(1) - PYEOF + - name: Run clang-tidy checks + run: | + bazel build \ + //score/config_management/config_daemon:clang_tidy_extra_checks \ + //score/config_management/config_provider:clang_tidy_extra_checks diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f41a6a2..ec20930 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,50 +42,21 @@ jobs: repository-cache: true cache-save: ${{ github.event_name == 'push' }} - - name: Pre-warm Bazel cache (build test targets before running them) + - name: Apply OSS-only patches + # TEMPORARY WORKAROUND (patch): score/config_management/** is synced from an internal source and cannot be + # edited directly from OSS. bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch adapts the + # config_provider proxy wiring to the OSS score_communication ProxyFuture API and drops internal-only + # (non-OSS) targets. The --check guard makes this a no-op once the change lands via sync. run: | - python3 - <<'PYEOF' - import json, subprocess, sys - with open("score/config_management/deps_acceptlist.json") as f: - targets = json.load(f)["test_targets"] - result = subprocess.run(["bazel", "build"] + targets) - sys.exit(result.returncode) - PYEOF + git apply --check bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch 2>/dev/null && \ + git apply bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch || true - - name: Run tests from deps_acceptlist.json + - name: Run all unit tests run: | - python3 - <<'PYEOF' - import json, subprocess, sys - - ACCEPTLIST = "score/config_management/deps_acceptlist.json" - - with open(ACCEPTLIST) as f: - targets = json.load(f)["test_targets"] - - failures = [] - for target in targets: - try: - result = subprocess.run( - ["bazel", "test", target], - capture_output=True, text=True, - timeout=600, - ) - except subprocess.TimeoutExpired: - failures.append(target) - print(f" TIMEOUT {target}") - continue - if result.returncode == 0: - print(f" PASS {target}") - else: - failures.append(target) - print(f" FAIL {target}") - print(result.stderr[-2000:]) - - print(f"\n{len(targets) - len(failures)}/{len(targets)} tests passed.") - - if failures: - print("\nTests failed for the following targets:") - for t in failures: - print(f" {t}") - sys.exit(1) - PYEOF + bazel test \ + --config=host_gcc \ + --test_tag_filters=-mw_com \ + //score/config_management/... \ + -- \ + -//score/config_management/config_provider/code/config_provider/factory:unit_tests_mw_com \ + -//score/config_management/dependability/... diff --git a/bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch b/bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch new file mode 100644 index 0000000..9baed89 --- /dev/null +++ b/bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch @@ -0,0 +1,171 @@ +diff --git a/score/config_management/config_provider/BUILD b/score/config_management/config_provider/BUILD +index e0d763b..0dd66b9 100644 +--- a/score/config_management/config_provider/BUILD ++++ b/score/config_management/config_provider/BUILD +@@ -14,13 +14,6 @@ alias( + visibility = ["//visibility:public"], + ) + +-cc_library( +- name = "config_provider_factory_impl", +- tags = ["FUSA"], +- visibility = ["//visibility:public"], +- deps = ["//score/config_management/config_provider/code/config_provider/factory:factory_socal_r20_11"], +-) +- + cc_library( + name = "config_provider_mw_com", + tags = ["FUSA"], +@@ -28,12 +21,6 @@ cc_library( + deps = ["//score/config_management/config_provider/code/config_provider/factory:factory_mw_com"], + ) + +-alias( +- name = "config_provider_factory_for_unit_test", +- actual = "//score/config_management/config_provider/code/config_provider/factory:factory_socal_r20_11_for_unit_tests", +- visibility = ["//visibility:public"], +-) +- + cc_unit_test_suites_for_host_and_qnx( + name = "unit_tests", + test_suites_from_sub_packages = [ +@@ -45,14 +32,6 @@ cc_unit_test_suites_for_host_and_qnx( + visibility = ["//score/config_management:__pkg__"], + ) + +-test_suite( +- name = "component_tests", +- tests = [ +- "//score/config_management/config_provider/test/sct:component_tests", +- ], +- visibility = ["//score/config_management:__pkg__"], +-) +- + clang_tidy_extra_checks( + name = "clang_tidy_extra_checks", + extra_features = [ +diff --git a/score/config_management/config_provider/code/config_provider/details/config_provider_impl.cpp b/score/config_management/config_provider/code/config_provider/details/config_provider_impl.cpp +index 6784355..c6f05ea 100644 +--- a/score/config_management/config_provider/code/config_provider/details/config_provider_impl.cpp ++++ b/score/config_management/config_provider/code/config_provider/details/config_provider_impl.cpp +@@ -46,7 +46,7 @@ std::string GetParameterSetValue(mw::log::Logger& logger, const ParameterSet& pa + } // namespace + + ConfigProviderImpl::ConfigProviderImpl( +- mw::service::OptionalProxyData proxy_data, ++ mw::service::ProxyFuture> proxy_future, + score::cpp::stop_token user_stop_token, + score::cpp::pmr::memory_resource* const memory_resource, + score::cpp::optional max_samples_limit, +@@ -78,22 +78,23 @@ ConfigProviderImpl::ConfigProviderImpl( + score::cpp::ignore = proxy_available_thread_.emplace( + [this](const score::cpp::stop_token jthread_stop_token, + decltype(callback) notification_callback, +- decltype(proxy_data) pd) mutable { +- auto proxy_holder = pd.GetProxyFuture().Get(jthread_stop_token); +- pd.StopServiceDiscovery(); +- if (proxy_holder.has_value()) ++ decltype(proxy_future) pf) mutable { ++ auto proxy_holder = pf.Get(jthread_stop_token); ++ if (proxy_holder.has_value() && (proxy_holder.value() != nullptr)) + { + logger_.LogInfo() << "ProxyAvailableThread: InternalConfigProvider proxy is connected"; + SetupInternalConfigProvider( +- std::move(proxy_holder).value(), std::move(notification_callback), jthread_stop_token); ++ std::shared_ptr(std::move(proxy_holder).value()), ++ std::move(notification_callback), ++ jthread_stop_token); + } + else + { +- logger_.LogInfo() << "ProxyAvailableThread: No proxy found: " << proxy_holder.error().Message(); ++ logger_.LogInfo() << "ProxyAvailableThread: No proxy found"; + } + }, + std::move(callback), +- std::move(proxy_data)); ++ std::move(proxy_future)); + + score::cpp::ignore = stop_callback_.emplace(user_stop_token, [this]() { + score::cpp::ignore = proxy_available_thread_->request_stop(); +diff --git a/score/config_management/config_provider/code/config_provider/details/config_provider_impl.h b/score/config_management/config_provider/code/config_provider/details/config_provider_impl.h +index 508555c..7630e60 100644 +--- a/score/config_management/config_provider/code/config_provider/details/config_provider_impl.h ++++ b/score/config_management/config_provider/code/config_provider/details/config_provider_impl.h +@@ -24,6 +24,7 @@ + + #include "score/concurrency/condition_variable.h" + #include "score/mw/service/proxy_data.h" ++#include "score/mw/service/proxy_future.h" + + #include + #include +@@ -87,7 +88,7 @@ class ConfigProviderImpl final : public ConfigProvider + bool IsAwaitingProxyConnection() const noexcept; + + ConfigProviderImpl( +- mw::service::OptionalProxyData proxy_data, ++ mw::service::ProxyFuture> proxy_future, + score::cpp::stop_token user_stop_token, + score::cpp::pmr::memory_resource* const memory_resource, + score::cpp::optional max_samples_limit, +diff --git a/score/config_management/config_provider/code/config_provider/details/config_provider_impl_test.cpp b/score/config_management/config_provider/code/config_provider/details/config_provider_impl_test.cpp +index 8bd5f2f..ed559ea 100644 +--- a/score/config_management/config_provider/code/config_provider/details/config_provider_impl_test.cpp ++++ b/score/config_management/config_provider/code/config_provider/details/config_provider_impl_test.cpp +@@ -182,7 +182,7 @@ class ConfigProviderTest : public ::testing::Test + auto CreateConfigProviderWithAvailableCallback(IsAvailableNotificationCallback callback) + { + return std::make_unique( +- mw::service::OptionalProxyData{promise_.GetInterruptibleFuture().value()}, ++ promise_.GetInterruptibleFuture().value(), + stop_source_.get_token(), + score::cpp::pmr::get_default_resource(), + score::cpp::nullopt, // default max_samples_limit +@@ -196,7 +196,7 @@ class ConfigProviderTest : public ::testing::Test + IsAvailableNotificationCallback callback) + { + return std::make_unique( +- mw::service::OptionalProxyData{promise_.GetInterruptibleFuture().value()}, ++ promise_.GetInterruptibleFuture().value(), + stop_source_.get_token(), + score::cpp::pmr::get_default_resource(), + score::cpp::nullopt, +diff --git a/score/config_management/config_provider/code/config_provider/factory/factory_mw_com.h b/score/config_management/config_provider/code/config_provider/factory/factory_mw_com.h +index 5aeca26..123868b 100644 +--- a/score/config_management/config_provider/code/config_provider/factory/factory_mw_com.h ++++ b/score/config_management/config_provider/code/config_provider/factory/factory_mw_com.h +@@ -182,7 +182,8 @@ class ConfigProviderFactory final + logger_.LogDebug() << "ConfigProviderFactory:: Create ConfigProviderImpl"; + auto config_provider = score::cpp::pmr::make_unique( + memory_resource, +- proxy_container.template Extract>(), ++ static_cast>>( ++ proxy_container.template Extract>()), + token, + memory_resource, + max_samples_limit, +diff --git a/score/config_management/config_daemon/code/app/details/BUILD b/score/config_management/config_daemon/code/app/details/BUILD +index 63e9161..db9b630 100644 +--- a/score/config_management/config_daemon/code/app/details/BUILD ++++ b/score/config_management/config_daemon/code/app/details/BUILD +@@ -52,6 +52,7 @@ cc_library( + "//score/config_management/config_daemon/code/factory:interface_for_unit_test", + "//score/config_management/config_daemon/code/fault_event_reporter", + "@score_baselibs//score/scope_exit", ++ "@score_lifecycle_health//score/launch_manager:application_cc", + "@score_lifecycle_health//score/launch_manager:applicationcontext_mock_cc", + "@score_logging//score/mw/log", + ], +diff --git a/score/config_management/config_daemon/code/BUILD b/score/config_management/config_daemon/code/BUILD +index b9a1469..7fdb370 100644 +--- a/score/config_management/config_daemon/code/BUILD ++++ b/score/config_management/config_daemon/code/BUILD +@@ -76,6 +76,7 @@ cc_binary( + deps = [ + "//score/config_management/config_daemon/code/app/details:app", + "//score/config_management/config_daemon/code/factory/details:mw_factory", ++ "@score_lifecycle_health//score/launch_manager:lifecyclemanager_cc", + "@score_lifecycle_health//score/launch_manager:runapplication_cc", + ], + ) diff --git a/score/config_management/deps_acceptlist.json b/score/config_management/deps_acceptlist.json deleted file mode 100644 index b9cf5e3..0000000 --- a/score/config_management/deps_acceptlist.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "test_targets": [ - "//score/config_management/config_daemon/code/data_model:unit_tests_host", - "//score/config_management/config_daemon/code/data_model/parameter_set_storage:unit_tests_host", - "//score/config_management/config_daemon/code/fault_event_reporter:unit_tests_host", - "//score/config_management/config_daemon/code/plugins/demo_json:unit_tests_host", - "//score/config_management/config_daemon/code/plugins/plugin_collector:unit_tests_host", - "//score/config_management/config_daemon/code/services:unit_tests_host", - "//score/config_management/config_provider/code/config_provider/error:unit_test", - "//score/config_management/config_provider/code/parameter_set:unit_test", - "//score/config_management/config_provider/code/persistency:unit_tests_host", - "//tests/cpp:cpp_test_main" - ], - "clang_tidy_targets": [ - "//score/config_management/config_daemon:clang_tidy_extra_checks", - "//score/config_management/config_provider:clang_tidy_extra_checks" - ], - "buildable_targets": [ - "//score/config_management/config_daemon/code/app:interface", - "//score/config_management/config_daemon/code/app:mock", - "//score/config_management/config_daemon/code/data_model/details:parameterset_collection_impl", - "//score/config_management/config_daemon/code/data_model/details:unit_test", - "//score/config_management/config_daemon/code/data_model/error:error", - "//score/config_management/config_daemon/code/data_model/error:unit_test", - "//score/config_management/config_daemon/code/data_model:parameter_set_qualifier", - "//score/config_management/config_daemon/code/data_model:parameterset_collection", - "//score/config_management/config_daemon/code/data_model:parameterset_collection_mock", - "//score/config_management/config_daemon/code/data_model/parameterset_collection_interfaces:read_only_parameterset_collection", - "//score/config_management/config_daemon/code/data_model/parameterset_collection_interfaces:read_only_parameterset_collection_mock", - "//score/config_management/config_daemon/code/fault_event_reporter/details:details_score_impl", - "//score/config_management/config_daemon/code/fault_event_reporter/details:details_score_impl_for_test", - "//score/config_management/config_daemon/code/fault_event_reporter:fault_event_reporter", - "//score/config_management/config_daemon/code/fault_event_reporter:fault_event_score_types", - "//score/config_management/config_daemon/code/fault_event_reporter:mock", - "//score/config_management/config_daemon/code:is_score_variant", - "//score/config_management/config_daemon/code/json_helper/details:details", - "//score/config_management/config_daemon/code/json_helper:json_helper", - "//score/config_management/config_daemon/code/json_helper:mock", - "//score/config_management/config_daemon/code/plugins/plugin_collector:mock", - "//score/config_management/config_daemon/code/plugins:plugin_creator", - "//score/config_management/config_daemon/code/plugins:plugin_creator_mock", - "//score/config_management/config_daemon/code:score_variant", - "//score/config_management/config_daemon/code/services:internal_config_provider_reactor", - "//score/config_management/config_daemon/code/services:internal_config_provider_reactor_mock", - "//score/config_management/config_daemon/code/types/initial_qualifier_state:initial_qualifier_state", - "//score/config_management/config_provider/code/config_provider/error:error", - "//score/config_management/config_provider/code/config_provider/error:unit_test", - "//score/config_management/config_provider/code/config_provider/factory:test_mw_com_config", - "//score/config_management/config_provider/code/parameter_set:parameter_set", - "//score/config_management/config_provider/code/persistency/error:error", - "//score/config_management/config_provider/code/proxies/details:test_mw_com_config" - ] -} From 1eff1b1ada3b5c0208de77fe6424dc50ec59c9c2 Mon Sep 17 00:00:00 2001 From: qxz6ezp Date: Thu, 13 Aug 2026 10:13:26 +0530 Subject: [PATCH 2/3] Also apply proxy-API patch before docs build The docs job builds //score/config_management/dependability:config_management_rst, whose component() targets reference the unit()-wrapped config_daemon_app_unit / config_provider_details_unit targets from wire_unit_test_to_lobster.patch. Those unit() targets pull in the :details cc_library as `implementation`, which requires actually compiling config_provider_impl.cpp - but only wire_unit_test_to_lobster.patch was applied in docs.yml, not bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch, so the build hit the same OptionalProxyData/ProxyFuture compile error fixed elsewhere. Chain a second git-apply (with the same --check no-op guard) for 001-adapt-proxy-api-and-remove-internal-targets.patch before `bazel run //:docs`. Locally verified: with both patches applied, `bazel build //score/config_management/dependability/...` (which //:docs depends on via config_management_rst) now completes successfully, including the full sphinx/LOBSTER doc build. --- .github/workflows/docs.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 44d3838..7684468 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -48,11 +48,17 @@ jobs: # the bazel-target depends on your repo specific docs_targets configuration (e.g. "suffix") # --define=LOBSTER_SOURCE_ROOT sets the GitHub blob URL prefix for source links in the LOBSTER traceability report # TEMPORARY WORKAROUND (patch): score/config_management/** is synced from an internal source and cannot be - # edited directly from OSS, so the LOBSTER unit() wiring lives only in bazel/patches/wire_unit_test_to_lobster.patch. - # The reusable docs workflow exposes no pre-build hook, so we apply the patch as a side effect of a - # command substitution (redirected to stderr so it contributes nothing to the bazel command line) before - # `bazel run` executes, purely so the generated report reflects the intended wiring. The --check guard - # makes this a no-op (skips silently) once the real change lands via sync, so it never fails the build. - # Remove this workaround once the patch's content is synced into score/config_management/ for real. - bazel-target: "$(git apply --check bazel/patches/wire_unit_test_to_lobster.patch 2>/dev/null && git apply bazel/patches/wire_unit_test_to_lobster.patch 1>&2) //:docs --define=LOBSTER_SOURCE_ROOT=https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}/blob/main/ -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}" + # edited directly from OSS, so two fixes live only as patches applied here: + # - bazel/patches/wire_unit_test_to_lobster.patch: the LOBSTER unit() wiring (config_daemon_app_unit / + # config_provider_details_unit) that score/config_management/dependability/BUILD's component() targets + # reference. + # - bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch: adapts config_provider's proxy + # wiring to the OSS score_communication ProxyFuture API and drops internal-only targets; without it the + # unit()-wrapped :details library (pulled in transitively by //:docs via dependability) fails to compile. + # The reusable docs workflow exposes no pre-build hook, so we apply both patches as a side effect of + # command substitutions (redirected to stderr so they contribute nothing to the bazel command line) before + # `bazel run` executes. The --check guards make this a no-op (skips silently) once the real changes land + # via sync, so it never fails the build. Remove each workaround once its patch's content is synced into + # score/config_management/ for real. + bazel-target: "$(git apply --check bazel/patches/wire_unit_test_to_lobster.patch 2>/dev/null && git apply bazel/patches/wire_unit_test_to_lobster.patch 1>&2)$(git apply --check bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch 2>/dev/null && git apply bazel/patches/001-adapt-proxy-api-and-remove-internal-targets.patch 1>&2) //:docs --define=LOBSTER_SOURCE_ROOT=https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}/blob/main/ -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}" retention-days: 3 From 0cee26bf0998f63e70f7913e2ad6f54595c9b8dc Mon Sep 17 00:00:00 2001 From: qxz6ezp Date: Thu, 13 Aug 2026 15:09:52 +0530 Subject: [PATCH 3/3] fix: bump score_communication pin for ProvidedServices dynamic_cast fix score_communication's ProvidedServices dynamic_cast lookup bug (fixed upstream in commit 9a91fc9528070a2358becc042443b84346651fc7 on Chahult/communication.git, branch fix/v0.2.1_provided_service_container_count) caused the real config_daemon binary to crash at runtime with "ConfigDaemon::Run Failed to create InitialQualifierStateSender callback" (exit code 1), since GetServices<>() always returned nullptr regardless of whether the service had actually been registered. Bump the pin to pick up that fix, and fix the last 2 remaining unit_test_mw_com test call sites that used GetServices directly instead of GetServices (the only alias consistent with internal storage), which were still failing. Verified: all 10/10 unit_test_mw_com tests pass, and the real config_daemon binary now runs successfully instead of crashing. --- MODULE.bazel | 2 +- .../code/factory/details/factory_mw_impl_test.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 274a98a..93c4359 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -147,7 +147,7 @@ git_override( bazel_dep(name = "score_communication") git_override( module_name = "score_communication", - commit = "4658ffb26a18dacdc1e903e6bad7282113c4a739", + commit = "9a91fc9528070a2358becc042443b84346651fc7", remote = "https://github.com/Chahult/communication.git", ) diff --git a/score/config_management/config_daemon/code/factory/details/factory_mw_impl_test.cpp b/score/config_management/config_daemon/code/factory/details/factory_mw_impl_test.cpp index 22abcb0..a0ef625 100644 --- a/score/config_management/config_daemon/code/factory/details/factory_mw_impl_test.cpp +++ b/score/config_management/config_daemon/code/factory/details/factory_mw_impl_test.cpp @@ -94,7 +94,8 @@ TEST_F(TestFactoryMwImpl, CreateInternalConfigProviderServiceSuccess) auto provided_service_container = unit_->CreateInternalConfigProviderService(parameter_data); ASSERT_EQ(provided_service_container.NumServices(), 1); - auto* services = provided_service_container.GetServices(); + auto* services = + provided_service_container.GetServices(); ASSERT_NE(services, nullptr) << "Failed to get ProvidedServices from ProviderServicesContainer"; auto* internal_config_provider_service = services->Get(); @@ -121,7 +122,8 @@ TEST_F(TestFactoryMwImpl, CreateInternalConfigProviderService_InvalidParameterDa ASSERT_EQ(provided_service_container.NumServices(), 1); - auto* services = provided_service_container.GetServices(); + auto* services = + provided_service_container.GetServices(); ASSERT_NE(services, nullptr); auto* internal_config_provider_service = services->Get();