Repository navigation
Move the owner-name rule into its own package - #198
Merged
Merged
Conversation
The rule that turns an owner name into the absolute name PowerDNS keys an RRset on lived in the PowerDNS client, so every package that compared owner names imported the backend, and the status helpers kept a copy of their own. It now lives in internal/dns/ownername, which imports nothing from the operator, and the helpers call it. They still accept a name typed without a zone. No behaviour changes. The fix for #188 needs this: its election of claimants must not depend on the backend.
vvoytovych
marked this pull request as ready for review
September 29, 2026 08:07
mattdjenkinson
approved these changes
Sep 29, 2026
|
@vvoytovych you state "Nothing changes in behaviour," but it looks like ownername now comes from milo instead of powerdns, which is an improvement. Is it because the owername strings are equal in all cases? |
Contributor
Author
|
@0xmc Yes, the strings are equal in every case, because the code is the same.
The reason for the move: code that compares owner names no longer has to import the PowerDNS client. The shared election function (step 3 of #201) needs that. |
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.
Summary
The rule that decides whether two spellings of an owner name are one name lived inside the PowerDNS client, so the webhook and the status helpers imported the backend to use it, and the helpers kept a second copy. This moves the rule into a small package of its own, and the helpers now call it. Nothing changes in behaviour. It prepares the fix for #188, whose election of claimants must not depend on the backend.
Test plan