Repository navigation
Enable logging integration tests and fix datarouter config packaging - #387
Merged
Merged
Conversation
…kaging The score_logging datarouter component tests never passed in reference_integration because the datarouter cannot find its static config at runtime: it runs with cwd=/opt/datarouter and opens ./etc/log-channels.json, but the config files were packaged under opt/datarouter/external/score_logging+/score/test/component/datarouter/etc/ instead of opt/datarouter/etc/. Root cause: score/test/component/BUILD's _datarouter_conf_pkg used pkg_tar(strip_prefix = "/score/test/component/datarouter"). An absolute (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 consumed as an external dependency (exactly reference_integration) the file path is prefixed with external/score_logging+/ so the strip matches nothing and the whole prefix survives under package_dir. Fix (patches/logging/003-fix-datarouter-config-packaging.patch): replace the absolute-strip pkg_tar with a package-relative pkg_files using strip_prefix.from_pkg(), which resolves to opt/datarouter/etc/* for both root and external consumption. Verified by inspecting the built datarouter_pkg.tar. Re-enable the logging integration_test_targets/integration_test_config in known_good.json (removed in #386) so CI exercises the component tests.
test_datarouter_filters counts only non-verbose (non-extended) DLT messages, so it needs the datarouter built with enable_nonverbose_dlt=True. RI's .bazelrc build:_common forces that flag to False globally, and the integration run inherits it via --config=linux-x86_64. Override it back to True in logging's integration_test_config (appended after --config, so it wins) so the filter test sees the expected 11 non-verbose messages instead of 0.
|
The created documentation from the pull request is available at: docu-html |
…1 & 003 logging#351 (datarouter config packaging) merged upstream, so the local patch 003 is no longer needed. The bump also pulls in logging's upstream baselibs target-path migration (3fce1678), making patch 001 obsolete too.
antonkri
marked this pull request as ready for review
October 8, 2026 06:45
antonkri
requested review from
AlexanderLanin,
FScholPer,
MaximilianSoerenPollak,
PiotrKorkus,
dcalavrezo-qorix,
lurtz,
nradakovic,
opajonk and
pawelrutkaq
as code owners
October 8, 2026 06:45
nradakovic
approved these changes
Oct 8, 2026
pawelrutkaq
approved these changes
Oct 8, 2026
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
Re-enables the
score_loggingmodule integration (component) tests inknown_good.jsonand adds a patch that fixes why they could never pass in reference_integration.Why the datarouter component tests failed here
All 10
@score_logging//score/test/component/...tests failedTimeoutError: Datarouter not ready within 10.0s(3/3 attempts, not flaky). The datarouter runs withcwd=/opt/datarouterand opens./etc/log-channels.json, but in the reference_integration-built image the config files landed at:instead of
So
ReadStaticDltfails →DltLogServerisnullptr→ "static config is not available, interrupt work" → the unix socket never opens → every test times out.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 (its owncomponent_tests.ymlCI, where the tests are green). When logging is consumed as an external dependency — exactly reference_integration — the file path is prefixed withexternal/score_logging+/, the strip matches nothing, and the whole prefix survives underpackage_dir.This is why
test_datarouter_filters/test_mw_log/test_mw_log_filterspass in logging's own per-PR CI but fail here, and it's the first time these tests ran in reference_integration (added in #385).The fix
patches/logging/003-fix-datarouter-config-packaging.patchreplaces the absolute-strippkg_tarwith a package-relativepkg_filesusingstrip_prefix.from_pkg()(mirroring the already-working QNXdatarouter_config_pkg). This resolves toopt/datarouter/etc/*for both root and external consumption. Verified locally by inspecting the builtdatarouter_pkg.tar.The fix belongs upstream in eclipse-score/logging; this local patch unblocks reference_integration until logging is bumped to include it.
Changes
patches/logging/003-fix-datarouter-config-packaging.patch(new)known_good.json: register patch 003 + restore loggingintegration_test_targets/integration_test_config(removed in Fix feature integration tests (psutil) and green the pipeline #386)bazel_common/score_modules_target_sw.MODULE.bazel: regenerated viascripts/known_good/update_module_from_known_good.pyValidation
Letting CI exercise the full logging component test suite via the module integration test step.