google / google/openhtf

Output callbacks are difficult to debug due to suppression of errors

Open
#793 0 comments 0 reactions 1 assignee Claimed by @jettisonjoe View on GitHub
bug
Dominant language
Python
Stars
722
Forks
237
Avg merge
11h 31m
Merged PRs (30d)
4

Description

### Repro steps

In `examples/hello_world.py` add the following lines right after `test = htf.Test(hello_world)`:

```python
def raises():
raise RuntimeError
test.add_output_callbacks(raises)
```

### Issue 1

Run the example as normal with `py -m examples.hello_world`. There is no indication that the output callback failed.

In the recent logging changes, we tried to hide tracebacks by default to provide a cleaner UI experience in production. But I question whether serious errors like an output callback failing should be silenced entirely. Shouldn't there be at least a single line to indicate something went wrong?

### Issue 2

Run the example verbosely with `py -m examples.hello_world -vvv`. We learn that an output callback raised, but there is no way to get a traceback. I'd expect there to be some way to get a traceback.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.