RTXteam / RTX

Software repo for Team Expander Agent (Oregon State U., Institute for Systems Biology, and Penn State U.)
https://arax.ncats.io/
MIT License
34 stars 20 forks source link

Tests fail on arax.ncats.io in kg2test and kg2beta #2268

Closed edeutsch closed 2 months ago

edeutsch commented 2 months ago

Tests are passing in other instances, but on arax.ncats.io in kg2test and kg2beta only, then are failing like this:

cd /mnt/data/orangeboard/kg2test
cd RTX/code/ARAX/test
git branch | grep '*'
git pull
pytest -v test_ARAX_messenger.py

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/mnt/data/python/Python-3.9.16/lib/python3.9/site-packages/_pytest/main.py", line 268, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/mnt/data/python/Python-3.9.16/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/mnt/data/python/Python-3.9.16/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/mnt/data/python/Python-3.9.16/lib/python3.9/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/mnt/data/python/Python-3.9.16/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/mnt/data/python/Python-3.9.16/lib/python3.9/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/mnt/data/orangeboard/kg2test/RTX/code/ARAX/test/conftest.py", line 46, in pytest_sessionstart
INTERNALERROR>     cache_is_stale = time.time() - os.path.getmtime(kp_info_cacher.smart_api_and_meta_map_cache) > 3600
INTERNALERROR>   File "/mnt/data/python/Python-3.9.16/lib/python3.9/genericpath.py", line 55, in getmtime
INTERNALERROR>     return os.stat(filename).st_mtime
INTERNALERROR> FileNotFoundError: [Errno 2] No such file or directory: '/mnt/data/orangeboard/kg2test/RTX/code/ARAX/ARAXQuery/Expand/cache_smart_api_and_meta_map_1.5--development.pkl'

@saramsey any ideas on this one? Were you adjusting the meta map caching recently and might know about this?

Of some note is that kg2beta and kg2test do not need metagraph caching because they do not use metagraphs (I think??)

saramsey commented 2 months ago

I'm on it

saramsey commented 2 months ago

OK, so I notice the 1.5 in the file that Python is trying to open:

/mnt/data/orangeboard/kg2test/RTX/code/ARAX/ARAXQuery/Expand/cache_smart_api_and_meta_map_1.5--development.pkl

still investigating....

saramsey commented 2 months ago

I think there is a bug in conftest.py. This fixes it: Screenshot 2024-04-17 at 2 00 04 PM

amykglen commented 2 months ago

thanks @saramsey! my bad

saramsey commented 2 months ago

Confirmed; via testing on arax.ncats.io/kg2test, commit 8dfee21 fixes the issue:

Screenshot 2024-04-17 at 3 08 00 PM

I just made this commit in the master branch (rather than the dev branch) since it seems safe to roll out to ITRB TEST in the near future.

saramsey commented 2 months ago

I've rolled out the patch to arax.ncats.io/kg2beta.

saramsey commented 2 months ago

I've rolled out the patch to arax.ncats.io/test

saramsey commented 2 months ago

I've rolled out the patch to arax.ncats.io/beta.

saramsey commented 2 months ago

I've rolled out the patch to arax.ncats.io/devED.

saramsey commented 2 months ago

Tested using pytest -v test_ARAX_messenger.py on all five development endpoints.