Skip to content

feat(balancer): add IPv6-only endpoint filtering#2239

Open
kprokopenko wants to merge 1 commit into
masterfrom
codex/ipv6-endpoint-filter
Open

feat(balancer): add IPv6-only endpoint filtering#2239
kprokopenko wants to merge 1 commit into
masterfrom
codex/ipv6-endpoint-filter

Conversation

@kprokopenko

Copy link
Copy Markdown
Collaborator

Pull request type

  • Feature
  • Bugfix
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Discovery may return FQDN endpoints without ip_v6 values. In this case gRPC resolves the name itself and can establish a connection over IPv4.

Issue Number: N/A

What is the new behavior?

  • Added experimental balancers.OnlyIPVersion(..., balancers.IPv6).
  • FQDN endpoints are resolved to IPv6 during Discovery.
  • Endpoints without IPv6 addresses are excluded.

Other information

Validated with:

  • go test ./balancers ./internal/discovery ./internal/balancer
  • go test -race -tags integration ./tests/integration -run '^TestOnlyIPVersion$' -count=1
  • golangci-lint run ./...

@github-actions

Copy link
Copy Markdown

github.com/ydb-platform/ydb-go-sdk/v3/balancers

compatible changes

IPVersion: added
IPv6: added
OnlyIPVersion: added

summary

Inferred base version: v3.143.0
Suggested version: v3.144.0

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.20710% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.25%. Comparing base (541e672) to head (ff612fc).

Files with missing lines Patch % Lines
internal/conn/pool.go 7.14% 13 Missing ⚠️
internal/balancer/config/routerconfig.go 84.00% 4 Missing ⚠️
internal/conn/conn.go 55.55% 3 Missing and 1 partial ⚠️
internal/balancer/balancer.go 88.23% 1 Missing and 1 partial ⚠️
internal/xresolver/xresolver.go 94.59% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2239      +/-   ##
==========================================
- Coverage   75.27%   72.25%   -3.02%     
==========================================
  Files         443      443              
  Lines       45910    46015     +105     
==========================================
- Hits        34557    33249    -1308     
- Misses       9401    10745    +1344     
- Partials     1952     2021      +69     
Flag Coverage Δ
experiment ?
go-1.21.x 72.18% <85.20%> (+0.03%) ⬆️
go-1.26.x 72.18% <85.20%> (-3.08%) ⬇️
integration 56.84% <70.41%> (-0.01%) ⬇️
macOS 45.30% <66.86%> (+0.16%) ⬆️
ubuntu 72.25% <85.20%> (-3.02%) ⬇️
unit 45.31% <66.86%> (+0.15%) ⬆️
windows 45.31% <66.86%> (+0.16%) ⬆️
ydb-24.4 56.40% <70.41%> (+0.04%) ⬆️
ydb-edge 56.64% <70.41%> (-0.03%) ⬇️
ydb-latest 56.53% <70.41%> (-0.11%) ⬇️
ydb-nightly ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kprokopenko kprokopenko force-pushed the codex/ipv6-endpoint-filter branch from 0c05b56 to 3ef8dc1 Compare July 13, 2026 17:34
@kprokopenko kprokopenko requested a review from Copilot July 13, 2026 17:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@kprokopenko kprokopenko requested a review from Copilot July 13, 2026 17:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@kprokopenko kprokopenko force-pushed the codex/ipv6-endpoint-filter branch 3 times, most recently from 0b99a94 to 50b1819 Compare July 13, 2026 18:04
@kprokopenko kprokopenko force-pushed the codex/ipv6-endpoint-filter branch from 50b1819 to cf48942 Compare July 13, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants