From 2b2a4f8840b30bc68ea0840516ccfddb409eef2a Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 10 Jul 2024 16:52:40 +0200 Subject: [PATCH] Strip unicode null from tool stdio Fixes https://github.com/galaxyproject/galaxy/issues/18437. On the non-pulsar side we strip nulls in set_meta. --- lib/galaxy/jobs/runners/pulsar.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/jobs/runners/pulsar.py b/lib/galaxy/jobs/runners/pulsar.py index 556d049f0b9d..58cee82f3f29 100644 --- a/lib/galaxy/jobs/runners/pulsar.py +++ b/lib/galaxy/jobs/runners/pulsar.py @@ -57,6 +57,7 @@ galaxy_directory, specs, string_as_bool_or_none, + unicodify, ) log = logging.getLogger(__name__) @@ -649,8 +650,8 @@ def finish_job(self, job_state: JobState): client = self.get_client_from_state(job_state) run_results = client.full_status() remote_metadata_directory = run_results.get("metadata_directory", None) - tool_stdout = run_results.get("stdout", "") - tool_stderr = run_results.get("stderr", "") + tool_stdout = unicodify(run_results.get("stdout", ""), strip_null=True) + tool_stderr = unicodify(run_results.get("stderr", ""), strip_null=True) job_stdout = run_results.get("job_stdout") job_stderr = run_results.get("job_stderr") exit_code = run_results.get("returncode")