#6 [WIP] Attempt at fixing unit tests
Opened by mhuin. Modified
software-factory/ mhuin/k1s fix_tests  into  master

Download 6.patch

WIP - I cannot run the ansible test locally (Fedora 41). It fails with the following error:

INFO cherrypy.access.140106612969488:cplogging.py:283 127.0.0.1 - - [02/Dec/2024:18:03:04] "POST /api/v1/namespaces/default/pods/nodepool-41845/exec?command=%2Fbin%2Fsh&command=-c&command=%2Fbin%2Fsh+-c+%27%2Fopt%2Fapp-root%2Fbin%2Fpython+%2Fopt%2Fapp-root%2Fsrc%2F.ansible%2Ftmp%2Fansible-tmp-1733158984.007376-629890-11785986149919%2FAnsiballZ_command.py+%26%26+sleep+0%27&container=nodepool-41845&stderr=true&stdin=true&stdout=true HTTP/1.1" 101 - "" "kubectl/v1.28.2 (linux/amd64) kubernetes/89a4ea3"
ERROR K1S.api:api.py:384 execution failed
Traceback (most recent call last):
File "/tmp/k1s/k1s/api.py", line 380, in run
rc = exec_pod(
self.args['pod'], self.args.get('stdin', False),
self.args['command'], self)
File "/tmp/k1s/k1s/api.py", line 236, in exec_pod
return run_exec_stream(proc, spdy)
File "/tmp/k1s/k1s/api.py", line 259, in run_exec_stream
, flag, data = spdy.readDataFrame()
~~~~~~~~~~~~~~~~~~^^
File "/tmp/k1s/k1s/spdy.py", line 138, in readDataFrame
return self.readFrame(b'\x00\x00')
~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/tmp/k1s/k1s/spdy.py", line 134, in readFrame
raise RuntimeError("Invalid frame", header)
RuntimeError: ('Invalid frame', b'\x80\x03\x00\x06\x00\x00\x00\x04')


Trying to look for a fix, I've also read that SPDY will be phased out in favor of websockets. Should we add support for websockets?

Arg that's annoying, well I'm getting .tox/python/lib/python3.11/site-packages/kubernetes/config/kube_config.py:509: TypeError, perhaps the test dependencies broke.

For websockets, does the kubectl client supports it? 5 years ago SPDY was already deprecated, but websockets were not usable.

Metadata