Skip to content

Commit 9b63c0e

Browse files
authored
v0.4.4 (#176)
* print only first and last 20 char of long variables in tracebacks * bump to v0.4.4
1 parent fdc4c0a commit 9b63c0e

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

docs/source/versions/v0_4_4.rst

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
v0.4.4
2+
======
3+
4+
New Features
5+
------------
6+
7+
Bug Fixes
8+
---------
9+
10+
* In execution error reports, local variables with very long string forms are
11+
now cut down to a smaller size.
12+
13+
Known Issues
14+
------------
15+
16+
* Execution errors that result in the job being terminated but no output being
17+
produced are still not handled entirely gracefully. Right now, the component
18+
state will just show as ``ERRORED``, but there won't be an actual error report.
19+
* Map component state may become corrupted when a map is manually vacated.
20+
Force-removal may be needed to clean up maps if HTCondor and HTMap disagree
21+
about the state of their components.
22+
Issue: https://github.com/htcondor/htmap/issues/129

htmap/errors.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ def _format_stack_trace(self):
108108
row.append(self._indent('\nLocal variables:\n', multiple = 2))
109109
if frame.locals:
110110
for name, value in sorted(frame.locals.items()):
111-
row.append(self._indent(f'{name} = {value}\n', multiple = 3))
111+
v = str(value)
112+
if len(v) > 45:
113+
v = v[:20] + ' ... ' + v[-20:]
114+
row.append(self._indent(f'{name} = {v}\n', multiple = 3))
112115
result.append(''.join(row))
113116
if count > _RECURSIVE_CUTOFF:
114117
count -= _RECURSIVE_CUTOFF

htmap/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from typing import Tuple
1717

18-
__version__ = '0.4.3'
18+
__version__ = '0.4.4'
1919

2020

2121
def version() -> str:

0 commit comments

Comments
 (0)