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

Exit status is zero when server connection fails #45

Open
pkrog opened this issue Feb 27, 2018 · 1 comment
Open

Exit status is zero when server connection fails #45

pkrog opened this issue Feb 27, 2018 · 1 comment
Labels

Comments

@pkrog
Copy link
Member

pkrog commented Feb 27, 2018

If wft4galaxy-docker is run with wrong server URL or wrong API key, an error message is printed but the exist status is zero. Hence no failure is detected in Jenkins.

@pkrog pkrog added the bug label Feb 27, 2018
@pkrog
Copy link
Member Author

pkrog commented Feb 27, 2018

Output example:

 Workflow Test: 'sacurine' ... 2018-02-27 18:45:58,024 [wft4galaxy.common] [DEBUG]  Loading workflow definition from file: /data_input/workflow.ga
2018-02-27 18:45:58,028 [wft4galaxy.common] [DEBUG]  Workflow definition loaded from file: done
2018-02-27 18:45:58,028 [wft4galaxy.common] [DEBUG]  Uploading the Workflow to the Galaxy instance ...
2018-02-27 18:45:58,031 [urllib3.connectionpool] [DEBUG]  Starting new HTTPS connection (1): publicdev.phenomenal-h2020.u
ERROR (4.936s)

======================================================================
ERROR [4.936s]: Workflow Test: 'sacurine'
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/wft4galaxy-0.3-py2.7.egg/wft4galaxy/runner.py", line 477, in run_test
    workflow = self.get_galaxy_workflow()
  File "/usr/lib/python2.7/site-packages/wft4galaxy-0.3-py2.7.egg/wft4galaxy/runner.py", line 441, in get_galaxy_workflow
    workflow_name_suffix=self.uuid
  File "/usr/lib/python2.7/site-packages/wft4galaxy-0.3-py2.7.egg/wft4galaxy/common.py", line 224, in load_workflow
    workflow_name, workflow_name_prefix, workflow_name_suffix)
  File "/usr/lib/python2.7/site-packages/wft4galaxy-0.3-py2.7.egg/wft4galaxy/common.py", line 247, in load_workflow_by_filename
    wf = self._galaxy_instance.workflows.import_new(wf_json)
  File "/usr/lib/python2.7/site-packages/bioblend/galaxy/objects/client.py", line 263, in import_new
    wf_info = self.gi.workflows.import_workflow_dict(wf_dict, publish)
  File "/usr/lib/python2.7/site-packages/bioblend/galaxy/workflows/__init__.py", line 107, in import_workflow_dict
    return self._post(url=url, payload=payload)
  File "/usr/lib/python2.7/site-packages/bioblend/galaxy/client.py", line 152, in _post
    files_attached=files_attached)
  File "/usr/lib/python2.7/site-packages/bioblend/galaxyclient.py", line 137, in make_post_request
    timeout=self.timeout)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='publicdev.phenomenal-h2020.u', port=443): Max retries exceeded with url: /api/workflows/upload?key=946143e4f5ef858e9d10879f9b81e43c (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0544b3be90>: Failed to establish a new connection: [Errno 111] Connection refused',))

----------------------------------------------------------------------
Ran 1 test in 4.937s

FAILED (errors=1)
2018-02-27 18:46:02,965 [wft4galaxy.runner] [DEBUG]  Cleanup of workflow test '72fdf059-1bee-11e8-a49a-0242ac110002'...
2018-02-27 18:46:02,965 [wft4galaxy.runner] [DEBUG]  Cleanup of workflow test '72fdf059-1bee-11e8-a49a-0242ac110002': DONE
2018-02-27 18:46:02,967 [wft4galaxy.app.runner] [DEBUG]  wft4galaxy.run_tests exiting with code: 0
2018-02-27 19:46:01,902 [wft4galaxy-docker] [DEBUG]  Docker container terminated with 0 exit code
pierrick@marcie:wft4galaxy$ echo $?
0

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

No branches or pull requests

1 participant