client-go/tools/remotecommand
Patrick Ohly 804ee8c42e client-go remotecommand: avoid "unexpected error" log when there is no error
Normal execution always started to trigger this after adding more logging in
the E2E framework's exec_util.go:

     I0506 21:23:56.781188 6341 exec_util.go:201] unexpected error trying to use websockets for pod exec: <nil>

That the "should fall back" implementation gets called when there is no error
and thus no reason to even consider falling back is odd. Now the execute
implementation checks for nil first.

This is the same approach taken also in the portforward code:
b35c5c0a30/staging/src/k8s.io/client-go/tools/portforward/fallback_dialer.go (L52)

Kubernetes-commit: 35870c480d64a8ae35c0e5839cc40b0115b7328a
2025-05-07 14:51:18 +02:00
..
doc.go remove import doc comments 2024-12-02 14:43:58 +01:00
errorstream.go client-go: transform watchErrorStream to wrap the underlying error (#129765) 2025-01-23 20:07:37 +00:00
fallback_test.go Websocket HTTPS proxy support 2025-01-29 03:56:55 +00:00
fallback.go client-go remotecommand: avoid "unexpected error" log when there is no error 2025-05-07 14:51:18 +02:00
OWNERS Adds OWNERS files to client-go streaming dirs 2024-03-05 20:21:48 +00:00
reader.go Fix sending oversided data frames to spdy stream 2018-11-13 10:57:33 -05:00
remotecommand.go WebSocket Client and V5 RemoteCommand Subprotocol 2023-07-06 21:22:07 -07:00
resize.go Move client/unversioned/remotecommand to client-go 2017-05-16 17:20:28 +00:00
spdy_test.go StreamTranslator and FallbackExecutor for WebSockets 2023-07-06 21:22:07 -07:00
spdy.go StreamTranslator and FallbackExecutor for WebSockets 2023-07-06 21:22:07 -07:00
v1.go Use https links for k8s KEPs, issues, PRs, etc 2022-09-23 16:13:22 -04:00
v2_test.go client-go: transform watchErrorStream to wrap the underlying error (#129765) 2025-01-23 20:07:37 +00:00
v2.go Remove ioutil from client-go 2022-07-30 20:54:41 +09:00
v3.go run hack/update-staging-client-go, somehow we copied listers/<authn,authz,imagepolicy> 2017-06-28 00:06:44 +00:00
v4_test.go fixes the unit tests to be more tolerant with error messages 2020-11-27 08:21:56 +00:00
v4.go Fix Go vet errors for master golang 2024-09-12 18:15:22 +05:30
v5.go WebSocket Client and V5 RemoteCommand Subprotocol 2023-07-06 21:22:07 -07:00
websocket_test.go Websocket HTTPS proxy support 2025-01-29 03:56:55 +00:00
websocket.go Return correct error upon websocket message read failure 2025-03-07 12:53:47 +01:00