Skip to content

null ContainerImage names bugfix - #591

Merged
Avi-Robusta merged 4 commits into
masterfrom
added_containerimage_monkey_patch
Nov 13, 2022
Merged

null ContainerImage names bugfix#591
Avi-Robusta merged 4 commits into
masterfrom
added_containerimage_monkey_patch

Conversation

@Avi-Robusta

Copy link
Copy Markdown
Contributor

ContainerImages names can be None due to a containerd bug
we had to patch Hikaru - ContainerImage, and kubernetes python cli ContainerImage.

2022-11-10 12:15:57.973 ERROR    Failed to build execution event for update-Node-v1
2022-11-10 12:16:13.720 ERROR    Failed to run periodic nodes discovery
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/robusta/core/discovery/discovery.py", line 104, in discovery_process
    current_nodes: V1NodeList = client.CoreV1Api().list_node()
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api/core_v1_api.py", line 16414, in list_node
    return self.list_node_with_http_info(**kwargs)  # noqa: E501
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api/core_v1_api.py", line 16517, in list_node_with_http_info
    return self.api_client.call_api(
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 348, in call_api
    return self.__call_api(resource_path, method,
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 192, in __call_api
    return_data = self.deserialize(response_data, response_type)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 264, in deserialize
    return self.__deserialize(data, response_type)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 303, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 639, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 280, in __deserialize
    return [self.__deserialize(sub_data, sub_kls)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 280, in <listcomp>
    return [self.__deserialize(sub_data, sub_kls)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 303, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 639, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 303, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 639, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 280, in __deserialize
    return [self.__deserialize(sub_data, sub_kls)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 280, in <listcomp>
    return [self.__deserialize(sub_data, sub_kls)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 303, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 641, in __deserialize_model
    instance = klass(**kwargs)
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/models/v1_container_image.py", line 55, in __init__
    self.names = names
  File "/usr/local/lib/python3.9/site-packages/kubernetes/client/models/v1_container_image.py", line 80, in names
    raise ValueError("Invalid value for `names`, must not be `None`")  # noqa: E501

@Avi-Robusta Avi-Robusta changed the title null containerimage bug null ContainerImage bugfix Nov 10, 2022
@Avi-Robusta Avi-Robusta changed the title null ContainerImage bugfix null ContainerImage names bugfix Nov 10, 2022

@arikalon1 arikalon1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work.
Left one comment
Please fix and make sure it works before merging



def names(self, names):
if names:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't compile on my machine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was a tab that got erased in the line below by acident

@Avi-Robusta

Copy link
Copy Markdown
Contributor Author

testing on normal cluster to verify okay

@Avi-Robusta
Avi-Robusta merged commit 9e02e9d into master Nov 13, 2022
@Avi-Robusta
Avi-Robusta deleted the added_containerimage_monkey_patch branch November 13, 2022 09:02
pavangudiwada pushed a commit to pavangudiwada/robusta that referenced this pull request Nov 6, 2023
* added monkey patch

* Patching ContainerImage in Hikaru and kubernetes client

* remove unused import

* tab was accidentally removed
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