Draft
Conversation
Collaborator
|
Auto Cherry-pick Instructions |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9454 +/- ##
==========================================
+ Coverage 59.63% 59.93% +0.30%
==========================================
Files 500 517 +17
Lines 54384 55678 +1294
==========================================
+ Hits 32431 33370 +939
- Misses 19033 19336 +303
- Partials 2920 2972 +52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8d3c46e to
38c9185
Compare
zjx20
approved these changes
Jun 26, 2025
leon-inf
reviewed
Jun 26, 2025
| return nil, (*result).err | ||
| } | ||
| return (*result).stdout.Bytes(), nil | ||
| return (*result).stdout.Bytes(), wrapExecError((*result).err, (*result).stderr) |
Contributor
There was a problem hiding this comment.
It should not operate on stdout when a failure occurs. This is the behavior defined by the API.
leon-inf
reviewed
Jun 26, 2025
| return nil, errors.Wrapf(proto.ErrFailed, errMsg) | ||
| } | ||
| return nil, err | ||
| return result.stdout.Bytes(), wrapExecError(result.err, result.stderr) |
|
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Log kbagent command's stdout on error so that users would have more context to debug.
One more thing. Action command is executed by os/exec. If the command A has created a subprocess B, and A exits before B exits, the command's timeout, which is included in the context, is not respected. (the exact same problem described in golang/go#23019) That is because B shares stdout/stderr fd with A, and go will wait for the fd to close before
cmd.Wait()returns. This PR addscmd.WaitDelayto handle this.The timeout parameter seems like not used currently, but it makes the test slow.