From 666696c6660ef1c247db115b442cc999adb77a67 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 13 Nov 2023 15:25:58 +0100 Subject: [PATCH 01/30] extend regex groups in stdio regex matchs idea came up here https://github.com/galaxyproject/tools-iuc/issues/5629#issuecomment-1807050561 --- lib/galaxy/tool_util/output_checker.py | 3 ++- lib/galaxy/tool_util/xsd/galaxy.xsd | 21 +++++++++++++++++++++ test/unit/tool_util/test_output_checker.py | 22 ++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/output_checker.py b/lib/galaxy/tool_util/output_checker.py index 8612737da7c9..04012fbb77a6 100644 --- a/lib/galaxy/tool_util/output_checker.py +++ b/lib/galaxy/tool_util/output_checker.py @@ -176,8 +176,9 @@ def __regex_err_msg(match, stream, regex): # If there's a description for the regular expression, then use it. # Otherwise, we'll take the first 256 characters of the match. + print(f"{regex.desc=}") if regex.desc is not None: - desc += regex.desc + desc += match.expand(regex.desc) else: desc += f"Matched on {match_str}" return { diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index e14bbd8a05fe..da8775aa7e88 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -7009,6 +7009,27 @@ stderr are checked. If ``Branch A`` is at the beginning of stdout or stderr, the a warning will be registered and the source that contained ``Branch A`` will be prepended with the warning ``Warning: Branch A was taken in execution``. +Since Galaxy 24.0 groups defines in the regular expression are expanded in the +description (using the syntax of the [``expand`` function](https://docs.python.org/3/library/re.html#re.Match.expand)). +For the first ``regex`` in the following example the ``\1`` will be replaced +by the content of the text matching ``.*`` that follows on ``INFO: ``, +i.e. the content of the first group. +The second regular expression defines a named group ``error_message`` +which then replaces the corresponding placeholder ``\g`` in the +description. Notethe quoting of the ``<`` and ``>`` characters in XML. + +```xml + + + + +``` ]]> diff --git a/test/unit/tool_util/test_output_checker.py b/test/unit/tool_util/test_output_checker.py index 6938bbf85ad5..8d181006c8dd 100644 --- a/test/unit/tool_util/test_output_checker.py +++ b/test/unit/tool_util/test_output_checker.py @@ -72,6 +72,28 @@ def test_stderr_regex_positive_match(self): self.stderr = "foobar" self.__assertNotSuccessful() + def test_stderr_regex_group_positive_match(self): + regex = ToolStdioRegex() + regex.stderr_match = True + regex.match = "ERROR: (.{3})bar" + regex.desc = r"\1" + self.__add_regex(regex) + self.stderr = "ERROR: foobar" + _, _, _, job_messages = self.__check_output() + assert job_messages[0]['desc'] == "Fatal error: foo" + self.__assertNotSuccessful() + + def test_stderr_regex_namedgroup_positive_match(self): + regex = ToolStdioRegex() + regex.stderr_match = True + regex.match = "ERROR: (?P.{3})bar" + regex.desc = "\g" + self.__add_regex(regex) + self.stderr = "ERROR: foobar" + _, _, _, job_messages = self.__check_output() + assert job_messages[0]['desc'] == "Fatal error: foo" + self.__assertNotSuccessful() + def test_stdout_ignored_for_stderr_regexes(self): regex = ToolStdioRegex() regex.stderr_match = True From 5afeb45f5655e6f094b3e1f4244a473ff39c4609 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 13 Nov 2023 15:28:12 +0100 Subject: [PATCH 02/30] temp change to test tool --- test/functional/tools/qc_stdout.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/tools/qc_stdout.xml b/test/functional/tools/qc_stdout.xml index 634f48a6396b..8a9ffcf1764a 100644 --- a/test/functional/tools/qc_stdout.xml +++ b/test/functional/tools/qc_stdout.xml @@ -1,6 +1,7 @@ - + + Date: Mon, 13 Nov 2023 17:23:05 +0100 Subject: [PATCH 03/30] fix tests --- test/functional/tools/qc_stdout.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/tools/qc_stdout.xml b/test/functional/tools/qc_stdout.xml index 8a9ffcf1764a..2ff39c2a1c44 100644 --- a/test/functional/tools/qc_stdout.xml +++ b/test/functional/tools/qc_stdout.xml @@ -1,7 +1,7 @@ - - + + Date: Mon, 13 Nov 2023 15:58:59 +0100 Subject: [PATCH 04/30] Remove debug message Co-authored-by: Nicola Soranzo --- lib/galaxy/tool_util/output_checker.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/galaxy/tool_util/output_checker.py b/lib/galaxy/tool_util/output_checker.py index 04012fbb77a6..af3d0b86d76a 100644 --- a/lib/galaxy/tool_util/output_checker.py +++ b/lib/galaxy/tool_util/output_checker.py @@ -176,7 +176,6 @@ def __regex_err_msg(match, stream, regex): # If there's a description for the regular expression, then use it. # Otherwise, we'll take the first 256 characters of the match. - print(f"{regex.desc=}") if regex.desc is not None: desc += match.expand(regex.desc) else: From d0ef548c73feef4759b01ca3f2ad022ab93ddf93 Mon Sep 17 00:00:00 2001 From: M Bernt Date: Mon, 13 Nov 2023 15:59:20 +0100 Subject: [PATCH 05/30] Fix typo Co-authored-by: Nicola Soranzo --- lib/galaxy/tool_util/xsd/galaxy.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index da8775aa7e88..7f597b36edd0 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -7009,7 +7009,7 @@ stderr are checked. If ``Branch A`` is at the beginning of stdout or stderr, the a warning will be registered and the source that contained ``Branch A`` will be prepended with the warning ``Warning: Branch A was taken in execution``. -Since Galaxy 24.0 groups defines in the regular expression are expanded in the +Since Galaxy 24.0 groups defined in the regular expression are expanded in the description (using the syntax of the [``expand`` function](https://docs.python.org/3/library/re.html#re.Match.expand)). For the first ``regex`` in the following example the ``\1`` will be replaced by the content of the text matching ``.*`` that follows on ``INFO: ``, From 1622c11bb5f32b4984e307989b1047eb59783ae8 Mon Sep 17 00:00:00 2001 From: M Bernt Date: Mon, 13 Nov 2023 16:05:30 +0100 Subject: [PATCH 06/30] Fix typo Co-authored-by: Nicola Soranzo --- lib/galaxy/tool_util/xsd/galaxy.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index 7f597b36edd0..4e6db8c5986f 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -7016,7 +7016,7 @@ by the content of the text matching ``.*`` that follows on ``INFO: ``, i.e. the content of the first group. The second regular expression defines a named group ``error_message`` which then replaces the corresponding placeholder ``\g`` in the -description. Notethe quoting of the ``<`` and ``>`` characters in XML. +description. Note the quoting of the ``<`` and ``>`` characters in XML. ```xml From 93b9678e0b332d72819050039930aba9986d937c Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 14 Nov 2023 09:26:26 +0100 Subject: [PATCH 07/30] make regex string --- test/unit/tool_util/test_output_checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/tool_util/test_output_checker.py b/test/unit/tool_util/test_output_checker.py index 8d181006c8dd..2437e27f3260 100644 --- a/test/unit/tool_util/test_output_checker.py +++ b/test/unit/tool_util/test_output_checker.py @@ -87,7 +87,7 @@ def test_stderr_regex_namedgroup_positive_match(self): regex = ToolStdioRegex() regex.stderr_match = True regex.match = "ERROR: (?P.{3})bar" - regex.desc = "\g" + regex.desc = r"\g" self.__add_regex(regex) self.stderr = "ERROR: foobar" _, _, _, job_messages = self.__check_output() From 73219583f18ec1b229be7960040877756d08d259 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 14 Nov 2023 09:43:03 +0100 Subject: [PATCH 08/30] remove unused variable job_id_tag was used in the past for log messages which are now gone --- lib/galaxy/jobs/__init__.py | 6 +----- lib/galaxy/metadata/set_metadata.py | 2 +- lib/galaxy/tool_util/output_checker.py | 12 ++++-------- test/unit/tool_util/test_output_checker.py | 2 +- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py index ae9a2dddca06..feea8c6db3ab 100644 --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -2088,12 +2088,8 @@ def discover_outputs(self, job, inp_data, out_data, out_collections, final_job_s ) def check_tool_output(self, tool_stdout, tool_stderr, tool_exit_code, job, job_stdout=None, job_stderr=None): - job_id_tag = "" - if job is not None: - job_id_tag = job.get_id_tag() - state, tool_stdout, tool_stderr, job_messages = check_output( - self.tool.stdio_regexes, self.tool.stdio_exit_codes, tool_stdout, tool_stderr, tool_exit_code, job_id_tag + self.tool.stdio_regexes, self.tool.stdio_exit_codes, tool_stdout, tool_stderr, tool_exit_code ) # Store the modified stdout and stderr in the job: diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index 8c36bf70a1d9..cd126da98e19 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -273,7 +273,7 @@ def set_meta(new_dataset_instance, file_dict): tool_exit_code = read_exit_code_from(exit_code_file, job_id_tag) check_output_detected_state, tool_stdout, tool_stderr, job_messages = check_output( - stdio_regexes, stdio_exit_codes, tool_stdout, tool_stderr, tool_exit_code, job_id_tag + stdio_regexes, stdio_exit_codes, tool_stdout, tool_stderr, tool_exit_code ) if check_output_detected_state == DETECTED_JOB_STATE.OK and not tool_provided_metadata.has_failed_outputs(): final_job_state = Job.states.OK diff --git a/lib/galaxy/tool_util/output_checker.py b/lib/galaxy/tool_util/output_checker.py index af3d0b86d76a..0e4fff4fed0e 100644 --- a/lib/galaxy/tool_util/output_checker.py +++ b/lib/galaxy/tool_util/output_checker.py @@ -17,7 +17,7 @@ class DETECTED_JOB_STATE(str, Enum): ERROR_PEEK_SIZE = 2000 -def check_output_regex(job_id_tag, regex, stream, stream_name, job_messages, max_error_level): +def check_output_regex(regex, stream, stream_name, job_messages, max_error_level): """ check a single regex against a stream @@ -35,7 +35,7 @@ def check_output_regex(job_id_tag, regex, stream, stream_name, job_messages, max return max_error_level -def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code, job_id_tag): +def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code): """ Check the output of a tool - given the stdout, stderr, and the tool's exit code, return DETECTED_JOB_STATE.OK if the tool exited succesfully or @@ -118,16 +118,12 @@ def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code # - If it matched, then determine the error level. # o If it was fatal, then we're done - break. if regex.stderr_match: - max_error_level = check_output_regex( - job_id_tag, regex, stderr, "stderr", job_messages, max_error_level - ) + max_error_level = check_output_regex(regex, stderr, "stderr", job_messages, max_error_level) if max_error_level >= StdioErrorLevel.MAX: break if regex.stdout_match: - max_error_level = check_output_regex( - job_id_tag, regex, stdout, "stdout", job_messages, max_error_level - ) + max_error_level = check_output_regex(regex, stdout, "stdout", job_messages, max_error_level) if max_error_level >= StdioErrorLevel.MAX: break diff --git a/test/unit/tool_util/test_output_checker.py b/test/unit/tool_util/test_output_checker.py index 2437e27f3260..b9dfe151d4a9 100644 --- a/test/unit/tool_util/test_output_checker.py +++ b/test/unit/tool_util/test_output_checker.py @@ -121,5 +121,5 @@ def __assertNotSuccessful(self): def __check_output(self): return check_output( - self.tool.stdio_regexes, self.tool.stdio_exit_codes, self.stdout, self.stderr, self.tool_exit_code, "job_id" + self.tool.stdio_regexes, self.tool.stdio_exit_codes, self.stdout, self.stderr, self.tool_exit_code ) From 43bdd28bbd9ca877640ad9c4aa44d4ba6ad80434 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 14 Nov 2023 11:19:49 +0100 Subject: [PATCH 09/30] formating fixes --- test/unit/tool_util/test_output_checker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/tool_util/test_output_checker.py b/test/unit/tool_util/test_output_checker.py index b9dfe151d4a9..041e24955115 100644 --- a/test/unit/tool_util/test_output_checker.py +++ b/test/unit/tool_util/test_output_checker.py @@ -80,7 +80,7 @@ def test_stderr_regex_group_positive_match(self): self.__add_regex(regex) self.stderr = "ERROR: foobar" _, _, _, job_messages = self.__check_output() - assert job_messages[0]['desc'] == "Fatal error: foo" + assert job_messages[0]["desc"] == "Fatal error: foo" self.__assertNotSuccessful() def test_stderr_regex_namedgroup_positive_match(self): @@ -91,7 +91,7 @@ def test_stderr_regex_namedgroup_positive_match(self): self.__add_regex(regex) self.stderr = "ERROR: foobar" _, _, _, job_messages = self.__check_output() - assert job_messages[0]['desc'] == "Fatal error: foo" + assert job_messages[0]["desc"] == "Fatal error: foo" self.__assertNotSuccessful() def test_stdout_ignored_for_stderr_regexes(self): From 6d99463613f6807e3422ccbb26655001f7f44338 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 14 Nov 2023 11:39:32 +0100 Subject: [PATCH 10/30] fix test --- test/unit/tool_util/test_parsing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/tool_util/test_parsing.py b/test/unit/tool_util/test_parsing.py index 4b5a2202d96d..7550bea601ab 100644 --- a/test/unit/tool_util/test_parsing.py +++ b/test/unit/tool_util/test_parsing.py @@ -882,6 +882,6 @@ class TestQcStdio(BaseLoaderTestCase): def test_tests(self): exit, regexes = self._tool_source.parse_stdio() assert len(exit) == 2 - assert len(regexes) == 1 + assert len(regexes) == 2 regex = regexes[0] assert regex.error_level == 1.1 From 125e74b4bb9c5e35019e2173bec096e3d2eca84d Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 14 Nov 2023 14:26:18 +0100 Subject: [PATCH 11/30] fix api test --- lib/galaxy_test/api/test_tools.py | 6 ++++++ test/functional/tools/qc_stdout.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/galaxy_test/api/test_tools.py b/lib/galaxy_test/api/test_tools.py index 0dda061d14dd..7befe7f221b1 100644 --- a/lib/galaxy_test/api/test_tools.py +++ b/lib/galaxy_test/api/test_tools.py @@ -1396,11 +1396,17 @@ def test_qc_messages(self, history_id): job_id = create["jobs"][0]["id"] details = self.dataset_populator.get_job_details(job_id, full=True).json() assert "job_messages" in details, details + # test autogenerated message (if regex defines no description attribute) qc_message = details["job_messages"][0] # assert qc_message["code_desc"] == "QC Metrics for Tool", qc_message assert qc_message["desc"] == "QC: Matched on Quality of sample is 30%." assert qc_message["match"] == "Quality of sample is 30%." assert qc_message["error_level"] == 1.1 + # test message generated from the description containing a reference to group defined in the regex + qc_message = details["job_messages"][1] + assert qc_message["desc"] == "QC: Sample quality 30" + assert qc_message["match"] == "Quality of sample is 30%." + assert qc_message["error_level"] == 1.1 @skip_without_tool("cat1") def test_multirun_cat1(self, history_id): diff --git a/test/functional/tools/qc_stdout.xml b/test/functional/tools/qc_stdout.xml index 2ff39c2a1c44..5f4e50bdfa8f 100644 --- a/test/functional/tools/qc_stdout.xml +++ b/test/functional/tools/qc_stdout.xml @@ -1,6 +1,6 @@ - + Date: Thu, 16 Nov 2023 16:04:32 +0100 Subject: [PATCH 12/30] make all job messages a dict fixes https://github.com/galaxyproject/galaxy/issues/17023 I'm unsure about storing job messages in such an unstructured way... --- lib/galaxy/metadata/set_metadata.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index cd126da98e19..5617c2ce8e79 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -56,11 +56,13 @@ build_object_store_from_config, ObjectStore, ) + from galaxy.tool_util.output_checker import ( check_output, DETECTED_JOB_STATE, ) from galaxy.tool_util.parser.stdio import ( + StdioErrorLevel, ToolStdioExitCode, ToolStdioRegex, ) @@ -75,7 +77,7 @@ log = logging.getLogger(__name__) -MAX_STDIO_READ_BYTES = 100 * 10**6 # 100 MB +MAX_STDIO_READ_BYTES = 100 * 10 ** 6 # 100 MB def reset_external_filename(dataset_instance: DatasetInstance): @@ -340,7 +342,15 @@ def set_meta(new_dataset_instance, file_dict): collect_dynamic_outputs(job_context, output_collections) except MaxDiscoveredFilesExceededError as e: final_job_state = Job.states.ERROR - job_messages.append(str(e)) + job_messages.append( + { + "type": "max_discovered_files", + "desc": str(e), + "code_desc": str(e), + "error_level": StdioErrorLevel.FATAL, + } + ) + if job: job.set_streams(tool_stdout=tool_stdout, tool_stderr=tool_stderr, job_messages=job_messages) job.state = final_job_state From fbfdc4d4776bbff4730b00f81821384bdcaa19fb Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 16 Nov 2023 16:49:44 +0100 Subject: [PATCH 13/30] add types --- lib/galaxy/metadata/set_metadata.py | 28 +++++++++------ lib/galaxy/tool_util/output_checker.py | 49 ++++++++++++++++++++------ 2 files changed, 55 insertions(+), 22 deletions(-) diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index 5617c2ce8e79..a980b61d8040 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -19,7 +19,12 @@ import traceback from functools import partial from pathlib import Path -from typing import Optional +from typing import ( + Any, + Dict, + List, + Optional +) try: from pulsar.client.staging import COMMAND_VERSION_FILENAME @@ -70,6 +75,7 @@ from galaxy.util import ( safe_contains, stringify_dictionary_keys, + unicodify, ) from galaxy.util.expressions import ExpressionContext @@ -218,7 +224,7 @@ def set_meta(new_dataset_instance, file_dict): export_store = None final_job_state = Job.states.OK - job_messages = [] + job_messages: List[Dict[str, Any]] = [] if extended_metadata_collection: tool_dict = metadata_params["tool"] stdio_exit_code_dicts, stdio_regex_dicts = tool_dict["stdio_exit_codes"], tool_dict["stdio_regexes"] @@ -239,25 +245,25 @@ def set_meta(new_dataset_instance, file_dict): for directory, prefix in locations: if directory and os.path.exists(os.path.join(directory, f"{prefix}stdout")): with open(os.path.join(directory, f"{prefix}stdout"), "rb") as f: - tool_stdout = f.read(MAX_STDIO_READ_BYTES) + tool_stdout = unicodify(f.read(MAX_STDIO_READ_BYTES), strip_null=True) with open(os.path.join(directory, f"{prefix}stderr"), "rb") as f: - tool_stderr = f.read(MAX_STDIO_READ_BYTES) + tool_stderr = unicodify(f.read(MAX_STDIO_READ_BYTES), strip_null=True) break else: if os.path.exists(os.path.join(tool_job_working_directory, "task_0")): # We have a task splitting job - tool_stdout = b"" - tool_stderr = b"" + tool_stdout = "" + tool_stderr = "" paths = tool_job_working_directory.glob("task_*") for path in paths: with open(path / "outputs" / "tool_stdout", "rb") as f: - task_stdout = f.read(MAX_STDIO_READ_BYTES) + task_stdout = unicodify(f.read(MAX_STDIO_READ_BYTES), strip_null=True) if task_stdout: - tool_stdout = b"%s[%s stdout]\n%s\n" % (tool_stdout, path.name.encode(), task_stdout) + tool_stdout = "%s[%s stdout]\n%s\n" % (tool_stdout, path.name, task_stdout) with open(path / "outputs" / "tool_stderr", "rb") as f: - task_stderr = f.read(MAX_STDIO_READ_BYTES) + task_stderr = unicodify(f.read(MAX_STDIO_READ_BYTES), strip_null=True) if task_stderr: - tool_stderr = b"%s[%s stdout]\n%s\n" % (tool_stderr, path.name.encode(), task_stderr) + tool_stderr = "%s[%s stderr]\n%s\n" % (tool_stderr, path.name, task_stderr) else: wdc = os.listdir(tool_job_working_directory) odc = os.listdir(outputs_directory) @@ -267,7 +273,7 @@ def set_meta(new_dataset_instance, file_dict): log.warning(f"{error_desc}. {error_extra}") raise Exception(error_desc) else: - tool_stdout = tool_stderr = b"" + tool_stdout = tool_stderr = "" job_id_tag = metadata_params["job_id_tag"] diff --git a/lib/galaxy/tool_util/output_checker.py b/lib/galaxy/tool_util/output_checker.py index 0e4fff4fed0e..f93b1011981a 100644 --- a/lib/galaxy/tool_util/output_checker.py +++ b/lib/galaxy/tool_util/output_checker.py @@ -1,13 +1,44 @@ import re from enum import Enum from logging import getLogger +from typing import ( + Any, + Dict, + List, + Tuple, + TYPE_CHECKING, + Union +) from galaxy.tool_util.parser.stdio import StdioErrorLevel -from galaxy.util import unicodify + +if TYPE_CHECKING: + from galaxy.tool_util.parser.stdio import ToolStdioRegex, ToolStdioExitCode log = getLogger(__name__) +class JobErrorMessage: + def __init__(self, type, desc, code_desc, error_level): + self.type = type + self.desc = desc + self.code_desc = code_desc + self.error_level = error_level + + +class ExitCodeJobErrorMessage(JobErrorMessage): + def __init__(self, desc, code_desc, error_level, tool_exit_code): + super().__init__("exit_code", desc, code_desc, error_level) + self.exit_code = tool_exit_code + + +class RegexJobErrorMessage(JobErrorMessage): + def __init__(self, desc, code_desc, error_level, stream, match): + super().__init__("regex", desc, code_desc, error_level) + self.stream = stream + self.match = match + + class DETECTED_JOB_STATE(str, Enum): OK = "ok" OUT_OF_MEMORY_ERROR = "oom_error" @@ -17,7 +48,7 @@ class DETECTED_JOB_STATE(str, Enum): ERROR_PEEK_SIZE = 2000 -def check_output_regex(regex, stream, stream_name, job_messages, max_error_level): +def check_output_regex(regex: "ToolStdioRegex", stream: str, stream_name: str, job_messages: List[Dict[str, Any]], max_error_level: int) -> int: """ check a single regex against a stream @@ -35,7 +66,7 @@ def check_output_regex(regex, stream, stream_name, job_messages, max_error_level return max_error_level -def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code): +def check_output(stdio_regexes: List["ToolStdioRegex"], stdio_exit_codes: List["ToolStdioExitCode"], stdout: str, stderr: str, tool_exit_code: int) -> Tuple[str, str, str, List[Dict[str, Any]]]: """ Check the output of a tool - given the stdout, stderr, and the tool's exit code, return DETECTED_JOB_STATE.OK if the tool exited succesfully or @@ -51,9 +82,6 @@ def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code # has a bug but the tool was ok, and it lets a workflow continue. state = DETECTED_JOB_STATE.OK - stdout = unicodify(stdout, strip_null=True) - stderr = unicodify(stderr, strip_null=True) - # messages (descriptions of the detected exit_code and regexes) # to be prepended to the stdout/stderr after all exit code and regex tests # are done (otherwise added messages are searched again). @@ -132,10 +160,10 @@ def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code if max_error_level == StdioErrorLevel.FATAL_OOM: state = DETECTED_JOB_STATE.OUT_OF_MEMORY_ERROR elif max_error_level >= StdioErrorLevel.FATAL: - reason = "" + error_reason = "" if job_messages: - reason = f" Reasons are {job_messages}" - log.info(f"Job error detected, failing job.{reason}") + error_reason = f" Reasons are {job_messages}" + log.info(f"Job error detected, failing job.{error_reason}") state = DETECTED_JOB_STATE.GENERIC_ERROR # When there are no regular expressions and no exit codes to check, @@ -154,8 +182,7 @@ def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code return state, stdout, stderr, job_messages - -def __regex_err_msg(match, stream, regex): +def __regex_err_msg(match: re.Match, stream: str, regex: "ToolStdioRegex"): """ Return a message about the match on tool output using the given ToolStdioRegex regex object. The regex_match is a MatchObject From 658aaff7373951b9ecde1e57433fa9896decc147 Mon Sep 17 00:00:00 2001 From: M Bernt Date: Thu, 16 Nov 2023 17:41:17 +0100 Subject: [PATCH 14/30] Improve job_message for max discovered files Co-authored-by: Marius van den Beek --- lib/galaxy/metadata/set_metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index a980b61d8040..5228101d710e 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -351,8 +351,8 @@ def set_meta(new_dataset_instance, file_dict): job_messages.append( { "type": "max_discovered_files", - "desc": str(e), - "code_desc": str(e), + "desc": "Too many output files were discovered for a single job.", + "code_desc": None, "error_level": StdioErrorLevel.FATAL, } ) From a89f4820ecd656f369b28bd804c38da36cc73b5d Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 16 Nov 2023 17:47:17 +0100 Subject: [PATCH 15/30] linter fixes --- lib/galaxy/metadata/set_metadata.py | 6 +++--- lib/galaxy/tool_util/output_checker.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index 5228101d710e..a6ae9c7634db 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -259,11 +259,11 @@ def set_meta(new_dataset_instance, file_dict): with open(path / "outputs" / "tool_stdout", "rb") as f: task_stdout = unicodify(f.read(MAX_STDIO_READ_BYTES), strip_null=True) if task_stdout: - tool_stdout = "%s[%s stdout]\n%s\n" % (tool_stdout, path.name, task_stdout) + tool_stdout = f"{tool_stdout}[{path.name} stdout]\n{task_stdout}\n" with open(path / "outputs" / "tool_stderr", "rb") as f: task_stderr = unicodify(f.read(MAX_STDIO_READ_BYTES), strip_null=True) if task_stderr: - tool_stderr = "%s[%s stderr]\n%s\n" % (tool_stderr, path.name, task_stderr) + tool_stderr = f"{tool_stderr}[{path.name} stderr]\n{task_stderr}\n" else: wdc = os.listdir(tool_job_working_directory) odc = os.listdir(outputs_directory) @@ -346,7 +346,7 @@ def set_meta(new_dataset_instance, file_dict): input_ext=input_ext, ) collect_dynamic_outputs(job_context, output_collections) - except MaxDiscoveredFilesExceededError as e: + except MaxDiscoveredFilesExceededError: final_job_state = Job.states.ERROR job_messages.append( { diff --git a/lib/galaxy/tool_util/output_checker.py b/lib/galaxy/tool_util/output_checker.py index f93b1011981a..ab9a3c6f4ba6 100644 --- a/lib/galaxy/tool_util/output_checker.py +++ b/lib/galaxy/tool_util/output_checker.py @@ -7,7 +7,6 @@ List, Tuple, TYPE_CHECKING, - Union ) from galaxy.tool_util.parser.stdio import StdioErrorLevel From a8e6e8d5d6604ece7ae7b5efd97f738146698ee5 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 16 Nov 2023 18:23:50 +0100 Subject: [PATCH 16/30] fix test exit code default --- test/unit/tool_util/test_output_checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/tool_util/test_output_checker.py b/test/unit/tool_util/test_output_checker.py index 041e24955115..f815d5248341 100644 --- a/test/unit/tool_util/test_output_checker.py +++ b/test/unit/tool_util/test_output_checker.py @@ -19,7 +19,7 @@ def setUp(self): ) self.stdout = "" self.stderr = "" - self.tool_exit_code = None + self.tool_exit_code = 0 def test_default_no_stderr_success(self): self.__assertSuccessful() From 673abadaba76d37d7d9916c20f574a80d0725cf9 Mon Sep 17 00:00:00 2001 From: M Bernt Date: Thu, 16 Nov 2023 18:39:37 +0100 Subject: [PATCH 17/30] Apply suggestions from code review Co-authored-by: Marius van den Beek --- lib/galaxy/metadata/set_metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index a6ae9c7634db..df5df1455b12 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -346,12 +346,12 @@ def set_meta(new_dataset_instance, file_dict): input_ext=input_ext, ) collect_dynamic_outputs(job_context, output_collections) - except MaxDiscoveredFilesExceededError: + except MaxDiscoveredFilesExceededError as e: final_job_state = Job.states.ERROR job_messages.append( { "type": "max_discovered_files", - "desc": "Too many output files were discovered for a single job.", + "desc": str(e), "code_desc": None, "error_level": StdioErrorLevel.FATAL, } From 05185623dd0fb039ec1fcbcfb2b55300a6a25c03 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 16 Nov 2023 18:40:42 +0100 Subject: [PATCH 18/30] remove unneded classes --- lib/galaxy/tool_util/output_checker.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/lib/galaxy/tool_util/output_checker.py b/lib/galaxy/tool_util/output_checker.py index ab9a3c6f4ba6..022fa9012f0a 100644 --- a/lib/galaxy/tool_util/output_checker.py +++ b/lib/galaxy/tool_util/output_checker.py @@ -17,27 +17,6 @@ log = getLogger(__name__) -class JobErrorMessage: - def __init__(self, type, desc, code_desc, error_level): - self.type = type - self.desc = desc - self.code_desc = code_desc - self.error_level = error_level - - -class ExitCodeJobErrorMessage(JobErrorMessage): - def __init__(self, desc, code_desc, error_level, tool_exit_code): - super().__init__("exit_code", desc, code_desc, error_level) - self.exit_code = tool_exit_code - - -class RegexJobErrorMessage(JobErrorMessage): - def __init__(self, desc, code_desc, error_level, stream, match): - super().__init__("regex", desc, code_desc, error_level) - self.stream = stream - self.match = match - - class DETECTED_JOB_STATE(str, Enum): OK = "ok" OUT_OF_MEMORY_ERROR = "oom_error" @@ -181,6 +160,7 @@ def check_output(stdio_regexes: List["ToolStdioRegex"], stdio_exit_codes: List[" return state, stdout, stderr, job_messages + def __regex_err_msg(match: re.Match, stream: str, regex: "ToolStdioRegex"): """ Return a message about the match on tool output using the given From e47b640314453baae5b19bef726b0292fe313132 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Fri, 17 Nov 2023 12:23:59 +0100 Subject: [PATCH 19/30] black reformatting --- lib/galaxy/metadata/set_metadata.py | 9 ++------- lib/galaxy/tool_util/output_checker.py | 12 ++++++++++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index df5df1455b12..39b60961e037 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -19,12 +19,7 @@ import traceback from functools import partial from pathlib import Path -from typing import ( - Any, - Dict, - List, - Optional -) +from typing import Any, Dict, List, Optional try: from pulsar.client.staging import COMMAND_VERSION_FILENAME @@ -83,7 +78,7 @@ log = logging.getLogger(__name__) -MAX_STDIO_READ_BYTES = 100 * 10 ** 6 # 100 MB +MAX_STDIO_READ_BYTES = 100 * 10**6 # 100 MB def reset_external_filename(dataset_instance: DatasetInstance): diff --git a/lib/galaxy/tool_util/output_checker.py b/lib/galaxy/tool_util/output_checker.py index 022fa9012f0a..ad6dd7e225a7 100644 --- a/lib/galaxy/tool_util/output_checker.py +++ b/lib/galaxy/tool_util/output_checker.py @@ -26,7 +26,9 @@ class DETECTED_JOB_STATE(str, Enum): ERROR_PEEK_SIZE = 2000 -def check_output_regex(regex: "ToolStdioRegex", stream: str, stream_name: str, job_messages: List[Dict[str, Any]], max_error_level: int) -> int: +def check_output_regex( + regex: "ToolStdioRegex", stream: str, stream_name: str, job_messages: List[Dict[str, Any]], max_error_level: int +) -> int: """ check a single regex against a stream @@ -44,7 +46,13 @@ def check_output_regex(regex: "ToolStdioRegex", stream: str, stream_name: str, j return max_error_level -def check_output(stdio_regexes: List["ToolStdioRegex"], stdio_exit_codes: List["ToolStdioExitCode"], stdout: str, stderr: str, tool_exit_code: int) -> Tuple[str, str, str, List[Dict[str, Any]]]: +def check_output( + stdio_regexes: List["ToolStdioRegex"], + stdio_exit_codes: List["ToolStdioExitCode"], + stdout: str, + stderr: str, + tool_exit_code: int, +) -> Tuple[str, str, str, List[Dict[str, Any]]]: """ Check the output of a tool - given the stdout, stderr, and the tool's exit code, return DETECTED_JOB_STATE.OK if the tool exited succesfully or From 53e18dd32b2eb5491fe6e14fa12fed1319ab5720 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Fri, 17 Nov 2023 12:31:04 +0100 Subject: [PATCH 20/30] fix import order --- lib/galaxy/metadata/set_metadata.py | 1 - lib/galaxy/tool_util/output_checker.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index 39b60961e037..dfe262779b24 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -56,7 +56,6 @@ build_object_store_from_config, ObjectStore, ) - from galaxy.tool_util.output_checker import ( check_output, DETECTED_JOB_STATE, diff --git a/lib/galaxy/tool_util/output_checker.py b/lib/galaxy/tool_util/output_checker.py index ad6dd7e225a7..b3be2c02372a 100644 --- a/lib/galaxy/tool_util/output_checker.py +++ b/lib/galaxy/tool_util/output_checker.py @@ -12,7 +12,7 @@ from galaxy.tool_util.parser.stdio import StdioErrorLevel if TYPE_CHECKING: - from galaxy.tool_util.parser.stdio import ToolStdioRegex, ToolStdioExitCode + from galaxy.tool_util.parser.stdio import ToolStdioExitCode, ToolStdioRegex log = getLogger(__name__) From e459b11cf5e6fbb97dac745940b8aff7a5e797d6 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Fri, 17 Nov 2023 12:41:19 +0100 Subject: [PATCH 21/30] full fix for import sorting .. lets see if this conflicts with black --- lib/galaxy/metadata/set_metadata.py | 7 ++++++- lib/galaxy/tool_util/output_checker.py | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index dfe262779b24..f1c8906c39fd 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -19,7 +19,12 @@ import traceback from functools import partial from pathlib import Path -from typing import Any, Dict, List, Optional +from typing import ( + Any, + Dict, + List, + Optional, +) try: from pulsar.client.staging import COMMAND_VERSION_FILENAME diff --git a/lib/galaxy/tool_util/output_checker.py b/lib/galaxy/tool_util/output_checker.py index b3be2c02372a..ca6dc11be40f 100644 --- a/lib/galaxy/tool_util/output_checker.py +++ b/lib/galaxy/tool_util/output_checker.py @@ -12,7 +12,10 @@ from galaxy.tool_util.parser.stdio import StdioErrorLevel if TYPE_CHECKING: - from galaxy.tool_util.parser.stdio import ToolStdioExitCode, ToolStdioRegex + from galaxy.tool_util.parser.stdio import ( + ToolStdioExitCode, + ToolStdioRegex, + ) log = getLogger(__name__) From bbaad155f8d1cb7bddb14f6384e8b44975443cbf Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 28 Nov 2023 18:02:20 +0100 Subject: [PATCH 22/30] Fix up integration test for max discovered files --- test/integration/test_max_discovered_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/test_max_discovered_files.py b/test/integration/test_max_discovered_files.py index 7bcbca1659b0..c9399371b1e2 100644 --- a/test/integration/test_max_discovered_files.py +++ b/test/integration/test_max_discovered_files.py @@ -31,7 +31,7 @@ def test_discover(self): assert job_details["state"] == "error" assert ( f"Job generated more than maximum number ({self.max_discovered_files}) of output datasets" - in job_details["job_messages"] + in job_details["job_messages"][0]["desc"] ) From e8e443a4cdf0697e33bd2d05cecae27a463a1d40 Mon Sep 17 00:00:00 2001 From: M Bernt Date: Wed, 29 Nov 2023 08:35:19 +0100 Subject: [PATCH 23/30] Update lib/galaxy/tool_util/xsd/galaxy.xsd --- lib/galaxy/tool_util/xsd/galaxy.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index 4e6db8c5986f..d4c69b56e336 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -7009,7 +7009,7 @@ stderr are checked. If ``Branch A`` is at the beginning of stdout or stderr, the a warning will be registered and the source that contained ``Branch A`` will be prepended with the warning ``Warning: Branch A was taken in execution``. -Since Galaxy 24.0 groups defined in the regular expression are expanded in the +Since Galaxy 23.2 groups defined in the regular expression are expanded in the description (using the syntax of the [``expand`` function](https://docs.python.org/3/library/re.html#re.Match.expand)). For the first ``regex`` in the following example the ``\1`` will be replaced by the content of the text matching ``.*`` that follows on ``INFO: ``, From 14889b1d30fb3a4e23c2a3a87f3fe8018f181724 Mon Sep 17 00:00:00 2001 From: hujambo-dunia Date: Fri, 8 Dec 2023 11:51:11 -0500 Subject: [PATCH 24/30] Fix, basic - preformatted html tag --- client/src/components/JobInformation/JobInformation.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/JobInformation/JobInformation.vue b/client/src/components/JobInformation/JobInformation.vue index 95fe2d8cb7bf..6479819b73bc 100644 --- a/client/src/components/JobInformation/JobInformation.vue +++ b/client/src/components/JobInformation/JobInformation.vue @@ -74,7 +74,7 @@ Job Messages
    -
  • {{ message }}
  • +
  • {{ message }}
From 91619ac2c5d91bb4ca9be3eb490120d0df6949e3 Mon Sep 17 00:00:00 2001 From: hujambo-dunia Date: Fri, 8 Dec 2023 15:39:24 -0500 Subject: [PATCH 25/30] Fix, moderate - bulletted list --- .../src/components/JobInformation/JobInformation.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/components/JobInformation/JobInformation.vue b/client/src/components/JobInformation/JobInformation.vue index 6479819b73bc..9f3d1303383f 100644 --- a/client/src/components/JobInformation/JobInformation.vue +++ b/client/src/components/JobInformation/JobInformation.vue @@ -74,7 +74,15 @@ Job Messages
    -
  • {{ message }}
  • +
  • + [{{ index }}] +
      +
    • + {{ name }} + : {{ value }} +
    • +
    +
From 2bc88045b5520bc1b990ab2dd0e4042e16cd36c5 Mon Sep 17 00:00:00 2001 From: hujambo-dunia Date: Wed, 3 Jan 2024 17:35:39 -0500 Subject: [PATCH 26/30] Add check if output is not an array of objects --- client/src/components/JobInformation/JobInformation.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/JobInformation/JobInformation.vue b/client/src/components/JobInformation/JobInformation.vue index 9f3d1303383f..419634c85df3 100644 --- a/client/src/components/JobInformation/JobInformation.vue +++ b/client/src/components/JobInformation/JobInformation.vue @@ -73,7 +73,7 @@ Job Messages -
    +
    • [{{ index }}]
        @@ -84,6 +84,9 @@
    +
    + {{ job.job_messages }} +
    From 450c93710ecec72f765ad690f613875e9c58cb36 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Wed, 28 Feb 2024 17:27:24 +0100 Subject: [PATCH 27/30] make the max discovered files error a "proper" job error message --- lib/galaxy/jobs/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py index feea8c6db3ab..86c43b45ed7c 100644 --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -75,6 +75,7 @@ check_output, DETECTED_JOB_STATE, ) +from galaxy.tool_util.parser.stdio import StdioErrorLevel from galaxy.tools.evaluation import ( PartialToolEvaluator, ToolEvaluator, @@ -1939,7 +1940,13 @@ def fail(message=job.info, exception=None): self.discover_outputs(job, inp_data, out_data, out_collections, final_job_state=final_job_state) except MaxDiscoveredFilesExceededError as e: final_job_state = job.states.ERROR - job.job_messages = [str(e)] + job.job_messages = [ + { + "type": "internal", + "desc": str(e), + "error_level": StdioErrorLevel.FATAL, + } + ] for dataset_assoc in output_dataset_associations: if getattr(dataset_assoc.dataset, "discovered", False): From ea359c36b4e4c47fad073114e4906fef86497491 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 28 Feb 2024 14:03:31 -0500 Subject: [PATCH 28/30] Links to invocations. (by John Chilton via Michelle Savage Vue-component upgrade) Upgraded component to Vue 3. Extra space removed. Remove index enumeration and indentation; separate multiple errors with border line instead. Prevent metadata from printing when there is no value. Rebased and edited/removed accidental 'merge conflict markers' in file --- .../JobInformation/JobInformation.test.js | 2 +- .../JobInformation/JobInformation.vue | 181 +++++++++--------- 2 files changed, 96 insertions(+), 87 deletions(-) diff --git a/client/src/components/JobInformation/JobInformation.test.js b/client/src/components/JobInformation/JobInformation.test.js index f90dd1385492..df8448c4d1dd 100644 --- a/client/src/components/JobInformation/JobInformation.test.js +++ b/client/src/components/JobInformation/JobInformation.test.js @@ -69,7 +69,7 @@ describe("JobInformation/JobInformation.vue", () => { }); it("job messages", async () => { - const rendered_link = jobInfoTable.findAll(`#job-messages li`); + const rendered_link = jobInfoTable.findAll(`#job-messages .job-message`); expect(rendered_link.length).toBe(jobResponse.job_messages.length); for (let i = 0; i < rendered_link.length; i++) { const msg = rendered_link.at(i).text(); diff --git a/client/src/components/JobInformation/JobInformation.vue b/client/src/components/JobInformation/JobInformation.vue index 419634c85df3..be2a3eee9455 100644 --- a/client/src/components/JobInformation/JobInformation.vue +++ b/client/src/components/JobInformation/JobInformation.vue @@ -1,6 +1,74 @@ + + - + From 415f419404cb42ea5dbad2abee19f3a2005e3b96 Mon Sep 17 00:00:00 2001 From: John Davis Date: Tue, 5 Mar 2024 10:39:22 -0500 Subject: [PATCH 29/30] Update lib/galaxy/tool_util/xsd/galaxy.xsd Co-authored-by: M Bernt --- lib/galaxy/tool_util/xsd/galaxy.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index d4c69b56e336..4e6db8c5986f 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -7009,7 +7009,7 @@ stderr are checked. If ``Branch A`` is at the beginning of stdout or stderr, the a warning will be registered and the source that contained ``Branch A`` will be prepended with the warning ``Warning: Branch A was taken in execution``. -Since Galaxy 23.2 groups defined in the regular expression are expanded in the +Since Galaxy 24.0 groups defined in the regular expression are expanded in the description (using the syntax of the [``expand`` function](https://docs.python.org/3/library/re.html#re.Match.expand)). For the first ``regex`` in the following example the ``\1`` will be replaced by the content of the text matching ``.*`` that follows on ``INFO: ``, From 0739b136e399d944d985b4a5fee2cd98c67cb0e8 Mon Sep 17 00:00:00 2001 From: John Davis Date: Tue, 5 Mar 2024 14:30:12 -0500 Subject: [PATCH 30/30] Fix client linting --- client/src/components/JobInformation/JobInformation.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/JobInformation/JobInformation.vue b/client/src/components/JobInformation/JobInformation.vue index be2a3eee9455..759e59b97418 100644 --- a/client/src/components/JobInformation/JobInformation.vue +++ b/client/src/components/JobInformation/JobInformation.vue @@ -5,9 +5,10 @@ import { JobDetailsProvider } from "components/providers/JobProvider"; import UtcDate from "components/UtcDate"; import { formatDuration, intervalToDuration } from "date-fns"; import JOB_STATES_MODEL from "utils/job-states-model"; -import { invocationForJob } from "@/api/invocations"; import { computed, ref } from "vue"; +import { invocationForJob } from "@/api/invocations"; + import DecodedId from "../DecodedId.vue"; import CodeRow from "./CodeRow.vue";