Lines Matching full:group
5 """Model for a group of alerts."""
19 """Represents a group of alerts that are likely to have the same cause."""
33 # The kind of the alerts in this group. Each group only has one kind.
37 """Sets this group's revision range the minimum of the given group.
40 grouped_alerts: Alert entities that belong to this group. These
54 Assigns a bug_id or a group_id if there is a matching group,
55 otherwise creates a new group for that anomaly.
84 """Finds and assigns a group for |alert_entity|.
86 An alert should only be assigned an existing group if the group if
87 the other alerts in the group are of the same kind, which should be
88 the case if the alert_kind property of the group matches the alert's
92 alert_entity: Alert to find group for.
98 True if a group is found and assigned, False otherwise.
100 for group in groups:
101 if (_IsOverlapping(alert_entity, group.start_revision, group.end_revision)
102 and group.alert_kind == kind
103 and test_suite in group.test_suites):
104 _AddAlertToGroup(alert_entity, group)
111 group = AlertGroup()
112 group.start_revision = alert_entity.start_revision
113 group.end_revision = alert_entity.end_revision
114 group.test_suites = [test_suite]
115 group.alert_kind = kind
116 group.put()
117 alert_entity.group = group.key
118 logging.debug('Auto triage: Created group %s.', group)
121 def _AddAlertToGroup(alert_entity, group): argument
122 """Adds an anomaly to group and updates the group's properties."""
124 if alert_entity.start_revision > group.start_revision:
126 group.start_revision = alert_entity.start_revision
128 if alert_entity.end_revision < group.end_revision:
129 group.end_revision = alert_entity.end_revision
132 group.put()
134 if group.bug_id:
135 alert_entity.bug_id = group.bug_id
136 _AddLogForBugAssociate(alert_entity, group.bug_id)
137 alert_entity.group = group.key
140 group.key.urlsafe())