diff --git a/config/galaxy.ini.sample b/config/galaxy.ini.sample index b5e6ab43fa4..88799042671 100644 --- a/config/galaxy.ini.sample +++ b/config/galaxy.ini.sample @@ -207,8 +207,6 @@ paste.app_factory = galaxy.web.buildapp:app_factory # Set to True to instruct Galaxy to look for and install missing tool # dependencies before each job runs. #conda_auto_install = False -# Set to True to perform additional checking of installed Conda environment -#conda_verbose_install_check=False # 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. #conda_auto_init = False diff --git a/doc/source/admin/interactive_environments.rst b/doc/source/admin/interactive_environments.rst index c333715e1f0..d215e36d50f 100644 --- a/doc/source/admin/interactive_environments.rst +++ b/doc/source/admin/interactive_environments.rst @@ -122,6 +122,7 @@ As you can see most of these variables map directly to the command line arguments to the NodeJS script. There are a few extra parameters which will be needed if you run Galaxy behind an upstream proxy like nginx or Apache: + .. code-block:: ini dynamic_proxy_external_proxy=True @@ -182,7 +183,7 @@ Please note you will need to be using apache2.4 with ``mod_proxy_wstunnel``. # Project Jupyter / IPython specific. Other IEs may require their own routes. location ~ ^/galaxy/gie_proxy/jupyter/(?[^/]+)/api/kernels(?.*?)$ { - proxy_pass http://localhost:8800/galaxy/gie_proxy/$nbtype/api/kernels$rest; + proxy_pass http://localhost:8800/galaxy/gie_proxy/jupyter/$nbtype/api/kernels$rest; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; diff --git a/lib/galaxy/jobs/runners/cli.py b/lib/galaxy/jobs/runners/cli.py index e33109f03c8..70e8c3fde7e 100644 --- a/lib/galaxy/jobs/runners/cli.py +++ b/lib/galaxy/jobs/runners/cli.py @@ -158,13 +158,16 @@ class ShellJobRunner( AsynchronousJobRunner ): ajs.job_wrapper.change_state( state ) else: if state != old_state: - log.debug("(%s/%s) state change: %s" % ( id_tag, external_job_id, state ) ) + log.debug("(%s/%s) state change: from %s to %s" % ( id_tag, external_job_id, old_state, state ) ) ajs.job_wrapper.change_state( state ) if state == model.Job.states.RUNNING and not ajs.running: ajs.running = True ajs.job_wrapper.change_state( model.Job.states.RUNNING ) ajs.old_state = state - new_watched.append( ajs ) + if state == model.Job.states.OK: + self.work_queue.put( ( self.finish_job, ajs ) ) + else: + new_watched.append( ajs ) # Replace the watch list with the updated version self.watched = new_watched diff --git a/lib/galaxy/tools/deps/conda_util.py b/lib/galaxy/tools/deps/conda_util.py index 66d3c0dc7a5..9914fdd016f 100644 --- a/lib/galaxy/tools/deps/conda_util.py +++ b/lib/galaxy/tools/deps/conda_util.py @@ -423,33 +423,19 @@ def is_target_available(conda_target, conda_context=None, channels_override=None return False -def is_conda_target_installed(conda_target, conda_context=None, verbose_install_check=False): +def is_conda_target_installed(conda_target, conda_context=None): conda_context = _ensure_conda_context(conda_context) # fail by default - success = False if conda_context.has_env(conda_target.install_environment): - if not verbose_install_check: - return True - # because export_list directs output to a file we - # need to make a temporary file, not use StringIO - f, package_list_file = tempfile.mkstemp(suffix='.env_packages') - os.close(f) - conda_context.export_list(conda_target.install_environment, package_list_file) - search_pattern = conda_target.package_specifier + '=' - with open(package_list_file) as input_file: - for line in input_file: - if line.startswith(search_pattern): - success = True - break - os.remove(package_list_file) - return success + return True + else: + return False -def filter_installed_targets(conda_targets, conda_context=None, verbose_install_check=False): +def filter_installed_targets(conda_targets, conda_context=None): conda_context = _ensure_conda_context(conda_context) installed = functools.partial(is_conda_target_installed, - conda_context=conda_context, - verbose_install_check=verbose_install_check) + conda_context=conda_context) return list(filter(installed, conda_targets)) diff --git a/lib/galaxy/tools/deps/resolvers/conda.py b/lib/galaxy/tools/deps/resolvers/conda.py index e55253c6d06..fd23349cd45 100644 --- a/lib/galaxy/tools/deps/resolvers/conda.py +++ b/lib/galaxy/tools/deps/resolvers/conda.py @@ -68,7 +68,6 @@ class CondaDependencyResolver(DependencyResolver, ListableDependencyResolver, In conda_exec = get_option("exec") debug = _string_as_bool(get_option("debug")) - verbose_install_check = _string_as_bool(get_option("verbose_install_check")) ensure_channels = get_option("ensure_channels") use_path_exec = get_option("use_path_exec") if use_path_exec is None: @@ -96,7 +95,6 @@ class CondaDependencyResolver(DependencyResolver, ListableDependencyResolver, In self.disabled = not galaxy.tools.deps.installable.ensure_installed(conda_context, install_conda, self.auto_init) self.auto_install = auto_install self.copy_dependencies = copy_dependencies - self.verbose_install_check = verbose_install_check def resolve(self, name, version, type, **kwds): # Check for conda just not being there, this way we can enable @@ -113,7 +111,7 @@ class CondaDependencyResolver(DependencyResolver, ListableDependencyResolver, In conda_target = CondaTarget(name, version=version) is_installed = is_conda_target_installed( - conda_target, conda_context=self.conda_context, verbose_install_check=self.verbose_install_check + conda_target, conda_context=self.conda_context ) job_directory = kwds.get("job_directory", None) @@ -178,7 +176,7 @@ class CondaDependencyResolver(DependencyResolver, ListableDependencyResolver, In conda_target = CondaTarget(name, version=version) is_installed = is_conda_target_installed( - conda_target, conda_context=self.conda_context, verbose_install_check=self.verbose_install_check + conda_target, conda_context=self.conda_context ) if is_installed: @@ -190,7 +188,7 @@ class CondaDependencyResolver(DependencyResolver, ListableDependencyResolver, In else: # Recheck if installed is_installed = is_conda_target_installed( - conda_target, conda_context=self.conda_context, verbose_install_check=self.verbose_install_check + conda_target, conda_context=self.conda_context ) if not is_installed: log.debug("Removing failed conda install of {}, version '{}'".format(name, version))