Commit Graph
76 Commits
Author SHA1 Message Date
Michael R. Crusoe 528bce2e05 CWL: expression processing moved to cwl_utils 2022-11-10 10:02:52 +01:00
Nate Coraor 5468ee8959 Fix isort complaint 2022-09-21 19:01:05 -04:00
Nate Coraor 61b1417d1f Relocate container_monitor from galaxy_ext, but keep it runnable from
galaxy_ext. Add entrypoitn galaxy-container-monitor to job_execution
package.
2022-09-21 17:32:21 -04:00
Michael R. Crusoe 59ac92c1c8 mark galaxy packages as containing typing information 2022-07-26 23:27:36 +01:00
Nicola Soranzo 5cc94e03c8 Fix file name 2022-06-06 19:21:38 +01:00
Nicola Soranzo f2a42ba67e Run mypy on all packages' files
Also:
- mypy fixes.
- Use `with` statement to open/close files.
2022-05-30 22:38:55 +01:00
Dannon Baker 623a5e165a Apply black formatting.
Apply isort.
2022-02-03 07:42:20 -05:00
Michael R. Crusoe 7819fdc7a6 tighten type ignores 2021-11-23 13:12:07 +01:00
mvdbeek 11363a013e Merge branch 'release_21.05' into dev 2021-06-24 12:22:55 +02:00
mvdbeek 57e8efcc55 Add timeout for requests
From https://docs.python-requests.org/en/master/user/advanced/#timeouts:

> Most requests to external servers should have a timeout attached, in
> case the server is not responding in a timely manner. By default,
> requests do not time out unless a timeout value is set explicitly.
> Without a timeout, your code may hang for minutes or more.
2021-06-20 14:10:16 +02:00
Dannon Baker 22e7601653 First pass fstring conversion 2021-05-11 13:47:00 -04:00
mvdbeek 41aca51d2b Merge branch 'release_20.09' into release_21.01 2021-05-11 18:01:46 +02:00
Marius van den BeekandNicola Soranzo 4db3af8e5d Open container_monitor_exception.txt in write mode
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2021-05-11 14:54:56 +02:00
mvdbeek 75f5877951 Log exceptions IT port monitor fails and stop job
That should make it significantly easier to debug issues when the
container monitor dies unexpectedly (which I sort of expect in the
future given that we parse output from the docker CLI).
2021-05-10 17:43:46 +02:00
John Chilton 2391624c9c More typing fixes. 2021-01-03 00:18:56 -05:00
John Chilton 4cd0883b0f Allow returning error messages from Galaxy-flavored expression tools. 2020-11-17 11:46:36 +01:00
John Chilton a7a8754e24 Harden, formalize 'null' handling around booelan tool parameters and between workflow steps.
Important for expression tools and implementing CWL-style conditionals.
2020-11-11 19:44:16 -05:00
Dannon Baker e2461e5c5b Remainder of py3-only feature updates. 2020-06-26 08:26:00 -04:00
Helena Rasche 98fc625f91 Merge branch 'dev' into container_monitor 2020-04-20 17:01:32 +02:00
John Chilton f71d970963 Adjust monitor.py for the fact Pulsar and Galaxy call from different dirs. 2020-02-19 09:53:10 -05:00
John Chilton 04b21a06ff Allow remote container port monitoring for ITs.
Tested with Pulsar but not sure there is anything Pulsar specific about the implementation - simply set container_monitor_result on the job destination to 'callback' (instead of implicit default of 'file'). This causes the monitor.py script to hit a new job_ports API (that mirrors job_files API) and uses the same security mechanism (per-job keys that are only active while the job is active).

PR contains fixes for embedded Pulsar configuration handling, embedded Pulsar under uwsgi, and the introduction of new feature that allows dynamic expansion of ``$UWSGI_PORT`` inside of galaxy_infrastructure_url.
2020-02-19 09:53:10 -05:00
John Chilton aa2e6f2143 Refactor container montior for reuse of block. 2020-02-19 09:53:10 -05:00
Gianmauro Cuccuru e5d1a7f167 move the function into a different path 2020-02-11 15:07:07 +01:00
Gianmauro Cuccuru 55dc0e6a2f add a new function to get the local ip address 2020-02-11 11:16:37 +01:00
Nicola Soranzo a639c935c3 Filter Python 2 deprecation warning from cwltool
which makes some tools fail by printing to stderr:
```
galaxy.tool_util.output_checker DEBUG 2020-01-07 02:59:07,720 job failed, detected state generic_error, standard error is - [/galaxy_venv/local/lib/python2.7/site-packages/cwltool/__init__.py:17: CWLToolDeprecationWarning:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020.
Please upgrade your Python as the Python 2.7 version of cwltool won't be
maintained after that date.

  """,  category=CWLToolDeprecationWarning)
]
```
2020-01-13 17:35:40 +02:00
Nicola Soranzo 6b7a823cb3 Filter Python 2 deprecation warning from cwltool
which makes some tools fail by printing to stderr:
```
galaxy.tool_util.output_checker DEBUG 2020-01-07 02:59:07,720 job failed, detected state generic_error, standard error is - [/galaxy_venv/local/lib/python2.7/site-packages/cwltool/__init__.py:17: CWLToolDeprecationWarning:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020.
Please upgrade your Python as the Python 2.7 version of cwltool won't be
maintained after that date.

  """,  category=CWLToolDeprecationWarning)
]
```
2020-01-10 11:03:46 +00:00
mvdbeek d5fc7d426e Fix interactivetool python 3 support and tests
- enables docker destination for interactivetool tests
- fixes a wrong argument in entrypoint management
- fixes the test setup that targeted a previous iteration (which was
  still called realtimetools)
- prevents deleting the working directory before python has a chance to
  start the container monitor (that's the sleep command)
- fixes some odd interactive tool test assertions
- uses unicode arguments in key_type_token_mapping.py.
  uwsgi arguments are always passed as bytestrings.
2020-01-09 14:40:48 +01:00
Nicola Soranzo 1663c9e331 Check host_ip only once 2019-10-30 15:30:03 +00:00
John Chilton ff08885c2e Only re-map container monitor host if can find IP and have 0.0.0.0. 2019-10-30 11:03:20 -04:00
John Chilton 352e751927 Revert hacking IPs in container monitor script.
It breaks the Mac setup and seems just wrong, docker might not be on localhost. This needs to be made more specific in some way and should handle those socker commands not working on OS X.
2019-10-29 10:12:38 -04:00
Nate Coraor ddd950e209 Lint fixes 2019-10-24 17:46:28 -04:00
Nate Coraor 1ea1990959 Galaxy InteractiveTools cluster fixes from EU 2019-10-24 17:12:21 -04:00
Daniel Blankenberg f231e42c48 Merge branch 'dev' of https://github.com/galaxyproject/galaxy into realtimetools 2019-07-05 16:43:01 +02:00
John Chilton 16b7d6a031 Move set metadata. 2019-06-12 14:43:45 -04:00
John Chilton de30bde5e4 Refactor galaxy.tools.provided_metadata -> galaxy.tool_util.
Needed for remote job output metadata collection.
2019-06-12 14:43:44 -04:00
Daniel Blankenberg ccc4fc482f Merge branch 'dev' of https://github.com/galaxyproject/galaxy into realtimetools 2019-06-06 17:39:45 -04:00
John Chilton c6e5a86e80 Fix finding datatype's registry for metadata collection on Pulsar. 2019-06-03 13:35:59 -04:00
John Chilton 5f4bebd2ce Fix portable remote metadata output files...
... three features not working together super well.
2019-06-03 13:35:58 -04:00
John Chilton e7d4265aaf Add missing container_monitor package to previous commits. 2019-05-28 09:14:32 -04:00
John Chilton 8e6ac481f9 Fix composite datatype handling for storing objects by UUID. 2019-04-04 08:11:56 -04:00
John Chilton f427a74dd9 More changes to expression tool commit thanks to @mvdbeek. 2019-03-19 18:25:08 -04:00
John Chilton c2e67e3270 flake imports 2019-03-19 18:25:08 -04:00
John Chilton f5c93e868b Implement expression tools and non-data tool outputs.
PR #6925 introduced a GUI for connecting non-data (e.g. integer, boolean, color, etc..) workflow input parameter to tool input parameters (the backend for this was originally added in #1306). That ideally was just the beginning of work toward using such values in structured ways in workflows.

This PR extends tool output handling to allow producing of non-data parameters. These can serve as a source for non-data values in workflows the same work workflow input parameters can. To make such values more easy to produce, this PR also introduces Galaxy expression tools - mirroring functionality regularly used in CWL. These small JavaScript-based tools that consume inputs just like a regular Galaxy tool but that produce dictionary of non-data values.

I think these expressions will be maximally useful when paired with format 2 workflows once we allow users to load arbitrary tools (I make the case more in full here https://github.com/galaxyproject/galaxy/pull/7545#issuecomment-473894424), but I outline some potential uses there as well.

Because there is always a checklist in my PR descriptions:

- Tool definition language and plumbing and datatype for expressing expressions as jobs.
- Allow connecting expression tools to parameters in workflows, will delay evaluation of workflow so calculated value
- Example test expression tools for testing and demonstration.
2019-03-19 17:20:18 -04:00
John Chilton 1ca256aaba Merge pull request #7470 from jmchilton/portable_metadata
Implement portable metadata generation.
2019-03-11 09:57:13 -04:00
John Chilton f0912eb404 Fix set_metadata executing from wrong directory when using tool. 2019-03-10 21:15:56 -04:00
John Chilton 17cb35bc25 Use ToolProvidedMetadata abstraction in set_metadata.
There is are somethings that happen in set_metadata.py that assume the old style galaxy.json. This sets the stage for proper external metadata collection of newer style galaxy.json files.
2019-03-08 09:47:02 -05:00
John Chilton 1d0e4bcb2c New, portable metadata generation.
Variant of external metadata generation that doesn't use command-line arguments or absolute paths and simply takes operates on the current, job working directory and knows what to do.

- Uses relative paths allowing the directory to be staged elsewhere via Pulsar, Condor, or Docker for instance.
- Avoids DB objects for hard-coded paths making everything more robust.
- Avoids huge command-lines which for huge collection reduction jobs might hit system limits for command-line length.
- Uses JSON dicts to communicate parameters - meaning we can avoid awkward argument parsing as this evolves (see old max_metadata_value_size handling in set_metadata.py for instance).
- Uses output names instead of database IDs to key files - so file naming is consistent and human readable.
2019-03-08 09:47:02 -05:00
John Chilton 676cdf7678 Log exception in set_metadata.py.
We can finally do this as a result of #7095 I believe!
2019-03-07 12:33:38 -05:00
John Chilton 8bcda83aad Bug fix for reading metadata and extension from galaxy.json in set_metadata.py. 2019-01-15 09:43:29 -05:00
John Chilton d2b7e8af32 Refactor set_metadata.py to simplify provided metadata access. 2019-01-15 09:43:29 -05:00