[Enhancement] remove legacy config package#3372
Conversation
…GetProviderService()、config.GetShutDown()
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3372 +/- ##
===========================================
+ Coverage 52.40% 52.69% +0.28%
===========================================
Files 492 492
Lines 37785 37955 +170
===========================================
+ Hits 19800 19999 +199
+ Misses 16380 16346 -34
- Partials 1605 1610 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR continues the staged removal of the legacy dubbo.apache.org/dubbo-go/v3/config package by eliminating runtime reads from it in the registry layer, switching registry/protocol and registry/directory to resolve configuration exclusively via URL attributes (with sensible defaults).
Changes:
- Remove legacy
configpackage usage fromregistry/protocolexport/reExport/destroy paths by resolving shutdown/application/provider config via URL attributes. - Remove legacy
configpackage usage fromregistry/directoryinitialization by resolving application/registries via URL attributes (with defaults). - Add/adjust tests to validate attribute propagation, listener key resolution, service map re-registration, and destroy shutdown wait behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| registry/protocol/protocol.go | Drops legacy config reads; resolves shutdown/application/provider config from URL attributes and uses resolved shutdown config for destroy wait. |
| registry/protocol/protocol_test.go | Updates provider config attribute key usage and adds tests covering attribute copying, reExport service map registration, destroy wait timing, and application name resolution. |
| registry/directory/directory.go | Drops legacy config reads; resolves application and registries configuration from URL attributes (or defaults) during directory creation and listener initialization. |
| registry/directory/directory_test.go | Adds tests for application/registries attribute resolution and consumer listener key selection via the resolved application name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| func ensureApplicationAttribute(url *common.URL, fallbackURL *common.URL) *global.ApplicationConfig { | ||
| if application, ok := applicationFromAttribute(url); ok { | ||
| url.SetAttribute(constant.ApplicationKey, application) | ||
| return application | ||
| } |



…GetProviderService()、config.GetShutDown()
Description
Fixes #3329
Checklist
develop