-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cmd/docker: do not print error status on exec/run #5854
Conversation
2ac3ab0
to
bfe64df
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5854 +/- ##
==========================================
+ Coverage 58.89% 59.27% +0.37%
==========================================
Files 350 353 +3
Lines 29682 29694 +12
==========================================
+ Hits 17482 17601 +119
+ Misses 11218 11113 -105
+ Partials 982 980 -2 |
bfe64df
to
67df68b
Compare
67df68b
to
db9aa7d
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.
LGTM
@@ -68,7 +68,6 @@ func TestRunAttach(t *testing.T) { | |||
} | |||
|
|||
assert.Equal(t, c.ProcessState.ExitCode(), 7) | |||
assert.Check(t, is.Contains(d.String(), "exit status 7")) |
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.
I guess if we want to be strict in our tests, we could consider checking for the error message to be empty (with a comment);
assert.Check(t, is.Equal(err.Error(), ""), "should not print our own error message, as the container's output is the error message")
Not urgent for how, but something we could consider
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.
Derp; meant checking the d.String()
for what we expect it to output (for that we could add a echo "something failed"
to the container's command.
(but again, probably fine to look at in a follow up)
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
Note: This also fixes |
Co-authored-by: Fabio Pugliese Ornellas <[email protected]> Signed-off-by: Alano Terblanche <[email protected]>
db9aa7d
to
0cff340
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.
LGTM
yeah, bit of a hassle always; sometimes help finding back changes in git history though!
Is it possible to get a 28.0.1 release soon with this fix included? |
- What I did
Do not print to
std.Err
when usingdocker exec
.- How I did it
Be explicit on printing the
Cause/Status
fromStatusError
instead of a fallback to a generic error message.- How to verify it
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)