-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[flashing scripts] Log errors from subprocesses #15593
Conversation
#### Problem It's difficult to troubleshoot errors frome external commands run by the flashing scripts, because their output is captured and not reported. #### Change overview Log command stdout and stderr in case of failure. #### Testing Manual run.
PR #15593: Size comparison from bb6bb37 to 64532f7 Full report (45 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
self.log(fail_level, '--- stdout ---') | ||
self.log(fail_level, exception.stdout) | ||
self.log(fail_level, '--- stderr ---') | ||
self.log(fail_level, exception.stderr) | ||
self.log(fail_level, '---') |
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.
nit: shouldn't be better to have only one single log entry?
self.log(fail_level, '--- stdout ---') | |
self.log(fail_level, exception.stdout) | |
self.log(fail_level, '--- stderr ---') | |
self.log(fail_level, exception.stderr) | |
self.log(fail_level, '---') | |
self.log(fail_level, '--- stdout ---\n' | |
f'{exception.stdout}\n--- stderr ---\n' | |
f'{exception.stderr}\n---') |
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.
Lets follow up in a separate PR if needed. I would like to have this version in to catch the reason of the flakyness. In most cases these logs will not be used.
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.
Unresolved after merge. @kpschoedel could you followup in a separate PR or argue that it is not needed?
there would also be the option of 'every stdout/stderr line should have its own log line' so that things align nicely in logs.
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.
Yes, I'll address this one way or another, when we catch the parttool error or separately.
Problem
It's difficult to troubleshoot errors frome external commands
run by the flashing scripts, because their output is captured
and not reported.
Change overview
Log command stdout and stderr in case of failure.
Testing
Manual run.