Commit Graph
368 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
Dannon Baker 6e6845b498 Merge pull request #4534 from jmchilton/collection_import_export_test_case
Refactor history import/export tests to allow collection testing.
2017-09-05 08:59:04 -04:00
Martin Cech 9b4cd096e1 Merge pull request #4505 from jmchilton/composite_upload_refine
Tests and clarifications for composite uploads.
2017-09-04 21:02:40 -04:00
John Chilton 3d9809a50d Merge pull request #4512 from martenson/improving-datalibraries
A round of data libraries improvements.
2017-09-04 00:21:51 -04:00
John Chilton cfefeebdd7 Refactor history import/export tests to allow collection testing (not yet implemented).
xref #4345, #4532
2017-08-31 13:15:55 -04:00
John Chilton 5a7a15d161 Test and clarifications for composite uploads.
- Add an API test for datatype-defined composite uploads - including exercising newline conversion and the space_to_tab parameter.
- Add a test decorator skip_without_datatype to mirror skip_without_tool for this test, improve both decorators.
- The ftype parameter in the composite test tools does nothing - drop it and drop it from the XSD spec.
- Slightly improve the documentation for these composite_data elements in the XSD.
2017-08-31 12:47:40 -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
Martin Cech f79eba25b5 fix small regressions and add tests for the new API 2017-08-30 15:25:00 -04:00
John Chilton 5ab28634ca Prevent transient job state test failures from failing the build.
A precondition to the real meat of the test is failing to be met sometimes in production - this failure is indicating a problem with the test and not with Galaxy. I previously tried to address this with https://github.com/galaxyproject/galaxy/pull/3988 but that didn't work. Now if the trainsient ok occurs the test will be skipped. Most of the time it won't skip and the rest of the test will execute and ensure there aren't regressions in behaviors related to cleaning up datasets after job completion. I'm placing the skips a couple different places so hopefully we can get a stack trace at somepoint - knowing where the code is when the job state is changing from running to ok will help puzzle out what is handing for the two minutes the job is running in the test framework.
2017-08-29 10:10:39 -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
Matt Chambers 9ef13a1c72 Remove (imported from API) suffix from test 2017-08-16 10:03:41 -05:00
Marius van den Beek 8e192dbf4c Merge pull request #4397 from jmchilton/api_test_enhancement
Better Error Summaries for API Tests
2017-08-14 12:22:34 +02: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
John Chilton 67f9e34f53 Implement test lib history context. 2017-08-08 23:18:08 -04:00
mvdbeek 35c0a47703 Add test API test for default_identifier_source 2017-08-02 18:24:03 +02:00
John Chilton 422add1c48 Fix problem in collection download tests related to ID references.
DatasetsCollectionElement ids were being confused with HDA ids.
2017-07-05 14:20:47 -04:00
John Chilton 7467bcf101 More reporting in new transiently failing collection download test. 2017-06-06 11:42:14 -04:00
mvdbeek 7527609e60 Set assert_ok to true when wiaiting for datasets to become ready 2017-05-23 12:20:43 +02:00
mvdbeek 9db1cc455d Fix the API tests for collection downloads
by waiting for the datasets to become ready.
2017-05-22 22:32:28 +02:00
mvdbeek 3084e192cb Add API route for downloading entire collections
Entire collections can now be downloaded as tarballs. I have used the
StreamBall class from galaxy.utils, so archives start downloading
immediately.

The collection structure is mapped onto a directory struture, where each
level of a collection is a directory in the archive.  Collections of BAM
files are included alongside their .bai indices, and composite datatype
are supported as well.

API tests for downloading list, paired and list:paired collections are
included.

Currently collection elements that are not in the OK status will be
skipped, so we should probably hide the download button if not all
collection elements are in a final state.
2017-05-22 22:32:27 +02: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
Martin Cech ffed281c33 Merge pull request #3988 from jmchilton/job_test_timing_improvements
Attempted fix for transiently failing API test_jobs introduced in #3619.
2017-04-30 12:14:11 -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 b12b951e91 Attempted fix for transiently failing API test_jobs introduced in #3619.
A couple things need to occur while the jobs are "running" and it seems that 60 seconds wasn't enough time to sleep for all that to happen on Jenkins.
 I checked the timing in the raw logs (they are for some reasons being filtered out in the Jenkins display of the XUnit) - and indeed the jobs are properly sleeping the correct amount of time but the client API calls need some more time it seems. My initial thought was maybe the jobs were being interrupted or something - and that does not appear to be the case.
2017-04-27 15:41:12 -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
Nicola Soranzo 41a88de752 Merge branch 'release_17.01' into dev
Conflicts:
	static/scripts/bundled/analysis.bundled.js
	static/scripts/bundled/analysis.bundled.js.map
	static/scripts/bundled/libs.bundled.js
	static/scripts/bundled/libs.bundled.js.map
2017-04-04 15:07:31 +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
John Chilton 1e70211fa4 Touch up #3559 based on post-merge discussions. 2017-04-03 12:35:57 -04:00
John Chilton 5b46c431b4 Fix certain aspects of dataset reductions in conditionals/repeats.
For instance, fixes #3859 restoring the correct ``element_identifier`` for reduces collections in conditionals. Add tests for combinations of repeats and conditionals.
2017-04-03 12:19:18 -04:00
John Chilton 5dcc0ed043 Clean up old TODO into history tests.
We upgraded the module a long time ago now that was referenced in the Trello card.
2017-03-31 14:46:37 -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
Martin Cech 810a96caef Merge branch 'dev' into collection_builder_enhancements 2017-03-27 17:11:42 -04:00
Martin Cech 967d0b6c0a Merge pull request #3619 from jmchilton/purge_jobs_rework
Improve interaction between job state and purged datasets.
2017-03-27 16:49:54 -04:00
John Chilton c9d06aeb41 Allow collection creation API to hide original datasets during creation. 2017-03-24 10:06:43 -04:00
Martin Cech b82d7311c1 Merge pull request #3786 from jmchilton/zip_edit
Fix collection operations not having a history.
2017-03-23 14:56:24 -04:00
John Chilton 79b26d2273 Fix collection operations not having a history.
Fixes #3437.
2017-03-21 14:54:26 -04:00
Martin Cech 234361253a Merge branch 'dev' into add_hdca_to_library 2017-03-21 11:47:47 -04:00