Skip to content

Add return_conflicts option to check_conflicts function and enhance tests#5000

Merged
boegel merged 4 commits intoeasybuilders:developfrom
Flamefire:check-conflict-enhancement
Apr 7, 2026
Merged

Add return_conflicts option to check_conflicts function and enhance tests#5000
boegel merged 4 commits intoeasybuilders:developfrom
Flamefire:check-conflict-enhancement

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

@Flamefire Flamefire commented Sep 23, 2025

This is motivated by the easyconfig tests where the result is hard to interpret:

FAIL: test_conflicts (test.easyconfigs.easyconfigs.EasyConfigTest)
Check whether any conflicts occur in software dependency graphs.
...
AssertionError: True is not false : No conflicts detected

First the wording: It sounds like the error is that no conflicts are detected (similar in other places)

Second the actual conflicts are printed to stderr somewhere hidden above with other test output

The new parameter allows returning the text instead of printing it.

The PR where I've seen this was PyTorch: It has a build dependency on something which happens to be a runtime dependency of a dependency. So I added a test that this is detected but not if it is a build dependency for both where there would be no issue.

With that I ran into our somewhat strange dictionary duplicating a couple values that are easyconfig parameters, properties or functions: { 'ec': ec, 'spec': ec.path, 'short_mod_name': ec.short_mod_name, ...}

As the robot-resolver uses that dict instead of an EasyConfig instance and I needed that in the test I factored out the creation of this dict into a new function. It is still strange... We should consider removing it or at least transforming it to a dataclass once we support only Python 3.7 to make it easier to reason about.

Should we report only primary dependents in the error message? See this confusing message:

pybind11-2.13.6-GCC-13.3.0 as dep of: HiGHS-1.11.0-gfbf-2024a, PyTorch-2.7.1-foss-2024a-CUDA-12.6.0, Triton-3.1.0-foss-2024a-CUDA-12.6.0
pybind11-2.12.0-GCC-13.3.0 as dep of: KMC-3.2.4-GCC-13.3.0, MACS3-3.0.3-gfbf-2024a, PyTorch-2.6.0-foss-2024a, PyTorch-2.7.1-foss-2024a-CUDA-12.6.0, SciPy-bundle-2024.05-gfbf-2024.05, SciPy-bundle-2024.05-gfbf-2024a, SignalP-6.0h-foss-2024a-fast, SnapATAC2-2.9.0-dev0-20250630-foss-2024a, TensorFlow-2.18.1-foss-2024a, Triton-3.3.1-foss-2024a-CUDA-12.6.0, bokeh-3.6.0-gfbf-2024a, dm-tree-0.1.9-gfbf-2024a, gemmi-0.7.1-GCC-13.3.0, heat-1.6.0-foss-2024a, hmmlearn-0.3.3-gfbf-2024a, matplotlib-3.9.2-gfbf-2024a, pybind11_abseil-202402.0-GCC-13.3.0, pyspoa-0.2.1-GCC-13.3.0, tensorstore-0.1.72-gfbf-2024a, torchvision-0.21.0-foss-2024a

I.e. it collects transitive dependents while collecting transitive dependencies in https://github.com/Flamefire/easybuild-framework/blob/9cd02c9ea03c5bdf278f0760453306e795737a5f/easybuild/tools/robot.py#L178-L181

@boegel boegel changed the title Add return_conflicts param to check_conflicts and enhance tests Add return_conflicts options to check_conflicts function and enhance tests Sep 24, 2025
@boegel boegel added this to the release after 5.1.2 (5.2.0?) milestone Sep 24, 2025
@Flamefire Flamefire changed the title Add return_conflicts options to check_conflicts function and enhance tests Add return_conflicts option to check_conflicts function and enhance tests Jan 15, 2026
@Flamefire
Copy link
Copy Markdown
Contributor Author

This is used in easybuilders/easybuild-easyconfigs#23969 to enhance error messages for CI tests

@boegel boegel removed the tests label Apr 7, 2026
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel merged commit 6f0b7cf into easybuilders:develop Apr 7, 2026
40 checks passed
@Flamefire Flamefire deleted the check-conflict-enhancement branch April 7, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants