Labkey credentials for CI
The Labkey tests fail because we miss CI credentials (see log below).
In dev
the labkey tests are disabled (for now). What needs to be done is add credentials either in the VM or as secrets in gitlab (I am not sure how we implemented this) and enable again the tests.
$ bash tests/test_scripts_prepare_inputs_labkey/test.sh
- user_dir=/builds/zavolan_group/pipelines/zarp +++ dirname tests/test_scripts_prepare_inputs_labkey/test.sh ++ cd tests/test_scripts_prepare_inputs_labkey ++ pwd
- script_dir=/builds/zavolan_group/pipelines/zarp/tests/test_scripts_prepare_inputs_labkey
- cd /builds/zavolan_group/pipelines/zarp/tests/test_scripts_prepare_inputs_labkey
- cat
- umask 0377
- cat
- python ../../scripts/prepare_inputs.py --labkey-domain=labkey.scicore.unibas.ch '--labkey-path=/Zavolan Group/TEST_LABKEY' --input-to-output-mapping=../../scripts/prepare_inputs.dict.tsv --resources-dir=../input_files --output-table=samples.tsv --config-file=config.yaml --multimappers=10 --logo=../../images/logo.128px.png --debug RNA_Seq_data_template_raw [2021-02-11 12:49:12,478: INFO @ main] Fetching input table from LabKey instance '{args.labkey_domain}'... Traceback (most recent call last): File "/opt/conda/envs/zarp/lib/python3.7/site-packages/urllib3/connection.py", line 170, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/opt/conda/envs/zarp/lib/python3.7/site-packages/urllib3/util/connection.py", line 96, in create_connection raise err File "/opt/conda/envs/zarp/lib/python3.7/site-packages/urllib3/util/connection.py", line 86, in create_connection sock.connect(sa) TimeoutError: [Errno 110] Connection timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/conda/envs/zarp/lib/python3.7/site-packages/urllib3/connectionpool.py", line 706, in urlopen chunked=chunked, File "/opt/conda/envs/zarp/lib/python3.7/site-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/opt/conda/envs/zarp/lib/python3.7/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn conn.connect() File "/opt/conda/envs/zarp/lib/python3.7/site-packages/urllib3/connection.py", line 353, in connect conn = self._new_conn() File "/opt/conda/envs/zarp/lib/python3.7/site-packages/urllib3/connection.py", line 182, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7ff7da1a0210>: Failed to establish a new connection: [Errno 110] Connection timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/conda/envs/zarp/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/opt/conda/envs/zarp/lib/python3.7/site-packages/urllib3/connectionpool.py", line 756, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/opt/conda/envs/zarp/lib/python3.7/site-packages/urllib3/util/retry.py", line 573, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='labkey.scicore.unibas.ch', port=443): Max retries exceeded with url: /labkey//Zavolan%20Group/TEST_LABKEY/login-whoami.api (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff7da1a0210>: Failed to establish a new connection: [Errno 110] Connection timed out')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/conda/envs/zarp/lib/python3.7/site-packages/labkey/utils.py", line 93, in make_request response = handle_response(self._session.get(csrf_url)) File "/opt/conda/envs/zarp/lib/python3.7/site-packages/requests/sessions.py", line 555, in get return self.request('GET', url, **kwargs) File "/opt/conda/envs/zarp/lib/python3.7/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/opt/conda/envs/zarp/lib/python3.7/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/opt/conda/envs/zarp/lib/python3.7/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='labkey.scicore.unibas.ch', port=443): Max retries exceeded with url: /labkey//Zavolan%20Group/TEST_LABKEY/login-whoami.api (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff7da1a0210>: Failed to establish a new connection: [Errno 110] Connection timed out')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "../../scripts/prepare_inputs.py", line 696, in main(args) File "../../scripts/prepare_inputs.py", line 473, in main query_name=args.table, File "../../scripts/prepare_inputs.py", line 258, in fetch_labkey_table query_name=query_name, File "/opt/conda/envs/zarp/lib/python3.7/site-packages/labkey/query.py", line 286, in select_rows return server_context.make_request(url, payload, timeout=timeout) File "/opt/conda/envs/zarp/lib/python3.7/site-packages/labkey/utils.py", line 98, in make_request handle_request_exception(e, server_context=self) File "/opt/conda/envs/zarp/lib/python3.7/site-packages/labkey/utils.py", line 157, in handle_request_exception raise ServerContextError(server_context, e) labkey.exceptions.ServerContextError: 'Failed to connect to server. Ensure the server_context domain, context_path, and SSL are configured correctly.'