Skip to content

Honour bump_serial_on_unchanged_save in the API v2 record and RRset updates #1557

Description

@edmondas

What problem are you trying to solve?

#1438 added dns.bump_serial_on_unchanged_save. With false, the zone editor and the single record form leave the SOA serial alone when a save changes nothing. The public API does not honour the setting yet: PUT /api/v2/zones/{id}/records/{rid}, the RRset PATCH/PUT endpoints and the bulk record endpoint call updateSOASerial() after every write, and on the API backend the write itself makes PowerDNS bump through SOA-EDIT-API.

External reconciliation loops (Terraform, ExternalDNS, scripts that re-apply the same data) are the case the setting was asked for in the first place, so the API is where it matters most.

What would you like implemented?

When dns.bump_serial_on_unchanged_save is false:

  • A record update whose normalized name, type, content, TTL, priority and disabled flag match the stored row skips the write and the serial bump, and still returns 200 with the unchanged record.
  • An RRset replacement whose resulting record set equals the stored set does the same.
  • Bulk updates bump once only if at least one record actually changed.

RecordManager::recordFieldsDiffer() already does the row comparison for the web form and can be reused. With the default true nothing changes.

Additional context (optional)

Follows #1438. DNSSEC signing keeps bumping unconditionally either way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAPI-related features, improvements, and integrationsdnsDNS Managementsize: SSmall effort

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions