-
Notifications
You must be signed in to change notification settings - Fork 5.5k
api: deprecate hosts in Cluster. #9663
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
Changes from 3 commits
c6e4cc7
f349baa
e397703
22d5dfc
818522e
868253f
73c4d23
207a3f6
2266a4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,7 +116,7 @@ OriginalDstCluster::OriginalDstCluster( | |
| : false), | ||
| host_map_(std::make_shared<HostMap>()) { | ||
| // TODO(dio): Remove hosts check once the hosts field is removed. | ||
| if (config.has_load_assignment() || !config.hosts().empty()) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought that the point of doing conversion was to not have to deal with the old style things in Envoy
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, in this case, we don't do any conversion from hosts --> load assignment, since neither of these are used by original dst clusters. So, here we just check that both are not set. |
||
| if (config.has_load_assignment() || !config.hidden_envoy_deprecated_hosts().empty()) { | ||
| throw EnvoyException("ORIGINAL_DST clusters must have no load assignment or hosts configured"); | ||
| } | ||
| cleanup_timer_->enableTimer(cleanup_interval_ms_); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1566,7 +1566,7 @@ TEST_F(StaticClusterImplTest, UnsupportedLBType) { | |
| connect_timeout: 0.25s | ||
| type: static | ||
| lb_policy: fakelbtype | ||
| hosts: | ||
| hidden_envoy_deprecated_hosts: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we should be testing this field like this? Either convert or use the deprecated field with a deprecated field test? (We should make sure we still have tests that cover the conversion path)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fixed this one. There are actually a bunch of places where
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm confused, doesn't marking it deprecated cause the fail on warn tests to fail? Or is the issue that those tests don't run through the validation path? I would expect to see a DEPRECATED_FEATURE_TEST here unless the config is not going through the validation path?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would fail due to this, except it fails even earlier, because
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As a follow up shouldn't we fix all these tests even though they fail for some other reason? Mainly just for reduced confusion in the future?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we are talking past each other here, even without disable-by-default, we still have DEPRECATED_FEATURE_TEST and a compile time options build that fails on any use of a deprecated feature, whether disabled by default or not. My point is that I would expect any use of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, basically I think this config would be fatal anyway, but as Matt points out, we hit the fatal condition we care about first so it's not a problem as far as gunit is concerned. I think in general once v3 lands, we need to do a sweep for v2 config and stop using it apart from coverage checks. We have to do the clean up eventually and doing it sooner rather than later avoids hacks like this. I think that'd resolve this concern since hosts isn't in v3 at all. |
||
| - { socket_address: { address: 192.168.1.1, port_value: 22 }} | ||
| - { socket_address: { address: 192.168.1.2, port_value: 44 }} | ||
| )EOF"; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.