diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 50fd4634ae..a572fc87b9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,7 +10,7 @@ Added * Continue introducing `pants `_ to improve DX (Developer Experience) working on StackStorm, improve our security posture, and improve CI reliability thanks in part to pants' use of PEX lockfiles. This is not a user-facing addition. - #5778 #5789 #5817 #5795 #5830 + #5778 #5789 #5817 #5795 #5830 #5833 Contributed by @cognifloyd diff --git a/contrib/core/tests/BUILD b/contrib/core/tests/BUILD index dabf212d7e..b679ff82cf 100644 --- a/contrib/core/tests/BUILD +++ b/contrib/core/tests/BUILD @@ -1 +1,12 @@ -python_tests() +python_tests( + overrides={ + "test_action_sendmail.py": { + "dependencies": [ + # contrib/core is symlinked to st2tests/st2tests/fixtures/packs/core + # so pants thinks "mail-parser" is defined twice, making it ambiguous. + # Use contrib/core as the canonical copy. + "contrib/core:reqs#mail-parser", + ], + } + }, +) diff --git a/contrib/packs/tests/BUILD b/contrib/packs/tests/BUILD index dabf212d7e..3a89bff937 100644 --- a/contrib/packs/tests/BUILD +++ b/contrib/packs/tests/BUILD @@ -1 +1,10 @@ -python_tests() +python_tests( + overrides={ + "test_action_download.py": { + "dependencies": [ + # imports tests.fixtures which is ambiguous. Tell pants which one to use. + "contrib/packs/tests/fixtures", + ], + } + }, +) diff --git a/contrib/runners/orquesta_runner/tests/unit/BUILD b/contrib/runners/orquesta_runner/tests/unit/BUILD index 00e59b3017..5934dd9b24 100644 --- a/contrib/runners/orquesta_runner/tests/unit/BUILD +++ b/contrib/runners/orquesta_runner/tests/unit/BUILD @@ -1,5 +1,9 @@ python_tests( name="tests", + dependencies=[ + # most files import tests.unit.base which is ambiguous. Tell pants which one to use. + "contrib/runners/orquesta_runner/tests/unit/base.py", + ], ) python_sources() diff --git a/st2auth/tests/unit/BUILD b/st2auth/tests/unit/BUILD index 57341b1358..bd52dfb436 100644 --- a/st2auth/tests/unit/BUILD +++ b/st2auth/tests/unit/BUILD @@ -1,3 +1,7 @@ python_tests( name="tests", + dependencies=[ + # most files import tests.base which is ambiguous. Tell pants which one to use. + "st2auth/tests/base.py", + ], ) diff --git a/st2auth/tests/unit/controllers/v1/BUILD b/st2auth/tests/unit/controllers/v1/BUILD index 57341b1358..bd52dfb436 100644 --- a/st2auth/tests/unit/controllers/v1/BUILD +++ b/st2auth/tests/unit/controllers/v1/BUILD @@ -1,3 +1,7 @@ python_tests( name="tests", + dependencies=[ + # most files import tests.base which is ambiguous. Tell pants which one to use. + "st2auth/tests/base.py", + ], ) diff --git a/st2client/tests/unit/BUILD b/st2client/tests/unit/BUILD index 57341b1358..9aaca5d249 100644 --- a/st2client/tests/unit/BUILD +++ b/st2client/tests/unit/BUILD @@ -1,3 +1,7 @@ python_tests( name="tests", + dependencies=[ + # most files import tests.base which is ambiguous. Tell pants which one to use. + "st2client/tests/base.py", + ], ) diff --git a/st2common/tests/unit/BUILD b/st2common/tests/unit/BUILD index 00e59b3017..34cacadb2b 100644 --- a/st2common/tests/unit/BUILD +++ b/st2common/tests/unit/BUILD @@ -1,5 +1,9 @@ python_tests( name="tests", + dependencies=[ + # several files import tests.unit.base which is ambiguous. Tell pants which one to use. + "st2common/tests/unit/base.py", + ], ) python_sources()