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: issue with OOM not being reported due to being captured downstream #1605

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/robusta/core/sinks/robusta/robusta_sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,15 @@ def __discover_resources(self) -> DiscoveryResults:

except Exception:
# we had an error during discovery. Reset caches to align the data with the storage
if Discovery.out_of_memory_detected and "ERROR_DISCOVERY_OOM" not in self.__errors:
self.__errors.append("ERROR_DISCOVERY_OOM")
self.__reset_caches()
logging.error(
f"Failed to run publish discovery for {self.sink_name}",
exc_info=True,
)
finally:
if Discovery.out_of_memory_detected and "ERROR_DISCOVERY_OOM" not in self.__errors:
self.__errors.append("ERROR_DISCOVERY_OOM")


def __publish_new_nodes(self, current_nodes: List[NodeInfo]):
# convert to map
Expand Down
Loading