diff --git a/client/gulpfile.js b/client/gulpfile.js index ca806b726c76..9766e256fd16 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -120,6 +120,20 @@ function buildPlugins(callback, forceRebuild) { skipBuild = false; } else { if (fs.existsSync(hashFilePath)) { + const hashFileContent = fs.readFileSync(hashFilePath, "utf8").trim(); + const isHash = /^[0-9a-f]{7,40}$/.test(hashFileContent); // Check for a 7 to 40 character hexadecimal string + + if (!isHash) { + console.log(`Hash file for ${pluginName} exists but does not have a valid git hash.`); + skipBuild = false; + } else { + skipBuild = + child_process.spawnSync("git", ["diff", "--quiet", hashFileContent, "--", pluginDir], { + stdio: "inherit", + shell: true, + }).status === 0; + } + skipBuild = child_process.spawnSync("git", ["diff", "--quiet", `$(cat ${hashFilePath})`, "--", pluginDir], { stdio: "inherit", diff --git a/lib/galaxy/config/__init__.py b/lib/galaxy/config/__init__.py index 70f43efd9225..a3dfa347e627 100644 --- a/lib/galaxy/config/__init__.py +++ b/lib/galaxy/config/__init__.py @@ -861,7 +861,14 @@ def _process_config(self, kwargs: Dict[str, Any]) -> None: self.install_database_engine_options = get_database_engine_options(kwargs, model_prefix="install_") self.shared_home_dir = kwargs.get("shared_home_dir") self.cookie_path = kwargs.get("cookie_path") - self.tool_path = self._in_root_dir(self.tool_path) + if not running_from_source and kwargs.get("tool_path") is None: + try: + self.tool_path = str(files("galaxy.tools") / "bundled") + except ModuleNotFoundError: + # Might not be a full galaxy installation + self.tool_path = self._in_root_dir(self.tool_path) + else: + self.tool_path = self._in_root_dir(self.tool_path) self.tool_data_path = self._in_root_dir(self.tool_data_path) if not running_from_source and kwargs.get("tool_data_path") is None: self.tool_data_path = self._in_data_dir(self.schema.defaults["tool_data_path"]) diff --git a/lib/galaxy/files/sources/s3fs.py b/lib/galaxy/files/sources/s3fs.py index 6234391409c8..e2a654b16309 100644 --- a/lib/galaxy/files/sources/s3fs.py +++ b/lib/galaxy/files/sources/s3fs.py @@ -71,7 +71,8 @@ def _realize_to(self, source_path, native_path, user_context=None, opts: Optiona self._open_fs(user_context=user_context, opts=opts).download(bucket_path, native_path) def _write_from(self, target_path, native_path, user_context=None, opts: Optional[FilesSourceOptions] = None): - raise NotImplementedError() + bucket_path = self._bucket_path(target_path) + self._open_fs(user_context=user_context, opts=opts).upload(native_path, bucket_path) def _bucket_path(self, path: str): if path.startswith("s3://"): diff --git a/packages/web_apps/setup.cfg b/packages/web_apps/setup.cfg index 17de386f4c12..86efbb04b7bf 100644 --- a/packages/web_apps/setup.cfg +++ b/packages/web_apps/setup.cfg @@ -36,7 +36,7 @@ install_requires = galaxy-data galaxy-job-execution galaxy-tool-util - galaxy-util + galaxy-util[jstree,template] galaxy-web-framework galaxy-web-stack a2wsgi