Commit Graph
61966 Commits
Author SHA1 Message Date
John Davis bd56131ebd Split script into admin and dev
TODO: remove duplication between db.py and db_dev.py (split into
multiple commits is intentional)
2022-09-28 15:45:00 -04:00
John Davis 6c64a44a10 Remove run_alembic.sh from root; user scripts/run_alembic.py instead.
Rationale: move developer-focused scripts out of galaxy root.
2022-09-28 15:45:00 -04:00
John Davis e43552fdc5 Rename db.sh > manage_db.sh, following code review feedback 2022-09-28 15:45:00 -04:00
John DavisandMarius van den Beek 170e4a4be2 Update lib/galaxy/model/migrations/README.md
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>

Update lib/galaxy/model/migrations/README.md

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>

Update lib/galaxy/model/migrations/README.md

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>

Update lib/galaxy/model/migrations/README.md

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
2022-09-28 15:44:41 -04:00
John Davis f049a38683 Rewrite migrations documentation 2022-09-28 15:35:51 -04:00
John Davis 503adcdf3b Override script name to display correct usage in cli help 2022-09-28 15:32:16 -04:00
John Davis 0c348a5759 Update test comments 2022-09-28 15:32:10 -04:00
John Davis dfd32a2ee8 Add type hints 2022-09-28 15:32:01 -04:00
John Davis 5902cadf7f Remove duplicate migration code 2022-09-28 15:31:52 -04:00
John Davis 6fcc58a85c Drop LegacyScripts: no longer used 2022-09-28 15:31:25 -04:00
John Davis b0a3c013ab Remove manage_db_adapter.py
We no longer need to translate the arguments of manage_db.sh into
arguments for alembic. The new facade script for alembic (db.sh)
accesses the alembic api programmatically.
2022-09-28 15:27:50 -04:00
John Davis 5e8add0e46 Rename migrate_db.py > run_alembic.py
This is consistent with other similar pairs of files:
[script-name].sh invoking scripts/[script-name].py (check_model, create_roolshed_db, db)

Also, the python file does not require exec permissions.
2022-09-28 15:25:51 -04:00
John Davis 5d376fdacc Drop create_db.sh, create_db.py (see note)
For ToolShed, we have create_toolshed_db.sh.

For galaxy and toolshed install databases (gxy and tsi branches under
alembic), we use the `init` subcommand of the `db.sh` script (`./db.sh
init`), which has exactly the same functionality as these deleted
scripts.

To the best of my knowledge, these are not used anywhere else (unlike,
for example, scripts/manage_db.py, which is called from the
ansible-galaxy role).
2022-09-28 15:25:43 -04:00
John Davis ed1f6702e5 Rename manage_db.sh to manage_toolshed_db.sh. Limit to TS operations.
Becuase everything else is handled via db.sh or run_alembic.sh
2022-09-28 15:25:31 -04:00
John Davis dc823d589c Misc edits to db.sh 2022-09-28 15:25:21 -04:00
John Davis d8e8a8efb6 Add --raiseerr option; hide error traceback by default 2022-09-28 15:25:14 -04:00
John Davis b4b76c91a2 Add missing tests 2022-09-28 15:25:06 -04:00
John Davis 40249133cc Revise db.sh cli command aliases
1. Remove aliases from subcommands that change things (upgrade, downgrade,
revision, init) to reduce risk of accidental usage.

2. Add aliases to readonly subcommands (history, show, version,
   dbversion)

3. Minor edits
2022-09-28 15:24:57 -04:00
John Davis 889a8445bd Change parsing of --galaxy-config option
Rationale: alternate config file applies to all subcommands, so, I
think, it is more correct to run this:

> ./db.sh -c mygalaxy.yml upgrade some-revision-id

than this:

> ./db.sh upgrade some-revision-id -c mygalaxy.yml

That's also consistent with how alembic handles this option.
2022-09-28 15:24:49 -04:00
John Davis bf83b4347a Fix mypy by asserting object before accessing its attributes 2022-09-28 15:24:40 -04:00
John Davis e0e30a5744 Fix packages tests: script is one level up 2022-09-28 15:24:26 -04:00
John Davis 3be7c53eb9 Fix linting 2022-09-28 15:24:16 -04:00
John Davis 0c9b087543 Add init command 2022-09-28 15:24:09 -04:00
John Davis 103210cc73 Set dburl in alembic config 2022-09-28 15:24:01 -04:00
John Davis ab1854f3a7 Test against 1 or 2 databases 2022-09-28 15:23:50 -04:00
John Davis 887b882ff0 Add inline testing documentation 2022-09-28 15:23:42 -04:00
John Davis d1c9342eca Add logging to script 2022-09-28 15:23:32 -04:00
John Davis b64fda7478 Add initial draft 2022-09-28 15:23:21 -04:00
John Davis 4cd3291598 Refactor get_alembic_cfg: make available to other code 2022-09-28 15:23:09 -04:00
Dannon 4ee6b34240 Merge pull request #14715 from jdavcs/release_22.05_migration_docs
Move database migration documentation to Galaxy docs
2022-09-28 06:24:26 -04:00
John Davis ab40d01ceb Link readme to docs, don't duplicate content. 2022-09-27 15:08:41 -04:00
John Davis 84f22bac77 Add db migration documentation to docs 2022-09-27 15:03:12 -04:00
John Davis 5a748bb867 Display 'Config Options' as subheading of 'Galaxy Configuration'
This corrects a (supposedly) typo that prevented this to be displayed as
a subheading on this page: https://docs.galaxyproject.org/en/master/admin/index.html
2022-09-27 15:03:03 -04:00
John Chilton ace1e13da3 Merge pull request #14641 from mvdbeek/fix_optional_data_input_submission_expanded_tool_form
[22.05] Fix delayed optional data input handling
2022-09-22 18:08:58 -04:00
mvdbeek 17f3647a6f Test that subworkflows with disconnected optional inputs are scheduled correctly 2022-09-21 19:31:42 +02:00
mvdbeek 9a7c23335f Regression test for unspecified optional data inputs 2022-09-21 19:31:42 +02:00
mvdbeek 64cb245ddd Fix running subworkflows with disconnected optional/default inputs 2022-09-21 19:31:41 +02:00
mvdbeek 58142b8f44 Set output for optional inputs in set_outputs_for_input
This is the core of the backend fix and allows omitting optional
workflow inputs from the API. This somewhat worked previously when
`recover_mapping` didin't have to be called, but failed when a step
had to be delayed.
2022-09-21 19:29:44 +02:00
mvdbeek 146f52c5fb Move input_optional to Step for re-use 2022-09-21 19:29:43 +02:00
mvdbeek 53154ad218 Improve logging when set_outputs_for_inputs fails 2022-09-21 19:29:43 +02:00
mvdbeek a1e446a3e9 Rename WorkflowRunToolStep to WorkflowRunDefaultStep, WorkflowRunDefaultStep to WorkflowInputStep
I think these are better names that describe what they are used for.
2022-09-16 21:10:01 +02:00
mvdbeek eacf1f9b5c Render subworkflow step with replacable form param component
Tool and subworkflow steps can have replacement parameters
2022-09-16 20:50:38 +02:00
mvdbeek ebbfb0b765 Submit workflow input paramters as inputs in expanded tool form
This fixes recording optional data input module use in the expanded tool
form (and is closer to how we want to use the API).

Fixes https://github.com/galaxyproject/galaxy/issues/14611
2022-09-16 18:56:41 +02:00
Nicola Soranzo 463779b1b5 Merge branch 'release_22.01' into release_22.05 2022-09-13 12:28:05 +01:00
Nicola Soranzo 7b870dce88 Merge pull request #14607 from nsoranzo/release_22.01_pin_CacheControl
[22.01] Pin CacheControl to prevent missing dependency
2022-09-13 12:07:02 +01:00
Nicola Soranzo 77553d1711 Pin CacheControl to prevent missing dependency
schema-salad currently requires:
- "CacheControl >= 0.11.7, < 0.13"
- "lockfile >= 0.9", which is needed for CacheControl's FileCache until 0.12.11

but CacheControl 0.12.12 replaced lockfile with filelock.

Prevent the following traceback:

```
self = <cachecontrol.caches.file_cache.FileCache object at 0x7fe36ac5d190>
directory = PosixPath('/tmp/.cache/salad'), forever = False, filemode = 384
dirmode = 448, lock_class = None

    def __init__(
        self,
        directory,
        forever=False,
        filemode=0o0600,
        dirmode=0o0700,
        lock_class=None,
    ):

        try:
            if lock_class is None:
>               from filelock import FileLock
E               ModuleNotFoundError: No module named 'filelock'

/tmp/gxpkgtestenvcy0lxY/lib/python3.7/site-packages/cachecontrol/caches/file_cache.py:74: ModuleNotFoundError
```
2022-09-12 21:57:43 +01:00
David López 4d14bb4ae7 Merge pull request #14603 from nsoranzo/release_22.05_backport_14283
[22.05] Backport #14283
2022-09-12 15:52:21 +02:00
Helena 53a88b900a Update robots.txt 2022-09-12 12:55:34 +01:00
Nicola Soranzo d8986239a1 Merge branch 'release_22.01' into release_22.05 2022-09-09 17:12:29 +01:00
Nicola Soranzo eb33760312 Merge pull request #14590 from mvdbeek/fix_systemd_sample_unit
[22.01] Include /bin in sample systemd unit path
2022-09-09 13:17:59 +01:00