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

Broken test_export_editor API test. #734

Closed
nsoranzo opened this issue Sep 15, 2015 · 7 comments
Closed

Broken test_export_editor API test. #734

nsoranzo opened this issue Sep 15, 2015 · 7 comments
Assignees
Labels

Comments

@nsoranzo
Copy link
Member

Running ./run_tests.sh -api gives me:

======================================================================
FAIL: test_export_editor (api.test_workflows.WorkflowsApiTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/galaxy/test/api/test_workflows.py", line 395, in test_export_editor
    downloaded_workflow = self._download_workflow( uploaded_workflow_id, style="editor" )
  File "/opt/galaxy/test/api/test_workflows.py", line 1155, in _download_workflow
    self._assert_status_code_is( download_response, 200 )
  File "/opt/galaxy/test/base/api.py", line 82, in _assert_status_code_is
    assert_status_code_is( response, expected_status_code )
  File "/opt/galaxy/test/base/api_asserts.py", line 15, in assert_status_code_is
    raise AssertionError( assertion_message )
AssertionError: Request status code (500) was not expected value 200. Body was {u'err_msg': u'Uncaught exception in exposed API method:', u'err_code': 0}
-------------------- >> begin captured logging << --------------------
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): localhost
galaxy.web.framework.webapp: INFO: Session authenticated using Galaxy master api key
requests.packages.urllib3.connectionpool: DEBUG: "GET /api/users?key=TEST123 HTTP/1.1" 200 None
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): localhost
galaxy.web.framework.webapp: INFO: Session authenticated using Galaxy master api key
requests.packages.urllib3.connectionpool: DEBUG: "POST /api/users/adb5f5c93f827949/api_key HTTP/1.1" 200 None
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): localhost
requests.packages.urllib3.connectionpool: DEBUG: "POST /api/workflows/upload HTTP/1.1" 200 None
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): localhost
galaxy.tools: ERROR: tools::to_json - [history_id=None] Failed to retrieve history. History unavailable. Please specify a valid history id..
Traceback (most recent call last):
  File "/opt/galaxy/lib/galaxy/tools/__init__.py", line 2347, in to_json
    raise Exception('History unavailable. Please specify a valid history id')
Exception: History unavailable. Please specify a valid history id
galaxy.web.framework.decorators: ERROR: Uncaught exception in exposed API method:
Traceback (most recent call last):
  File "/opt/galaxy/lib/galaxy/web/framework/decorators.py", line 260, in decorator
    rval = func( self, trans, *args, **kwargs)
  File "/opt/galaxy/lib/galaxy/webapps/galaxy/api/workflows.py", line 232, in workflow_dict
    ret_dict = self.workflow_contents_manager.workflow_to_dict( trans, stored_workflow, style=style )
  File "/opt/galaxy/lib/galaxy/managers/workflows.py", line 274, in workflow_to_dict
    return self._workflow_to_dict_editor( trans, stored )
  File "/opt/galaxy/lib/galaxy/managers/workflows.py", line 349, in _workflow_to_dict_editor
    'form_html': module.get_config_form(),
  File "/opt/galaxy/lib/galaxy/workflow/modules.py", line 717, in get_config_form
    tool=self.tool, values=self.state.inputs, errors=( self.errors or {} ) )
  File "/opt/galaxy/lib/galaxy/web/framework/webapp.py", line 809, in fill_template
    return self.fill_template_mako( filename, **kwargs )
  File "/opt/galaxy/lib/galaxy/web/framework/webapp.py", line 823, in fill_template_mako
    return template.render( **data )
  File "/opt/galaxy/eggs/Mako-0.4.1-py2.7.egg/mako/template.py", line 296, in render
    return runtime._render(self, self.callable_, args, data)
  File "/opt/galaxy/eggs/Mako-0.4.1-py2.7.egg/mako/runtime.py", line 660, in _render
    **_kwargs_for_callable(callable_, data))
  File "/opt/galaxy/eggs/Mako-0.4.1-py2.7.egg/mako/runtime.py", line 692, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/opt/galaxy/eggs/Mako-0.4.1-py2.7.egg/mako/runtime.py", line 718, in _exec_template
    callable_(context, *args, **kwargs)
  File "/opt/galaxy/database/compiled_templates/workflow/editor_tool_form.mako.py", line 37, in render_body
    'history_id'        : trans.security.encode_id( trans.history.id ),
AttributeError: 'NoneType' object has no attribute 'id'
requests.packages.urllib3.connectionpool: DEBUG: "GET /api/workflows/917af94b51aeccc8/download?style=editor&key=08b6c93ec530f27b033916ff5a7dbf70 HTTP/1.1" 500 None
--------------------- >> end captured logging << ---------------------

which is caused by a fail in the API call GET /api/workflows/917af94b51aeccc8/download?style=editor, which is due to a bug in templates/webapps/galaxy/workflow/editor_tool_form.mako .

@jmchilton
Copy link
Member

@guerler If this functionality is no longer needed by the workflow editor - we can rip it out of the API and delete the test case in my opinion. There are most useful ways to represent the workflow available in the API, this one option was only ever useful for the workflow editor.

@hexylena
Copy link
Member

@hexylena
Copy link
Member

@nsoranzo are you not experiencing the api.test_jobs.JobsApiTestCase.test_search failure?

@nsoranzo
Copy link
Member Author

@erasche I'd suggest to also run ./run_tests.sh -with_framework_test_tools -api, which should not skip any test.

@hexylena
Copy link
Member

@nsoranzo okay, can update the jenkins job.

@nsoranzo
Copy link
Member Author

@nsoranzo are you not experiencing the api.test_jobs.JobsApiTestCase.test_search failure?

Nope.

@nsoranzo okay, can update the jenkins job.

If there are resources/interest, running both with and without -with_framework_test_tools may be useful. Otherwise, with the option is better.

@jmchilton
Copy link
Member

I would just run it with the option always on jenkins.

Also, @erasche - @martenson and I setup docker and gave Jenkins access this morning.

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

4 participants