From 90caa402a5cf42768c8c959ad87cf43d485e0219 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Thu, 24 Oct 2024 10:05:41 -0400 Subject: [PATCH] Disable conda_auto_init default = true when not running from source --- doc/source/admin/galaxy_options.rst | 3 ++- lib/galaxy/config/__init__.py | 3 +++ lib/galaxy/config/sample/galaxy.yml.sample | 3 ++- lib/galaxy/config/schemas/config_schema.yml | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/source/admin/galaxy_options.rst b/doc/source/admin/galaxy_options.rst index 45386d72d861..393b54cb92a6 100644 --- a/doc/source/admin/galaxy_options.rst +++ b/doc/source/admin/galaxy_options.rst @@ -509,7 +509,8 @@ :Description: Set to true to instruct Galaxy to install Conda from the web automatically if it cannot find a local copy and conda_exec is not - configured. + configured. The default is true if running Galaxy from source, and + false if running from installed packages. :Default: ``true`` :Type: bool diff --git a/lib/galaxy/config/__init__.py b/lib/galaxy/config/__init__.py index 80d57ab04bf6..812ca96fe6b9 100644 --- a/lib/galaxy/config/__init__.py +++ b/lib/galaxy/config/__init__.py @@ -982,6 +982,9 @@ def _process_config(self, kwargs: Dict[str, Any]) -> None: # self, populate config_dict self.config_dict["conda_mapping_files"] = [self.local_conda_mapping_file, _default_mapping] + if not running_from_source and kwargs.get("conda_auto_init") is None: + self.config_dict["conda_auto_init"] = False + if self.container_resolvers_config_file: self.container_resolvers_config_file = self._in_config_dir(self.container_resolvers_config_file) diff --git a/lib/galaxy/config/sample/galaxy.yml.sample b/lib/galaxy/config/sample/galaxy.yml.sample index d6718cf176e7..dca66e799347 100644 --- a/lib/galaxy/config/sample/galaxy.yml.sample +++ b/lib/galaxy/config/sample/galaxy.yml.sample @@ -589,7 +589,8 @@ galaxy: # Set to true to instruct Galaxy to install Conda from the web # automatically if it cannot find a local copy and conda_exec is not - # configured. + # configured. The default is true if running Galaxy from source, and + # false if running from installed packages. #conda_auto_init: true # You must set this to true if conda_prefix and job_working_directory diff --git a/lib/galaxy/config/schemas/config_schema.yml b/lib/galaxy/config/schemas/config_schema.yml index 3ed0c7455e74..06963d364186 100644 --- a/lib/galaxy/config/schemas/config_schema.yml +++ b/lib/galaxy/config/schemas/config_schema.yml @@ -386,7 +386,8 @@ mapping: required: false desc: | Set to true to instruct Galaxy to install Conda from the web automatically - if it cannot find a local copy and conda_exec is not configured. + if it cannot find a local copy and conda_exec is not configured. The default is + true if running Galaxy from source, and false if running from installed packages. conda_copy_dependencies: type: bool