kopf
kopf copied to clipboard
`kopf.testing.KopfRunner` wedges on operator startup failures
Long story short
Simple typos and ImportError
s in the operator namespace cause kopf.testing.KopfRunner
to hang forever. This is a problem for CI/CD workflows.
Kopf version
1.35.2
Kubernetes version
1.22
Python version
3.8
Code
This works as expected:
$ kopf run -m does.not.exist -A --debug
[2021-11-18 16:51:41,213] asyncio [DEBUG ] Using selector: EpollSelector
Traceback (most recent call last):
...
ModuleNotFoundError: No module named 'does'
This hangs forever
import kopf.testing
import shlex
kopf.testing.KopfRunner(shlex.split("run -m does.not.exist -A --debug")).exit_code
Logs
See above.
Additional information
No response