Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is minimal useful debug information when the git run by python -m towncrier.check fails #124

Closed
exarkun opened this issue Aug 8, 2018 · 0 comments

Comments

@exarkun
Copy link
Member

exarkun commented Aug 8, 2018

A poor interaction between towncrier and TravisCI resulted in this behavior:

codechecks runtests: commands[7] | python -m towncrier.check
Traceback (most recent call last):
  File "/opt/python/2.7.14/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/opt/python/2.7.14/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/travis/build/LeastAuthority/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/towncrier/check.py", line 95, in <module>
    _main()
  File "/home/travis/build/LeastAuthority/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/travis/build/LeastAuthority/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/travis/build/LeastAuthority/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/travis/build/LeastAuthority/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/travis/build/LeastAuthority/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/towncrier/check.py", line 30, in _main
    return __main(compare_with, directory)
  File "/home/travis/build/LeastAuthority/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/towncrier/check.py", line 40, in __main
    _run(["git", "diff", "--name-only", comparewith + "..."], cwd=base_directory)
  File "/home/travis/build/LeastAuthority/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/towncrier/check.py", line 23, in _run
    return check_output(args, **kwargs)
  File "/opt/python/2.7.14/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['git', 'diff', '--name-only', u'origin/master...']' returned non-zero exit status 128

This is challenging to debug since the git output is not available. towncrier should report the git output as part of this failure report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant