From: Zack Cerza Date: Mon, 24 Jul 2023 17:22:51 +0000 (-0600) Subject: exceptions.AnsibleFailedError: Add fingerprint() X-Git-Tag: 1.2.0~87^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1871%2Fhead;p=teuthology.git exceptions.AnsibleFailedError: Add fingerprint() This will cause Sentry to group events by their failure reasons, rather than lumping all AnsibleFailedErrors together Signed-off-by: Zack Cerza --- diff --git a/teuthology/exceptions.py b/teuthology/exceptions.py index 3939ba53c..cbe8b5941 100644 --- a/teuthology/exceptions.py +++ b/teuthology/exceptions.py @@ -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):