Skip to content

[INLONG-12088][Audit] Audit routing data source management supports domain names#12089

Merged
dockerzhang merged 2 commits intoapache:masterfrom
doleyzi:INLONG-12088
Feb 27, 2026
Merged

[INLONG-12088][Audit] Audit routing data source management supports domain names#12089
dockerzhang merged 2 commits intoapache:masterfrom
doleyzi:INLONG-12088

Conversation

@doleyzi
Copy link
Contributor

@doleyzi doleyzi commented Feb 27, 2026

Motivation

Enable audit routing data source management to support domain names, allowing for more flexible and scalable configuration.

Modifications

  • Updated audit routing data source management to accept domain names as valid inputs.
  • Enhanced resolution logic to handle domain names properly during routing.
  • Ensured backward compatibility with IP-based configurations.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dockerzhang dockerzhang merged commit a5876c1 into apache:master Feb 27, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improve][Audit] Audit routing data source management supports domain names

6 participants