Commit Graph
74994 Commits
Author SHA1 Message Date
Dannon Baker dd9af46eff Document isSubType 2024-04-11 07:45:44 -04:00
Dannon Baker c15b6e0fd3 Allow abstract parent class lookup by classname for isSubType. 2024-04-11 07:45:44 -04:00
Dannon Baker 9291173c77 In HistoryDatasetDisplay markdown element, display images in iframe 2024-04-11 07:45:44 -04:00
Nicola Soranzo 6fbd2ab8a2 Merge branch 'release_23.2' into release_24.0 2024-04-10 17:46:53 +01:00
Nicola Soranzo f33c5a4ca6 Merge branch 'release_23.1' into release_23.2 2024-04-10 17:43:11 +01:00
Nicola Soranzo dc9e078808 Merge branch 'release_23.0' into release_23.1 2024-04-10 17:42:00 +01:00
John Davis 6700809e83 Merge pull request #17948 from mvdbeek/followup_messages
[24.0] Revert unnecessary error change
2024-04-10 10:37:35 -04:00
Nicola Soranzo 659e87f029 Merge pull request #17955 from nsoranzo/release_23.0_fix_XForwardedHostMiddleware
[23.0] Fix KeyError in ``XForwardedHostMiddleware``
2024-04-10 13:20:48 +01:00
Nicola Soranzo 11bb4b414b Fix KeyError in `XForwardedHostMiddleware`
when `REMOTE_ADDR` is not defined.
Reported by @vazovn .

Also fix typos in environment variable names.
2024-04-10 12:09:24 +01:00
mvdbeek 9b795ab28d Merge branch 'release_23.2' into release_24.0 2024-04-10 09:39:34 +02:00
Marius van den Beek 206fe020af Merge pull request #17952 from mvdbeek/fix_implicit_conversion_mapped_over
[23.2] Fix missing implicit conversion for mapped over jobs
2024-04-10 09:36:56 +02:00
mvdbeek ec6a8e72dd Fix implicit conversion for mapped over inputs
Fixes https://github.com/galaxyproject/galaxy/issues/17940
2024-04-09 19:44:36 +02:00
mvdbeek 8d52714199 Add test for implicit map over conversion in workflow
This test fails because cut fails on the compressed input with
`cut: /private/var/folders/df/6xqpqpcd7h73b6jpx9t6cwhw0000gn/T/tmpu8gqd71c/tmpmae9egoz/tmpz8sonmgx/database/objects/6/9/8/dataset_69847aef-7b3f-4915-a8ae-394921dbe388.dat: Illegal byte sequence`
2024-04-09 19:44:36 +02:00
mvdbeek f71de4399a Revert unnecessary error change
Upgrade messages are collected via step.upgrade_messages.
Addresses https://github.com/galaxyproject/galaxy/pull/17858/files#r1557810107
2024-04-09 17:50:24 +02:00
Marius van den Beek f4c40199e4 Merge pull request #17858 from mvdbeek/fix_tool_version_switch_in_editor
[24.0] Fix tool version switch in editor
2024-04-09 16:38:49 +02:00
mvdbeek 1a39c618d1 Merge branch 'release_23.2' into release_24.0 2024-04-09 15:57:55 +02:00
mvdbeek e35ea08c9b Merge branch 'release_23.1' into release_23.2 2024-04-09 15:57:34 +02:00
mvdbeek 796ed40335 Merge branch 'release_23.0' into release_23.1 2024-04-09 15:57:03 +02:00
Marius van den Beek 3abb181423 Merge pull request #17944 from nsoranzo/release_23.0_fix_17938
[23.] Fix output datatype when uncompressing a dataset with incorrect datatype
2024-04-09 14:49:04 +02:00
Nicola Soranzo 0611465e3b Fix output datatype when uncompressing a dataset with incorrect datatype
with the ``CONVERTER_gz_to_uncompressed`` tool.

Previously, if a user forced an incorrect datatype to a compressed input
dataset (e.g. `fastqsanger` instead of `fastqsanger.gz`), then the output
datatype assigned by this tool would be an invalid one (`fastqsan`).

Fix #17938.
2024-04-09 11:39:39 +01:00
mvdbeek e3b56f13f4 Adjust integration test for additional conditional 2024-04-09 11:50:52 +02:00
mvdbeek d0c2b502d2 Only run check_and_update_state when current state fails 2024-04-08 22:07:42 +02:00
mvdbeek 8e8d7fa0f9 Fix tool state in build_module and refactor action
that can result form upgrading tools.
2024-04-08 20:28:39 +02:00
Martin Cech f9806acde3 Merge pull request #17939 from mvdbeek/drop_debug_message
[24.0] Drop left-over debug statement
2024-04-08 18:21:04 +02:00
mvdbeek 9a6ff0ac0f Drop left-over debug statement 2024-04-08 18:18:51 +02:00
Marius van den Beek dda61339ab Merge pull request #17937 from mvdbeek/fix_peek_display
[24.0] Never fail dataset serialization if display_peek fails
2024-04-08 18:16:37 +02:00
mvdbeek b3217607ea Fix version switching error in workflow editor 2024-04-08 17:16:56 +02:00
mvdbeek 8d62ebade2 Fix toolform not updating for version changes in wf editor
This only happens for non-ts tools which don't have the version in their
tool id.
2024-04-08 17:16:55 +02:00
John Davis 89ac7806f4 Merge pull request #17932 from mvdbeek/fix_InvalidRequestError
[24.0] Fix ``InvalidRequestError: Can't operate on closed transaction inside context manager.  Please complete the context manager before emitting further commands.``
2024-04-08 10:42:19 -04:00
Marius van den BeekandNicola Soranzo 456f33fbd7 Fix peek typo
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2024-04-08 16:34:15 +02:00
mvdbeek b971e33263 Fix Qiime2 display_peek method
Fixes:
```
ExceptionGroup: unhandled errors in a TaskGroup
  File "starlette/_utils.py", line 87, in collapse_excgroups
    yield
  File "starlette/middleware/base.py", line 190, in __call__
    async with anyio.create_task_group() as task_group:
  File "anyio/_backends/_asyncio.py", line 678, in __aexit__
    raise BaseExceptionGroup(
AttributeError: 'NoneType' object has no attribute 'replace'
  File "starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "starlette_context/middleware/raw_middleware.py", line 92, in __call__
    await self.app(scope, receive, send_wrapper)
  File "starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
  File "galaxy/webapps/galaxy/fast_app.py", line 108, in add_x_frame_options
    response = await call_next(request)
  File "starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "starlette/routing.py", line 79, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "starlette/routing.py", line 74, in app
    response = await func(request)
  File "fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
  File "fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
    return await future
  File "anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
  File "galaxy/webapps/galaxy/api/history_contents.py", line 465, in index
    items = self.service.index(
  File "galaxy/webapps/galaxy/services/history_contents.py", line 312, in index
    return self.__index_v2(trans, history_id, params, serialization_params, filter_query_params, accept)
  File "galaxy/webapps/galaxy/services/history_contents.py", line 992, in __index_v2
    items = [
  File "galaxy/webapps/galaxy/services/history_contents.py", line 993, in <listcomp>
    self._serialize_content_item(
  File "galaxy/webapps/galaxy/services/history_contents.py", line 1064, in _serialize_content_item
    rval = serializer.serialize_to_view(
  File "galaxy/managers/base.py", line 785, in serialize_to_view
    return self.serialize(item, all_keys, **context)
  File "galaxy/managers/hdas.py", line 614, in serialize
    return super().serialize(hda, keys, user=user, **context)
  File "galaxy/managers/datasets.py", line 770, in serialize
    serialized = super().serialize(dataset_assoc, keys, **context)
  File "galaxy/managers/base.py", line 698, in serialize
    returned[key] = self.serializers[key](item, key, **context)
  File "galaxy/managers/datasets.py", line 633, in <lambda>
    "peek": lambda item, key, **context: item.display_peek() if item.peek and item.peek != "no peek" else None,
  File "galaxy/model/__init__.py", line 4669, in display_peek
    return self.datatype.display_peek(self)
  File "galaxy/datatypes/qiime2.py", line 57, in display_peek
    table += [make_row(pair) for pair in self._peek(dataset, simple=True)]
  File "galaxy/datatypes/qiime2.py", line 57, in <listcomp>
    table += [make_row(pair) for pair in self._peek(dataset, simple=True)]
  File "galaxy/datatypes/qiime2.py", line 54, in make_row
    return f"<tr><th>{pair[0]}</th><td>{html.escape(pair[1])}</td></tr>"
  File "__init__.py", line 19, in escape
    s = s.replace("&", "&amp;") # Must be done first!
```
2024-04-08 16:25:34 +02:00
mvdbeek 031d59ff2b Don't set peek in display_peek method 2024-04-08 16:12:34 +02:00
mvdbeek 7eee169448 Never fail on display_peek wrapper 2024-04-08 16:03:59 +02:00
mvdbeek b147669a40 Revert "Commit after changing job state"
This reverts commit 061d4c32db.

Fixes:

```
Traceback (most recent call last):
  File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/jobs/handler.py", line 1083, in __monitor
    self.__monitor_step()
  File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/jobs/handler.py", line 1115, in __monitor_step
    self._check_jobs(session, jobs_to_check)
  File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/jobs/handler.py", line 1181, in _check_jobs
    self.__stop(job, session)
  File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/jobs/handler.py", line 1099, in __stop
    job.set_state(job.states.STOPPED)
  File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/__init__.py", line 1703, in set_state
    self.state_history.append(JobStateHistory(self))
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 487, in __get__
    return self.impl.get(state, dict_)
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 959, in get
    value = self._fire_loader_callables(state, key, passive)
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 995, in _fire_loader_callables
    return self.callable_(state, passive)
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 912, in _load_for_state
    return self._emit_lazyload(
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 1022, in _emit_lazyload
    lazy_clause, params = self._generate_lazy_clause(state, passive)
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 807, in _generate_lazy_clause
    value = mapper._get_state_attr_by_column(
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/mapper.py", line 3018, in _get_state_attr_by_column
    return state.manager[prop.key].impl.get(state, dict_, passive=passive)
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 959, in get
    value = self._fire_loader_callables(state, key, passive)
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 990, in _fire_loader_callables
    return state._load_expired(state, passive)
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/state.py", line 712, in _load_expired
    self.manager.expired_attribute_loader(self, toload, passive)
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 1451, in load_scalar_attributes
    result = load_on_ident(
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 407, in load_on_ident
    return load_on_pk_identity(
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 530, in load_on_pk_identity
    session.execute(
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1716, in execute
    conn = self._connection_for_bind(bind)
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1552, in _connection_for_bind
    TransactionalContext._trans_ctx_check(self)
  File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.8/site-packages/sqlalchemy/engine/util.py", line 199, in _trans_ctx_check
    raise exc.InvalidRequestError(
sqlalchemy.exc.InvalidRequestError: Can't operate on closed transaction inside context manager.  Please complete the context manager before emitting further commands.
```

at the cost of larger transactions that are more likely to deadlock.
Still likely a better tradeoff. Probably fixes
test/integration/test_interactivetools_api.py::TestInteractiveToolsIntegration::test_multi_server_realtime_tool.
2024-04-08 15:28:30 +02:00
Marius van den Beek 7278fa5eb4 Merge pull request #17930 from mvdbeek/tool_form_build_fix
[24.0] Fix tool form building if select filters from unavailable dataset metadata
2024-04-08 15:14:10 +02:00
mvdbeek 8616cbcd57 Fix tool form building if select filters from unavailable dataset
metadata

Fixes:

```
Message
Uncaught exception in exposed API method:
Stack Trace(most recent call first)

TypeError: 'NoneType' object is not iterable
  File "galaxy/web/framework/decorators.py", line 346, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "galaxy/webapps/galaxy/api/tools.py", line 247, in build
    return tool.to_json(trans, kwd.get("inputs", kwd), history=history)
  File "galaxy/tools/__init__.py", line 2509, in to_json
    populate_state(request_context, self.inputs, params.__dict__, state_inputs, state_errors)
  File "galaxy/tools/parameters/__init__.py", line 412, in populate_state
    _populate_state_legacy(
  File "galaxy/tools/parameters/__init__.py", line 525, in _populate_state_legacy
    state[input.name] = input.get_initial_value(request_context, context)
  File "galaxy/tools/parameters/basic.py", line 1107, in get_initial_value
    options = list(self.get_options(trans, other_values))
  File "galaxy/tools/parameters/basic.py", line 960, in get_options
    return self.options.get_options(trans, other_values)
  File "galaxy/tools/parameters/dynamic_options.py", line 893, in get_options
    rval = filter.filter_options(rval, trans, other_values)
  File "galaxy/tools/parameters/dynamic_options.py", line 227, in filter_options
    for r in ref:
```
from

https://sentry.galaxyproject.org/share/issue/ac3a350198604034aca07eaca3cc9cb8/

This happens if you have the following input section:
```
        <param name="otu" type="data" format="mothur.list,mothur.shared" label="list or shared - OTU List of Shared"/>
        <param name="repfasta" type="data" format="fasta" optional="true" label="repfasta - rep.fasta" help="rep.fasta file generated by get.oturep"/>
        <param name="label" type="select" label="label - OTU Labels" optional="true" help="Select exactly one label. If none selected, first label in your list or shared file will be used">
            <options>
                <filter type="data_meta" ref="otu" key="labels"/>
            </options>
        </param>
```
but the first input collection to mothur.list or mothur.shared dataset
has no elements.
2024-04-08 13:43:34 +02:00
Marius van den Beek c2f45dd560 Merge pull request #17929 from mvdbeek/rename_pja_fix
[24.0] Fix workflow run form for workflows with null rename PJA
2024-04-08 12:43:24 +02:00
mvdbeek 29e9cc3276 For workflow run form for worflows with null rename PJA
Fixes:
```
AttributeError: 'NoneType' object has no attribute 'values'
  File "galaxy/web/framework/decorators.py", line 346, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "galaxy/webapps/galaxy/api/workflows.py", line 357, in workflow_dict
    ret_dict = self.workflow_contents_manager.workflow_to_dict(
  File "galaxy/managers/workflows.py", line 907, in workflow_to_dict
    wf_dict = self._workflow_to_dict_run(trans, stored, workflow=workflow, history=history or trans.history)
  File "galaxy/managers/workflows.py", line 1025, in _workflow_to_dict_run
    step_model["replacement_parameters"] = step.module.get_informal_replacement_parameters(step)
  File "galaxy/workflow/modules.py", line 2388, in get_informal_replacement_parameters
    for argument in pja.action_arguments.values():
```
from https://sentry.galaxyproject.org/share/issue/954ebe7b658f401a8a8e40987d43a91d/
2024-04-08 11:27:32 +02:00
Marius van den Beek 249681de20 Merge pull request #17913 from mvdbeek/remove_session_after_loop
[24.0] Always discard session after __handle_waiting_jobs is done
2024-04-06 16:28:58 +02:00
Martin Cech fecf279d5a Merge pull request #17917 from ElectronicBlueberry/fix-settings-information
[24.0] Fix saving user preferences crashes tab
2024-04-05 20:16:44 +02:00
John Davis cbdb19d4f1 Merge pull request #17919 from martenson/notes
[24.0] adjust release notes to use the same languag3 as interface
2024-04-05 13:13:10 -04:00
Martin Cech 06c5762a5c adjust release notes to use the same languag3 as interface 2024-04-05 09:45:34 -07:00
Nicola Soranzo ad6fbe5b82 Merge branch 'release_23.2' into release_24.0 2024-04-05 14:52:29 +01:00
Nicola Soranzo ad45629885 Merge pull request #17916 from mvdbeek/fix_cwl_test_update_script
[23.2] Adjust update_cwl_conformance_tests.sh for removed branch
2024-04-05 14:45:20 +01:00
Laila Los 7b8866495f fix computed setter infinite loop 2024-04-05 15:21:41 +02:00
Laila Los 1fdef1f551 Merge pull request #17915 from mvdbeek/fix_step_removal
[24.0] Make sure step removal also resets mapOver state
2024-04-05 14:50:56 +02:00
mvdbeek bd846d9b2e Adjust update_cwl_conformance_tests.sh for removed branch 2024-04-05 13:49:31 +02:00
mvdbeek 0bb2925a05 Make sure step removal also resets mapOver state
Fixes https://github.com/galaxyproject/galaxy/issues/17906
2024-04-05 13:33:18 +02:00
Aysam Guerler f3377c44d3 Merge pull request #17904 from mvdbeek/fix_losing_markdown
[24.0] Fix lost reports when switching workflow versions
2024-04-05 14:00:30 +03:00
Marius van den Beek b887bf32c7 Merge pull request #17911 from davelopez/update_config_samples 2024-04-05 12:36:09 +02:00