This repository was archived by the owner on May 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
Improve error reporting in the "try_run" function and correctly include original command output in the error message #153
Merged
Conversation
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
Kami
commented
Jul 25, 2018
| output, _ = process.communicate() | ||
| if process.returncode: | ||
| raise CalledProcessError(process.returncode, cmd) | ||
| raise CalledProcessError(process.returncode, cmd, output) |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constructor signature - https://github.com/enthought/Python-2.7.3/blob/master/Lib/subprocess.py#L408
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. |
|
I'll bring in @thomasrockhu as point of contact for getting this merged. However it seems like appveyor is failing for every build? |
Contributor
|
@Kami we are working on getting the |
thomasrockhu
reviewed
Sep 9, 2020
thomasrockhu
approved these changes
Sep 9, 2020
Codecov Report
@@ Coverage Diff @@
## master #153 +/- ##
=====================================
Coverage 88% 88%
=====================================
Files 2 2
Lines 9 9
=====================================
Hits 8 8
Misses 1 1 |
Contributor
|
Thank you for this @Kami! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes
check_outputfunction to correctly include output of the command which ran in theCalledProcessErrorexception 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
Nonewhich 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: [email protected] IRC: #codecov Gitter: https://gitter.im/codecov/support Twitter: @codecovAfter (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: [email protected] IRC: #codecov Gitter: https://gitter.im/codecov/support Twitter: @codecov