From 569eeb3086dff25d507dc68c7fa7ed278145c019 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 16 Oct 2024 12:08:56 -0400 Subject: [PATCH 01/11] Fix extra call to test_data_path that requires an admin key --- lib/galaxy/tool_util/verify/interactor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tool_util/verify/interactor.py b/lib/galaxy/tool_util/verify/interactor.py index b51e2a33ad5a..08525860a000 100644 --- a/lib/galaxy/tool_util/verify/interactor.py +++ b/lib/galaxy/tool_util/verify/interactor.py @@ -560,7 +560,7 @@ def stage_data_async( file_name = None file_name_exists = False location = self._ensure_valid_location_in(test_data) - if fname: + if fname and force_path_paste: file_name = self.test_data_path(tool_id, fname, tool_version=tool_version) file_name_exists = os.path.exists(f"{file_name}") upload_from_location = not file_name_exists and location is not None @@ -575,7 +575,8 @@ def stage_data_async( if upload_from_location: tool_input.update({"files_0|url_paste": location}) elif force_path_paste: - file_name = self.test_data_path(tool_id, fname, tool_version=tool_version) + if file_name is None: + file_name = self.test_data_path(tool_id, fname, tool_version=tool_version) tool_input.update({"files_0|url_paste": f"file://{file_name}"}) else: file_content = self.test_data_download(tool_id, fname, is_output=False, tool_version=tool_version) From e1c0c089396ea11f6550d272809c4d6149e44a38 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 16 Oct 2024 18:33:33 +0200 Subject: [PATCH 02/11] Put cached jobs back into queue on handler restart and don't recover job wrapper, which will fail since we don't actually create a job working directory for cached jobs. --- lib/galaxy/jobs/handler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy/jobs/handler.py b/lib/galaxy/jobs/handler.py index 0213a797aab4..8f1d2f5f3410 100644 --- a/lib/galaxy/jobs/handler.py +++ b/lib/galaxy/jobs/handler.py @@ -309,6 +309,8 @@ def _check_job_at_startup(self, job): self.job_wrapper(job).fail( "This tool was disabled before the job completed. Please contact your Galaxy administrator." ) + elif job.copied_from_job_id: + self.queue.put((job.id, job.tool_id)) elif job.job_runner_name is not None and job.job_runner_external_id is None: # This could happen during certain revisions of Galaxy where a runner URL was persisted before the job was dispatched to a runner. log.debug(f"({job.id}) Job runner assigned but no external ID recorded, adding to the job handler queue") From 62e9b34b426dd642da4961f765080e72b149dbf0 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 16 Oct 2024 21:03:59 -0400 Subject: [PATCH 03/11] Fix typo in hasLoadingCollectionElementsError computed property As it was, false was being used as an index instead of the fallback return. --- client/src/stores/collectionElementsStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/stores/collectionElementsStore.ts b/client/src/stores/collectionElementsStore.ts index 849ae75abe1a..e457dbd81559 100644 --- a/client/src/stores/collectionElementsStore.ts +++ b/client/src/stores/collectionElementsStore.ts @@ -66,7 +66,7 @@ export const useCollectionElementsStore = defineStore("collectionElementsStore", const hasLoadingCollectionElementsError = computed(() => { return (collection: CollectionEntry) => { - return loadingCollectionElementsErrors.value[getCollectionKey(collection) ?? false]; + return loadingCollectionElementsErrors.value[getCollectionKey(collection)] ?? false; }; }); From 677c90bd0b79c2030d68850d7a14a862dfd6859a Mon Sep 17 00:00:00 2001 From: Arash Kadkhodaei Date: Thu, 17 Oct 2024 10:13:43 +0200 Subject: [PATCH 04/11] PR title update workflow --- .github/workflows/pr-title-update.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/pr-title-update.yml diff --git a/.github/workflows/pr-title-update.yml b/.github/workflows/pr-title-update.yml new file mode 100644 index 000000000000..6a4c5021f63d --- /dev/null +++ b/.github/workflows/pr-title-update.yml @@ -0,0 +1,27 @@ +name: Update PR title + +on: + pull_request_target: + types: [opened, edited] + branches: + - "release_**" + +jobs: + update-title: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v4 + - name: Update PR title + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ github.event.pull_request.number }} + TARGET_BRANCH: "${{ github.base_ref }}" + PR_TITLE: "${{ github.event.pull_request.title }}" + run: | + VERSION=$(echo $TARGET_BRANCH | grep -oP '\d+\.\d+') + if [[ -n "$VERSION" && ! "$PR_TITLE" =~ ^\[$VERSION\] ]]; then + NEW_TITLE="[$VERSION] $PR_TITLE" + gh pr edit $PR_NUMBER --title "$NEW_TITLE" + fi From 4e81a78c6137c43c989fa139b62f711e35d1919e Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 2 Sep 2024 10:16:50 +0200 Subject: [PATCH 05/11] remove defaults channel for conda https://www.theregister.com/2024/08/08/anaconda_puts_the_squeeze_on/ According to the FAQs on https://repo.anaconda.com/pkgs/ this includes `pkgs/main`, `pkgs/r`, and `pkgs/msys2`. Seems also to be a good idea because for `mulled_channels` we apparently never used it (consistency). --- lib/galaxy/config/sample/galaxy.yml.sample | 2 +- lib/galaxy/config/schemas/config_schema.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/config/sample/galaxy.yml.sample b/lib/galaxy/config/sample/galaxy.yml.sample index bb4c6fc32d4f..55a1d5388234 100644 --- a/lib/galaxy/config/sample/galaxy.yml.sample +++ b/lib/galaxy/config/sample/galaxy.yml.sample @@ -578,7 +578,7 @@ galaxy: # conda channels to enable by default # (https://conda.io/docs/user-guide/tasks/manage-channels.html) - #conda_ensure_channels: conda-forge,bioconda,defaults + #conda_ensure_channels: conda-forge,bioconda # Use locally-built conda packages. #conda_use_local: false diff --git a/lib/galaxy/config/schemas/config_schema.yml b/lib/galaxy/config/schemas/config_schema.yml index aa7f4891936d..5e0d2e352487 100644 --- a/lib/galaxy/config/schemas/config_schema.yml +++ b/lib/galaxy/config/schemas/config_schema.yml @@ -359,7 +359,7 @@ mapping: conda_ensure_channels: type: str - default: conda-forge,bioconda,defaults + default: conda-forge,bioconda required: false desc: | conda channels to enable by default From b71b6ef22e1a97e74b100358c95fabe1109d4ccd Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 2 Sep 2024 12:06:10 +0200 Subject: [PATCH 06/11] update osx startup workflow to use miniforge --- .github/workflows/osx_startup.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx_startup.yaml b/.github/workflows/osx_startup.yaml index 0a3050cbcb6b..981a44cf9a8d 100644 --- a/.github/workflows/osx_startup.yaml +++ b/.github/workflows/osx_startup.yaml @@ -49,9 +49,10 @@ jobs: with: path: .tox key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-osx - - name: Install miniconda # use this job to test using Python from a conda environment + - name: Install miniforge # use this job to test using Python from a conda environment uses: conda-incubator/setup-miniconda@v3 with: + miniforge-version: latest activate-environment: '' - name: Restore client cache uses: actions/cache@v4 From 14f382e9f09b68bb90d42101cac8e28de00a4005 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 2 Sep 2024 12:39:43 +0200 Subject: [PATCH 07/11] deprecate 32bit conda installation option can be installed manually by affected users --- lib/galaxy/tool_util/deps/conda_util.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/galaxy/tool_util/deps/conda_util.py b/lib/galaxy/tool_util/deps/conda_util.py index 4905b6091e3e..19550602ed83 100644 --- a/lib/galaxy/tool_util/deps/conda_util.py +++ b/lib/galaxy/tool_util/deps/conda_util.py @@ -60,13 +60,10 @@ def conda_link() -> str: else: url = "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh" else: - if sys.maxsize > 2**32: - if "arm64" in platform.platform(): - url = "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh" - else: - url = "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh" + if "arm64" in platform.platform(): + url = "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh" else: - url = "https://repo.anaconda.com/miniconda/Miniconda3-4.5.12-Linux-x86.sh" + url = "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh" return url From af9b9efdd6de7595af0b90d42dfe9eafdd7cd996 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Mon, 2 Sep 2024 14:03:18 +0100 Subject: [PATCH 08/11] Remove conda defaults channel from more places --- doc/source/admin/dependency_resolvers.rst | 2 +- doc/source/admin/galaxy_options.rst | 2 +- lib/galaxy/tool_util/deps/resolvers/conda.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/admin/dependency_resolvers.rst b/doc/source/admin/dependency_resolvers.rst index 19862f4c7c23..88821e74fa5d 100644 --- a/doc/source/admin/dependency_resolvers.rst +++ b/doc/source/admin/dependency_resolvers.rst @@ -207,7 +207,7 @@ debug ensure_channels Conda channels to enable by default. See https://conda.io/docs/user-guide/tasks/manage-channels.html for more information about channels. This defaults to the value of the global ``conda_ensure_channels`` option or - ``iuc,conda-forge,bioconda,defaults`` otherwise. This order should be consistent with the `Bioconda prescribed + ``conda-forge,bioconda`` otherwise. This order should be consistent with the `Bioconda prescribed order `__ if it includes ``bioconda``. auto_install diff --git a/doc/source/admin/galaxy_options.rst b/doc/source/admin/galaxy_options.rst index cdf82ab688fd..1b55117668f4 100644 --- a/doc/source/admin/galaxy_options.rst +++ b/doc/source/admin/galaxy_options.rst @@ -477,7 +477,7 @@ :Description: conda channels to enable by default (https://conda.io/docs/user-guide/tasks/manage-channels.html) -:Default: ``conda-forge,bioconda,defaults`` +:Default: ``conda-forge,bioconda`` :Type: str diff --git a/lib/galaxy/tool_util/deps/resolvers/conda.py b/lib/galaxy/tool_util/deps/resolvers/conda.py index d28fca78b42c..450e0c1b6fdd 100644 --- a/lib/galaxy/tool_util/deps/resolvers/conda.py +++ b/lib/galaxy/tool_util/deps/resolvers/conda.py @@ -45,7 +45,7 @@ DEFAULT_CONDARC_OVERRIDE = "_condarc" # Conda channel order from highest to lowest, following the one used in # https://github.com/bioconda/bioconda-recipes/blob/master/config.yml -DEFAULT_ENSURE_CHANNELS = "conda-forge,bioconda,defaults" +DEFAULT_ENSURE_CHANNELS = "conda-forge,bioconda" CONDA_SOURCE_CMD = """[ "$(basename "$CONDA_DEFAULT_ENV")" = "$(basename '{environment_path}')" ] || {{ MAX_TRIES=3 COUNT=0 From b99e3c8244df5194d0c67712031d89790dfbd46b Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 3 Sep 2024 15:40:17 +0200 Subject: [PATCH 09/11] add miniforge3 to prefix search --- lib/galaxy/tool_util/deps/conda_util.py | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/lib/galaxy/tool_util/deps/conda_util.py b/lib/galaxy/tool_util/deps/conda_util.py index 19550602ed83..3af39301e884 100644 --- a/lib/galaxy/tool_util/deps/conda_util.py +++ b/lib/galaxy/tool_util/deps/conda_util.py @@ -72,21 +72,12 @@ def find_conda_prefix() -> str: for Miniconda installs. """ home = os.path.expanduser("~") - miniconda_2_dest = os.path.join(home, "miniconda2") - miniconda_3_dest = os.path.join(home, "miniconda3") - anaconda_2_dest = os.path.join(home, "anaconda2") - anaconda_3_dest = os.path.join(home, "anaconda3") - # Prefer miniconda3 install if both available - if os.path.exists(miniconda_3_dest): - return miniconda_3_dest - elif os.path.exists(miniconda_2_dest): - return miniconda_2_dest - elif os.path.exists(anaconda_3_dest): - return anaconda_3_dest - elif os.path.exists(anaconda_2_dest): - return anaconda_2_dest - else: - return miniconda_3_dest + destinations = ["miniforge3", "miniconda3", "miniconda2", "anaconda3", "anaconda2"] + for destination in destinations: + destination = os.path.join(home, destination) + if os.path.exists(destination): + return destination + return "miniforge3" class CondaContext(installable.InstallableContext): From 57b36669bbf69c3fbda4b1f272d8cf5e6fe21b68 Mon Sep 17 00:00:00 2001 From: M Bernt Date: Tue, 3 Sep 2024 15:55:15 +0200 Subject: [PATCH 10/11] also add home for default return Co-authored-by: Nicola Soranzo --- lib/galaxy/tool_util/deps/conda_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/deps/conda_util.py b/lib/galaxy/tool_util/deps/conda_util.py index 3af39301e884..8bead7148a5d 100644 --- a/lib/galaxy/tool_util/deps/conda_util.py +++ b/lib/galaxy/tool_util/deps/conda_util.py @@ -77,7 +77,7 @@ def find_conda_prefix() -> str: destination = os.path.join(home, destination) if os.path.exists(destination): return destination - return "miniforge3" + return os.path.join(home, "miniforge3") class CondaContext(installable.InstallableContext): From 56fae9bc6e51a317767607e5c842ae34204aaad0 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 21 Oct 2024 21:32:34 +0200 Subject: [PATCH 11/11] reset default channels --- lib/galaxy/tool_util/deps/resolvers/conda.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/deps/resolvers/conda.py b/lib/galaxy/tool_util/deps/resolvers/conda.py index 450e0c1b6fdd..d28fca78b42c 100644 --- a/lib/galaxy/tool_util/deps/resolvers/conda.py +++ b/lib/galaxy/tool_util/deps/resolvers/conda.py @@ -45,7 +45,7 @@ DEFAULT_CONDARC_OVERRIDE = "_condarc" # Conda channel order from highest to lowest, following the one used in # https://github.com/bioconda/bioconda-recipes/blob/master/config.yml -DEFAULT_ENSURE_CHANNELS = "conda-forge,bioconda" +DEFAULT_ENSURE_CHANNELS = "conda-forge,bioconda,defaults" CONDA_SOURCE_CMD = """[ "$(basename "$CONDA_DEFAULT_ENV")" = "$(basename '{environment_path}')" ] || {{ MAX_TRIES=3 COUNT=0