Repository navigation
Refactor command runner interface, allow stdin writes - #5530
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Travis tests have failedHey @medyagh, 1st Buildmake test2nd Buildmake testTravisBuddy Request Identifier: 83023ec0-e569-11e9-950a-c74496fc22d4 |
Travis tests have failedHey @medyagh, 1st Buildmake test2nd Buildmake testTravisBuddy Request Identifier: 7d3218b0-e62e-11e9-9927-991e8c29daea |
Codecov Report
@@ Coverage Diff @@
## master #5530 +/- ##
==========================================
- Coverage 37.83% 36.62% -1.22%
==========================================
Files 106 110 +4
Lines 7773 8093 +320
==========================================
+ Hits 2941 2964 +23
- Misses 4452 4740 +288
- Partials 380 389 +9
|
Travis tests have failedHey @medyagh, 1st Buildmake testTravisBuddy Request Identifier: bbeea290-e6d2-11e9-9927-991e8c29daea |
Travis tests have failedHey @medyagh, 1st Buildmake test2nd Buildmake testTravisBuddy Request Identifier: 6caef200-e6e3-11e9-9927-991e8c29daea |
Travis tests have failedHey @medyagh, 1st Buildmake test2nd Buildmake testTravisBuddy Request Identifier: 160f7bc0-e6ea-11e9-9927-991e8c29daea |
Travis tests have failedHey @medyagh, 1st Buildmake test2nd Buildmake testTravisBuddy Request Identifier: 6cb7dc90-e6ec-11e9-9927-991e8c29daea |
|
/retest this please |
ed491fb to
29a015b
Compare
|
|
Linux Vbox FailureWeird error on Linux virtualbox integration test: None Faliurethe one time that none passedFor the record, the time that it passed was on Build #6235 (Oct 29, 2019 2:54:49) on GCP - Linux This one acted as a flake ! when I updated the PR for a un-realted Wrap format, it went from green to red. I wonder if this is related to which VM the CI job lands on ? VM :Linux GCP - Linux |
|
/ok-to-test |
|
Flakes appear unrelated. Merging. |
I believe I've fixed this. It seemed that the GPU machine had a bad KVM-SPICE config. I deinstalled the SPICE driver. |
RunCmd and WaitCmd used a type assertion against *exec.ExitError, but SSH sessions return *ssh.ExitError. The assertion silently failed, leaving ExitCode at 0 for every command. The bug was introduced in kubernetes#5530 (62 commits, +639 -449): commit eaa0171 Author: Medya Gh <medya@google.com> Date: Wed Oct 2 15:56:21 2019 -0700 move unit tests from util to command_runner The method also changes from ExitCode() to ExitStatus() to match the ssh.ExitError interface. With this fix, callers like HelmInstall can detect a missing executable reliably using exit code 127. Previously ExitCode was always 0.
RunCmd and WaitCmd used a type assertion against *exec.ExitError, but SSH sessions return *ssh.ExitError. The assertion silently failed, leaving ExitCode at 0 for every command. The bug was introduced in kubernetes#5530 (62 commits, +639 -449): commit eaa0171 Author: Medya Gh <medya@google.com> Date: Wed Oct 2 15:56:21 2019 -0700 move unit tests from util to command_runner The method also changes from ExitCode() to ExitStatus() to match the ssh.ExitError interface. With this fix, callers like HelmInstall can detect a missing executable reliably using exit code 127. Previously ExitCode was always 0.
RunCmd and WaitCmd used a type assertion against *exec.ExitError, but SSH sessions return *ssh.ExitError. The assertion silently failed, leaving ExitCode at 0 for every command. The bug was introduced in kubernetes#5530 (62 commits, +639 -449): commit eaa0171 Author: Medya Gh <medya@google.com> Date: Wed Oct 2 15:56:21 2019 -0700 move unit tests from util to command_runner Fixed by: - Use *ssh.ExitError and ExitStatus() instead of *exec.ExitError and ExitCode() - Extract sshExitCode helper to avoid duplication and document the behavior for non-exit errors (e.g. connection drop, SSH protocol error): ExitCode remains 0 to match ExecRunner and KICRunner behavior
RunCmd and WaitCmd used a type assertion against *exec.ExitError, but SSH sessions return *ssh.ExitError. The assertion silently failed, leaving ExitCode at 0 for every command. The bug was introduced in kubernetes#5530 (62 commits, +639 -449): commit eaa0171 Author: Medya Gh <medya@google.com> Date: Wed Oct 2 15:56:21 2019 -0700 move unit tests from util to command_runner Fixed by: - Use *ssh.ExitError and ExitStatus() instead of *exec.ExitError and ExitCode() - Extract sshExitCode helper to avoid duplication and document the behavior for non-exit errors (e.g. connection drop, SSH protocol error): ExitCode remains 0 to match ExecRunner and KICRunner behavior
Initially this is preparing minikube to use kic ! (which requires setting StdIn on the commands)
previously minikube commands were all string, now it would be a exec.Cmd interface type.
This PR:
cmd string