Skip to content

endpoint: do not rewrite an unchanged generated RecordSet - #25

Merged
reoring merged 1 commit into
mainfrom
endpoint/recordset-noop-update
Nov 10, 2026
Merged

reoring merged 1 commit into
mainfrom
endpoint/recordset-noop-update

Conversation

@reoring

@reoring reoring commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Problem

applyRecordSets (endpointrecordset/controller.go) called Update on every existing child RecordSet on each reconcile. Adding or removing one hostname therefore rewrote every sibling RecordSet although labels and spec were identical.

Observed on a Platform estate on 2026-11-10 while investigating public URLs of unrelated apps dropping for 1-2 minutes after each app install: 89 optimistic-lock conflicts on one shared EndpointRecordSet and 290 on its ZoneUnit in 30 minutes.

Change

Skip the Update when owned labels and spec are semantically equal. Drift in targets, TTL, provider options, or owned labels still updates in place. Pruning and withdrawal capture are unchanged.

What this does not fix

The delete-and-recreate of sibling RecordSets seen in that incident is NOT explained by this Update: the Route 53 provider already skips a change when the actual record equals the desired one. The deletion trigger is still under investigation; this PR removes the write churn and conflict load only.

Checks (local)

go test ./internal/go/apps/endpoint/controllers/endpointrecordset ./internal/go/apps/gatewayendpoint/controllers/gateway pass. The new regression fails without the change (resourceVersion of unchanged children advances).

applyRecordSets updated every existing child RecordSet on each reconcile, so
adding or removing one hostname rewrote all sibling RecordSets (new
resourceVersion, watch events for every consumer) although their labels and spec
were identical. Skip the Update when owned labels and spec are semantically
equal. Target, TTL, provider option, or owned-label drift still updates in
place; pruning and withdrawal capture are unchanged.

Regression: three published hosts; add, admit, then remove a sibling hostname.
Unchanged children keep UID and resourceVersion with zero Update/Patch/Delete;
exactly one child is created and one removed.
@reoring
reoring merged commit acbe8ef into main Nov 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant