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

Jobs push changes #1023

Merged
merged 15 commits into from
Aug 14, 2023
Merged

Jobs push changes #1023

merged 15 commits into from
Aug 14, 2023

Conversation

RoiGlinik
Copy link
Contributor

No description provided.

@@ -251,40 +255,14 @@ def external_video_enricher(event: ExecutionBaseEvent, params: VideoEnricherPara
@action
def resource_events_diff(event: KubernetesAnyChangeEvent):
new_resource = event.obj
if not isinstance(new_resource, (Deployment, DaemonSet, StatefulSet, Node, Job)):
Copy link
Contributor

@Avi-Robusta Avi-Robusta Aug 10, 2023

Choose a reason for hiding this comment

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

pod and replicaset is missing here, so it will always return on pod/replicaset changes

@@ -524,3 +534,58 @@ def __publish_new_namespaces(self, namespaces: List[NamespaceInfo]):

def get_global_config(self) -> dict:
return self.registry.get_global_config()

def __update_node(self, new_node: Node, operation: K8sOperationType):
Copy link
Contributor

Choose a reason for hiding this comment

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

will this be called every time a new pod is added or CPU/mem allocation changes?

Copy link
Contributor

Choose a reason for hiding this comment

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

do you have a way of checking how often this is called

if old_info is None: # Update may occur after delete.
return

new_info.job_data = old_info.job_data
Copy link
Contributor

Choose a reason for hiding this comment

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

can the new_info have different job data that isn't in old info, like pods? (other fields in data might not be mutable )

return

new_info = self.__from_api_server_node(new_node, [])
new_info.memory_allocated = cache.memory_allocated
Copy link
Contributor

Choose a reason for hiding this comment

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

can the memory allocation/cpu/pods/count change on updates?
Like if a pod on a node is deleted wouldn't that change all the above?

@@ -384,6 +384,8 @@ platformPlaybooks:
- on_statefulset_all_changes: {}
- on_replicaset_all_changes: {}
- on_pod_all_changes: {}
- on_node_all_changes: {}
- on_job_all_changes: {}
Copy link
Contributor

Choose a reason for hiding this comment

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

how noisy is this for jobs?
like on one job that runs a few pods how often is this called?

Copy link
Contributor

@Avi-Robusta Avi-Robusta left a comment

Choose a reason for hiding this comment

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

Good work,
1 bugfix, had a few questions

# Conflicts:
#	helm/robusta/values.yaml
#	playbooks/robusta_playbooks/event_enrichments.py
#	src/robusta/core/sinks/robusta/robusta_sink.py
remove unnecessary imports
node fix node_system_info naming issues
add logic to prevent update on equal cache info
some attributes fixes
@RoiGlinik RoiGlinik merged commit d800a04 into master Aug 14, 2023
12 checks passed
@RoiGlinik RoiGlinik deleted the jobs-push-changes branch August 14, 2023 09:43
pavangudiwada pushed a commit that referenced this pull request Aug 21, 2023
* push jobs changes on job changes
pavangudiwada pushed a commit to pavangudiwada/robusta that referenced this pull request Nov 6, 2023
* push jobs changes on job changes
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