-
Notifications
You must be signed in to change notification settings - Fork 41
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
fix(errors): reformat plugin build error output #1012
fix(errors): reformat plugin build error output #1012
Conversation
10f4740
to
a4ab131
Compare
In case of a plugin build error, pass the combined output to the error message and display the last lines as the error detail. It was previously displaying only the stderr output, starting at the last line with '+' as the first character. Signed-off-by: Claudio Matsuoka <[email protected]>
a4ab131
to
8cc1627
Compare
This is a very interesting error because it seems that, despite being reported as happening randomly, it should have never worked in the first place: only stderr was captured and the string being tested by Rockcraft was sent to stdout. Now we're capturing the combined output, and accounting for the race of stdout text appearing before or after the |
9b75036
to
8cc1627
Compare
Signed-off-by: Claudio Matsuoka <[email protected]>
11150cf
to
236229c
Compare
Signed-off-by: Claudio Matsuoka <[email protected]>
It seems that related Rockcraft issues are gone after preventing the Python interpreter search to return an error and stop the build process. See canonical/rockcraft#809 |
Note that capturing only stderr can sometimes show us error messages with the
|
Properly redirect error messages instead of using the combined stream output. Signed-off-by: Claudio Matsuoka <[email protected]>
592d34e
to
96710f0
Compare
Signed-off-by: Claudio Matsuoka <[email protected]>
96710f0
to
c045cc5
Compare
Also note that capturing the last three lines will capture only the last error message, along with its |
As a reference, this is how the error message usually appears if using combined output:
|
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
Not a huge difference in this case, but here's the output including the last three traced lines:
|
Signed-off-by: Claudio Matsuoka <[email protected]>
12d2a89
to
bd20e82
Compare
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.
Last 3 commands looks good, I'm happy with this! Thanks.
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.
thanks!
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
8382ef0
to
3721fa5
Compare
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
Signed-off-by: Claudio Matsuoka <[email protected]>
In case of Python plugin build errors, print error messages to stderr
instead of stdout so they can be captured and properly displayed to the
user. Don't start printing from the last script execution trace line because
messages printed to stderr appear before the traced
exit
line.Fixes #1000
Signed-off-by: Claudio Matsuoka [email protected]
docs/reference/changelog.rst
)?