Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add serviceMappingListener for application service discovery #2205

Merged
merged 11 commits into from
Mar 25, 2023

Conversation

bobtthp
Copy link
Contributor

@bobtthp bobtthp commented Feb 8, 2023

issue: #2167

support add service mapping listen for service change

@justxuewei
Copy link
Member

It looks like this pull request breaks the ci tests, please fix it.

@AlexStocks
Copy link
Contributor

pls fix the ci confliction

@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2023

Codecov Report

Merging #2205 (3ea4adb) into 3.0 (6deedc3) will decrease coverage by 0.16%.
The diff coverage is 4.00%.

@@            Coverage Diff             @@
##              3.0    #2205      +/-   ##
==========================================
- Coverage   44.15%   43.99%   -0.16%     
==========================================
  Files         283      284       +1     
  Lines       17164    17271     +107     
==========================================
+ Hits         7578     7599      +21     
- Misses       8789     8872      +83     
- Partials      797      800       +3     
Impacted Files Coverage Δ
common/url.go 59.13% <ø> (ø)
config/metric_config.go 58.06% <ø> (ø)
metadata/report/etcd/report.go 1.08% <0.00%> (-0.03%) ⬇️
registry/event.go 20.51% <0.00%> (-9.12%) ⬇️
...try/servicediscovery/service_discovery_registry.go 1.02% <0.00%> (-0.10%) ⬇️
...scovery/service_instances_changed_listener_impl.go 0.00% <ø> (ø)
...ediscovery/service_mapping_change_listener_impl.go 0.00% <0.00%> (ø)
remoting/zookeeper/listener.go 0.00% <ø> (ø)
metadata/report/nacos/report.go 38.32% <16.66%> (-5.25%) ⬇️
cluster/loadbalance/ringhash/ring.go 84.50% <0.00%> (-2.82%) ⬇️
... and 2 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@justxuewei justxuewei left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks!

@bobtthp bobtthp requested review from justxuewei and removed request for zhaoyunxing92 and mark4z February 21, 2023 07:09
Group: group,
})
}

// RegisterServiceAppMapping map the specified Dubbo service interface to current Dubbo app name
func (n *nacosMetadataReport) RegisterServiceAppMapping(key string, group string, value string) error {
oldVal, err := n.getConfig(vo.ConfigParam{
Copy link
Member

Choose a reason for hiding this comment

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

OldVal is a list of service names. If strings.Contains(oldVal, newServiceName), then the SNP registration will be skipped, e.g. if oldVal = dubbo.io-2 and newServiceName = dubbo.io, then newServiceName will be skipped.

@mark4z
Copy link
Member

mark4z commented Feb 27, 2023

@sonarcloud
Copy link

sonarcloud bot commented Feb 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@bobtthp
Copy link
Contributor Author

bobtthp commented Mar 1, 2023

@mark4z
Copy link
Member

mark4z commented Mar 3, 2023

lgtm

@justxuewei
Copy link
Member

@AlexStocks @zhaoyunxing92 PTAL

@AlexStocks AlexStocks merged commit 02a1d5b into apache:3.0 Mar 25, 2023
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.

5 participants