-
Notifications
You must be signed in to change notification settings - Fork 929
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
Fix: make metadata report work without serviceDiscovery #948
Conversation
785e323
to
5a7f093
Compare
Codecov Report
@@ Coverage Diff @@
## develop #948 +/- ##
===========================================
- Coverage 59.66% 59.53% -0.13%
===========================================
Files 261 261
Lines 12919 12952 +33
===========================================
+ Hits 7708 7711 +3
- Misses 4240 4268 +28
- Partials 971 973 +2
Continue to review full report at Codecov.
|
f002d8a
to
8aba190
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dubbo-go/registry/servicediscovery/service_discovery_registry.go
Lines 177 to 180 in af6b6c0
err = s.metaDataService.PublishServiceDefinition(url) | |
if err != nil { | |
return perrors.WithMessage(err, "publish the service definition failed. ") | |
} |
We don't need publish service definition in service_discovery_registry.
common/extension/metadata_service.go
Outdated
remoteMetadataService, err = creator() | ||
return remoteMetadataService, err | ||
} | ||
logger.Info("could not find the metadata service creator for metadataType: remote") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be warm
?
metadata/service/remote/service.go
Outdated
BaseMetadataIdentifier: identifier.BaseMetadataIdentifier{ | ||
ServiceInterface: interfaceName, | ||
Version: url.GetParam(constant.VERSION_KEY, ""), | ||
// Group: url.GetParam(constant.GROUP_KEY, constant.SERVICE_DISCOVERY_DEFAULT_GROUP), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not use, pls remove it
546dabf
to
70eb671
Compare
d12bf6a
to
e633a73
Compare
603f989
to
794ab77
Compare
metadata/service/remote/service.go
Outdated
id := &identifier.MetadataIdentifier{ | ||
BaseMetadataIdentifier: identifier.BaseMetadataIdentifier{ | ||
ServiceInterface: interfaceName, | ||
Version: url.GetParam(constant.VERSION_KEY, ""), | ||
// Group: url.GetParam(constant.GROUP_KEY, constant.SERVICE_DISCOVERY_DEFAULT_GROUP), | ||
Group: url.GetParam(constant.GROUP_KEY, constant.DUBBO), | ||
Side: url.GetParam(constant.SIDE_KEY, "provider"), | ||
Side: url.GetParam(constant.SIDE_KEY, "consumer"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SIDE_KEY consumer and provider should refer from constant
This pr is resolve issue#939? |
metadata/service/remote/service.go
Outdated
url.RangeParams(func(key, value string) bool { | ||
params[key] = value | ||
return true | ||
}) | ||
id := &identifier.MetadataIdentifier{ | ||
BaseMetadataIdentifier: identifier.BaseMetadataIdentifier{ | ||
ServiceInterface: interfaceName, | ||
Version: url.GetParam(constant.VERSION_KEY, ""), | ||
// Group: url.GetParam(constant.GROUP_KEY, constant.SERVICE_DISCOVERY_DEFAULT_GROUP), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls remove it.
25c3b98
to
9a666eb
Compare
@@ -116,22 +116,40 @@ func (mts *MetadataService) UnsubscribeURL(url *common.URL) error { | |||
func (mts *MetadataService) PublishServiceDefinition(url *common.URL) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of error
always return nil
.
Fix: make metadata report work without serviceDiscovery
What this PR does:
The metadata should work without ServiceDiscovery. So I think should add some logic in service_config.go and reference_config.go