]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
exceptions.AnsibleFailedError: Add fingerprint() 1871/head
authorZack Cerza <zack@redhat.com>
Mon, 24 Jul 2023 17:22:51 +0000 (11:22 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 24 Jul 2023 17:22:51 +0000 (11:22 -0600)
This will cause Sentry to group events by their failure reasons, rather
than lumping all AnsibleFailedErrors together

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/exceptions.py

index 3939ba53c6434202b266cc7f2a26f14358c67c8d..cbe8b5941fe198669a84419d90f6b8b43779b626 100644 (file)
@@ -105,6 +105,13 @@ class AnsibleFailedError(Exception):
             failures=self.failures,
         )
 
+    def fingerprint(self):
+        """
+        Sentry will use this to group events by their failure reasons, rather
+        than lumping all AnsibleFailedErrors together
+        """
+        return self.failures
+
 
 class CommandCrashedError(Exception):