Traverse all registered API routes, attempt to load schema information
if available in docstring, register with an `APISpec` instance, and
convert to YAML.
if we're building a web app, but aren't using gunicorn. I don't think
this has a big impact currently, since you can only set base pools via
lib/galaxy/main.py. I think you could set up alternative logging based
on the web stack class though, and this seems cleaner.
Fixes:
```
AttributeError: 'UniverseApplication' object has no attribute 'user_manager'
File "galaxy/web/framework/decorators.py", line 312, in decorator
rval = func(self, trans, *args, **kwargs)
File "galaxy/webapps/galaxy/api/authenticate.py", line 63, in get_api_key
user = self.app.user_manager.get_user_by_identity(identity)
```
This broke when we started re-exporting jobs to update their command
line in https://github.com/galaxyproject/galaxy/pull/12459/commits/65e0ee213ae574bc0a45dfcc60e997863ff96a7c#diff-bfb854f344e56a25a86761f80a639de09add404a7a53ebde45afb908762fc1eaR161:
```
ERROR galaxy.jobs:__init__.py:1836 problem importing job outputs. stdout [] stderr [
Traceback (most recent call last):
File "metadata/set.py", line 1, in <module>
from galaxy_ext.metadata.set_metadata import set_metadata; set_metadata()
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/metadata/set_metadata.py", line 121, in set_metadata
set_metadata_portable()
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/metadata/set_metadata.py", line 307, in set_metadata_portable
export_store.export_job(job, include_job_data=False)
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/store/__init__.py", line 1320, in export_job
self.export_jobs([job], include_job_data=include_job_data)
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/store/__init__.py", line 1336, in export_jobs
job_attrs = job.serialize(self.security, self.serialization_options)
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/__init__.py", line 339, in serialize
return self._serialize(id_encoder, serialization_options)
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/__init__.py", line 1447, in _serialize
params_objects = remap(params_objects, remap_objects)
File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.7/site-packages/boltons/iterutils.py", line 1128, in remap
visited_item = visit(path, key, value)
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/__init__.py", line 1441, in remap_objects
new_id = serialization_options.get_identifier_for_id(id_encoder, obj["id"])
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/__init__.py", line 323, in get_identifier_for_id
raise NotImplementedError()
NotImplementedError
]
```
To test run `GALAXY_CONFIG_METADATA_STRATEGY=extended ./run_tests.sh
-api
lib/galaxy_test/api/test_jobs.py::JobsApiTestCase::test_dce_submission_security`
Ref:
https://docs.sqlalchemy.org/en/14/changelog/migration_20.html#library-level-but-not-driver-level-autocommit-removed-from-both-core-and-ormohttps://docs.sqlalchemy.org/en/14/changelog/migration_20.html#implicit-and-connectionless-execution-bound-metadata-removed
Exposed by the following tests:
test/unit/data/model/test_model_discovery.py::test_model_create_context_persist_hdas
test/unit/data/model/test_model_discovery.py::test_model_create_context_persist_error_hda
test/unit/data/model/test_model_discovery.py::test_persist_target_library_dataset
test/unit/data/model/test_model_discovery.py::test_persist_target_library_folder
test/unit/data/model/test_model_discovery.py::test_persist_target_hdca
/home/sergey/0dev/galaxy/_galaxy/dev/lib/galaxy/model/triggers/utils.py:8: RemovedIn20Warning: The DDLElement.execute() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed by the Connection.execute() method of Connection, or in the ORM by the Session.execute() method of Session. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
cmd.execute(bind=engine)
test/unit/data/model/test_model_discovery.py::test_model_create_context_persist_hdas
test/unit/data/model/test_model_discovery.py::test_model_create_context_persist_error_hda
test/unit/data/model/test_model_discovery.py::test_persist_target_library_dataset
test/unit/data/model/test_model_discovery.py::test_persist_target_library_folder
test/unit/data/model/test_model_discovery.py::test_persist_target_hdca
/home/sergey/0dev/galaxy/_galaxy/dev/lib/galaxy/model/triggers/utils.py:8: RemovedIn20Warning: The Engine.execute() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed by the Connection.execute() method of Connection, or in the ORM by the Session.execute() method of Session. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
cmd.execute(bind=engine)
This broke when we started re-exporting jobs to update their command
line in https://github.com/galaxyproject/galaxy/pull/12459/commits/65e0ee213ae574bc0a45dfcc60e997863ff96a7c#diff-bfb854f344e56a25a86761f80a639de09add404a7a53ebde45afb908762fc1eaR161:
```
ERROR galaxy.jobs:__init__.py:1836 problem importing job outputs. stdout [] stderr [
Traceback (most recent call last):
File "metadata/set.py", line 1, in <module>
from galaxy_ext.metadata.set_metadata import set_metadata; set_metadata()
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/metadata/set_metadata.py", line 121, in set_metadata
set_metadata_portable()
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/metadata/set_metadata.py", line 307, in set_metadata_portable
export_store.export_job(job, include_job_data=False)
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/store/__init__.py", line 1320, in export_job
self.export_jobs([job], include_job_data=include_job_data)
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/store/__init__.py", line 1336, in export_jobs
job_attrs = job.serialize(self.security, self.serialization_options)
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/__init__.py", line 339, in serialize
return self._serialize(id_encoder, serialization_options)
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/__init__.py", line 1447, in _serialize
params_objects = remap(params_objects, remap_objects)
File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.7/site-packages/boltons/iterutils.py", line 1128, in remap
visited_item = visit(path, key, value)
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/__init__.py", line 1441, in remap_objects
new_id = serialization_options.get_identifier_for_id(id_encoder, obj["id"])
File "/home/runner/work/galaxy/galaxy/galaxy root/lib/galaxy/model/__init__.py", line 323, in get_identifier_for_id
raise NotImplementedError()
NotImplementedError
]
```
To test run `GALAXY_CONFIG_METADATA_STRATEGY=extended ./run_tests.sh
-api
lib/galaxy_test/api/test_jobs.py::JobsApiTestCase::test_dce_submission_security`