Repository navigation
Fix feature integration tests (psutil) and green the pipeline - #386
Merged
Merged
Conversation
The feature integration tests add a lifecycle persistency recovery test (tests/lifecycle/test_lifecycle_persistency_recovery.py) that imports psutil, but psutil was not declared in the test requirements. The fit_*_lifecycle_persistency targets therefore fail during pytest collection with "ModuleNotFoundError: No module named 'psutil'". Add psutil to requirements.txt and the generated lock so it is part of all_requirements and available to the feature integration test venv.
antonkri
requested review from
AlexanderLanin,
FScholPer,
MaximilianSoerenPollak,
PiotrKorkus,
dcalavrezo-qorix,
lurtz,
nradakovic,
opajonk and
pawelrutkaq
as code owners
October 6, 2026 07:16
The module integration test step (added in eclipse-score#385) is red on main because two of the three configured modules fail for module-internal reasons: - score_persistency: cit_rust fails to build its python test venv with "Collision resolution not yet implemented! Saw nodejs_wheel/executable.py twice" (surfaced by the eclipse-score#383 persistency bump to 323950c, which also dropped several bazel patches). - score_logging: the datarouter component tests fail with "TimeoutError: Datarouter not ready within 10.0s". Remove the integration_test_targets/integration_test_config for these two modules so the pipeline is green again, keeping score_lifecycle (which passes). The persistency/logging integration tests can be re-enabled once the underlying venv collision and datarouter timeout are fixed.
|
The created documentation from the pull request is available at: docu-html |
PiotrKorkus
approved these changes
Oct 6, 2026
This was referenced Oct 6, 2026
antonkri
added a commit
that referenced
this pull request
Oct 6, 2026
The score_persistency KVS integration tests (//score/kvs/tests/test_cases:cit,
i.e. cit_cpp + cit_rust) could not build in reference_integration: building
their test venv failed with
× Collision resolution not yet implemented!
Saw nodejs_wheel/bin/corepack twice (then iniconfig, pytest, ...)
Root cause: the venv is assembled by score_tooling's score_virtualenv, which
does py_venv(deps = <@pip_tooling all_requirements> + reqs + ...). persistency
passes reqs = all_requirements of its own test hub (@pip_score_persistency_venv_test,
renamed by patch 003). That hub re-vendors score_tooling's
python_basics/requirements.txt (the test lock lists it as a compile src), so
basedpyright, iniconfig, nodejs-wheel-binaries, packaging, pluggy, pygments and
pytest exist in BOTH hubs. aspect_rules_py 1.5.2's venv tool cannot merge two
different repos that ship the same file (collision resolution is unimplemented
regardless of package_collisions=warning/ignore), so venv creation aborts.
This surfaced only after persistency was bumped to 323950c (#383) and the module
integration-test step was added (#385); it is the first time these tests ran in
reference_integration.
Fix (patches/persistency/006-dedupe-test-venv-pip-hub.patch): drop the seven
packages that score_tooling's @pip_tooling hub already provides from persistency's
test lock, so each package is contributed by exactly one hub. pytest and friends
come from @pip_tooling (added by score_virtualenv); persistency's hub keeps only
its own unique deps (psutil, pytest-env, pytest-html, pytest-metadata,
pytest-repeat, testing-utils, jinja2, markupsafe).
Verified locally (no docker): both
@score_persistency//score/kvs/tests/test_cases:python_tc_venv and
@score_persistency//score/kvs/tests/test_cases:cit build successfully with the
patch applied.
Re-enable the persistency integration_test_targets/integration_test_config in
known_good.json (removed in #386) so CI exercises the KVS integration tests.
antonkri
added a commit
that referenced
this pull request
Oct 7, 2026
…overrides (#388) * Enable persistency integration tests and fix test-venv pip hub collision The score_persistency KVS integration tests (//score/kvs/tests/test_cases:cit, i.e. cit_cpp + cit_rust) could not build in reference_integration: building their test venv failed with × Collision resolution not yet implemented! Saw nodejs_wheel/bin/corepack twice (then iniconfig, pytest, ...) Root cause: the venv is assembled by score_tooling's score_virtualenv, which does py_venv(deps = <@pip_tooling all_requirements> + reqs + ...). persistency passes reqs = all_requirements of its own test hub (@pip_score_persistency_venv_test, renamed by patch 003). That hub re-vendors score_tooling's python_basics/requirements.txt (the test lock lists it as a compile src), so basedpyright, iniconfig, nodejs-wheel-binaries, packaging, pluggy, pygments and pytest exist in BOTH hubs. aspect_rules_py 1.5.2's venv tool cannot merge two different repos that ship the same file (collision resolution is unimplemented regardless of package_collisions=warning/ignore), so venv creation aborts. This surfaced only after persistency was bumped to 323950c (#383) and the module integration-test step was added (#385); it is the first time these tests ran in reference_integration. Fix (patches/persistency/006-dedupe-test-venv-pip-hub.patch): drop the seven packages that score_tooling's @pip_tooling hub already provides from persistency's test lock, so each package is contributed by exactly one hub. pytest and friends come from @pip_tooling (added by score_virtualenv); persistency's hub keeps only its own unique deps (psutil, pytest-env, pytest-html, pytest-metadata, pytest-repeat, testing-utils, jinja2, markupsafe). Verified locally (no docker): both @score_persistency//score/kvs/tests/test_cases:python_tc_venv and @score_persistency//score/kvs/tests/test_cases:cit build successfully with the patch applied. Re-enable the persistency integration_test_targets/integration_test_config in known_good.json (removed in #386) so CI exercises the KVS integration tests. * Bump persistency to latest main and refresh integration-test overrides persistency fixed the test-venv pip hub collision upstream (#463 migrated to score_pytest from score_tools, #466 renamed the hub to pip_score_persistency_venv_test and dropped the unused python_tc_venv IDE venv). Bump the pinned commit to current main (961c0a0) so the reference_integration graph picks up those fixes directly. Consequences of the bump: - Drop 006-dedupe-test-venv-pip-hub.patch: the colliding python_tc_venv it worked around no longer exists upstream. - Regenerate 003/004/005 against the new MODULE.bazel (the old context no longer matched, so Bazel failed to apply them during fetch). - Add 006-tools / 007-sbom: the new main declares score_tools and score_sbom as dev_dependency, but reference_integration (root) needs them non-dev because the test BUILD loads @score_tools//score_pytest and the module root BUILD loads @score_sbom//:defs.bzl. Regenerated bazel_common/score_modules_target_sw.MODULE.bazel and refreshed MODULE.bazel.lock accordingly. * Pin score_tools to the $(locations) fix for persistency cit tests Persistency's integration test //score/kvs/tests/test_cases:cit failed in analysis: cit_cpp: label '...:cit_files' in $(location) expression expands to more than one file, please use $(locations ...) instead. score_pytest (from score_tools) only emits the correct $(locations ...) for multi-file srcs starting at a commit past the registry version 0.0.3. Persistency's own MODULE.bazel git_overrides score_tools to 4b48cec for exactly this fix, but Bzlmod ignores non-root overrides, so RI (root) was resolving score_tools 0.0.3 from the registry (still buggy). Add score_tools to known_good.json pinned to the same commit so the root module applies the override, regenerate the tooling MODULE fragment and refresh the lockfile. * Consolidate persistency dev_dependency flips into one patch The five patches 003-007 all edited the same file (MODULE.bazel) and four of them touched the same hunk region, so none of 005/006/007 applied standalone - they only worked as a sequential chain in exactly the known_good.json order, each carrying the previous ones' edits as context. Reordering or dropping any entry silently broke the rest. Replace them with a single patch containing two clean hunks. Same net effect: flip googletest, score_sbom, score_rules_imagefs, score_tools and the pip extension to non-dev, because their apparent names appear in BUILD/.bzl files that reference_integration evaluates (//:BUILD for the docs bundle, test_cases/BUILD for the pip hub). Extensions RI never evaluates, such as sbom_metadata and imagefs, stay dev on purpose. Verified: the patch applies standalone, and both @score_persistency//score/kvs/tests/test_cases:cit and @score_persistency//:docs_bundle resolve with --lockfile_mode=error.
antonkri
added a commit
that referenced
this pull request
Oct 8, 2026
…387) * Enable logging module integration tests and fix datarouter config packaging 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. * Enable non-verbose DLT for logging integration 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. * Bump score_logging to latest main (3d98966), drop obsolete patches 001 & 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.
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
Two changes to get the
test_and_docspipeline green again:1. Add
psutilto feature integration test requirementsThe feature integration tests (
bazel test //feature_integration_tests/test_cases:fit) failed during pytest collection withModuleNotFoundError: No module named 'psutil'. The lifecycle persistency recovery test (feature_integration_tests/test_cases/tests/lifecycle/test_lifecycle_persistency_recovery.py, added in draft PR #328) importspsutil, which was not declared in the test requirements. Addedpsutiltorequirements.txtand the generatedrequirements.txt.lock.2. Drop failing module integration tests (persistency, logging)
The module integration test step (added in #385) is red on
mainbecause two of three configured modules fail for module-internal reasons:cit_rustfails to build its python test venv withCollision resolution not yet implemented! Saw nodejs_wheel/executable.py twice(surfaced by the Bump score_persistency to latest main (323950c) #383 persistency bump to323950c, which also dropped several bazel patches).TimeoutError: Datarouter not ready within 10.0s.Removed the
integration_test_targets/integration_test_configfor these two modules inknown_good.json, keeping score_lifecycle (which passes). These can be re-enabled once the underlying venv collision and datarouter timeout are fixed in the respective modules.