1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

_process_desired_zone after populate, test/enforce order

This commit is contained in:
Ross McFarland
2022-02-12 12:27:51 -08:00
parent 5215930109
commit 728ab2af89
2 changed files with 38 additions and 7 deletions

View File

@@ -168,13 +168,6 @@ class BaseProvider(BaseSource):
def plan(self, desired, processors=[]):
self.log.info('plan: desired=%s', desired.name)
# Make a (shallow) copy of the desired state so that everything from
# now on (in this target) can modify it as they see fit without
# worrying about impacting other targets.
desired = desired.copy()
desired = self._process_desired_zone(desired)
existing = Zone(desired.name, desired.sub_zones)
exists = self.populate(existing, target=True, lenient=True)
if exists is None:
@@ -183,6 +176,13 @@ class BaseProvider(BaseSource):
self.log.warning('Provider %s used in target mode did not return '
'exists', self.id)
# Make a (shallow) copy of the desired state so that everything from
# now on (in this target) can modify it as they see fit without
# worrying about impacting other targets.
desired = desired.copy()
desired = self._process_desired_zone(desired)
existing = self._process_existing_zone(existing)
for processor in processors: