You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Docker kbase/sdkbase2:python base image has v1.1 of kb-sdk installed on it. If you try to update kb-sdk to v1.2, running kb-sdk test fails as follows:
Running /home/runner/work/kb_sdk/kb_sdk/MyContigFilter/test_local/run_docker.sh with args run -v /home/runner/work/kb_sdk/kb_sdk/MyContigFilter/test_local/workdir:/kb/module/work -e SDK_CALLBACK_URL=http://172.17.0.1:38903 -e KB_SDK_TEST=1 test/mycontigfilter:latest test
Run Tests
if [ ! -f /kb/module/work/token ]; then echo -e '\nOutside a docker container please run "kb-sdk test" rather than "make test"\n' && exit 1; fi
bash test/run_tests.sh
Running test/run_tests.sh with args
Removing temp files...
Finished removing temp files.
E
======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'MyContigFilter.authclient')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/miniconda/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/miniconda/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/miniconda/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/miniconda/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/miniconda/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/miniconda/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/kb/module/test/MyContigFilter_server_test.py", line 8, in <module>
from MyContigFilter.MyContigFilterServer import MethodContext
File "/kb/module/lib/MyContigFilter/MyContigFilterServer.py", line 20, in <module>
from MyContigFilter.authclient import KBaseAuth as _KBaseAuth
ModuleNotFoundError: No module named 'MyContigFilter.authclient'
Name Stmts Miss Cover
----------------------------------------------------------
MyContigFilter/MyContigFilterImpl.py 61 48 21%
MyContigFilter/__init__.py 0 0 100%
----------------------------------------------------------
Ran 1 test in 0.291s
FAILED (errors=1)
make: *** [test] Error 1
Makefile:67: recipe for target 'test' failed
No further investigation was done. Due to the way that kb-sdk is called in the kb-sdk test command, it's likely that this has been broken for quite a while. It looks from the error logs as though the location of the authclient and baseclient modules changed, but kb-sdk did not keep up with those changes.
The text was updated successfully, but these errors were encountered:
fix: in src/java/us/kbase/templates/module_test_python_client.vm.properties
@@ -6,7 +6,11 @@ from configparser import ConfigParser
from ${module_name}.${module_name}Impl import ${module_name}
from ${module_name}.${module_name}Server import MethodContext
-from ${module_name}.authclient import KBaseAuth as _KBaseAuth
+
+try:
+ from ${module_name}.authclient import KBaseAuth as _KBaseAuth
+except ImportError:
+ from installed_clients.authclient import KBaseAuth as _KBaseAuth
Currently the Docker
kbase/sdkbase2:python
base image has v1.1 ofkb-sdk
installed on it. If you try to updatekb-sdk
to v1.2, runningkb-sdk test
fails as follows:No further investigation was done. Due to the way that
kb-sdk
is called in thekb-sdk test
command, it's likely that this has been broken for quite a while. It looks from the error logs as though the location of theauthclient
andbaseclient
modules changed, butkb-sdk
did not keep up with those changes.The text was updated successfully, but these errors were encountered: