Commit Graph
37957 Commits
Author SHA1 Message Date
Marius van den Beek 942ddea389 Merge pull request #18255 from davelopez/24.0_fix_invenio_credentials_handling
[24.0] Fix Invenio credentials handling
2024-05-31 10:01:42 +02:00
John Chilton 4c8b4bf2a7 Merge pull request #18249 from mvdbeek/fix_no_elements_exception_extract_dataset
[24.0] Raise exception when extracting dataset from collection without datasets
2024-05-30 17:54:24 -04:00
John Chilton 1dd31f08f6 Merge pull request #18248 from mvdbeek/enable_transparent_use_of_compressed_datasets_in_DatasetDataProvider
[24.0] Transparently open compressed files in DatasetDataProvider
2024-05-30 17:53:20 -04:00
Nicola Soranzo 53bf8ce1de Format with black 2024-05-30 17:58:42 +01:00
John Davis 15a8e6cc9a Merge branch 'release_23.2' into release_24.0 2024-05-30 11:11:12 -04:00
John Davis dbd063e00d Merge release_23.1 into release_23.2 2024-05-30 10:57:20 -04:00
John Davis d0d16ebf49 Make column non-nullable 2024-05-30 09:34:38 -04:00
Nicola Soranzo 713556029d Merge branch 'release_23.2' into release_24.0 2024-05-30 12:51:06 +01:00
Nicola Soranzo bd9a16988e Merge branch 'release_23.1' into release_23.2 2024-05-30 12:41:23 +01:00
mvdbeek 063d985650 Also set model to nullable=False 2024-05-30 11:50:43 +02:00
mvdbeek 4099fcc15a Set all old keys to deleted 2024-05-30 11:45:12 +02:00
John Davis a774c9234c Add ts db migration: deleted column to api_keys tbl 2024-05-29 22:49:30 -04:00
mvdbeek 410ccb9ab2 Fix up lock handling in hgweb_config_manager 2024-05-29 17:50:49 +02:00
mvdbeek b00beec3d2 Allow configuring hgweb repo prefix 2024-05-29 17:44:55 +02:00
davelopez 7cfba26fe1 Fix Invenio credentials handling
Only ask for token when is really required
2024-05-29 16:51:00 +02:00
mvdbeek 2ea3d342cc Import tool shed url 2024-05-29 15:29:39 +02:00
mvdbeek b0ea69e418 Fix import order 2024-05-29 13:58:09 +02:00
Marius van den BeekandNicola Soranzo 74e8d3257b Make it an f-string
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2024-05-29 13:35:52 +02:00
mvdbeek 5f1ec2b06f Skip tests that require toolshed to be up if toolshed down 2024-05-29 13:30:22 +02:00
mvdbeek 229b1c5bcb Skip doi unit test if request fails 2024-05-29 13:30:22 +02:00
mvdbeek 455a851eef Raise exception when extracting dataset from collection without datasets
Fixes https://github.com/galaxyproject/galaxy/issues/18240.
2024-05-29 10:20:56 +02:00
mvdbeek dea0d523c6 Transparently open compressed files in DatasetDataProvider
Fixes https://sentry.galaxyproject.org/share/issue/026b0ea1f8aa478daea1cdb0b18df78a/:
```
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
  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 109, 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/datasets.py", line 446, in show
    return self.service.show(trans, dataset_id, hda_ldda, serialization_params, data_type, **extra_params)
  File "galaxy/webapps/galaxy/services/datasets.py", line 395, in show
    rval = self._raw_data(trans, dataset, **extra_params)
  File "galaxy/webapps/galaxy/services/datasets.py", line 1009, in _raw_data
    return DataResult(data=list(dataset.datatype.dataprovider(dataset, provider, **kwargs)))
  File "galaxy/datatypes/dataproviders/base.py", line 262, in __iter__
    for datum in parent_gen:
  File "galaxy/datatypes/dataproviders/base.py", line 199, in __iter__
    for datum in parent_gen:
  File "galaxy/datatypes/dataproviders/base.py", line 137, in __iter__
    yield from self.source
  File "galaxy/datatypes/dataproviders/base.py", line 137, in __iter__
    yield from self.source
  File "<frozen codecs>", line 322, in decode
```
2024-05-29 10:09:29 +02:00
mvdbeek 0359063816 Fix element serialization for collections that aren't populated yet
Fixes
https://github.com/galaxyproject/galaxy/pull/17818#issuecomment-2134060961:
```
AttributeError
'NoneType' object has no attribute 'dataset'
```
2024-05-28 08:15:19 +02:00
Marius van den Beek 316eb5bf81 Merge pull request #18233 from mvdbeek/reset_content_length_if_no_error_handling
[24.0] Reset content-length for unhandled exceptions
2024-05-27 20:00:39 +02:00
John Chilton 98d8ae99b4 Merge pull request #18223 from mvdbeek/discriminate_inputs_deleted_job_files
[24.0] Raise appropriate exception if accessing deleted input file
2024-05-27 09:49:09 -04:00
John Chilton 82a54a5f62 Merge pull request #18229 from mvdbeek/decrease_visualization_log_level
[24.0] Decrease log level for expected visualization errors
2024-05-27 09:44:54 -04:00
John Chilton 62b53c5e2a Merge pull request #18231 from mvdbeek/set_peek_on_success_only
[24.0] Don't set dataset peek for errored jobs
2024-05-27 09:42:56 -04:00
mvdbeek 3c6a9a8eaf Reset content-length for unhandled exceptions
This prevents `ProtocolError` caused by the error middleware not being
able to reset the content length. Only affects routes that explicitly
set the content-length and don't have a default response handler.

This is effectively the case when using `web.expose`. To test this,
make sure you get Galaxy's error middleware output in the browser
and your console.
```
diff --git a/lib/galaxy/webapps/galaxy/controllers/dataset.py b/lib/galaxy/webapps/galaxy/controllers/dataset.py
index c95d9df788..92b04684d3 100644
--- a/lib/galaxy/webapps/galaxy/controllers/dataset.py
+++ b/lib/galaxy/webapps/galaxy/controllers/dataset.py
@@ -456,6 +456,8 @@ class DatasetInterface(BaseUIController, UsesAnnotations, UsesItemRatings, UsesE
     def imp(self, trans, dataset_id=None, **kwd):
         """Import another user's dataset via a shared URL; dataset is added to user's current history."""
         # Set referer message.
+        trans.response.headers["content-length"] = 0
+        trans = None
         referer = trans.request.referer
         if referer and not referer.startswith(f"{trans.request.application_url}{url_for('/login')}"):
             referer_message = f"<a href='{escape(referer)}'>return to the previous page</a>"

```
2024-05-27 11:37:54 +02:00
mvdbeek 54db4e9a7a Don't fail set_peek if file does not look like GRO file 2024-05-27 10:23:59 +02:00
mvdbeek 3cd64e7861 Refactor set_peek and move exception handling 2024-05-27 10:15:54 +02:00
mvdbeek 11ae179c9a Don't set dataset peek for errored jobs
This is consistent with the extended metadata logic, and prevents:
```
Message
Job wrapper finish method failed
Stack Trace

Newest

IndexError
list index out of range
```
which only makes it harder to diagnose the actual error, which in the
case of https://sentry.galaxyproject.org/share/issue/831261683ce642a4976efa20a9a0e55c/
is `\nslurmstepd: error: *** JOB 1910486 ON js2-gpu-small0 CANCELLED AT 2024-05-26T23:30:00 DUE TO TIME LIMIT ***\n`
2024-05-27 10:06:46 +02:00
mvdbeek 30b1f4b2f9 Raise RequestParameterInvalidException if url can't be verified
Kind of a followup to
https://github.com/galaxyproject/galaxy/pull/18155.

Fixes:
```
ValueError
invalid literal for int() with base 10: 'sequences'
```
For the attempted url `"http://emp-single-end-sequences:sequences"`.
2024-05-27 09:54:09 +02:00
mvdbeek ed70432254 Decrease visualization log level
Minor followup to https://github.com/galaxyproject/galaxy/pull/18211.
If we've got a MessageException I don't think we need to log this as an
error, since we're also showing a reasonable message to the user.
2024-05-27 09:09:59 +02:00
Marius van den Beek d8b827f50e Merge pull request #17818 from martenson/noexpand-private
[24.0] do not expand datasets that are known to be inaccessible
2024-05-25 15:53:03 +02:00
mvdbeek cc2f83dac0 Raise appropriate exception if accessing deleted input file 2024-05-24 18:26:18 +02:00
Marius van den Beek ae9ea865e1 Merge pull request #18214 from mvdbeek/error_messages_when_accessing_datasets_we_cannot_access
[24.0] Check dataset state when attempting to acces dataset contents
2024-05-24 16:02:33 +02:00
davelopez 0104764bb8 Make accessible optional in HDAObject
It is probably enough to serialize the `accessible` property only when requesting collection contents displayed in the UI.
2024-05-24 13:43:33 +02:00
davelopez afac2afa24 Serialize accessible field for collection elements 2024-05-24 10:50:08 +02:00
Marius van den Beek 21a427213d Merge pull request #18217 from mvdbeek/tighten_job_access
[24.0] Restrict job_files access to jobs that are not terminal
2024-05-24 09:00:56 +02:00
Nicola Soranzo 7ab747506a Merge pull request #18192 from ahmedhamidawan/prevent_anon_users_run_workflow
[24.0] Prevent anonymous and inactive users from running workflows
2024-05-23 23:28:33 +01:00
mvdbeek 4e47b8de13 Restrict job_files access to jobs that are not terminal
That should fix https://sentry.galaxyproject.org/share/issue/c4eb157823c240d5a664ec6517354db2/
2024-05-23 23:11:38 +02:00
John Davis a047ea0861 Use config_section to distinguish between galaxy and ts or other apps 2024-05-23 14:34:10 -04:00
mvdbeek 59803e968e Check dataset state when attempting to acces dataset contents 2024-05-23 18:45:13 +02:00
Ahmed Hamid AwanandNicola Soranzo 538570b3e2 Update lib/galaxy/webapps/galaxy/services/workflows.py
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2024-05-23 11:05:41 -05:00
John Chilton 37aeadd146 Merge pull request #18179 from mvdbeek/fix_extra_files_dir_only_collection_pulsar
[24.0] Don't fail metadata if we only have an extra output files dir
2024-05-23 09:10:36 -04:00
Dannon 326e29158f Merge pull request #18211 from mvdbeek/fix_pca_3d_rendering_and_error_handling
[24.0] Fix pca 3d rendering of tabular files and visualization error handling in general
2024-05-23 09:09:50 -04:00
mvdbeek 15fa3a43f7 Fix display of error messages in visualizations 2024-05-23 13:18:20 +02:00
Marius van den Beek 825a045b0a Merge pull request #18208 from mvdbeek/exc_info_in_object_store_delete
[24.0] Include stack when reporting delete error
2024-05-23 11:48:08 +02:00
Marius van den Beek 921f181510 Merge pull request #18207 from mvdbeek/fix_genome_build_int
[24.0] Add string cast for dbkey / genome_build
2024-05-23 11:47:06 +02:00
Marius van den Beek 154aaa162d Merge pull request #18193 from mvdbeek/fix_tag_filter_workflow_run_form
[24.0] Fix submitted value in workflow run form if data is constrained by tag filter
2024-05-23 11:31:32 +02:00