Repository navigation
endpoint: do not rewrite an unchanged generated RecordSet - #25
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/gatewaypass. The new regression fails without the change (resourceVersion of unchanged children advances).