Repository navigation
fix(test): package datarouter docker config at opt/datarouter/etc - #351
Merged
Merged
Conversation
The datarouter component tests fail when score_logging is consumed as an
external Bazel dependency (e.g. in reference_integration): the datarouter
runs with cwd=/opt/datarouter and opens ./etc/log-channels.json, but the
config files were packaged at
opt/datarouter/external/score_logging+/score/test/component/datarouter/etc/
instead of opt/datarouter/etc/. ReadStaticDlt then fails, DltLogServer is
nullptr ("static config is not available, interrupt work"), the unix
socket never opens, and every test times out with "Datarouter not ready".
Root cause: _datarouter_conf_pkg used pkg_tar(strip_prefix =
"/score/test/component/datarouter"). A leading-slash strip_prefix is
repo-root-relative and only matches when logging is the root module (its
own component_tests.yml CI). When logging is external the file path is
prefixed with external/score_logging+/, the strip matches nothing, and
the whole prefix survives under package_dir.
Fix: package the config via a package-relative pkg_files
(datarouter_docker_config_pkg) using strip_prefix.from_pkg(), mirroring
the existing QNX datarouter_config_pkg. This resolves to
opt/datarouter/etc/* for both root and external consumption.
antonkri
requested a deployment
to
workflow-approval
October 6, 2026 11:14 — with
GitHub Actions
Waiting
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
antonkri
force-pushed
the
fix/datarouter-config-packaging
branch
from
October 6, 2026 15:35
cadd7b1 to
48465a2
Compare
antonkri
marked this pull request as ready for review
October 7, 2026 05:33
antonkri
requested review from
arsibo,
pawelrutkaq and
rmaddikery
as code owners
October 7, 2026 05:33
rmaddikery
approved these changes
Oct 8, 2026
This branch was successfully 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.
What
Packages the datarouter component-test config so it lands at
opt/datarouter/etc/*regardless of whetherscore_loggingis built as the root module or consumed as an external Bazel dependency.Why
The datarouter component tests (
//score/test/component/datarouter:test_datarouter_filters,test_mw_log,test_mw_log_filters, …) pass in this repo's owncomponent_tests.yml, but fail whenscore_loggingis pulled in as an external dependency (e.g. in eclipse-score/reference_integration).The datarouter runs with
cwd=/opt/datarouterand opens./etc/log-channels.json. In the external build the config files were packaged at:instead of:
So
ReadStaticDltfails →DltLogServerisnullptr→ "static config is not available, interrupt work" → the unix socket never opens → every test times out withDatarouter not ready within 10.0s.Root cause
score/test/component/BUILD's_datarouter_conf_pkgused:A leading-slash
strip_prefixis repo-root-relative and only matches when logging is the root module. When logging is consumed externally the file path is prefixed withexternal/score_logging+/, the strip matches nothing, and the whole prefix survives underpackage_dir.The fix
Package the config via a package-relative
pkg_files(datarouter_docker_config_pkg) usingstrip_prefix.from_pkg(), mirroring the existing QNXdatarouter_config_pkg. This resolves toopt/datarouter/etc/*for both root and external consumption.Downstream
reference_integration currently carries this as a local patch (eclipse-score/reference_integration#387). Once this lands and logging is bumped there, that patch can be dropped.