Skip to content

Commit

Permalink
[travis/sosreport] robustness, actually fail on errors
Browse files Browse the repository at this point in the history
This makes sure if we get errors (anything to stderr) in the build
it gets flagged.  Today, it can be easily silently ignored.

Current build is broken by recent lgtm pull.

3.4 python also appears to be broken by an unneeded call out of the
chunksize when threading plugins landed.  According to the docs it
defaults to 1.

Signed-off-by: Bryan Quigley <[email protected]>
  • Loading branch information
Bryan Quigley committed Mar 21, 2019
1 parent 9915987 commit 81da0d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ script:
- "nosetests -v --with-cover --cover-package=sos --cover-html"
- "sudo ~/virtualenv/python$TRAVIS_PYTHON_VERSION/bin/python ./sosreport --help"
- "sudo ~/virtualenv/python$TRAVIS_PYTHON_VERSION/bin/python ./sosreport -l --config-file=sos.conf"
- "sudo ~/virtualenv/python$TRAVIS_PYTHON_VERSION/bin/python ./sosreport -n kernel --batch --config-file=sos.conf | tee batch_output"
- "sudo ~/virtualenv/python$TRAVIS_PYTHON_VERSION/bin/python ./sosreport --batch --config-file=sos.conf 2> errors | tee batch_output"
- "[[ ! -s errors ]]"
- "cat errors"
- "sudo ~/virtualenv/python$TRAVIS_PYTHON_VERSION/bin/python ./sosreport --batch --build --config-file=sos.conf"
git:
depth: 5
2 changes: 1 addition & 1 deletion sos/sosreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ def collect(self):
self.plugpool = ThreadPoolExecutor(self.opts.threads)
# Pass the plugpool its own private copy of self.pluglist
results = self.plugpool.map(self._collect_plugin,
list(self.pluglist), chunksize=1)
list(self.pluglist))
self.plugpool.shutdown(wait=True)
for res in results:
if not res:
Expand Down

0 comments on commit 81da0d1

Please sign in to comment.