Commit Graph
30425 Commits
Author SHA1 Message Date
Sergey Golitsynskiy f59a1ace97 Wrap sql stms in text() (model/) 2022-03-17 12:41:47 -04:00
Sergey Golitsynskiy 64655d09b7 Fix mypy error: ignore dynamic attr 2022-03-16 16:53:54 -04:00
Sergey Golitsynskiy 158b9f0a70 s/eagerload/joinedload (SQLAlchemy 2.0)
Ref: https://docs.sqlalchemy.org/en/14/orm/loading_relationships.html?highlight=eagerload#sqlalchemy.orm.eagerload
2022-03-16 16:48:33 -04:00
Sergey Golitsynskiy dbbbc6c498 Use class attr in load options (_contained_id_map)
TODO: database.actions can be fixed only after moving Dataset to
declarative mapping.
2022-03-16 16:32:54 -04:00
Sergey Golitsynskiy 823ba91110 Use class attr in load options (_subcontainer_id_map) 2022-03-16 16:16:39 -04:00
Sergey Golitsynskiy 20f6e8d7a1 Use text() to wrap sql 2022-03-16 15:16:06 -04:00
Sergey Golitsynskiy 0963a02fb9 Use class attr in load options (all_roles()) 2022-03-16 15:05:35 -04:00
Sergey Golitsynskiy c2bee38662 Use text() to wrap sql string
Fixes RemovedIn20Warning
Ref: https://docs.sqlalchemy.org/en/14/changelog/migration_20.html#execute-method-more-strict-execution-options-are-more-prominent
2022-03-16 14:40:24 -04:00
Sergey Golitsynskiy 25985fc991 Use class attributes instead of strings in load options
Fixes multiple instances of RemovedIn20Warning
Joining / loading on relationships uses attributes, not strings
Ref: https://docs.sqlalchemy.org/en/14/changelog/migration_20.html#orm-query-joining-loading-on-relationships-uses-attributes-not-strings
2022-03-16 14:24:58 -04:00
Sergey Golitsynskiy 63e613436d Fix implicit exection and autocommit (both removed in 2.0)
Ref:
https://docs.sqlalchemy.org/en/14/changelog/migration_20.html#library-level-but-not-driver-level-autocommit-removed-from-both-core-and-ormo
https://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)
2022-03-16 12:16:43 -04:00
Sergey Golitsynskiy 41d7cf20e4 Merge pull request #13541 from ic4f/dev_13376_migration
Add source_metadata column to workflow table as alembic revision
2022-03-16 11:01:25 -04:00
John Chilton a132cf5892 Fix broken merge. 2022-03-15 17:40:46 -04:00
John Chilton 72f3a6f465 Merge branch 'release_22.01' into dev 2022-03-15 14:51:10 -04:00
Dannon 86f696cc0b Merge pull request #13546 from mvdbeek/fix_yaml_preview_firefox
[22.01] Fix yaml preview in firefox
2022-03-15 12:47:43 -04:00
mvdbeek 6806a0f995 Make gravity import conditional 2022-03-15 16:59:58 +01:00
mvdbeek 66406ffa72 Fix yaml preview in firefox
by using standard text/plain content-type.
Fixes https://github.com/galaxyproject/galaxy/issues/13295.
2022-03-15 16:04:10 +01:00
mvdbeek a8d9801785 Merge branch 'release_22.01' into dev 2022-03-15 15:21:15 +01:00
Marius van den Beek 083d94dfca Merge pull request #13531 from mvdbeek/include_gravity_in_sample_config
[22.01] Include gravity in sample config
2022-03-15 14:47:49 +01:00
mvdbeek 90672de88d Rebuild sample for gravity 0.11.0 2022-03-15 12:02:06 +01:00
Dannon 513c4c1bd1 Merge pull request #13529 from ic4f/dev_alembic_doc1
Add link to issue to error message
2022-03-15 06:38:24 -04:00
Marius van den Beek 550f47db9e Merge pull request #13540 from mvdbeek/dev
Merge release_22.01 into dev
2022-03-15 11:30:18 +01:00
Sergey GolitsynskiyandDavid López 77254915a7 Fix dumb mistake
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
2022-03-14 17:46:21 -04:00
Sergey Golitsynskiy 1b9be1e61a Factor out drop_column pattern into a util module 2022-03-14 16:12:33 -04:00
Sergey GolitsynskiyandMarius van den Beek 9db6c98fcb Update lib/galaxy/model/migrations/alembic/versions_gxy/b182f655505f_add_workflow_source_metadata_column.py
Drop import

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
2022-03-14 14:07:46 -04:00
Sergey Golitsynskiy 6bb0125664 Add source_metadata column to workflow table
The context manager in the downgrade() function is a standard workaround
for dealing with the limitations of SQLite's alter_table statement.

Ref:
https://alembic.sqlalchemy.org/en/latest/ops.html?highlight=batch_alter_table#alembic.operations.Operations.batch_alter_table
https://alembic.sqlalchemy.org/en/latest/batch.html#batch-migrations
2022-03-14 13:36:57 -04:00
mvdbeek faea1c8211 Merge branch 'release_22.01' into dev 2022-03-14 17:06:49 +01:00
Nicola Soranzo 0c80836c34 Upgrade syntax to Python 3.7
using `ack --type=python -f | grep -v '^tools/' | xargs pyupgrade --py37-plus`

Also more refactoring of Python files in `packages/` .
2022-03-14 14:57:43 +00:00
Dannon 4e742cdfcf Merge pull request #13536 from mvdbeek/content_id_issue
[22.01] Return actual tool id instead of specified tool id in workflow step
2022-03-14 10:49:54 -04:00
Dannon c8901b1bb1 Merge pull request #13514 from mvdbeek/support_preload
[22.01] Support ``--preload`` and worker_id for server processes
2022-03-14 10:24:29 -04:00
mvdbeek 4bb6802d31 Return actual tool id instead of specified tool id in step
We do also return the version changes in the module, so this should be
fine. Fixes https://github.com/galaxyproject/galaxy/issues/13524.
2022-03-14 13:37:50 +01:00
Nicola Soranzo a6b1238be7 Fix CondaSearch to use conda from PATH and CondaContext.exec_search()
The `conda` package on PyPI is severely outdated and unmaintained, and
the output of `run_command("search", ...)` did not parse correctly.

Fix broken `test_conda_search` unit test.
2022-03-13 20:34:40 +00:00
Nicola Soranzo dabc6f6389 Add exec_search() method to CondaContext
Rework `best_search_result()` and `CondaInDockerContext` to use it.
2022-03-13 20:34:39 +00:00
Nicola Soranzo dbf7ac364a Check GitHub API rate limit in GitHubSearch. Deprecate get_json() search
Follow-up on https://github.com/galaxyproject/galaxy/pull/13509 .
2022-03-13 20:34:31 +00:00
mvdbeek 0f65081127 Rebuild galaxy.yml.sample 2022-03-13 16:44:35 +01:00
mvdbeek 07a763eede Include gravity sample schema in galaxy.yml.sample 2022-03-13 16:44:11 +01:00
galaxybot 74c531135e Update Python dependencies 2022-03-12 03:11:18 +00:00
Sergey Golitsynskiy 41a60c7a2a Add link to issue to error message 2022-03-11 12:00:04 -05:00
Marius van den Beek 63ab54651a Merge pull request #13513 from ic4f/dev_alembic20_rebase2_1
Reorganized alembic branch
2022-03-11 09:38:26 +01:00
Sergey Golitsynskiy 44d245f820 Improve error message when SA Migrate version is incorrect
See inline comment ("version too old" is misleading if the incorrect
version is more recent than what the system expects).
2022-03-11 00:53:49 -05:00
mvdbeek c523529411 Revert "Merge pull request #13285 from mvdbeek/null_text_values"
This reverts commit 2549792d42, reversing
changes made to 0223188e59.

Fixes https://github.com/galaxyproject/galaxy/issues/13516, at the cost
of not respecting required text parameters.
2022-03-10 20:56:20 +01:00
Marius van den BeekandNicola Soranzo c98e13befe Skip unnecessary list comprehension
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2022-03-10 19:41:03 +01:00
Sergey Golitsynskiy 84d5787aa2 Drop new migration script (see note)
This will be added as an alembic revision as a separate commit
2022-03-10 12:32:46 -05:00
Sergey Golitsynskiy 1421e7ad7b Apply formatting 2022-03-10 12:25:21 -05:00
Sergey Golitsynskiy 7535159289 Manually re-apply edits to app (from config), mapping 2022-03-10 12:25:15 -05:00
mvdbeek d655aa3e8a Replicate log_startup for GunicornApplicationStack
Not loving it, but fixes https://github.com/galaxyproject/galaxy/issues/13515
2022-03-10 17:15:37 +01:00
mvdbeek 3fa572d612 First pass at supporting --preload and worker_id
We do need to include some kind of worker id in the server_name. If we
don't do this and we start with multiple workers the internal
QueueWorker won't work and multiple processes can pick up the same job
if the web process is also a job handler.
2022-03-10 17:15:37 +01:00
John Chilton 400c4ee465 Improved API exceptions for serializing views. 2022-03-10 10:51:30 -05:00
John Chilton 62dae772ec Add model stores manager.
Reused for a bunch of things in the deferred data branch but it does simplify the tasks file for now and move more logic into managers - which I think is a better place.
2022-03-10 10:51:28 -05:00
John Chilton 3bb3e90e5d Rework page creation in populators. 2022-03-10 10:51:27 -05:00
Sergey Golitsynskiy 67a4fa83b2 Remove vault table revision (part of 22.01) 2022-03-09 18:41:50 -05:00