Commit Graph
811 Commits
Author SHA1 Message Date
John Chilton 7120739230 [18.01] Fix missing job stdout/stderr on Pulsar transfer failures.
Shouldn't break backward compatiblity at all without it - but to get the outputs Pulsar requires an update (https://github.com/galaxyproject/pulsar/pull/159) as well.
2018-02-14 11:30:03 -05:00
Evgeny Anatskiy 6070bf07e1 simplify Webhooks' structure 2018-02-01 12:18:01 -05:00
John Chilton 73fe9bf827 Fix framework tests.
Broken while framework tests were misconfigured. Thanks for @nsoranzo for tracking down the problem.
2018-01-31 12:00:38 -05:00
mvdbeek eb506b25b9 Allow map-over when discovering dataset collections
This would affect for example the mapping over of fastq-dump (and all other
tools in the sra-toolkit).

If one had attempted this previously the discovery phase would fail with:
```
galaxy.tools.parameters.output_collect ERROR 2018-01-30 08:56:46,369 Problem gathering output collection.
Traceback (most recent call last):
  File "/bioinfo/guests/mvandenb/galaxy/lib/galaxy/tools/parameters/output_collect.py", line 169, in collect_dynamic_collections
    collection
  File "/bioinfo/guests/mvandenb/galaxy/lib/galaxy/managers/collections.py", line 216, in collection_builder_for
    return builder.BoundCollectionBuilder(dataset_collection, collection_type_description)
  File "/bioinfo/guests/mvandenb/galaxy/lib/galaxy/dataset_collections/builder.py", line 84, in __init__
    raise Exception("Cannot reset elements of an already populated dataset collection.")
Exception: Cannot reset elements of an already populated dataset collection.
```

Instead we force the collection state to be new when we are discovering output collection datasets,
which seems reasonable to me. This includes an API testcase that would have failed previously.
2018-01-30 14:48:42 +01:00
mvdbeek 7d15049c48 Fix bam conversion test tool
Starting with 16344a6 we attempt to set metadata also for files that have no
content. BAM files need to contain at least a header. To avoid failing tests we
only create the appropriate output based on the input.
2018-01-19 20:16:26 +01:00
Nate Coraor 080148a161 Merge pull request #5193 from jmchilton/structured_job_environment_1
Improved home and temp directory handling.
2018-01-19 11:33:26 -05:00
Marius van den Beek 8f65cd46b0 Merge pull request #5180 from bgruening/bam_unsorted
Add BamNative datatype
2018-01-19 16:37:36 +01:00
mvdbeek 680bf685c2 Fix datatype order 2018-01-17 18:11:31 +01:00
Martin Cech b91d8e1398 Merge pull request #5240 from gvlproject/discover_datasets_recursive
Added support for recursively discovering output datasets
2018-01-17 10:37:47 -05:00
Björn Grüning ae0c3524b8 Merge branch 'dev' into bam_unsorted 2018-01-15 12:57:56 +01:00
mvdbeek a36ebe3552 Enhance tests for sam_to_bam conversion
This demonstrates that the `sam_to_bam` converter will be used for an input
with `format="bam"`, and not `sam_to_bam_native`.
2018-01-13 14:17:59 +01:00
mvdbeek 49dd02f409 Keep header when converting sam to bam
Otherwise the converted datasets are not valid BAM files.
2018-01-11 14:13:02 +01:00
John Chilton 4bf47d0877 Improved home and temp directory handling.
Home Directory Handling
-----------------------

- For profile < 18.01 tools:
  - If use_shared_home="false" is set on the command block - the tool will be given a clean $HOME directory.
  - If ``shared_home_dir`` is set in Galaxy's config or the job destination configuration, Galaxy will set $HOME in the tool's job environment to point at this directory.
- For profile >= 18.01 tools, jobs will be given a clean home directory by default unless ``use_shared_home="true"`` is set. If that is set, the profile < 18.01 behavior is used.

In addition to these changes for Galaxy tools, the tool framework itself has been updated to allow other potential behaviors including the CWL defaults.

Integration tests for each of these cases has been added.

Upgrading to 18.01 - we recommend dropping overriding ``HOME`` in any Galaxy environment configuration (e.g. env directives in job_conf.xml). If any such configuration is found, we recommend instead setting "shared_home_dir" for destinations to the that cluster destination's shared HOME directory. If all destinations share a single HOME directory, this can be set in galaxy.ini instead of job_conf.xml.

Temp Directory Handling
-----------------------

There were serious disagreements with how to proceed here. I felt we should aggressively isolate tool TMP directories and provide deployers options to tweak these through structured arguments. Nicola felt we should defer to the environment variables already being set job_conf.xml - but tweak their meanings by default. Nate fell somewhere in between. I think all sides have merit and could make sense depending on what you want to improve (easing cognative load, reducing out-of-box errors, easing advanced deployer configs, structured reasonsing of paths by Galaxy, etc...).

I've navigated a path here that doesn't particularly reduce out of the box errors as I wanted by setting up a per-job temp directory by default but does make it possible and shouldn't break any existing configurations and doesn't make it anything more difficult to manage these things via environment variables.

The new approach doesn't change any thing by default for Galaxy tools (regardless of tool profile version). The only way to achieve new behaviors is for the deployer to set a job_conf parameter called "tmp_dir". If this is set, it can be set to "True" (to default to a new, clean directory below the job directory) or to a shell expression to allow setting this dynamically at runtime to paths or paths beneath directories as needed on a per-destination basis. If a temp directory is set this way all three variables TMP, TMPDIR, and TEMP are set.

Docker Environment Handling
---------------------------

- Mirror the CWL behavior of mounting an external /tmp by default.
- For newer tools, pass through the HOME, TMP, TMPDIR, and TEMP environment variables into the Docker container in addition to GALAXY_SLOTS.
- Fix the pass through of environment variables into Docker containers.
2018-01-09 09:30:16 -05:00
John Chilton 8d8bf5eaff Dockerized job integration testing.
Add simple test cases for both mulled containers and explicit Docker image resolution.
2018-01-09 09:30:15 -05:00
mvdbeek 2b5b6cf74f Fix test and add datatypes to test/functional/tools/sample_datatypes_conf.xml
This test is still failing because `CONVERTER_sam_to_bam` will be invoked instead
of CONVERTER_sam_to_bam_native. Possibly becasue Bam inherits from BamNative, so
this isn't strictly speaking wrong, though not what one would expect.
2018-01-04 13:50:48 +02:00
Bjoern Gruening 295e5712ee adjust tests 2018-01-04 00:45:02 +01:00
John Chilton 75283c7b6c Merge pull request #4178 from zipho/neo_datatype
Neostore Zip datatype support
2018-01-02 13:33:27 -05:00
John Chilton 8e93c2e070 Merge pull request #5247 from mvdbeek/job_rerun_fixes
Fix and enhance job resume functionality
2017-12-31 08:14:46 -06:00
mvdbeek c0dbace7bb Replace collection elements with re-run output
This specifically addresses the problem where some jobs of a mapped-over
collection have failed. Instead of filtering the failed collection and
restarting the workflow at this position (involving a lot of copy-paste ...)
the user can now limit the rerun to the problematic jobs and the workflow
should resume from there.
Should fix https://github.com/galaxyproject/galaxy/issues/2235.

This is one possible implementation, it would also be feasible to not
manipulate the original collection, but to copy the HDCA and then to replace
collection elements and replace all references for jobs that depend on the HDCA,
as we do for HDAs. This implementation seems simpler, but let me know if you
see problems with this approach.
2017-12-31 14:08:26 +02:00
mvdbeek 9fdf0a6269 Add job resume test with HDCA input to paused dataset
I am slightly surprised that this worked without change,
but it appears that the remapping occurs via the HDAs that
the HDCA is composed of.
2017-12-31 14:08:26 +02:00
John Chilton f017de30bf Tool-centric annotation of out of memory errors.
- Update explicit stdio definitions as well as detect_errors-based definitions to allow this.
- Update runner code to allow resubmission in such cases.
2017-12-22 09:08:18 -05:00
Nuwan Goonasekera 8b76a5a698 Added support for recursively discovering output datasets 2017-12-21 22:59:50 +05:30
Nicola Soranzo 6f722861cf Python3: fix moved imports
Add `.ci/check_py3_compatibility.sh` script to find library modules
that have been moved in Python3. Fix errors found by the script.
2017-12-15 01:03:28 +00:00
John Chilton dc67206b21 Merge remote-tracking branch 'jmchilton/dev' into neo_datatype 2017-12-12 10:23:41 -05:00
Bjoern Gruening eea55a9258 add new test tool 2017-12-10 15:23:26 +01:00
Martin Cech fc18b504be Merge pull request #5108 from mvdbeek/merge_forward_17_09
Merge forward 17 09
2017-12-01 09:58:55 -05:00
mvdbeek 4dd05fc942 Merge branch 'release_17.09' into dev 2017-12-01 14:33:00 +01:00
Nicola Soranzo 48aca7dce8 Update to flake8-import-order 0.16 2017-12-01 11:09:57 +00:00
Dannon Baker 1385cf4f83 Merge remote-tracking branch 'jmchilton/citations' into dev 2017-11-30 15:09:56 -05:00
John Chilton ca09e803ae Dataset collection state UX test case. 2017-11-30 10:02:03 -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 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 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
John Chilton ca2eb5b2a5 Simple tool test for citations. 2017-11-24 15:25:19 -05:00
John Chilton a7c8edbaa4 Bug fix - expose proper element_identifier in tool action template expansions. (#5049)
xref https://github.com/galaxyproject/tools-iuc/commit/f57f1bf4816f212b83c08e0e3c3782ebba8b7d9a
2017-11-20 23:11:00 +01:00
Nate Coraor c270614fac Merge remote-tracking branch 'origin/dev' into job-handler-mules 2017-11-16 12:13:28 -05:00
Marius van den Beek a9685d3acd Merge pull request #5017 from jmchilton/test_renaming_multiple_workflows
Test renaming multiple different outputs in workflows.
2017-11-16 17:51:59 +01:00
John Chilton d3b5fac751 Test renaming multiple different outputs in workflows.
Attempting to exercise a bug reported by @lparsons.
2017-11-15 13:46:01 -05:00
Nate Coraor 418fd53739 Merge remote-tracking branch 'origin/dev' into job-handler-mules 2017-11-15 12:42:20 -05:00
Dannon Baker e27a16953d Merge pull request #4961 from jmchilton/job_delete_api
Add DELETE /api/jobs/<job_id> as a job cancellation API endpoint.
2017-11-15 08:12:19 -05:00
John Chilton cecef90915 Merge remote-tracking branch 'jmchilton/dev' into tdt_tests 2017-11-14 21:49:15 -05:00
John Chilton c52ebfca26 Improvements for tour generator Selenium tests.
- Replace test using Cut1 with two tests each using framework test tools loaded with Selenium tests by default.
- Create a symbolic link so that tour generator is configured with default test webhooks.
- Establish and use components and navigates_galaxy.py abstractions for tour generation and navigation.
- In one of the tool tests actually walk the tour (previously we only verified the initial tour popover).
2017-11-14 21:41:09 -05:00
Nicola Soranzo 2cd95c48f6 Fix import order everywhere
- Add flake8-import-order to flake8 Pipfile and remove py27-lint-imports
  and py27-lint-imports-include-list tox envs
- Fix most E201 and E202 errors reported by flake8-import-order v0.15,
  but pin flake8-import-order to v0.14.3 until
  https://github.com/PyCQA/flake8-import-order/issues/123
  is fixed

This let us drop 2 jobs on Travis per each job.
2017-11-14 19:42:39 +00:00
Nate Coraor 30266c5221 Merge remote-tracking branch 'origin/dev' into job-handler-mules 2017-11-09 13:11:46 -05:00
John Chilton 140a0a49d3 Add DELETE /api/jobs/<job_id> as a job cancellation API endpoint. 2017-11-08 15:54:15 -05:00
John Chilton 162bddd96c Simple tests for data source responses.
- Verify a simple data source works when responding via the API.
- Verify a data source sending back a file:// parameter is blocked (GX-2017-0004/GX-2017-0003 - it is tracked different ways in the commit message and in the security issue tracker).
2017-10-25 14:46:16 -04:00
Nicola Soranzo 9b4de72ca6 Fix all E722 errors and ignore E741
Introduced in flake8 3.5.0
Fix import order.
2017-10-24 11:29:09 +01:00
E Rasche 0f311470d9 Backport of hardening fixes to 17.09 2017-10-18 13:03:49 -04:00
John Chilton eab674173c MacOS X fix for a test tool. 2017-10-13 19:30:33 -04:00
John Chilton d65a060b06 Fix to respect galaxy.json supplied metadata for empty outputs.
With a test case to verify this and a empty datasets in general (e.g. collecting empty datasets from work dir).
2017-09-28 11:18:09 -04:00