Skip to content

refactor: remove config package dependency from health and reflectionservices#3197

Open
CAICAIIs wants to merge 1 commit intoapache:developfrom
CAICAIIs:refactor/remove-config-clean
Open

refactor: remove config package dependency from health and reflectionservices#3197
CAICAIIs wants to merge 1 commit intoapache:developfrom
CAICAIIs:refactor/remove-config-clean

Conversation

@CAICAIIs
Copy link
Contributor

@CAICAIIs CAICAIIs commented Feb 6, 2026

Remove dependencies on config package from:

  • protocol/triple/health/healthServer.go
  • protocol/triple/reflection/serverreflection.go

Both services already register via server.SetProviderServices() in init(), so config.SetProviderServiceWithInfo() calls are no longer needed.

config.SetProviderServiceWithInfo():

  • 这个函数只是将服务和元数据存储在 config 包的 map 中
  • 这些 map (proServices, proServicesInfo) 实际上在新的架构中已经不再使用
  • 而新架构中服务已通过 server.SetProviderServices() 注册

Description

Related to #2741

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

… services

Remove dependencies on config package from:
- protocol/triple/health/healthServer.go
- protocol/triple/reflection/serverreflection.go

Both services already register via server.SetProviderServices() in init(),
so config.SetProviderServiceWithInfo() calls are no longer needed.

Relates to apache#2741

Signed-off-by: Sisyphus <sisyphus@apache.org>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2026

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.81%. Comparing base (60d1c2a) to head (d86056a).
⚠️ Report is 728 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3197      +/-   ##
===========================================
+ Coverage    46.76%   47.81%   +1.04%     
===========================================
  Files          295      461     +166     
  Lines        17172    33440   +16268     
===========================================
+ Hits          8031    15988    +7957     
- Misses        8287    16176    +7889     
- Partials       854     1276     +422     

☔ 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.

Copy link
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 removes the config package dependency from the built-in Triple health check and server reflection services by deleting legacy config.SetProviderServiceWithInfo() registrations, relying solely on server.SetProviderServices() internal-service registration.

Changes:

  • Remove dubbo.apache.org/dubbo-go/v3/config import from health and reflection internal services.
  • Remove config.SetProviderServiceWithInfo() calls previously used for legacy config.Load compatibility.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
protocol/triple/reflection/serverreflection.go Drops config import and removes provider-service registration into config maps for reflection.
protocol/triple/health/healthServer.go Drops config import and removes provider-service registration into config maps for health.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Alanxtl Alanxtl added 🧹 Updates 3.3.2 version 3.3.2 labels Feb 7, 2026
Copy link
Contributor

@Alanxtl Alanxtl left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@nanjiek nanjiek left a comment

Choose a reason for hiding this comment

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

lgtm

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.

5 participants