cmd/docker: do not print error status on exec/run#5854
Conversation
2ac3ab0 to
bfe64df
Compare
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (20.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. 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
| } | ||
|
|
||
| assert.Equal(t, c.ProcessState.ExitCode(), 7) | ||
| assert.Check(t, is.Contains(d.String(), "exit status 7")) |
There was a problem hiding this comment.
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.
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)
|
Note: This also fixes |
Co-authored-by: Fabio Pugliese Ornellas <fabio.ornellas@gmail.com> Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
db9aa7d to
0cff340
Compare
thaJeztah
left a comment
There was a problem hiding this comment.
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? |
|
Yes, we will be having a patch release this week (Wednesday is the initial plan). |


- What I did
Do not print to
std.Errwhen usingdocker exec.- How I did it
Be explicit on printing the
Cause/StatusfromStatusErrorinstead 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)