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: Make the Consumer config property Check available #1568

Merged
merged 28 commits into from
Nov 9, 2021
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a85b65b
Merge branch '3.0' into develop
AlexStocks May 9, 2021
9e38afe
Merge branch '3.0' into develop
AlexStocks May 10, 2021
f0ad730
Merge branch '3.0' into develop
AlexStocks May 10, 2021
4cb6e44
improve etcd version and change create to put (#1203)
ztelur May 15, 2021
56d9d71
Merge branch '3.0' into develop
AlexStocks May 15, 2021
cc74aa5
Merge branch '3.0' into develop
AlexStocks May 18, 2021
40082d4
Merge branch '3.0' into develop
AlexStocks May 21, 2021
727e346
Merge branch '3.0' into develop
AlexStocks Jun 20, 2021
268e072
Merge branch '3.0'
LaurenceLiZhixin Jun 21, 2021
42ef7fe
fix: CONTRIBUTING.md url error. (#1303)
stulzq Jul 5, 2021
a109967
add lock (#1304)
tylitianrui Jul 5, 2021
808862e
Revert "add lock (#1304)" (#1329)
LaurenceLiZhixin Jul 18, 2021
3da71a1
Merge branch '3.0' into develop
AlexStocks Aug 18, 2021
7802cca
Merge branch 'develop'
AlexStocks Aug 18, 2021
343ba6a
Merge branch 'master' of https://github.com/apache/dubbo-go
AlexStocks Aug 18, 2021
8b0191b
build(deps): bump github.com/dubbogo/gost from 1.11.14 to 1.11.16 (#1…
dependabot[bot] Aug 20, 2021
768c2d8
build(deps): bump google.golang.org/protobuf from 1.26.0 to 1.27.1 (#…
dependabot[bot] Aug 20, 2021
6377396
build(deps): bump go.etcd.io/etcd/client/v3 from 3.5.0-alpha.0 to 3.5…
dependabot[bot] Aug 20, 2021
d904ed4
merge 3.0
AlexStocks Aug 20, 2021
d32db09
Merge branch 'develop'
AlexStocks Aug 20, 2021
d49f62e
Merge branch '3.0' into develop
Sep 24, 2021
481eb47
Merge branch 'develop'
Sep 24, 2021
efe12a0
Merge remote-tracking branch 'apache/3.0' into develop
fangyincheng Sep 27, 2021
bfca099
Merge remote-tracking branch 'apache/develop'
fangyincheng Sep 27, 2021
891357a
Merge branch '3.0' into develop
Oct 31, 2021
cc7af11
Merge branch 'develop'
Oct 31, 2021
ebaa5b6
fix: in the Consumer service, the Reference config property ‘check’ u…
PhilYue Nov 7, 2021
f56cb86
Merge remote-tracking branch 'upstream/3.0' into fix/consumer_check
Nov 8, 2021
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
5 changes: 4 additions & 1 deletion config/reference_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type ReferenceConfig struct {
pxy *proxy.Proxy
id string
InterfaceName string `required:"true" yaml:"interface" json:"interface,omitempty" property:"interface"`
Check *bool `default:"true" yaml:"check" json:"check,omitempty" property:"check"`
Check *bool `yaml:"check" json:"check,omitempty" property:"check"`
Copy link
Contributor

Choose a reason for hiding this comment

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

为什么要删除default设置

Copy link
Member Author

Choose a reason for hiding this comment

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

为了让 Reference Config 的 check 延用 Consumer Config 的 check 配置,
如果 reference 的 check 有默认值,就没法判断是用户自己配置的还是默认的

URL string `yaml:"url" json:"url,omitempty" property:"url"`
Filter string `yaml:"filter" json:"filter,omitempty" property:"filter"`
Protocol string `default:"dubbo" yaml:"protocol" json:"protocol,omitempty" property:"protocol"`
Expand Down Expand Up @@ -97,6 +97,9 @@ func (rc *ReferenceConfig) Init(root *RootConfig) error {
if len(rc.RegistryIDs) <= 0 {
rc.RegistryIDs = root.Consumer.RegistryIDs
}
if rc.Check == nil {
rc.Check = &root.Consumer.Check
}
return verify(rc)
}

Expand Down