From 9e0d3b69cabe73a7b839e62723e73d52c2c41c69 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 27 Feb 2019 17:56:26 +0100 Subject: [PATCH 1/2] Fix workflow loading on systems with ASCII locale Fixes https://github.com/galaxyproject/galaxy/issues/7421, though it's very likely Galaxy won't play well when python is falling back to ASCII as default encoding. WorkflowStep.label is backed by a 255 character unicode string, but tool_inputs is JSONType, which might have integer or float values (in principle), so we play it safe by casting to unicode. --- lib/galaxy/managers/workflows.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/managers/workflows.py b/lib/galaxy/managers/workflows.py index 7218d619cd0..31348b9d6e0 100644 --- a/lib/galaxy/managers/workflows.py +++ b/lib/galaxy/managers/workflows.py @@ -1012,7 +1012,7 @@ class WorkflowContentsManager(UsesAnnotations): if not module.label and module.type in ['data_input', 'data_collection_input']: new_state = safe_loads(state) default_label = new_state.get('name') - if str(default_label).lower() not in ['input dataset', 'input dataset collection']: + if util.unicodify(default_label).lower() not in ['input dataset', 'input dataset collection']: step.label = module.label = default_label From 9a26de1b4b5a96eacab97aca2e74b994f38bdc31 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Thu, 28 Feb 2019 11:51:36 -0500 Subject: [PATCH 2/2] Catch another Slurm memory cgroup creation error message --- lib/galaxy/jobs/runners/slurm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/jobs/runners/slurm.py b/lib/galaxy/jobs/runners/slurm.py index bc24bb88bcf..333fd55d563 100644 --- a/lib/galaxy/jobs/runners/slurm.py +++ b/lib/galaxy/jobs/runners/slurm.py @@ -30,11 +30,11 @@ SLURM_MEMORY_LIMIT_EXCEEDED_PARTIAL_WARNINGS = [': Exceeded job memory limit at SLURM_MEMORY_LIMIT_SCAN_SIZE = 16 * 1024 * 1024 # 16MB SLURM_UNABLE_TO_ADD_TASK_TO_MEMORY_CG_MSG_RE = re.compile(r"""slurmstepd: error: task/cgroup: unable to add task\[pid=\d+\] to memory cg '\(null\)'$""") SLURM_UNABLE_TO_CREATE_CGROUP_MSG_RE = re.compile(r"""slurmstepd: error: xcgroup_instantiate: unable to create cgroup '[^']+' : No space left on device$""") -SLURM_UNABLE_TO_INSTANCIATE_JOB_MSG_RE = re.compile(r"""slurmstepd: error: jobacct_gather/cgroup: unable to instanciate job \d+ memory cgroup$""") +SLURM_UNABLE_TO_INSTANCIATE_CGROUP_MSG_RE = re.compile(r"""slurmstepd: error: jobacct_gather/cgroup: unable to instanciate (job|user) \d+ memory cgroup$""") SLURM_TOP_WARNING_RES = ( SLURM_UNABLE_TO_ADD_TASK_TO_MEMORY_CG_MSG_RE, SLURM_UNABLE_TO_CREATE_CGROUP_MSG_RE, - SLURM_UNABLE_TO_INSTANCIATE_JOB_MSG_RE + SLURM_UNABLE_TO_INSTANCIATE_CGROUP_MSG_RE ) # These messages are returned to the user