Skip to content

[Enhancement] remove legacy config package#3372

Open
nagisa-kunhah wants to merge 2 commits into
apache:developfrom
nagisa-kunhah:enhance/remove-elgacy-config-pr1
Open

[Enhancement] remove legacy config package#3372
nagisa-kunhah wants to merge 2 commits into
apache:developfrom
nagisa-kunhah:enhance/remove-elgacy-config-pr1

Conversation

@nagisa-kunhah
Copy link
Copy Markdown
Contributor

@nagisa-kunhah nagisa-kunhah commented Jun 5, 2026

…GetProviderService()、config.GetShutDown()

Description

Fixes #3329

Checklist

  • I confirm the target branch is develop
  • Code has passed local testing
  • I have added tests that prove my fix is effective or that my feature works

@nagisa-kunhah nagisa-kunhah marked this pull request as ready for review June 5, 2026 18:39
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 5, 2026

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.27957% with 59 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.69%. Comparing base (e6e14fd) to head (9d42c1b).
⚠️ Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
registry/protocol/protocol.go 69.36% 22 Missing and 12 partials ⚠️
registry/directory/directory.go 66.66% 21 Missing and 4 partials ⚠️
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.
📢 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.

@Alanxtl Alanxtl added 🧹 Updates 3.3.2 version 3.3.2 labels Jun 6, 2026
@Alanxtl Alanxtl linked an issue Jun 6, 2026 that may be closed by this pull request
@AlexStocks AlexStocks requested review from Alanxtl, Similarityoung and Copilot and removed request for Alanxtl June 6, 2026 08:51
@AlexStocks AlexStocks requested review from Alanxtl and removed request for Similarityoung June 6, 2026 08:52
Copy link
Copy Markdown
Contributor

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 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 config package usage from registry/protocol export/reExport/destroy paths by resolving shutdown/application/provider config via URL attributes.
  • Remove legacy config package usage from registry/directory initialization 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.

Comment on lines +173 to +177
func ensureApplicationAttribute(url *common.URL, fallbackURL *common.URL) *global.ApplicationConfig {
if application, ok := applicationFromAttribute(url); ok {
url.SetAttribute(constant.ApplicationKey, application)
return application
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] 移除 legacy config package

4 participants