FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Improve error reporting in the "try_run" function and correctly include original command output in the error message by Kami · Pull Request #153 · codecov/codecov-python · GitHub

This repository was archived by the owner on May 21, 2025. It is now read-only.
/ codecov-python Public archive

Improve error reporting in the "try_run" function and correctly include original command output in the error message - #153

Merged
thomasrockhu merged 7 commits into
codecov:masterfrom
Kami:better_error_output
Sep 9, 2020
Merged

Improve error reporting in the "try_run" function and correctly include original command output in the error message#153
thomasrockhu merged 7 commits into
codecov:masterfrom
Kami:better_error_output

Conversation

Kami commented Jul 25, 2018

Copy link
Copy Markdown
Contributor

This pull request fixes check_output function to correctly include output of the command which ran in the CalledProcessError exception which is thrown.

In addition to that, it also includes return (exit) code in the printed error message.

Before this change it was very hard / impossible to debug various codecove command failures because the original command output was not included in the error which is printed to the console.

Before (as you can see, output is always None which makes troubleshooting practically impossible):

      _____          _
     / ____|        | |
    | |     ___   __| | ___  ___ _____   __
    | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
    | |___| (_) | (_| |  __/ (_| (_) \ V /
     \_____\___/ \____|\___|\___\___/ \_/
                                    v2.0.15
==> Detecting CI provider
    Travis Detected
==> Preparing upload
==> Processing gcov (disable by -X gcov)
    Executing gcov (find /home/travis/build/StackStorm/st2 -not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**' -type f -name '*.gcno'  -exec gcov -pb  {} +)
==> Collecting reports
    Mergeing coverage reports
    Error running `coverage combine -a`: None
Error: No coverage report found
Tip: See an example python repo: https://github.com/codecov/example-python
Support channels:
  Email:   hello@codecov.io
  IRC:     #codecov
  Gitter:  https://gitter.im/codecov/support
  Twitter: @codecov

After (command output is correctly included which makes troubleshooting possible / easier):

      _____          _
     / ____|        | |
    | |     ___   __| | ___  ___ _____   __
    | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
    | |___| (_) | (_| |  __/ (_| (_) \ V /
     \_____\___/ \____|\___|\___\___/ \_/
                                    v2.0.15
==> Detecting CI provider
    Travis Detected
    Fixing merge commit SHA
==> Preparing upload
==> Processing gcov (disable by -X gcov)
    Executing gcov (find /home/travis/build/StackStorm/st2 -not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**' -type f -name '*.gcno'  -exec gcov -pb  {} +)
==> Collecting reports
    Mergeing coverage reports
    Error running `coverage combine -a`: output=Couldn't trace with concurrency=eventlet, the module isn't installed.
, returncode=1
Error: No coverage report found
Tip: See an example python repo: https://github.com/codecov/example-python
Support channels:
  Email:   hello@codecov.io
  IRC:     #codecov
  Gitter:  https://gitter.im/codecov/support
  Twitter: @codecov

Comment thread codecov/__init__.py
output, _ = process.communicate()
if process.returncode:
raise CalledProcessError(process.returncode, cmd)
raise CalledProcessError(process.returncode, cmd, output)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Kami commented Jan 21, 2019

Copy link
Copy Markdown
Contributor Author

Any progress on this?

We still need to use our fork and not upstream version because this change hasn't been accepted / merged upstream yet.

Thanks.

Copy link
Copy Markdown

I'll bring in @thomasrockhu as point of contact for getting this merged. However it seems like appveyor is failing for every build?

Copy link
Copy Markdown
Contributor

@Kami we are working on getting the appveyor tests passing. We will get this merged ASAP

Comment thread codecov/__init__.py Outdated

codecov Bot commented Sep 9, 2020

Copy link
Copy Markdown

Codecov Report

Merging #153 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #153   +/-   ##
=====================================
  Coverage      88%    88%           
=====================================
  Files           2      2           
  Lines           9      9           
=====================================
  Hits            8      8           
  Misses          1      1           

thomasrockhu merged commit 6638881 into codecov:master Sep 9, 2020

Copy link
Copy Markdown
Contributor

Thank you for this @Kami!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL