From baaa9f23310dec7bd35fd2cc025a737a13bed82c Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 24 Jul 2023 11:22:51 -0600 Subject: [PATCH] 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 --- teuthology/exceptions.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/teuthology/exceptions.py b/teuthology/exceptions.py index 3939ba53c6..cbe8b5941f 100644 --- a/teuthology/exceptions.py +++ b/teuthology/exceptions.py @@ -105,6 +105,13 @@ def __str__(self): 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):