octodns / octodns-ns1

Ns1Provider provider for octoDNS
MIT License
4 stars 13 forks source link

Reset filter chain and answer groups when a dynamic record is updated to a simple one #45

Closed viranch closed 1 year ago

viranch commented 1 year ago

When a dynamic record is updated to simple record, the filter chains and answer groups are not cleared. This keeps the record at higher tier. When sync is run again, Ns1Provider will think its still a dynamic record and refuse to populate in absence of proper notes, and will show an update in the plan.

This PR clears filters and answer groups (aka regions in the API) for all simple records. Tested that this makes the record bump down to a lower tier which correctly gets inferred as a simple record by Ns1Provider and doesn't trigger an update.

istr commented 1 year ago

Looks good. I observed the missing cleanup a while ago. Checked and good fix. :+1: