Skip to content

Commit

Permalink
Merge branch 'release_21.01' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Feb 4, 2021
2 parents 614ee25 + 87d21f0 commit 7cb575d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
name: Test
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
python-version: [3.7]
subset: ['upload_datatype', 'extended_metadata', 'kubernetes', 'not (upload_datatype or extended_metadata or kubernetes)']
Expand Down
2 changes: 0 additions & 2 deletions lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1310,8 +1310,6 @@ def fail(self, message, exception=False, tool_stdout="", tool_stderr="", exit_co
# Pause any dependent jobs (and those jobs' outputs)
for dep_job_assoc in dataset.dependent_jobs:
self.pause(dep_job_assoc.job, "Execution of this dataset's job is paused because its input datasets are in an error state.")
self.sa_session.add(dataset)
self.sa_session.flush()
job.set_final_state(job.states.ERROR)
job.command_line = unicodify(self.command_line)
job.info = message
Expand Down
3 changes: 2 additions & 1 deletion lib/galaxy/model/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __getitem__(self, key):
try:
return self.__getattr__(key)
except Exception:
return KeyError
raise KeyError

def __len__(self):
return len(self.spec)
Expand All @@ -113,6 +113,7 @@ def __getattr__(self, name):
return self.spec[name].wrap(self.spec[name].default, object_session(self.parent))
if name in self.parent._metadata:
return self.parent._metadata[name]
raise AttributeError

def __setattr__(self, name, value):
if name == "parent":
Expand Down
5 changes: 3 additions & 2 deletions lib/galaxy/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,9 @@ def unicodify(value, encoding=DEFAULT_ENCODING, error='replace', strip_null=Fals
if not isinstance(value, str):
value = str(value, encoding, error)
except Exception as e:
msg = "Value '{}' could not be coerced to Unicode: {}('{}')".format(value, type(e).__name__, e)
raise Exception(msg)
msg = "Value '{}' could not be coerced to Unicode: {}('{}')".format(repr(value), type(e).__name__, e)
log.exception(msg)
raise
if strip_null:
return value.replace('\0', '')
return value
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/util/object_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __do_wrap(value):
if value_mod:
wrapped_class_name = f"{value_mod.__name__}.{wrapped_class_name}"
wrapped_class_name = "SafeStringWrapper({}:{})".format(wrapped_class_name, ",".join(sorted(map(str, no_wrap_classes))))
do_wrap_func_name = "__do_wrap_%s" % (wrapped_class_name)
do_wrap_func_name = f"__do_wrap_{wrapped_class_name}"
do_wrap_func = __do_wrap
global_dict = globals()
if wrapped_class_name in global_dict:
Expand All @@ -141,7 +141,7 @@ def __do_wrap(value):
wrapped_class = type(wrapped_class_name, (safe_class, wrapped_class, ), {})
except TypeError as e:
# Fail-safe for when a class cannot be dynamically subclassed.
log.warning("Unable to create dynamic subclass for %s, %s: %s", type(value), value, e)
log.warning(f"Unable to create dynamic subclass {wrapped_class_name} for {type(value)}, {value}: {e}")
wrapped_class = type(wrapped_class_name, (safe_class, ), {})
if wrapped_class not in (SafeStringWrapper, CallableSafeStringWrapper):
# Save this wrapper for reuse and pickling/copying
Expand Down

0 comments on commit 7cb575d

Please sign in to comment.