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

fix:修复配置标签转换不对 & 客户端接口错误信息描述不对 #1274

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/model/config_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ func FromTagMap(kvs map[string]string) []*config_manage.ConfigFileTag {
func ToTagMap(tags []*config_manage.ConfigFileTag) map[string]string {
kvs := map[string]string{}
for i := range tags {
kvs[tags[i].GetKey().GetValue()] = tags[i].GetKey().GetValue()
kvs[tags[i].GetKey().GetValue()] = tags[i].GetValue().GetValue()
}

return kvs
Expand Down
4 changes: 4 additions & 0 deletions service/client_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,22 +494,26 @@ func (s *Server) getServiceCache(name string, namespace string) *model.Service {
func (s *Server) commonCheckDiscoverRequest(req *apiservice.Service, resp *apiservice.DiscoverResponse) bool {
if s.caches == nil {
resp.Code = utils.NewUInt32Value(uint32(apimodel.Code_ClientAPINotOpen))
resp.Info = utils.NewStringValue(api.Code2Info(resp.GetCode().GetValue()))
resp.Service = req
return false
}
if req == nil {
resp.Code = utils.NewUInt32Value(uint32(apimodel.Code_EmptyRequest))
resp.Info = utils.NewStringValue(api.Code2Info(resp.GetCode().GetValue()))
resp.Service = req
return false
}

if req.GetName().GetValue() == "" {
resp.Code = utils.NewUInt32Value(uint32(apimodel.Code_InvalidServiceName))
resp.Info = utils.NewStringValue(api.Code2Info(resp.GetCode().GetValue()))
resp.Service = req
return false
}
if req.GetNamespace().GetValue() == "" {
resp.Code = utils.NewUInt32Value(uint32(apimodel.Code_InvalidNamespaceName))
resp.Info = utils.NewStringValue(api.Code2Info(resp.GetCode().GetValue()))
resp.Service = req
return false
}
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.17.3
v1.17.6