Skip to content

Conversation

@Similarityoung
Copy link
Contributor

What this PR does:

This pull request significantly refactors and extends the Dubbo client configuration and integration logic to support more flexible and feature-rich Dubbo proxying. The main changes include expanding the DubboProxyConfig struct with new fields and helpers, updating the Dubbo client creation to use the latest dubbo-go v3.3.1 client API, and adding comprehensive unit tests for the new configuration options.

Key changes:

DubboProxyConfig Enhancements

  • Added new fields to DubboProxyConfig for advanced Dubbo features: Cluster, Check, Protocol, Filter, Serialization, Sticky, and Params, each with documentation and sensible defaulting logic. Helper methods (GetCluster, GetProtocol, GetCheck) were introduced to provide default values and maintain backward compatibility.

Dubbo Client Refactor

  • Switched Dubbo client initialization from the old dg.RootConfig approach to the new dclient.NewClient API, updating the registry and application configuration handling to use global.RegistryConfig and global.ApplicationConfig. [1] [2] [3] [4]
  • Refactored the service reference creation logic to use a new buildReferenceOptions method, which builds the reference configuration using the new API and applies all advanced options from DubboProxyConfig and the integration request. This enables support for all new configuration fields and ensures correct option precedence.

Testing

  • Added comprehensive unit tests in config_test.go to verify the new configuration fields and helper methods, including edge cases for defaulting and explicit configuration.

Which issue(s) this PR fixes:

Fixes #631

@Similarityoung Similarityoung marked this pull request as draft January 10, 2026 09:09
@sonarqubecloud
Copy link

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 10.62500% with 143 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.55%. Comparing base (5ac9162) to head (9f8593d).

Files with missing lines Patch % Lines
pkg/client/dubbo/dubbo.go 4.66% 142 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #862      +/-   ##
===========================================
- Coverage    20.63%   20.55%   -0.09%     
===========================================
  Files          259      260       +1     
  Lines        19017    19143     +126     
===========================================
+ Hits          3925     3935      +10     
- Misses       14707    14822     +115     
- Partials       385      386       +1     
Flag Coverage Δ
unittests 20.55% <10.62%> (-0.09%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Alanxtl Alanxtl added enhancement New feature or request 1.2.0 labels Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.2.0 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Support more custom config for Dubbo Client

3 participants