Commit Graph
30134 Commits
Author SHA1 Message Date
Alexander OSTROVSKY 972faaaea1 add optional for workflow tag input collections 2022-02-11 15:09:32 -08:00
Dannon 2f1c862a8f Merge pull request #13293 from mvdbeek/fix_text_parameter_connected_to_select
[22.01] Fix construction of SelectToolParameter default value
2022-02-11 13:12:12 -05:00
mvdbeek 973f6679d6 Merge branch 'release_21.09' into release_22.01 2022-02-11 13:29:04 +01:00
Marius van den Beek c1f959d909 Merge pull request #13330 from mvdbeek/exp_imp_anonymous
[22.01] Fix history exports import by url
2022-02-10 12:11:19 +01:00
Marius van den Beek 76a8e12d21 Merge pull request #13325 from mvdbeek/remap_fix_sentry
[21.09] Fix resuming job when job has optional data parameters
2022-02-10 11:19:20 +01:00
mvdbeek 96d89a4f5c Drop API key from more places 2022-02-09 17:38:10 +01:00
mvdbeek db6e2db4dc Endpoint needs to be sessionless as well 2022-02-09 17:30:34 +01:00
mvdbeek 925f44a16e Improve (history import) job error reporting 2022-02-09 17:30:12 +01:00
Nicola Soranzo bf3a5420ef Merge pull request #13317 from mvdbeek/fix_command_recording 2022-02-09 10:21:52 +00:00
mvdbeek 991f82b136 Fix history exports import by url 2022-02-08 22:56:57 +01:00
mvdbeek 96e76c62d2 Don't record version command as part of command line
Fixes https://github.com/galaxyproject/galaxy/issues/13306
2022-02-08 15:52:06 +01:00
Marius van den Beek e9270c5299 Merge pull request #13324 from mvdbeek/minor_fixes_sentry
Minor fixes from sentry data
2022-02-08 15:46:02 +01:00
mvdbeek bec9d4b49f Fix resuming job when job has optional data parameters
This fixes
```
ERROR    galaxy.tools.actions:__init__.py:683 Cannot remap rerun dependencies.
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/actions/__init__.py", line 664, in _remap_job_on_rerun
    self.__remap_parameters(job_to_remap, jtid, jtod, out_data)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/actions/__init__.py", line 694, in __remap_parameters
    input_values = {p.name: json.loads(p.value) for p in job_to_remap.parameters}
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/actions/__init__.py", line 694, in <dictcomp>
    input_values = {p.name: json.loads(p.value) for p in job_to_remap.parameters}
  File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not
NoneType
```

Optional data inputs or optional selects are stored as `None` (super
inconsistent, since most other parameters are stored as JOSN. We should
create "basic_2.py" using pydantic at one point not too far into the
future ...). This means we can't call `json.loads` on these. Fortunately
this is the only place we do it, and we don't need to consider optional
parameters here anyway.
2022-02-08 15:45:01 +01:00
Nicola Soranzo 00b0846e8f Merge branch 'release_21.05' into release_21.09 2022-02-08 13:29:08 +00:00
mvdbeek acd56abee8 Return DatasetChainModel
Fixes failure to serialize the response.
2022-02-08 11:33:05 +01:00
Marius van den Beek f15de14cbd Merge pull request #13313 from mvdbeek/tus_config_dir
[22.01] Add config variable for setting tus upload directory
2022-02-08 11:15:43 +01:00
mvdbeek 25d58f678d Drop unncessary log statement 2022-02-07 22:34:56 +01:00
mvdbeek 83c0683e86 Restore Metadata size limit
Broke in https://github.com/galaxyproject/galaxy/pull/11902
2022-02-07 15:02:02 +01:00
Marius van den Beek 377a608c5c Merge pull request #13267 from bernt-matthias/doc/xsd-collection-types
[22.01] Add missing collection types to xsd doc
2022-02-07 13:34:00 +01:00
mvdbeek 37846b2d27 Make __link_file_check more robust
There's no need to load the job and job parameters if the tool isn't
upload1. This should fix https://github.com/galaxyproject/galaxy/issues/13311
2022-02-07 11:33:18 +01:00
mvdbeek ee4603d918 Provide fallback for old chunked API 2022-02-06 19:16:44 +01:00
mvdbeek 2895dd36e1 Add config variable for setting tus upload directory 2022-02-06 10:41:35 +01:00
Nicola Soranzo c1f7799f98 Merge branch 'release_21.09' into release_22.01 2022-02-04 15:36:47 +00:00
Marius van den BeekandDavid López 43474de368 Use Optional instead of Union with None
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
2022-02-04 15:33:32 +01:00
mvdbeek 8da2f9eb01 Produce boolean 2022-02-04 15:31:03 +01:00
mvdbeek 51d728b4c2 Move option restriction to separate method 2022-02-04 15:31:03 +01:00
Björn Grüning 44644a0175 Merge pull request #13304 from mvdbeek/fix_stopping_its_slurm
[21.09] Fix stopping ITs on slurm
2022-02-04 13:46:28 +01:00
Marius van den Beek bb299b9dff Merge pull request #13301 from Smithsonian/Fixfor13297
[21.09] Fix univa job runner setup without nativeSpecification
2022-02-04 13:13:46 +01:00
mvdbeek 6b65de8f38 Add selenium test for restrictOnConnections 2022-02-04 13:03:42 +01:00
mvdbeek 8d8f6cf84b Fix construction of SelectToolParameter default value 2022-02-04 13:03:01 +01:00
Matthias BerntandMarius van den Beek 81ff85205d only create HDAH entries for undeleted HDAs
fixes https://github.com/galaxyproject/galaxy/issues/13307

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
2022-02-04 12:53:06 +01:00
mvdbeek a60a898c3b Fix stopping ITs on slurm
If slurm decided the job is in error. There are configurations of slurm
that error out when cancelling the job monitor script, and others that
don't do this.
2022-02-04 10:44:19 +01:00
Björn Grüning 3ed17ba8b8 Merge pull request #13292 from mvdbeek/tag_filter_input_optional
[22.01] Make tag filter input optional
2022-02-04 10:14:00 +01:00
Marius van den Beek a66a8b6e54 Merge pull request #13299 from mvdbeek/disable_required_metadata_filter_for_now
[22.01] Limit required element validation to safe elements
2022-02-04 09:27:26 +01:00
Marius van den Beek 3b25dd6184 Merge pull request #13268 from bgruening/xref_bioconductor
[22.01] Add bioconductor as valid xref for tools
2022-02-03 18:44:19 +01:00
mvdbeek f7eaa0a06d Make RData version optional 2022-02-03 18:31:07 +01:00
mvdbeek fd399a02ae Fix element_is_set check for keys that don't match the datatype
defintion.

Fixes
```
2022-02-03 12:40:03,491 ERROR [galaxy.web.framework.decorators] Uncaught exception in exposed API method:
Traceback (most recent call last):
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/web/framework/decorators.py", line 320, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/webapps/galaxy/api/tools.py", line 563, in create
    return self._create(trans, payload, **kwd)
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/webapps/galaxy/api/tools.py", line 631, in _create
    vars = tool.handle_input(trans, incoming, history=target_history, use_cached_job=use_cached_job, input_format=input_format)
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/tools/__init__.py", line 1767, in handle_input
    all_params, all_errors, rerun_remap_job_id, collection_info = self.expand_incoming(trans=trans, incoming=incoming, request_context=request_context, input_format=input_format)
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/tools/__init__.py", line 1747, in expand_incoming
    populate_state(request_context, self.inputs, expanded_incoming, params, errors, simple_errors=False, input_format=input_format)
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/tools/parameters/__init__.py", line 348, in populate_state
    _populate_state_legacy(request_context, inputs, incoming, state, errors=errors, context=context, check=check, simple_errors=simple_errors)
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/tools/parameters/__init__.py", line 408, in _populate_state_legacy
    state[input.name] = input.get_initial_value(request_context, context)
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/tools/parameters/basic.py", line 1001, in get_initial_value
    options = list(self.get_options(trans, other_values))
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/tools/parameters/basic.py", line 890, in get_options
    return self.options.get_options(trans, other_values)
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/tools/parameters/dynamic_options.py", line 763, in get_options
    rval = filter.filter_options(rval, trans, other_values)
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/tools/parameters/dynamic_options.py", line 207, in filter_options
    if not r.metadata.element_is_set(self.key):
  File "/tmp/tmp778b108w/galaxy-dev/lib/galaxy/model/metadata.py", line 175, in element_is_set
    meta_spec = self.parent.metadata.spec[name]
KeyError: 'groups'
```

which happens when forcing a tabular dataset into a more specialized
input https://github.com/galaxyproject/tools-iuc/blob/e22821f51ae326b3696a9456cbc44f9982512a52/tools/mothur/homova.xml#L48

Arguably this is a tool issue, but we already log a KeyError above and
it seems more of a linting issue than something that should cause a test
failure.
2022-02-03 18:30:10 +01:00
ajs6f 10a6db4392 Fix for traceback:
```
Traceback (most recent call last):
  File "lib/galaxy/jobs/runners/__init__.py", line 707, in monitor
    self.check_watched_items()
  File "lib/galaxy/jobs/runners/drmaa.py", line 338, in check_watched_items
    if self._complete_terminal_job(ajs, drmaa_state=state) is not None:
  File "lib/galaxy/jobs/runners/univa.py", line 85, in _complete_terminal_job
    time_granted, mem_granted = _parse_native_specs(ajs.job_id, native_spec)
  File "lib/galaxy/jobs/runners/univa.py", line 572, in _parse_native_specs
    m = re.search(r"rt=([0-9:]+)[\s,]*", native_spec)
  File "/pool/spare/galaxy/galaxy/.venv/lib64/python3.6/re.py", line 182, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
```

See https://github.com/galaxyproject/galaxy/issues/13297 reported by @ajs6f fix from @mvdbeek
2022-02-03 11:46:42 -05:00
mvdbeek 7341a90849 Mark Bed as check_required_metadata 2022-02-03 13:11:38 +01:00
mvdbeek 370d343670 Limit required element validation to safe elements
There used to be a long-standing bug in setting up the MetadataValidator
if default values were used. We fixed this in
https://github.com/galaxyproject/galaxy/pull/13139/commits/e194ef97e49c4947711ad1d20873ddc0aa686a66,
but that means we're now checking for all non-optional values before
running a tool. We have a ton of non-optional MetadatElement items
in datatypes that should maybe be optional (an indication might be if
`default` and `no_value` are specified and set to the same value ... but
I'm not sure that's a 100% thing). So I think that reviewing this
requires domain knowledge of the datatypes and what elements are really required,
and I'm not sure we can do this in a timely fashion, and not break
something that used to work.

So my suggestion is that we add `check_required_metadata=True`
on datatypes for which we have checked that non-optional metadata
elements are really non-optional. For those metadata elements
for which this is not the case we skip the validation as we would
do prior to
https://github.com/galaxyproject/galaxy/pull/13139/commits/e194ef97e49c4947711ad1d20873ddc0aa686a66.

As an example I have marked  RDS and RData with check_required_metadata
and added a test for check_required_metadata.
2022-02-03 12:58:38 +01:00
Björn Grüning 949da57ffe change XSD to adopt to the new syntax 2022-02-02 21:03:49 +01:00
Marius van den Beek 2549792d42 Merge pull request #13285 from mvdbeek/null_text_values
[22.01] Improve null value handling
2022-02-02 17:06:00 +01:00
mvdbeek ffebfeaee8 Make tag filter input optional 2022-02-02 13:23:37 +01:00
mvdbeek b4f8281b1d Annotation needs to be a string for html sanitization 2022-02-02 12:56:52 +01:00
mvdbeek 4675f3f2b8 Test validation message and disabled run button 2022-02-02 12:24:15 +01:00
Björn Grüning 9dff5f69eb Merge pull request #13271 from astrovsky01/add_gz
[22.01] Add gz as datatype
2022-02-02 09:05:22 +01:00
Alex OstrovskyandMarius van den Beek 67d1268666 Update lib/galaxy/config/sample/datatypes_conf.xml.sample
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
2022-02-01 12:07:28 -08:00
Alex Ostrovsky 75627c91df Update datatypes_conf.xml.sample 2022-02-01 08:02:40 -08:00
mvdbeek 967dc07e9f Fail invocation with null in required input parameter 2022-02-01 15:14:45 +01:00
mvdbeek d0fdbabed0 Add test that verifies invocation non-optional text parameter handling 2022-02-01 15:14:45 +01:00