[INLONG-12088][Audit] Audit routing data source management supports domain names#12089
Merged
dockerzhang merged 2 commits intoapache:masterfrom Feb 27, 2026
Merged
[INLONG-12088][Audit] Audit routing data source management supports domain names#12089dockerzhang merged 2 commits intoapache:masterfrom
dockerzhang merged 2 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request enhances the audit routing data source management to support domain names in addition to IP addresses. The change updates the JDBC URL parsing logic to accept hostnames (including localhost and fully qualified domain names) while maintaining backward compatibility with existing IP-based configurations.
Changes:
- Updated regex pattern in
RouteUtils.extractAddress()to accept domain names, not just IP addresses - Added error handling and logging for JDBC URL parsing failures
- Introduced comprehensive test coverage for domain name scenarios including localhost, single-level, multi-level, and hyphenated domains
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| inlong-audit/audit-common/src/main/java/org/apache/inlong/audit/utils/RouteUtils.java | Updated regex pattern from [\\d\\.] to [\\w.-] to support domain names; added logging, constants, and improved error handling |
| inlong-audit/audit-common/src/test/java/org/apache/inlong/audit/utils/RouteUtilsTest.java | Added four new test cases covering localhost, standard domain names, multi-level subdomains, and hyphenated domain names |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
inlong-audit/audit-common/src/main/java/org/apache/inlong/audit/utils/RouteUtils.java
Show resolved
Hide resolved
inlong-audit/audit-common/src/main/java/org/apache/inlong/audit/utils/RouteUtils.java
Outdated
Show resolved
Hide resolved
inlong-audit/audit-common/src/main/java/org/apache/inlong/audit/utils/RouteUtils.java
Outdated
Show resolved
Hide resolved
inlong-audit/audit-common/src/test/java/org/apache/inlong/audit/utils/RouteUtilsTest.java
Show resolved
Hide resolved
luchunliang
approved these changes
Feb 27, 2026
aloyszhang
approved these changes
Feb 27, 2026
baomingyu
approved these changes
Feb 27, 2026
dockerzhang
approved these changes
Feb 27, 2026
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.
Motivation
Enable audit routing data source management to support domain names, allowing for more flexible and scalable configuration.
Modifications