Also:
- Fix `_assert_container_in_cache_singularity()` to append `container_path`
to `cache_directory` only for explicit resolvers.
Also calculate `cache_dir_contents` only if `cache_directory` exists.
for proper type annotation of query results.
Also:
- Drop unused code from `lib/tool_shed/webapp/controllers/user.py`
- Drop Galaxy model code from
`lib/tool_shed/util/admin_util.py:Admin.purge_user()`
There is a bug in the user preferences handling when the user preferences
contains fields defined as "secret" but the field is not stored in the
vault. This commit adds integration tests to cover this case.
This fixes handling of `ToolInputsNotOK` exceptions, which would fail
with
```
Message
Uncaught exception in exposed API method:
Stack Trace
Newest
TypeError: Object of type ToolInputsNotOKException is not JSON serializable
File "galaxy/util/json.py", line 74, in safe_dumps
dumped = json.dumps(obj, allow_nan=False, **kwargs)
File "__init__.py", line 238, in dumps
**kw).encode(obj)
File "json/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
File "json/encoder.py", line 258, in iterencode
return _iterencode(o, 0)
File "json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ToolInputsNotOKException is not JSON serializable
File "galaxy/web/framework/decorators.py", line 350, in decorator
rval = format_return_as_json(rval, jsonp_callback, pretty=trans.debug)
File "galaxy/web/framework/decorators.py", line 387, in format_return_as_json
json = safe_dumps(rval, **dumps_kwargs)
File "galaxy/util/json.py", line 77, in safe_dumps
dumped = json.dumps(obj, allow_nan=False, **kwargs)
File "__init__.py", line 238, in dumps
**kw).encode(obj)
File "json/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
File "json/encoder.py", line 258, in iterencode
return _iterencode(o, 0)
File "json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
```
This also required making the tool form error modal dependent on the
returned errors, instead of only popping up on non-200 status codes
or if all jobs failed.
Fixes https://github.com/galaxyproject/galaxy/issues/19482