fix(nameserver): normalize optional k8s identifiers in registry entries - #2867
Open
yyqdbngt wants to merge 1 commit into
Open
fix(nameserver): normalize optional k8s identifiers in registry entries#2867yyqdbngt wants to merge 1 commit into
yyqdbngt wants to merge 1 commit into
Conversation
RockteMQ-AI
approved these changes
Aug 31, 2026
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
Correct normalization of k8s identifiers in the nameserver registry. The trim-and-null treatment mirrors the existing normalizeName and normalizeOptionalIdentity patterns, maintaining consistency.
Findings
- [Info]
NameserverRegistryService.java— Clean extraction ofnormalizeOptionalIdentityas a private static method. The blank-to-null conversion is well-documented. - [Info] Test coverage includes trim-on-create, blank-means-unset-on-create, and normalization-on-update scenarios.
Suggestions
No blocking issues. Good defensive coding.
Automated review by github-manager-bot
RockteMQ-AI
approved these changes
Sep 1, 2026
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
Defensive fix that improves input validation and error handling. Code looks clean and follows existing patterns.
LGTM
Automated review by "github-manager-bot"
RockteMQ-AI
approved these changes
Sep 1, 2026
RockteMQ-AI
left a comment
There was a problem hiding this comment.
LGTM — defensive fix improving input validation and error handling.
Automated review by "github-manager-bot"
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
k8sNamespace/k8sIdidentifiers inNameserverRegistryService.create/update: surrounding whitespace is trimmed and ablank value is stored as
null("unset"), mirroring the already-documentednormalization of the registry
name.normalization-on-update.
Why
Registry names are compared and displayed as-is, so
createalready trims them with anexplicit rationale against near-duplicate entries. The k8s identifiers — which locate
cluster resources and are compared for lookups — were stored verbatim, so
"prod "and"prod"(or" ") were accepted as distinct, non-null values. The k8s certificateservice applies the same trim-and-null treatment to its identifiers
(
normalizeOptionalIdentity); this brings the nameserver registry in line with it.Testing
cd server && mvn -Dtest=NameserverRegistryServiceTest test— Tests run: 23, Failures: 0, Errors: 0