Commit Graph
31455 Commits
Author SHA1 Message Date
John Chilton 40fd72a198 Allow rescheduling of single workflow steps.
Implement maximum_workflow_jobs_per_scheduling_iteration to test this and mitigate memory issues associated with scheduling large workflow steps (maybe).

Fixes #3883.
2017-11-30 10:02:02 -05:00
John Chilton 78babab645 Pre-build collections during mapping to be more recoverable.
Create mapped over collections ahead of time instead of at the end only if they are valid.

- This way if there is a problem that problem can be reported in the state of the mapped collection.
- This way datasets can just be hidden instead of displayed and then hidden (fixes #1790).
- I think this should improve performance and prevent locks because we no longer have conflicting threads trying to write dataset state.
- We populate the collection as we go so we can recover and continue scheduling the mapped step (needed for #3883)
2017-11-30 10:02:02 -05:00
John Chilton 53cba4aa74 Refactor collection manager into smaller, more focused methods.
Stronger assertions to verify arguments are correct.
2017-11-30 10:02:02 -05:00
John Chilton 9e471d3e97 Allow mapping over empty collections.
If one maps a tool over an empty collection, one should get an empty output collection for each of the tool's outputs.

This should have always been a valid operation I think, the code just wasn't quite structured right when the collection work was merged - there were too many places I was assuming the existence of at least one actual output or input that was mapped over to continue going. This reworks all of that and seems to handle empty collections appropriately.

Fixes #4025 (not being informing the user of the operation, but actually by allowing the operation - which it should be allowed I think).
2017-11-30 10:02:02 -05:00
John Chilton 0185e04a5b Test recover_mapping in conjunction with subworkflow executions. 2017-11-30 10:02:02 -05:00
John Chilton 64835c1e72 Three new worklfow test cases to verify mapping over workflows is possible.
- Simple mapping over an input dataset.
- Mapping that produces nested collections.
- Mapping over subworkflows.
2017-11-30 10:02:02 -05:00
John Chilton d5f98f4904 Formalize workflow invocation and invocation step outputs.
Workflow Invocations
--------------------

The workflow invocation outputs half of this is relatively straight forward. It is modelled somewhat on job outputs, output datasets and output dataset collections are now tracked for each workflow invocation and exposed via the workflow invocation API. This required adding new tables (linked to WorkflowInvocations and WorkflowOutputs) that track these output associations.

Previously one could imagine backtracking this information for simple tool steps via the WorkflowInvocationStep -> Job table, but for steps that have many jobs (i.e. mapping over a collection) or for non-tool steps such information was more difficult to recover (and simply couldn't be recovered from the API at all or even internally without significant knowledge of the underlying workflow).

Workflow Invocation Steps
-------------------------

Tracking the outputs of WorkflowInvocationSteps was not previously done at all, one would have to follow the Job table as well. A signficant downside to this is that one cannot map over empty collections in a workflow - since no such job would exist. Tracking job outputs for WorkflowInvocationSteps is not a simple matter of just attaching outputs to an existing table because we had no concept of a workflow step tracked - since there could be many WorklfowInvocationSteps corresponding to the same combination of WorkflowInvocation and WorkflowStep. That should feel wrong and that is because it is - when collections were added the possiblity of having many jobs for the same combination of WorkflowInvocation and WorkflowStep was added. I should have split WorkflowInvocationSteps into WorkflowInvocationSteps and WorkflowInvocationStepJobAssociations at that time but didn't. This commit now does it - effectively normalizing the ``workflow_invocation_step`` table by introducing the new ``workflow_invocation_step_job_association`` table.

Splitting up the WorkflowInvocationStep table this way allows recovering the mapped over output (e.g. the implicitly created collection from all the jobs) as well the outputs from the individual jobs (by walking WorkflowInvocationStep -> WorkflowInvocationStepJobAssociation -> Job -> JobToOutput*Association).

This split up involves failrly substantial changes to the workflow module interface. Any place a list of WorkflowInvocationSteps was assumed, I reworked it to just expect a single WorkflowInvocationStep. I vastly simplified recover_mapping to just use the persisted outputs (this was needed in order to also implment empty collection mapping in workflows). This also fixes a bug (or implements a missing feature) where Subworkflow moudles had no recover_mapping methods - so for instance if a tool that produces dynamic collections appeared anywhere in a workflow after a subworkflow step - that workflow would not complete scheduling properly.

Now that we have a way to reference the set of jobs corresponding to a workflow step within an invocation, we can start to track partial scheduling of such steps. This is outlined in https://github.com/galaxyproject/galaxy/issues/3883 and refactoring toward this goal is included here - including adding a state to WorkflowInvocationStep so Galaxy can determine if it has started scheduling this step and an index when scheduling jobs so it can tell how far into a scheduling things have gone as well as augmenting the tool executor to take a maximum number of jobs to execute and allow recovery of existing jobs for collection building purposes.

*Applications*

These changes will enable:

- A simple, consistent API for finding workflow outputs that can be consumed by Planemo for testing workflows.
- Mapping over empty collections in workflows.
- Re-scheduling workflow invocations that include subworkflow steps.
- Partial scheduling within steps requiring a large number of jobs when scheduling workflow invocations.
2017-11-30 10:02:01 -05:00
John Chilton 55aa7bce55 Test cases for mapping for outputs with filter statements.
Checked through tools-iuc and I couldn't find any tools that use the actual input data parameters in filter statements so I think it is a fairly good approximation to assume that all mapped jobs will either filter or not at least with current execution model.
2017-11-30 10:02:01 -05:00
John Chilton c076b3b6c5 Refactor workflow testing toward reuse via "populators".
Should allow more functionality to be shared between vanilla API tests and integration tests for various workflow scheduling options.
2017-11-30 10:02:01 -05:00
John Chilton 8c1658f61a Mixin for uses create and update time. 2017-11-30 10:02:01 -05:00
John Chilton 0e0894bbba Refactoring history contents API. 2017-11-30 10:02:01 -05:00
John Chilton 4e9ee22ebc More verbose workflow extraction test cases. 2017-11-30 10:02:01 -05:00
John Chilton 0ff639a29c More debugging in workflows API tests. 2017-11-30 10:02:01 -05:00
Martin Cech 711107473f Merge pull request #5092 from dannon/vue_component_standardized_naming
Vue component standardized naming
2017-11-30 09:28:47 -05:00
Marius van den Beek 3e7973940a Merge pull request #5098 from jmchilton/reload_dm_test_robust
Attempt to make data manager integration test more robust.
2017-11-30 15:06:53 +01:00
John Chilton 3c20f3285a Attempt to make data manager integration test more robust.
Increase the timeout - this test fails on Jenkins every now and then and reports the DM job is still queued. I assume this is because of conda_auto_install setting up the requirements for this data manager and the logs seem consistent with that assumption.

I also added data manager json type to the sample so this warning goes away:

```
galaxy.model WARNING 2017-11-30 06:39:59,335 Datatype class not found for extension 'data_manager_json'
```
2017-11-30 06:41:12 -05:00
Dannon Baker 79b9795f7d Build client. 2017-11-29 13:25:31 -05:00
Dannon Baker 15053783bf Case insensitive filesystems are a terrible idea. 2017-11-29 13:24:15 -05:00
Dannon Baker d074b22f29 Standard naming for components. TODO: organization, and re-add citations (working around case-insensitivity here) 2017-11-29 13:23:51 -05:00
Dannon Baker baba3417d0 Merge pull request #5056 from erasche/sentry-stuff
Support separate DSN for job sentry error reports
2017-11-29 07:55:49 -05:00
Marius van den Beek 75a6d434ee Merge pull request #4993 from guerler/replace_history_import
Replace history import form
2017-11-29 13:25:58 +01:00
John Chilton 8d7f344140 Merge pull request #5062 from nsoranzo/remove_wchartype_dep
Remove wchartype dependency and is_multi_byte [1/2]
2017-11-28 15:54:00 -05:00
guerler 081cbc4bb0 Add quotes 2017-11-28 13:11:12 -05:00
Nicola Soranzo 59f44cf2be Update get_fileobj() to use utf-8 encoding in text mode
Also, merge its 3 parameters `gzip_only`, `bz2_only`, `zip_only` into
`compressed_formats` (a list of allowed formats).

As a consequence of the changes in `get_fileobj()`, update:
- `files_diff()`
- `get_file_peek()`, which now determines that a file is binary when a
  `UnicodeDecodeError` exception is raised and doesn't need
  `is_multi_byte` any more
- `iter_headers()` and `get_headers()`, which now return Unicode and don't
  need `is_multi_byte` parameter any more

As a consequence of the changes in `get_file_peek()`, update:
- `set_peek()`, which now doesn't need `is_multi_byte` any more

As a consequence of the changes in `get_headers()`, update:
- `guess_ext` and `is_column_based()`, which now determine that a file is
  binary when a `UnicodeDecodeError` exception is raised and don't need
  `is_multi_byte` any more

As a consequence of the changes to `guess_ext`, update:
- `handle_uploaded_dataset_file() doesn't need `is_multi_byte` any more

Also, remove duplicated calls to `get_file_peek()` in
lib/galaxy/datatypes/molecules.py and lib/galaxy/datatypes/msa.py

The `is_multi_byte` was not removed from the signature of `get_file_peek()`
and `set_peek()` in order to preserve compatibility for ToolShed datatypes,
thanks @jmchilton for the review.
2017-11-28 17:46:32 +00:00
guerler 9800013ec2 Switch to transparent readmode for history tarfiles 2017-11-28 12:36:30 -05:00
Nicola Soranzo 6b730ae961 Add a datatype to sniff_order only if it has a sniff() method
This reduces the number of default sniffers from 412 to 246.
2017-11-28 17:17:44 +00:00
Nicola Soranzo 5a2cb85469 Fix SnpSiftDbNSFP.generate_primary_file() to return a string
Also use a `with` statement to open/close a file in
`SnpSiftDbNSFP.regenerate_primary_file()` .
2017-11-28 17:17:43 +00:00
Nicola Soranzo 4a19bf62e3 Add missing newline at end of some test files
It gets added anyway when the file is uploaded to Galaxy due to the
default "Use POSIX standard" (to_posix_lines) option. Many tests which
simply copy them with cat and compare them would fail a strict diff test.
2017-11-28 17:13:18 +00:00
Nicola Soranzo 0df99d89d7 Improve and test the PDF sniffer
Read just the first 4 bytes in binary mode.
2017-11-28 17:13:18 +00:00
Nicola Soranzo 1ba863d4d6 Remove duplicated functions
Added in commits 777d6a155c and
917d5a72e8
2017-11-28 17:13:18 +00:00
Nicola Soranzo c4a2d8c218 Fix html sniffer to not return True in case of exception 2017-11-28 17:13:18 +00:00
guerler fa661bf7b0 Merge branch 'dev' into replace_history_import 2017-11-28 11:46:33 -05:00
guerler 1785f6314d Fix inline, remove unused message div 2017-11-28 11:34:21 -05:00
guerler 3c3b47e8ef Restore history vue component 2017-11-28 11:32:11 -05:00
John Chilton 68795e415c Merge pull request #5027 from guerler/edit_info
Metadata parameters rely on their own optional setting not on the field attribute
2017-11-28 09:29:47 -05:00
John Chilton fac65894d3 Merge pull request #5078 from mvdbeek/fail_if_job_output_collection_fails
Fail job if job output collection fails
2017-11-28 08:54:55 -05:00
John Chilton c6c55e1046 Merge pull request #4475 from natefoo/job-handler-mules
Run Galaxy fully under uWSGI, including job handlers
2017-11-28 08:51:00 -05:00
mvdbeek f58ef13616 Fix import by url for history archive import tool 2017-11-28 14:37:36 +01:00
mvdbeek 13f6eeecf0 Add new runner state for 'Job output not returned from cluster'
This would allow adimns to write resubmit conditions for this specific failure.
2017-11-28 12:52:48 +01:00
mvdbeek cacd6eadc5 Mark job wrapper as failed in a more direct way 2017-11-28 10:44:05 +01:00
mvdbeek 73454e12df Fix undefined exit_code_str problem (thx @nsoranzo) 2017-11-27 17:54:25 +01:00
Martin Cech d82933d410 Merge pull request #5066 from jmchilton/qunit_improvements
Improved Karma configuration and options.
2017-11-26 23:18:11 -05:00
Martin Cech 52eb970d18 Merge pull request #5063 from jmchilton/reenable_qunit
Re-enable qunit testing.
2017-11-25 13:36:43 -05:00
Aysam Guerler 3303fab75b Restore admin form routes (#5065) 2017-11-24 20:49:32 +01:00
guerler 78508e200a Merge branch 'dev' into replace_history_import 2017-11-24 11:32:55 -05:00
John Chilton e03ea6d781 Merge pull request #4996 from guerler/remove_unused_workflow_endpoint
Revise workflow create form, remove unused rename endpoint
2017-11-24 11:26:35 -05:00
John Chilton d868ffd08b Improved qunit testing options.
- Speed up qunit testing but not re-building production bundles that aren't used anyway.
- Add a watch option for qunit.
- Add option to speed up running all tests by building tests as single bundle instead of many bundles. (May be future default for ``make client-test``.)

This is as close as I think we are going to get to closing #4843.
2017-11-24 10:01:56 -05:00
Eric Rasche 5c6e4a5c77 Merge pull request #4894 from mtekman/linkage
Add Classical linkage and haplotype datatypes
2017-11-24 12:51:52 +00:00
John Chilton f2b6af6ef9 Guess we need to build full client before webpack for qunit? 2017-11-24 07:33:13 -05:00
Mehmet Tekman 0ce67da13c enumerated lines, removed eof_res, header_check 2017-11-24 11:18:51 +01:00