Currently when uploading datasets with associated hashes, this were
only validated if `validate_hashes=True` was also passed in the
request.
This commit drops `validate_hashes` completely and always validates
hashes when they were provided.
And remove `default_view` query parameter parsing. That was never meant
to be definable via the API, users were meant to set the view, and the
controller code sets the appropriate default_view.
Fixes
https://sentry.galaxyproject.org/share/issue/e26374bcf34f4ac0aed92c343c5a1fe6/:
```
App Only
Full
Raw
WouldBlock: null
File "anyio/streams/memory.py", line 94, in receive
return self.receive_nowait()
File "anyio/streams/memory.py", line 89, in receive_nowait
raise WouldBlock
EndOfStream: null
File "starlette/middleware/base.py", line 43, in call_next
message = await recv_stream.receive()
File "anyio/streams/memory.py", line 114, in receive
raise EndOfStream
TypeError: serialize_to_view() got multiple values for keyword argument 'default_view'
File "starlette/middleware/base.py", line 68, in __call__
response = await self.dispatch_func(request, call_next)
File "galaxy/webapps/galaxy/fast_app.py", line 103, in add_x_frame_options
response = await call_next(request)
File "starlette/middleware/base.py", line 46, in call_next
raise app_exc
File "starlette/middleware/base.py", line 36, in coro
await self.app(scope, request.receive, send_stream.send)
File "starlette/exceptions.py", line 93, in __call__
raise exc
File "starlette/exceptions.py", line 82, in __call__
await self.app(scope, receive, sender)
File "fastapi/middleware/asyncexitstack.py", line 21, in __call__
raise e
File "fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "starlette/routing.py", line 670, in __call__
await route.handle(scope, receive, send)
File "starlette/routing.py", line 266, in handle
await self.app(scope, receive, send)
File "starlette/routing.py", line 65, in app
response = await func(request)
File "fastapi/routing.py", line 227, in app
raw_response = await run_endpoint_function(
File "fastapi/routing.py", line 162, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "galaxy/webapps/galaxy/api/history_contents.py", line 593, in create
return self.service.create(trans, history_id, payload, serialization_params)
File "galaxy/webapps/galaxy/services/history_contents.py", line 527, in create
return self.__create_datasets_from_library_folder(trans, history, payload, serialization_params)
File "galaxy/webapps/galaxy/services/history_contents.py", line 1336, in __create_datasets_from_library_folder
hda_dict = self.hda_serializer.serialize_to_view(
```
- Improved error handling and cleanup a past-John TODO.
- Moves "api/users/current" logic into a central place and allows that paradigm to work for user update.
- Downstream this abstraction allows that logic to be used for disk usage stuff as well.
- Cleans up object store selection branches in other small ways.
- Improves options and display around discarded datasets.
- Adds new APIs for importing model stores.
- Adds support to model store layer for importing/exporting workflow invocations and APIs and tests to support this.
- Add new DEFERRED dataset state - with APIs for materializing them or the option to defer them on the worker node if using tool_evaluation_strategy=remote on the job destination.
- UI and API options for uploading deferred datasets individually or into collections.
Sometimes the dataset is not ready when calling the PATCH action resulting in the error:
"This dataset is currently being used as input or output. You cannot edit metadata until the jobs have completed or you have canceled them."