Commit Graph
136 Commits
Author SHA1 Message Date
John Chilton 7efe561867 Rework invocation state tracking in API tests.
At the insistence of @nsoranzo, be more explicit about waiting for workflow test in API tests. While I was in there I also setup new abstractions for waiting on state and updated various workflow cancelling tests to use test_history context for better error reporting.
2017-09-11 16:08:29 -04:00
John Chilton 5da62ca264 Cancel workflow invocations when histories are deleted.
With test case, rebased with spelling fixes thanks to @nsoranzo.

xref #3555 (third point)
2017-09-11 16:07:37 -04:00
John Chilton 5142509f13 Make a couple workflow invocation tests more robust.
Less random sleeping, wait for actual invocation. I think this is likely the cause this transient failure (https://jenkins.galaxyproject.org/job/docker-api/8215/testReport/junit/api.test_workflows/WorkflowsApiTestCase/test_workflow_run_output_collection_mapping/) picking up the input as the last dataset in the history instead of the output - I bet the workflow just hadn't been invoked yet.
2017-08-31 09:07:03 -04:00
mvdbeek 0a4203ed92 Fix test to use invocation_id instead of history_id 2017-08-19 14:45:58 +02:00
mvdbeek 912da2f3b9 Fix checking WorkflowInvocation for published workflows 2017-08-19 14:45:58 +02:00
Nicola Soranzo 03df496540 Fix API tests broken in #4434 2017-08-17 13:44:51 +01:00
Nicola Soranzo a353b2e88f Fix E127 errors introduced by previous commit
using:
```
autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E127 .
```
2017-08-17 11:35:39 +01:00
Nicola Soranzo 21b44bf348 Fix all E201 and E202 style errors
using the following command:
```
autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E201,E202 .
```
2017-08-17 11:35:39 +01:00
Matt Chambers 03a3d34f1e Remove (imported from API) suffix from test 2017-08-16 10:05:04 -05:00
John Chilton 7dd3ddccaf Require admin for new import_tools function in workflows API.
Includes test case.
2017-08-10 13:29:44 -04:00
Dannon Baker 8acea34450 Merge pull request #3983 from jmchilton/collection_rename
Add test case clarifying datasets do get "renamed" by rename PJA in collections.
2017-05-08 18:04:00 -04:00
John Chilton 8b21e65196 Improve implicit workflow connection test case.
I think https://jenkins.galaxyproject.org/job/docker-api/7316/testReport/junit/api.test_workflows/WorkflowsApiTestCase/test_run_with_implicit_connection/ may be the first time I have seen it fail - but still it has some other problems.

- Eliminate the sleep - instead wait on explicitly on the desired condition (first two jobs are complete and the workflow is ready for unpause). This is likely why the test case failed.
- Improve the other assertions to provide more details in the test case ever fails again.
2017-04-28 09:01:00 -04:00
John Chilton 614d032f12 Add test case clarifying datasets do get "renamed" by rename PJA in collections.
xref #1675

This is of limited utility since we don't really expose the name - and intentionally so. Related open bugs/enhancements that still need to be addressed are:

 - Applying rename to the collection (in addition to the elements) - #1680.
 - Download of collection elements with element identifier instead of the name: #2023 / #2140.
2017-04-27 09:17:23 -04:00
Nicola Soranzo d398c90dbd Merge branch 'release_17.01' into dev
Conflicts:
	static/maps/mvc/ui/ui-select-content.js.map
	static/scripts/bundled/analysis.bundled.js
	static/scripts/bundled/analysis.bundled.js.map
	static/scripts/bundled/libs.bundled.js.map
	static/scripts/mvc/ui/ui-select-content.js
2017-04-26 19:05:28 +01:00
John Chilton 8e0be5089c [17.01] Fix collection operations in workflows.
Due to a couple bugs things weren't being delayed correctly for some of these tools in some workflows.
2017-04-03 14:50:05 -04:00
Dannon Baker ad2e6473bc Merge remote-tracking branch 'upstream/release_17.01' into dev 2017-03-31 08:38:40 -07:00
Dannon Baker bf6b65f005 Merge pull request #3830 from jmchilton/1701_order_collection_invocation_processing
[17.01] Order processing evaluation of workflow invocations when scheduling.
2017-03-31 08:38:23 -07:00
Dannon Baker 200e475bc7 Merge pull request #3849 from jmchilton/improved_scheduling_delay_logging
Log reason when workflow scheduling of a step is delayed.
2017-03-30 15:29:40 -07:00
Dannon Baker 94c357f608 Merge branch 'release_17.01' into dev 2017-03-30 13:44:42 -07:00
John Chilton 185aa3968b Log when workflow scheduling is delayed about why.
Currently the logs contain fairly uninformative step delayed messages that don't allow admins to understand why parts of the workflow are being delayed during scheduling.

Here are some examples of before and after.

When running the test:

```
./run_tests.sh -api test/api/test_workflows.py:WorkflowsApiTestCase.test_workflow_pause
```

Before these lines would show up:

```
galaxy.workflow.run DEBUG 2017-03-30 09:23:47,327 Workflow step 2 of invocation 1 invoked (174.149 ms)
galaxy.workflow.run DEBUG 2017-03-30 09:23:47,347 Workflow step 3 of invocation 1 invoked (19.355 ms)
galaxy.workflow.run DEBUG 2017-03-30 09:23:47,364 Workflow step 4 of invocation 1 delayed (16.262 ms)
```

Now these same lines are as follows:

```
galaxy.workflow.run DEBUG 2017-03-30 09:19:28,601 Workflow step 2 of invocation 1 invoked (172.849 ms)
galaxy.workflow.run DEBUG 2017-03-30 09:19:28,619 Marking step 3 outputs delayed (executing pause step)
galaxy.workflow.run DEBUG 2017-03-30 09:19:28,620 Workflow step 3 of invocation 1 invoked (17.999 ms)
galaxy.workflow.run DEBUG 2017-03-30 09:19:28,633 Workflow step 4 of invocation 1 delayed (dependent step [3] delayed, so this step must be delayed) (13.398 ms)
```

Also, when running the test:

```
./run_tests.sh -api test/api/test_workflows.py:WorkflowsApiTestCase.test_workflow_run_dynamic_output_collections_3
```

Before these lines would be printed:

```
galaxy.workflow.run DEBUG 2017-03-30 09:25:35,910 Workflow step 4 of invocation 1 invoked (281.479 ms)
galaxy.workflow.run DEBUG 2017-03-30 09:25:35,937 Workflow step 5 of invocation 1 delayed (25.904 ms)
galaxy.workflow.run DEBUG 2017-03-30 09:25:35,970 Workflow step 6 of invocation 1 delayed (32.597 ms)
```

Now these same lines are as follows:

```
galaxy.workflow.run DEBUG 2017-03-30 09:27:54,270 Workflow step 4 of invocation 1 invoked (295.826 ms)
galaxy.workflow.run DEBUG 2017-03-30 09:27:54,315 Workflow step 5 of invocation 1 delayed (dependent collection [1] not yet populated with datasets) (44.581 ms)
galaxy.workflow.run DEBUG 2017-03-30 09:27:54,326 Workflow step 6 of invocation 1 delayed (dependent step [5] delayed, so this step must be delayed) (10.804 ms)
```

When running workflows with steps that depend explicitly on other steps (instead of implicitly between dataset connections), lines such as:

```
galaxy.workflow.run DEBUG 2017-03-30 09:33:52,966 Marking step 3 outputs delayed (workflow paused at this step waiting for review)
galaxy.workflow.run DEBUG 2017-03-30 09:33:53,001 Workflow step 4 of invocation 1 delayed (dependent step [3] delayed, so this step must be delayed) (0.157 ms)
galaxy.workflow.run DEBUG 2017-03-30 09:33:53,001 Workflow step 5 of invocation 1 delayed (depends on step [4] but that step has not been invoked yet) (0.084 ms)
```

and

```
galaxy.workflow.run DEBUG 2017-03-30 09:33:57,090 Workflow step 5 of invocation 1 delayed (depends on step [4] but one or more jobs created from that step have not finished yet) (0.144 ms)
```

now may appear.
2017-03-30 12:58:45 -04:00
John Chilton 4beb98e973 [17.01] By default, do not allow workflow invocations to schedule indefinitely.
Give up after a month but allow admins to reduce this amount as well.
2017-03-29 22:19:13 -04:00
John Chilton 5d3250fac0 [17.01] Order processing evaluation of workflow invocations when scheduling.
xref https://github.com/galaxyproject/galaxy/pull/3820#issuecomment-289725795

Also optimize the query to just pull out workflow invocation IDs per the suggestion of @nsoranzo [here](https://github.com/galaxyproject/galaxy/pull/3830#pullrequestreview-29473700).
2017-03-28 13:31:07 -04:00
John Chilton 075d53af92 Fix for transiently failing workflow test.
The history can be complete before a workflow has fully scheduled if the workflow still has more jobs to schedule but all the current ones are complete.
2017-02-24 15:17:54 -05:00
guerler 84d9e171bc Merge branch 'fix_workflow_issues' of https://github.com/guerler/galaxy into fix_workflow_issues 2017-01-14 18:07:32 -05:00
John Chilton d1eeafcc8f Test case d1cf0def31. 2017-01-09 15:20:34 -05:00
guerler 48ba525eb5 Merge branch 'dev' into fix_workflow_issues 2017-01-08 12:36:53 -05:00
John Chilton de35c85b65 Refactor API helpers for re-use in rest of test framework.
- Move api.helpers to base.populators.
- Refactor helper subclasses adapted to use bioblend instead of test framework stuff into base.populators for greater visibility.
- Refactor workflow format 2 testing stuff for reuse by Selenium.
2017-01-08 08:13:42 -05:00
John Chilton a18b24e067 Allow rename PJA to target input collections.
Implements #2346 w/test case.
2017-01-05 09:06:19 -05:00
John Chilton d9ffbc433e Test cases for renaming datasets based on tool input datasets.
Includes test cases for #3197 and #662.
2017-01-05 09:06:19 -05:00
guerler 084b9432a6 Fix export test case 2016-12-29 15:09:52 -05:00
guerler f745ee3558 Remove tool errors from export assertion test, use unified state for all modules 2016-12-08 15:53:27 -05:00
Nicola Soranzo 1d17a29c79 Fixes for pycodestyle 2.2.0 2016-11-15 16:56:50 +00:00
Nicola Soranzo 1e32c0926c Fix import order and Python3 compatibility for most of test/ 2016-10-10 19:06:22 +01:00
guerler 4d871fa734 Check both invocation orders when using the new batch mode feature 2016-10-04 06:16:26 -04:00
guerler c2f1b635cc Rely on deterministic invocations order in batch mode test case 2016-10-03 17:47:08 -04:00
John Chilton b106c48b68 Unify build_workflow_run_configs for API and UI approaches to running workflows.
No more branches - the method runs top to bottom for each approach. One loop for batching regardless and completely available to all API options. Only call WorkflowRunConfig in one place. Remove duplicate fetching of replacement_params. One call to _normalize_step_parameters.
2016-09-30 22:54:06 -04:00
guerler c67e4ac1a3 Test case 2016-09-30 18:35:03 -04:00
guerler 70df25e74b Rename test associated workflow export 2016-09-30 13:29:29 -04:00
guerler 67eb2c6530 Use parameters/batch instead of input_params 2016-09-30 13:17:51 -04:00
guerler e14fe50643 Use order_index instead of step_id 2016-09-30 00:08:38 -04:00
guerler 6f7e9cd5df Use hid from hda 2016-09-29 04:11:00 -04:00
guerler 3545a0ef1f Remove unused history wait 2016-09-29 03:25:31 -04:00
guerler 3d7bfeb6dd Revise target url 2016-09-29 02:26:29 -04:00
guerler 477d3f9ae9 Add batch mode test case for invocations api 2016-09-27 15:59:42 -04:00
John Chilton 54b8ae00db Rework test case that fails occasionally on Jenkins.
Should be a little more robust now.
2016-07-20 12:08:18 -04:00
John Chilton 30fd1e0e64 Test case for dynamically creating list:list:lists.
This could check the outputs ideally, but it was failing to simply execute the workflow so this does serve as check that some bugs are fixed.
2016-07-19 16:20:09 -04:00
Nicola Soranzo 40f85f2913 Python3: add missing print_function imports 2016-06-27 12:41:40 -04:00
Nicola Soranzo cd13423953 Python3: small fixes to previous commits 2016-06-26 02:43:57 -04:00
Junzhou Wang 7d7396f18f Python3: test/api/ 2016-06-25 17:31:20 -04:00
John Chilton 6ddb2c2a6a Implement framework for model tools.
This special class of tools leverages the infrastructure for tool inputs, tool state tracking, tool module for workflows, tool API, etc... without actually producing command-line jobs. Instead these tools are provided the input model objects and are expected to produce output model objects directly. This provides an oppertunity to copy HDAs without copying the underlying datasets.

The first driving use case for these tools are also included - namely tools that allow zipping and unzipping paired collections. These tools can be mapped over lists (e.g. list:paired to (list, list) or the inverse) using much of the existing infrastructure for tools. Test cases included that validate these work with mapping operations and in workflows.

The most obvious advantage of these versus traditional tools that do the same thing is that the data isn't copied on disk - new HDAs are created directly from the source datasets.

Testing:

This PR includes various API test cases for functionality, these can be run with the following command:

```
./run_tests.sh -api test/api/test_tools.py:ToolsTestCase.test_unzip_collection
./run_tests.sh -api test/api/test_tools.py:ToolsTestCase.test_zip_inputs
./run_tests.sh -api test/api/test_tools.py:ToolsTestCase.test_zip_list_inputs
./run_tests.sh -api test/api/test_workflows.py:WorkflowsApiTestCase.test_workflow_run_zip_collections
```
2016-06-10 13:34:18 -04:00