From 1515fd186f83de7d1ce6c4629e42f0af4d89c00e Mon Sep 17 00:00:00 2001 From: Nathan Tat Date: Thu, 22 Jun 2023 14:32:03 -0700 Subject: [PATCH] Add zone name to TooMuchChange during plan --- octodns/provider/plan.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/octodns/provider/plan.py b/octodns/provider/plan.py index e27b1e3..7a13da5 100644 --- a/octodns/provider/plan.py +++ b/octodns/provider/plan.py @@ -18,10 +18,16 @@ class RootNsChange(UnsafePlan): class TooMuchChange(UnsafePlan): def __init__( - self, why, update_pcent, update_threshold, change_count, existing_count + self, + why, + update_pcent, + update_threshold, + change_count, + existing_count, + name, ): msg = ( - f'{why}, {update_pcent:.2f}% is over {update_threshold:.2f}% ' + f'[{name}] {why}, {update_pcent:.2f}% is over {update_threshold:.2f}% ' f'({change_count}/{existing_count}), force required' ) super().__init__(msg) @@ -97,6 +103,7 @@ class Plan(object): self.update_pcent_threshold * 100, self.change_counts['Update'], existing_record_count, + self.existing.decoded_name, ) if delete_pcent > self.delete_pcent_threshold: raise TooMuchChange( @@ -105,6 +112,7 @@ class Plan(object): self.delete_pcent_threshold * 100, self.change_counts['Delete'], existing_record_count, + self.existing.decoded_name, ) # If we have any changes of the root NS record for the zone it's a huge