116 Commits
Author SHA1 Message Date
Nicola Soranzo d22f652f91 Merge branch 'release_18.05' into release_18.09 2018-10-12 09:44:18 +01:00
Nicola Soranzo ac3e1ca1d0 Use Crypto to generate SSH keys
Also remove key files in `stop_ssh_docker()`.
2018-10-10 16:22:05 +01:00
mvdbeek b08c6219c3 Simplify ssh key handling in integration test 2018-10-10 14:56:05 +02:00
mvdbeek 5e12e509bf Fix selection of job plugin and image
Thanks @nsoranzo.
2018-10-10 14:56:05 +02:00
mvdbeek 5844bdc7aa Add integration test for remote shell CLI runners
This tests both the SecureShell and Paramiko shell plugins and the
Slurm and Torque CLI runner.
2018-10-10 10:10:51 +02:00
Nicola Soranzo e14b871eb9 Add test for scripts/galaxy-main 2018-09-06 11:00:08 +01:00
Marius van den Beek 2560919bd0 Merge pull request #6620 from jmchilton/job_recovery_test
Integration test for job recovery.
2018-08-25 16:51:16 +02:00
Dannon 43dbfdc7b1 Merge pull request #6632 from mvdbeek/testing_framework_improvements
Testing framework improvements
2018-08-23 14:24:43 -04:00
mvdbeek 23cfb46001 Allow setting CONDA_PREFIX using GALAXY_TEST_CONDA_PREFIX in testing 2018-08-23 14:57:31 +02:00
Dannon 498e7d576b Merge pull request #6552 from jmchilton/per_destination_object_store
Allow configuring object stores on a per-job-destination basis.
2018-08-22 11:41:16 -04:00
John Chilton 626195335e Integration test for job recovery (before and after handler has picked it up). 2018-08-21 15:17:12 -04:00
Nicola Soranzo df8abbe3ef Prefer unicodify() for binary-to-text conversion
which supports non-utf-8 encodings.
2018-08-21 12:35:05 +01:00
mvdbeek 620375c9d0 Do test mules on Jenkins, I don't see why this shouldn't work 2018-08-14 14:56:07 +02:00
mvdbeek cfce246845 Fix GRT export test 2018-08-14 14:56:07 +02:00
mvdbeek 293ce5a472 py3: Fix mules test cases
We're now just copying the current python path. Also the handler names
have actually changed, I think this hasn't been updated after a late
change (it is now as it should be, based on the documentation).
2018-08-14 14:56:07 +02:00
mvdbeek 37b5120197 py3: fix installing and running data managers 2018-08-14 14:56:06 +02:00
John Chilton 7882a067c8 Allow configuring object stores on a per-job-destination basis.
Setup a hierarchical objectstore with ids - these ids can be zero weight for objectstores that should only be used on a per-job-destination basis. Job destinations can then set object_store_id as a param to force a particular object store from the hierarchical configuration to be used. This can be set in job_conf.xml directly for static mappings or combined with dynamic job destinations for dynamic mapping to object stores. Dynamic job destinations can dispatch on cluster conditions, user, user preferences, etc.. Additionally, job resource parameters can be used with dynamic job destinations to allow user input on the object store to use.

An integration test case is included that tests and demonstrates all these different pieces. It sets up a Galaxy with a job and object store configuration that routes one tool to a specific disk store (called "static"), and routes another tool dynamically using job resource parameters that allow the user to pick between "slow, cheap" and "fast, expensive" storage options (for the test it is all just disk stores used - but you can imagine choosing between EBS and S3 or something this way).

I'd be happy to see something more formal than job resource parameters or user preferences developed to help users route job outputs to particular object stores - this is just a demonstration of what can be done today after these changes using extension points already being used by admins and users.
2018-08-06 11:29:08 -04:00
mvdbeek 8ccd5ed137 py3: Fix upload_configuration_options integration test 2018-08-02 13:21:19 +02:00
mvdbeek fd5e8cdd28 py3: fix test_scripts integration test 2018-08-02 13:21:19 +02:00
John Chilton fe5e1f1686 Integration test for the interaction of nested object stores and jobs.
- Test hierarchical store uses its first disk store for new files and not the remaining entries.
- Test basic functionality of writing to the distributed object store.
- Test all job outputs get placed in the same object store.
2018-07-27 09:16:05 -04:00
Dannon Baker 5171b9bd49 A couple more typos. 2018-07-18 09:42:39 -04:00
John Chilton cdbae706e6 Respect auto_decompress in fetch API, synchronize upload APIs. 2018-05-15 07:39:14 -04:00
Nicola Soranzo 6ea22bfe18 Exclude only test_grt_export integration test
which takes 35' by itself.
2018-04-16 17:25:49 +01:00
John Chilton 506de02ec4 Skip new script tests in dev branch, they are breaking integration suite. 2018-04-04 10:23:24 -04:00
Nicola Soranzo c9881fdc5c Merge branch 'release_18.01' into dev 2018-04-03 10:54:48 +01:00
John Chilton bb90ae93d8 More grt fixes - spotted by @nsoranzo. 2018-03-23 16:14:50 -04:00
John Chilton b14928d972 Cleanup script integration tests. 2018-03-23 16:14:49 -04:00
John Chilton 5f3f792f6f Unification of Galaxy configuration parsing for scripts/* 2018-03-23 16:14:49 -04:00
Nate Coraor ef6f7f62ab Memory usage bug fixes and code cleanup/simplification for upload tool 2018-03-15 14:32:02 -04:00
Nicola Soranzo 5ae52b7f06 Try to fix occasionally failing integration test
See https://jenkins.galaxyproject.org/job/docker-integration/4293/testReport/junit/integration.test_upload_configuration_options/AdvancedFtpUploadFetchTestCase/test_fetch_ftp_directory/
It seems `get_history_collection_details()` was called before the
collection was completely populated.

Also small fixes for a typo and class documentation found while
researching the origin of the bug.
2018-03-15 12:36:29 +00:00
Nicola Soranzo 6c3c076ef1 Sort files and subdirectories when fetching an FTP directory 2018-03-14 18:53:22 +00:00
Nicola Soranzo 67330b2751 Fix upload param to specify datatype
Also use higher level `tools_post()` method of the dataset populator instead of `_post()`.
2018-03-14 18:53:22 +00:00
John Chilton ca28000f8b Fixes for pre-creating HDAs using data fetch API. 2018-03-08 10:33:42 -05:00
John Chilton d783fc3309 Avoid symlinks in upload FTP tests. 2018-03-08 10:33:42 -05:00
John Chilton 60f632bb24 Precreate certain outputs for upload 2.0 API.
Trying to improve the user experience of this rule based uploader by placing HDAs and HDCAs in the history at the outset that the history panel can poll and that we can turn red if the upload fails.

From Marius' PR review:

> I can see that a job launched in my logs, but it failed and there were no visual indications of this in the UI

Not every HDA for instance can be created, for example if reading them from a zip file for instance that happens on the backend still. Likewise if HDCAs don't define a collection type up front they cannot be pre-created (if for instance that is inferred from a folder structure). Library things aren't precreated at all in this commit. There is room to pre-create more but I think this is an atomic commit as it is now and it will hopefully improve the user experience for the rule based uploader considerably.
2018-03-08 10:33:41 -05:00
John Chilton 5c5dbd2b65 Handle compressed datatypes appropriately in data fetch API. 2018-03-08 10:33:41 -05:00
John Chilton 1720354d86 More upload testing, some input is getting deleted that shouldn't. 2018-03-08 10:33:41 -05:00
John Chilton 3bf5990155 Allow uploading individual HDAs via fetch API. 2018-03-08 10:33:41 -05:00
John Chilton 347f1e123b Don't purge library path pastes and such in upload.py during testing.
Concerning that they sometimes will get deleted in production with default settings - see 5361.
2018-03-08 10:33:41 -05:00
John Chilton ce2170a56e Test case for link_to_files during upload. 2018-03-08 10:33:41 -05:00
John Chilton 1c6cc02415 Hierarchical upload API optimized for folders & collections.
Allows describing hierarchical data in JSON or inferring structure from archives or directories.

Datasets or archive sources can be specified via uploads, URLs, paths (if admin && allow_path_paste), library_import_dir/user_library_import_dir, and/or FTP imports. Unlike existing API endpoints, a mix of these on a per file basis is allowed and they work seemlessly between libraries and histories.

Supported "archives" include gzip, zip, bagit directories, bagit achives (with fetching and validations of downloads).

The existing upload API endpoint is quite rough to work with both in terms of adding parameters (e.g. the file type and dbkey hanlding in 4563 was difficult to implement, terribly hacky, and should seemingly have been trivial) and in terms of building requests (one needs to build a tool form - not describe sensible inputs in JSON). This API is built to be intelligable from an API standpoint instead of being constrained to the older style tool form. Additionally it built with hierarchical data in mind in a way that would not be easy at all enhancing the tool form components we don't even render.

This implements 5159 though much simpler YAML descriptions of data libraries should be possible basically as the API descriptions. We can replace the data library script in Ephemeris https://github.com/galaxyproject/ephemeris/blob/master/ephemeris/setup_data_libraries.py with one that converts a simple YAML file into an API call and allows many new options for free.

In future PRs I'll add filtering options to this and it will serve as the backend to 4733.
2018-03-08 10:33:36 -05:00
John Chilton 662f29fda2 Integration test case for running tool tests against shed installed tools. 2018-03-06 20:07:52 -05:00
John Chilton 6f908a76c5 Refactor data manager test to allow more integration tests with tool shed. 2018-03-06 20:07:52 -05:00
Nicola Soranzo 117b4dcd6c Update integration test to check external path files are not deleted after library upload
This test would have failed before commit 75b0618705.
2018-02-21 19:07:13 +00:00
Nicola Soranzo f7f9c120ed Refactor BaseFtpUploadConfigurationTestCase._write_ftp_file() method 2018-02-21 16:02:36 +00:00
John Chilton db0633eb89 Follow up on comments for #5193. 2018-01-09 11:51:04 -05: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
John Chilton f6ed568971 Clarify some FTP purging behaviors with tests.
xref https://github.com/galaxyproject/galaxy/pull/5264#issuecomment-355373614
2018-01-04 14:23:49 -05: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