Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when an APIResource has no verbs #1000

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

lukasstockner
Copy link
Contributor

When running a Kopf operator in a cluster that has a recent version of KubeVirt installed, it crashes on startup with TypeError: 'NoneType' object is not iterable.

The problem appears to be that KubeVirt registers an APIResource with no verbs, so the resource that is being fetched here contains "verbs": None, which causes the code in _read_version to fail.

There are actually quite a few such resources, but all the others contain slashes in their name so the filter in line 124 ignores them, which is why it worked before KubeVirt v0.58.1.

@nolar nolar enabled auto-merge July 27, 2023 09:03
@nolar nolar merged commit 08205e4 into nolar:main Jul 27, 2023
27 of 28 checks passed
@nolar
Copy link
Owner

nolar commented Jul 27, 2023

Sorry for the delay reviewing it. Released as 1.36.2. And thank you for the contribution!

@lukasstockner lukasstockner deleted the fix-apiresource-no-verbs branch July 27, 2023 11:43
@lukasstockner
Copy link
Contributor Author

Sorry for the delay reviewing it. Released as 1.36.2. And thank you for the contribution!

No worries, thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants