Skip to content

[AMORO-4413][AMS]Accept IPv6 connection endpoints - #4416

Open
hutiefang76 wants to merge 1 commit into
apache:masterfrom
hutiefang76:fix/kafka-ipv6-address-validation
Open

hutiefang76 wants to merge 1 commit into
apache:masterfrom
hutiefang76:fix/kafka-ipv6-address-validation

Conversation

@hutiefang76

Copy link
Copy Markdown
Contributor

Why are the changes needed?

A reachable endpoint such as [::1]:9092 fails before connection validation because splitting on colons loses the IPv6 host and port. The existing connection helper and KafkaClusterSimpleInfo bean should accept bracketed IPv6 endpoints while retaining IPv4, optional chroot and fallback behavior.

Fixes #4413.

Brief change log

  • Parse endpoints with the existing shaded HostAndPort dependency.
  • Reject empty ports before chroot and bracketed IPv6 empty ports, preserving the previous plain host: fallback.

How was this patch tested?

  • Add test cases: seven tests exercise real IPv4/IPv6 loopback sockets, chroot, bean validation, unreachable-address fallback and malformed/empty ports. Four original IPv6 cases fail on the base; the additional empty-port regression fails before its guard and passes afterward.
  • Run tests locally: all seven pass in the 15-module Maven reactor; Spotless and Checkstyle pass. Tests invoke the helper and bean; no deployed Kafka registration flow was tested.
  • Add screenshots for manual tests if appropriate: connection-helper change.

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

Post-Deploy Monitoring & Validation

An AMS maintainer should validate a known reachable bracketed IPv6 endpoint and an existing IPv4 endpoint when first exercising this helper after deployment. Valid ports should connect; malformed ports should be rejected. Restore the previous build if previously working IPv4/chroot endpoints fail. No production bean caller or project-specific connection metric was established, so this does not claim a deployed Kafka-registration check.


Compound Engineering

@github-actions github-actions Bot added the module:ams-server Ams server module label Oct 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:ams-server Ams server module

1 participant