Commit Graph
35274 Commits
Author SHA1 Message Date
John Chilton f36b8474a3 Comment about new bug discovered. Lower priority though right?
Come back and fix it in dev?
2023-11-16 05:51:03 -05:00
John Chilton 3e4089526e Fix duplicated tools in tool panel view section copying. 2023-11-15 14:21:38 -05:00
mvdbeek d0c583ec0e Merge branch 'release_23.0' into release_23.1 2023-11-13 15:06:55 +01:00
Matthias Bernt 0aafa22154 bump required conda version
potential solution for the build prblems in https://github.com/galaxyproject/planemo/pull/1388
2023-11-13 13:19:10 +01:00
Martin Cech 70d41851f4 Merge pull request #17009 from mvdbeek/update_tar_to_directory_dependency
[23.1] Update tar_to_directory dependency
2023-11-11 00:53:23 +01:00
mvdbeek 93d11dc04a Update tar_to_directory dependency
Should fix:
```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/galaxy/util/compression_utils.py", line 114, in extract
    common_prefix_dir = self.common_prefix_dir
  File "/usr/local/lib/python3.7/site-packages/galaxy/util/compression_utils.py", line 103, in common_prefix_dir
    if len(common_prefix) >= 1 and not common_prefix.endswith(os.sep) and self.isdir(self.getmember(common_prefix)) \
  File "/usr/local/lib/python3.7/site-packages/galaxy/util/compression_utils.py", line 186, in isdir
    return getattr(self, 'isdir_%s' % self.type)(member)
  File "/usr/local/lib/python3.7/site-packages/galaxy/util/compression_utils.py", line 189, in isdir_tar
    return member.isdir()
AttributeError: 'NoneType' object has no attribute 'isdir'

```

seen on usegalaxy.eu with https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE176031&format=file
2023-11-10 18:37:34 +01:00
mvdbeek 2fc1b64742 Fix copying metadata to copied job outputs
Fixes https://github.com/galaxyproject/galaxy/issues/17003
2023-11-10 18:03:45 +01:00
Marius van den Beek f450dee29b Merge pull request #16965 from mvdbeek/dont_hold_on_to_job_object
[23.1] Don't store job in JobIO instance attributes
2023-11-09 09:43:47 +01:00
mvdbeek 5566be02ab Don't store job in JobIO instance attributes
and invalidate `_output_hdas_and_paths` when current session is not the
same session that was used to populate `_output_hdas_and_paths`.

The Job instance may originate from a session that is associated to
another thread, and when that thread closes the session the instance
(along with other instances retrieved through loading relationships)
becomes detached.

I am not sure at all if this will fix
```
DetachedInstanceError: Instance <HistoryDatasetAssociation at 0x7fe68bbf14f0> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: https://sqlalche.me/e/14/bhk3)
  File "galaxy/jobs/runners/__init__.py", line 291, in prepare_job
    job_wrapper.prepare()
  File "galaxy/jobs/__init__.py", line 1248, in prepare
    tool_evaluator.set_compute_environment(compute_environment, get_special=get_special)
  File "galaxy/tools/evaluation.py", line 162, in set_compute_environment
    self.param_dict = self.build_param_dict(
  File "galaxy/tools/evaluation.py", line 204, in build_param_dict
    self.__populate_output_dataset_wrappers(param_dict, output_datasets, job_working_directory)
  File "galaxy/tools/evaluation.py", line 447, in __populate_output_dataset_wrappers
    param_dict[name] = DatasetFilenameWrapper(
  File "galaxy/tools/wrappers.py", line 403, in __init__
    path_rewrite = compute_environment and compute_environment.output_path_rewrite(dataset_instance)
  File "galaxy/job_execution/compute_environment.py", line 132, in output_path_rewrite
    return str(self.job_io.get_output_path(dataset))
  File "galaxy/job_execution/setup.py", line 226, in get_output_path
    if hda.id == dataset.id:
  File "sqlalchemy/orm/attributes.py", line 487, in __get__
    return self.impl.get(state, dict_)
  File "sqlalchemy/orm/attributes.py", line 959, in get
    value = self._fire_loader_callables(state, key, passive)
  File "sqlalchemy/orm/attributes.py", line 990, in _fire_loader_callables
    return state._load_expired(state, passive)
  File "sqlalchemy/orm/state.py", line 712, in _load_expired
    self.manager.expired_attribute_loader(self, toload, passive)
  File "sqlalchemy/orm/loading.py", line 1369, in load_scalar_attributes
    raise orm_exc.DetachedInstanceError(
```
but it seems to make some sense. JobIO crosses thread boundaries as part
of the job wrapper getting put into threading queues.

Ideally we'd make sure that no ORM instance crosses the thread boundary
(or we systematically re-associated with a session).

I also tried flagging these patterns automatically using something like:

```

    @event.listens_for(session, "persistent_to_detached")
    def on_detach(sess, instance):
        if not getattr(instance, "allow_detatch", False):
            raise Exception(f"{instance} detached. This ain't good for how we do things ?")
```

but it seems tricky to figure out when this is fine and when it is not.
2023-11-08 19:25:15 +01:00
Nicola Soranzo d8f490ff4a Workaround issue in routes
Fix the following traceback:
```
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: uvicorn.access INFO 2023-06-30 10:28:03,573 [pN:main.1,p:3528860,tN:MainThread] 193.156.42.8:0 - "HEAD /root/login HTTP/1.0" 500
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: Exception in supplement:
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: Traceback (most recent call last):
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: File "/cluster/galaxy-test/srv/galaxy/server/lib/galaxy/web/framework/middleware/error.py", line 165, in __call__
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: app_iter = self.application(environ, sr_checker)
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: File "/cluster/galaxy-test/srv/galaxy/venv/lib64/python3.11/site-packages/paste/recursive.py", line 85, in __call__
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: return self.application(environ, start_response)
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: File "/cluster/galaxy-test/srv/galaxy/venv/lib64/python3.11/site-packages/paste/httpexceptions.py", line 640, in __call__
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: return self.application(environ, start_response)
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: File "/cluster/galaxy-test/srv/galaxy/server/lib/galaxy/web/framework/base.py", line 167, in __call__
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: return self.handle_request(environ, start_response)
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: File "/cluster/galaxy-test/srv/galaxy/server/lib/galaxy/web/framework/base.py", line 221, in handle_request
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: rc.environ = environ
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: ^^^^^^^^^^
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: File "/cluster/galaxy-test/srv/galaxy/venv/lib64/python3.11/site-packages/routes/__init__.py", line 23, in __setattr__
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: self.load_wsgi_environ(value)
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: File "/cluster/galaxy-test/srv/galaxy/venv/lib64/python3.11/site-packages/routes/__init__.py", line 73, in load_wsgi_environ
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: self.__shared_state.host += ':' + environ['SERVER_PORT']
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Jun 30 10:28:03 galaxy01-test.educloud.no galaxyctl[3528286]: TypeError: can only concatenate str (not "int") to str
```

Reported by @vazovn : https://matrix.to/#/!rfLDbcWEWZapZrujix:gitter.im/$McOyd5Kmp-w-Z-bYbRUV42K30YhVvwRJtrCaxru-yf4?via=gitter.im&via=matrix.org
2023-11-06 14:52:35 +00:00
Ahmed Awan e23b3f8687 generate fixed_delegated_auth in core config, instead of serializer 2023-11-02 13:35:21 -05:00
Ahmed Awan bc5aca07a6 [23.1] Prevent Singular external auth users from disconnecting identity
Added a `fixed_delegated_path` variable to the `ConfigSerializer` that
lets us reroute users to home if we have a Galaxy set up with:
```
	config.enable_oidc
	and len(config.oidc) == 1
	and len(auth_manager.authenticators) == 0
```

as in; we only have 1 external auth and no local authenticator,
hence, we don't want users to be disconnecting the external
provider.
2023-11-01 17:54:52 -05:00
Leonid Kostrykin 055afb6b37 fixes example for xref references 2023-11-01 12:01:31 +01:00
Leonid Kostrykin 00a3d036e3 adds biii as supported xref reference type 2023-11-01 11:34:06 +01:00
Martin Cech 12b20c69d4 Merge pull request #16929 from davelopez/23.1_fix_discarded_dataset_ordering
[23.1] Fix discarded dataset ordering in Storage Dashboard
2023-10-27 22:45:34 +02:00
Marius van den Beek a2e3972ed2 Merge pull request #16930 from dannon/workflow-annotation-export
[23.1] Include owner's annotation when exporting workflow
2023-10-27 12:56:34 +02:00
Marius van den Beek d93095af2e Merge pull request #16937 from mvdbeek/fix_merge_collection_input_state_handling
[23.1] Skip state filtering in ``__MERGE_COLLECTION__`` tool
2023-10-27 12:39:31 +02:00
mvdbeek 21fb9be7fd Add regression test for #16931 2023-10-27 10:56:14 +02:00
mvdbeek 69ca24f67d Skip state filering in __MERGE_COLLECTION__ tool
Fixes inputs getting skipped that are NEW, QUEUED, etc.

If you're after filtering out errored you should use the
`__FILTER_FAILED_DATASETS__` tool.
2023-10-27 10:02:46 +02:00
Dannon Baker e48e490b3a Also get owner annotations for individual steps, unless trans.user has one. It's still unclear how one would, so I'm being cautious here. 2023-10-26 14:39:59 -04:00
Dannon Baker ffed1573ff When exporting a workflow, include owner's annotation if the exporting user doesn't have an overriding one. 2023-10-26 14:39:59 -04:00
Martin Cech 3e1d866b78 Merge pull request #16931 from mvdbeek/skip_datatype_change
[23.1] Skip change_datatype things if we're not actually changing the extension
2023-10-26 19:49:54 +02:00
mvdbeek d7beda0f1a Commit if we've got outstanding MetadataFile instances 2023-10-26 16:54:51 +02:00
mvdbeek ca5132d7bf Skip change_datatype things if we're not actually changing the extension
Side-steps a problem with FileParameter in the most efficient way
possible. This likely became a problem for one of Wolfgang's workflow
afer we dropped some earlier unnecessary flushes.
2023-10-26 15:44:23 +02:00
davelopez 3950785c9c Sort null size values accordingly 2023-10-26 11:56:37 +02:00
Björn Grüning f2d9cb6ad0 Merge pull request #16919 from davelopez/23.1_fix_library_import_path_linking
[23.1] Fix library import from path linking files
2023-10-25 17:49:47 +02:00
Marius van den Beek cd93598b87 Merge pull request #16917 from mvdbeek/improve_invocation_error_reporting
[23.1] Improve invocation error reporting
2023-10-25 16:59:50 +02:00
davelopez d411861d31 Revert always reset external filename
8ae0b9241e
2023-10-25 14:39:02 +02:00
mvdbeek ce38206990 Extend tests for new invocation failure messages 2023-10-25 13:26:31 +02:00
mvdbeek c351301602 Include failing step for unexpected failures, turn more exceptions into MessageExceptions 2023-10-25 11:53:29 +02:00
mvdbeek 285db62fd3 Improve invocation error reporting when step requires datasets in ok state 2023-10-25 10:39:41 +02:00
Dannon 575e05aff5 Merge pull request #16905 from mvdbeek/no_500_history
[23.1] Provide error message instead of internal server error
2023-10-24 08:20:19 -04:00
mvdbeek 81e9d52b4a Fix unbound runner variable when there is an error in the job config
Fixes
```
UnboundLocalError: local variable 'runner' referenced before assignment
  File "galaxy/jobs/handler.py", line 541, in __handle_waiting_jobs
    self.dispatcher.put(self.job_wrappers.pop(job.id))
  File "galaxy/jobs/handler.py", line 1224, in put
    runner = self.get_job_runner(job_wrapper, get_task_runner=True)
  File "galaxy/jobs/handler.py", line 1221, in get_job_runner
    return runner
```
from https://sentry.galaxyproject.org/share/issue/a0a0049feb53487f9c84ede3784624b0/
which followed `(53095435) Invalid job runner: bridges`.
2023-10-24 11:40:40 +02:00
mvdbeek 424695763b Provide error message instead of internal server error 2023-10-24 11:03:17 +02:00
mvdbeek 3dd88a4357 Start work on 23.1.2.dev0 2023-10-23 21:35:28 +02:00
mvdbeek e77b17df06 Create version 23.1.1 2023-10-23 21:35:24 +02:00
mvdbeek e88541e645 Start work on 23.0.7.dev0 2023-10-23 18:01:40 +02:00
mvdbeek bce8be24fe Create version 23.0.6 2023-10-23 18:01:36 +02:00
Marius van den Beek 41e06d0060 Merge pull request #16879 from davelopez/23.1_fix_delete_collection
[23.1] Fix delete collection + elements
2023-10-23 17:27:46 +02:00
davelopez 905a85cc11 Remove unnecessary update if the element was already deleted in bulk 2023-10-23 16:02:46 +02:00
davelopez 672518c815 Unify bulk delete/purge behavior on collections
Use the same default behavior as "bulk purge" and mark also elements as deleted.
2023-10-20 10:37:18 +02:00
davelopez 4656698fb5 Add asserts on history contents in tests 2023-10-19 17:48:07 +02:00
davelopez 74cbf8353d Refactor API tests 2023-10-19 14:23:25 +02:00
davelopez 1ea7ee0605 Exclude from usage DCEs contained in deleted collections 2023-10-19 14:23:07 +02:00
davelopez 3cfad7ef74 Add API tests for deleting collections in bulk 2023-10-19 13:43:00 +02:00
davelopez 5173906f63 Delete orphaned and hidden datasets in collection
When deleting the collection via history bulk delete
2023-10-19 13:42:29 +02:00
Björn Grüning e4c467794f Merge pull request #16880 from mvdbeek/fix_nested_collection_query
[23.1] Fix join condition for nested collection query
2023-10-18 22:35:42 +02:00
mvdbeek e617099feb Fix join condition for nested collection query
For a list:list:list collection this brings the query from 12.5 seconds
(after the database cache is already hot ...) to 11 ms
2023-10-18 18:17:56 +02:00
Marius van den Beek cdbbbbe268 Merge pull request #16877 from mvdbeek/fix_tag_ownership_check
[23.1] Fix tag ownership check
2023-10-18 17:23:08 +02:00
Marius van den Beek b116321913 Merge pull request #16875 from mvdbeek/eliminate_more_flushes
[23.1] Remove more flushes in database operation tools
2023-10-18 17:20:06 +02:00