Skip to content

Commit

Permalink
v0.4.4 (#176)
Browse files Browse the repository at this point in the history
* print only first and last 20 char of long variables in tracebacks

* bump to v0.4.4
  • Loading branch information
JoshKarpel committed Sep 4, 2019
1 parent fdc4c0a commit 9b63c0e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
22 changes: 22 additions & 0 deletions docs/source/versions/v0_4_4.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
v0.4.4
======

New Features
------------

Bug Fixes
---------

* In execution error reports, local variables with very long string forms are
now cut down to a smaller size.

Known Issues
------------

* Execution errors that result in the job being terminated but no output being
produced are still not handled entirely gracefully. Right now, the component
state will just show as ``ERRORED``, but there won't be an actual error report.
* Map component state may become corrupted when a map is manually vacated.
Force-removal may be needed to clean up maps if HTCondor and HTMap disagree
about the state of their components.
Issue: https://github.com/htcondor/htmap/issues/129
5 changes: 4 additions & 1 deletion htmap/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ def _format_stack_trace(self):
row.append(self._indent('\nLocal variables:\n', multiple = 2))
if frame.locals:
for name, value in sorted(frame.locals.items()):
row.append(self._indent(f'{name} = {value}\n', multiple = 3))
v = str(value)
if len(v) > 45:
v = v[:20] + ' ... ' + v[-20:]
row.append(self._indent(f'{name} = {v}\n', multiple = 3))
result.append(''.join(row))
if count > _RECURSIVE_CUTOFF:
count -= _RECURSIVE_CUTOFF
Expand Down
2 changes: 1 addition & 1 deletion htmap/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from typing import Tuple

__version__ = '0.4.3'
__version__ = '0.4.4'


def version() -> str:
Expand Down

0 comments on commit 9b63c0e

Please sign in to comment.