-
Notifications
You must be signed in to change notification settings - Fork 460
Log stderr when e2e ssh commands fail #5868
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5868 +/- ##
==========================================
- Coverage 46.94% 46.93% -0.01%
==========================================
Files 279 279
Lines 29687 29687
==========================================
- Hits 13936 13934 -2
- Misses 14938 14940 +2
Partials 813 813 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0db1a9d to
6fbd5bf
Compare
| var stdoutBuf bytes.Buffer | ||
| session.Stdout = &stdoutBuf | ||
| var stderrBuf bytes.Buffer | ||
| session.Stdout = f |
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.
Getting rid of the intermediate stdoutBuf is a drive-by optimization to save us from holding onto the entire file content in memory before writing it to the file.
|
/approve |
|
/retest |
|
/retest |
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.
/lgtm
|
LGTM label has been added. Git tree hash: 3416a12d3352b66c3b61f0b44954801300442b63
|
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.
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marosset, mboersma The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
When an SSH command fails in e2e, there isn't much context that shows up in logs, e.g. from #5844 (comment):
This PR adds the stderr from the command to the error message:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
TODOs:
Release note: