Skip to content

Commit ad24fc8

Browse files
authored
Bump persistency to latest main (upstream test-venv fix) and refresh 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.
1 parent 668b038 commit ad24fc8

8 files changed

Lines changed: 54 additions & 75 deletions

‎MODULE.bazel.lock‎

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎bazel_common/score_modules_target_sw.MODULE.bazel‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ git_override(
4343
bazel_dep(name = "score_persistency")
4444
git_override(
4545
module_name = "score_persistency",
46-
commit = "323950c42431956ce76bf48c407a1709f114876d",
46+
commit = "961c0a0989755a1e0fe8de55e83c0a44e2e20b56",
4747
patch_strip = 1,
4848
patches = [
49-
"//patches/persistency:003-pip-not-dev-dependency.patch",
50-
"//patches/persistency:004-imagefs-not-dev-dependency.patch",
51-
"//patches/persistency:005-googletest-not-dev-dependency.patch",
49+
"//patches/persistency:003-undev-deps-for-root-module.patch",
5250
],
5351
remote = "https://github.com/eclipse-score/persistency.git",
5452
)

‎bazel_common/score_modules_tooling.MODULE.bazel‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ git_override(
2828
remote = "https://github.com/eclipse-score/itf.git",
2929
)
3030

31+
bazel_dep(name = "score_tools")
32+
git_override(
33+
module_name = "score_tools",
34+
commit = "4b48cec400c67be75cfc3fa4658ac6a0489bf7a8",
35+
remote = "https://github.com/eclipse-score/tools.git",
36+
)
37+
3138
bazel_dep(name = "score_tooling")
3239
git_override(
3340
module_name = "score_tooling",

‎known_good.json‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@
6161
"score_persistency": {
6262
"repo": "https://github.com/eclipse-score/persistency.git",
6363
"bazel_patches": [
64-
"//patches/persistency:003-pip-not-dev-dependency.patch",
65-
"//patches/persistency:004-imagefs-not-dev-dependency.patch",
66-
"//patches/persistency:005-googletest-not-dev-dependency.patch"
64+
"//patches/persistency:003-undev-deps-for-root-module.patch"
6765
],
6866
"metadata": {
6967
"code_root_path": "//score/kvs/...",
@@ -77,9 +75,15 @@
7775
"//score/kvs/tests/integration_test_scenarios/...",
7876
"//score/kvs/tests/test_cases/..."
7977
],
80-
"rust_coverage_config": "ferrocene-coverage-per"
78+
"rust_coverage_config": "ferrocene-coverage-per",
79+
"integration_test_targets": [
80+
"//score/kvs/tests/test_cases:cit"
81+
],
82+
"integration_test_config": [
83+
"flaky_test_attempts=3"
84+
]
8185
},
82-
"hash": "323950c42431956ce76bf48c407a1709f114876d"
86+
"hash": "961c0a0989755a1e0fe8de55e83c0a44e2e20b56"
8387
},
8488
"score_kyron": {
8589
"repo": "https://github.com/eclipse-score/kyron.git",
@@ -189,6 +193,11 @@
189193
"repo": "https://github.com/eclipse-score/itf.git",
190194
"hash": "802e0186d373e0d9d67c1c9ccb1ea08952c7ad06"
191195
},
196+
"score_tools": {
197+
"repo": "https://github.com/eclipse-score/tools.git",
198+
"docs": false,
199+
"hash": "4b48cec400c67be75cfc3fa4658ac6a0489bf7a8"
200+
},
192201
"score_tooling": {
193202
"repo": "https://github.com/eclipse-score/tooling.git",
194203
"docs": false,

‎patches/persistency/003-pip-not-dev-dependency.patch‎

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
diff --git a/MODULE.bazel b/MODULE.bazel
2+
index 2649521..6c17327 100644
3+
--- a/MODULE.bazel
4+
+++ b/MODULE.bazel
5+
@@ -38,13 +38,13 @@ bazel_dep(name = "score_coverage", version = "0.3.1", dev_dependency = True)
6+
bazel_dep(name = "aspect_rules_lint", version = "2.7.2", dev_dependency = True)
7+
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.3", dev_dependency = True)
8+
bazel_dep(name = "google_benchmark", version = "1.9.5", dev_dependency = True)
9+
-bazel_dep(name = "googletest", version = "1.17.0.bcr.2", dev_dependency = True)
10+
+bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
11+
bazel_dep(name = "score_bazel_cpp_toolchains", version = "1.0.3", dev_dependency = True)
12+
-bazel_dep(name = "score_sbom", version = "0.1.1", dev_dependency = True)
13+
-bazel_dep(name = "score_rules_imagefs", version = "0.1.0", dev_dependency = True)
14+
+bazel_dep(name = "score_sbom", version = "0.1.1")
15+
+bazel_dep(name = "score_rules_imagefs", version = "0.1.0")
16+
bazel_dep(name = "score_rust_policies", version = "0.0.5", dev_dependency = True)
17+
bazel_dep(name = "score_toolchains_rust", version = "0.10.0", dev_dependency = True)
18+
-bazel_dep(name = "score_tools", version = "0.0.3", dev_dependency = True)
19+
+bazel_dep(name = "score_tools", version = "0.0.3")
20+
21+
# Pinned past v0.0.3 for the `$(locations)` fix in score_pytest.
22+
git_override(
23+
@@ -62,7 +62,7 @@ python.toolchain(
24+
python_version = PYTHON_VERSION,
25+
)
26+
27+
-pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency = True)
28+
+pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
29+
pip.parse(
30+
hub_name = "pip_score_persistency_venv_test",
31+
python_version = PYTHON_VERSION,

‎patches/persistency/004-imagefs-not-dev-dependency.patch‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎patches/persistency/005-googletest-not-dev-dependency.patch‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)