Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fail on appveyor after move to hatch #759

Open
mih opened this issue Sep 22, 2024 · 2 comments
Open

Test fail on appveyor after move to hatch #759

mih opened this issue Sep 22, 2024 · 2 comments

Comments

@mih
Copy link
Member

mih commented Sep 22, 2024

It smells like some kind of race condition, but I have no idea yet where it would come from...

test-linux

All these go away, when switching from PY3.9 Ubuntu 2204 to PY3.10 on Ubuntu2004, on a rerun test_initremote_basic_sshurl failure is back.

  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_initremote_basic_sshurl - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_setup_ds_in_store_ssh - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_obtain_permission_ssh - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_remote_layout_ssh - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_version_check_ssh - ValueError: Conflicting version found at target: 2

test-linux-crippled

All these stay, when switching from PY3.9 Ubuntu 2204 to PY3.10 on Ubuntu2004. But on a rerun test_version_check_ssh works.

  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_version_check_ssh - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_initremote_basic_sshurl - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_remote_layout_ssh - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_setup_ds_in_store_ssh - ValueError: Conflicting version found at target: 2

test-win

All these stay, when switching from PY3.12 Win2022 to PY3.9 on Win2019. And stayed for a rerun.

  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_initremote_basic_sshurl - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_version_check_ssh - ValueError: Conflicting version found at target: 2

test-mac

Only the last two stay when switching from PY3.12 sonoma to PY3.9 monterey. All came back after a rerun.

  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_remote_layout_ssh - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_obtain_permission_ssh - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_version_check_ssh - ValueError: Conflicting version found at target: 2
  • FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_setup_ds_in_store_ssh - ValueError: Conflicting version found at target: 2

datalad-core-1

This is fragile and goes away on a rerun

  • FAILED local/tests/test_run.py::test_basics

datalad-core-4

All these went away, with no change on a rerun. And then came back on another rerun.

  • FAILED tests/test_addurls.py::TestAddurls::test_addurls_from_list
  • FAILED tests/test_addurls.py::TestAddurls::test_addurls_url_on_collision_error_if_different
  • FAILED tests/test_addurls.py::TestAddurls::test_addurls_url_on_collision_choose
@mih mih mentioned this issue Sep 22, 2024
3 tasks
mih added a commit to adswa/datalad-next that referenced this issue Sep 23, 2024
The reason for this is unclear, and requires a dedicated investigation.
However, the general test setup is needed now, and this will have to
wait for a moment.

Refs: datalad#759
mih added a commit that referenced this issue Sep 23, 2024
The reason for this is unclear, and requires a dedicated investigation.
However, the general test setup is needed now, and this will have to
wait for a moment.

Refs: #759
mih added a commit that referenced this issue Sep 23, 2024
The reason for this is unclear, and requires a dedicated investigation.
However, the general test setup is needed now, and this will have to
wait for a moment.

Refs: #759
@adswa
Copy link
Member

adswa commented Sep 30, 2024

the ria failures are very very funky. I spent a while trying to make them fail on my local system. What ultimately did it was to set a pdb traceback in datalad:

(datalad) adina@muninn in ~/repos/datalad on git:maint!
❱ git diff
diff --git a/datalad/customremotes/tests/test_ria_utils.py b/datalad/customremotes/tests/test_ria_utils.py
index 908512316..c58eb6228 100644
--- a/datalad/customremotes/tests/test_ria_utils.py
+++ b/datalad/customremotes/tests/test_ria_utils.py
@@ -121,7 +121,7 @@ def _test_setup_ds_in_store(io_cls, io_args, store=None):
 
 
 def test_setup_ds_in_store():
-
+    import pdb; pdb.set_trace()
     _test_setup_ds_in_store(LocalIO, [])
 
     if on_windows:

when I then run DATALAD_TESTS_SSH=1 hatch run tests.py3.10:run --reruns 5 -v -s datalad_next/patches/tests/test_patched_ria_ora.py (having commented out the testremote invocation in this test suite, because it takes a while), the first failure is

AILED datalad_next/patches/tests/test_patched_ria_ora.py::test_version_check_ssh - ValueError: Conflicting version found at target: 2
===================================================== 1 failed, 19 passed, 5 rerun in 162.23s (0:02:42) =====================================================

When I then run the same command again, I get

FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_obtain_permission_ssh - ValueError: Conflicting version found at target: 2
FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_remote_layout_ssh - ValueError: Conflicting version found at target: 2
FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_initremote_basic_sshurl - ValueError: Conflicting version found at target: 2
FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_version_check_ssh - ValueError: Conflicting version found at target: 2
==================================================== 4 failed, 16 passed, 20 rerun in 179.22s (0:02:59) ==================================

and when I run the same command a third time, I get

FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_obtain_permission_ssh - ValueError: Conflicting version found at target: 2
FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_remote_layout_ssh - ValueError: Conflicting version found at target: 2
FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_version_check_ssh - ValueError: Conflicting version found at target: 2
==================================================== 3 failed, 17 passed, 15 rerun in 155.11s (0:02:35) ====================================================

and after running a fourth time I get

FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_obtain_permission_ssh - ValueError: Conflicting version found at target: 2
FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_setup_ds_in_store_ssh - ValueError: Conflicting version found at target: 2
FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_initremote_basic_sshurl - ValueError: Conflicting version found at target: 2
==================================================== 3 failed, 17 passed, 15 rerun in 169.63s (0:02:49) =====================================================

and the fifth run gives

FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_initremote_basic_sshurl - ValueError: Conflicting version found at target: 2
FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_version_check_ssh - ValueError: Conflicting version found at target: 2
FAILED datalad_next/patches/tests/test_patched_ria_ora.py::test_setup_ds_in_store_ssh - ValueError: Conflicting version found at target: 2
==================================================== 3 failed, 17 passed, 15 rerun in 170.48s (0:02:50) =====================================================

absolutely no idea what is happening.

Its probably worthwhile to note that the test suite doesn't end by itself but needs a CTRL-C after the summary (likely because of the breakpoint in datalad, although that breakpoint never brings me into a debugger during the test execution)

@mih
Copy link
Member Author

mih commented Sep 30, 2024

I suspect that these tests are not cleanly implemented and suffer from and/or cause residuals in the environment that makes them order-dependent. This is, from my POV, the main change from the previous test setup to the new one. The tests run in random order now (each time). I think this is a good thing in and of itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants