Skip to content

upstream: remove cluster.hosts#6419

Closed
dio wants to merge 1 commit intoenvoyproxy:masterfrom
dio:remove-hosts-1
Closed

upstream: remove cluster.hosts#6419
dio wants to merge 1 commit intoenvoyproxy:masterfrom
dio:remove-hosts-1

Conversation

@dio
Copy link
Member

@dio dio commented Mar 28, 2019

Description:
Since Cluster's load_assignment field is implemented (#3864), remove Cluster's hosts.

Risk Level: Medium
Testing: Existing tests
Release Notes: removed cluster.hosts
Fixes #4618

Signed-off-by: Dhi Aurrahman dio@tetrate.io

Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
@dio dio changed the title upstream: remove cluster.host upstream: remove cluster.hosts Mar 28, 2019
@dio dio requested review from htuch and snowp March 28, 2019 21:54
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

TBH, this deprecation scares me, as I think this is very widely used. It would be ideal to turn this one down for sure though. @envoyproxy/maintainers do you have thoughts on whether we should do something special here in terms of community communication or an extended deprecation cycle?

@htuch htuch self-assigned this Mar 29, 2019
// .. attention::
// .. note::
//
// Setting this allows non-EDS cluster types to contain embedded EDS equivalent
Copy link
Contributor

Choose a reason for hiding this comment

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

With hosts being done this is the only way to specify hosts right? Maybe this should be reworded a bit to make it clearer that this is not the way of specifying hosts?

Copy link
Member Author

Choose a reason for hiding this comment

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

👍


const std::string string_type = json_cluster.getString("type");
auto set_dns_hosts = [&json_cluster, &cluster] {
auto set_dns_hosts = [&json_cluster, &cluster, name] {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not pass name by ref?

const std::vector<Json::ObjectSharedPtr>& json_cluster_hosts,
bool url, bool resolved,
envoy::api::v2::ClusterLoadAssignment& load_assignment) {
// TODO(dio): Early return when json_cluster_hosts is empty.
Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds like easy enough to do in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Gotcha!

@snowp
Copy link
Contributor

snowp commented Mar 29, 2019

@htuch Agree that this is a high risk deprecation. Maybe this would warrant an envoy-announce email?

@mattklein123
Copy link
Member

@htuch Agree that this is a high risk deprecation. Maybe this would warrant an envoy-announce email?

Maybe we should do a runtime deprecation here per @alyssawilk's new stuff? Maybe she can guide us on Monday?

@alyssawilk
Copy link
Contributor

This predates the new style deprecation but if we think it's high risk there's no harm in extending it. This is the sort of deprecation where I think our new fatal-by-default will really help make removals smoother.

That said I do expect a fair amount of issues when we do our first fatal-by-default flip late this week / early next week :-P

@htuch
Copy link
Member

htuch commented Apr 2, 2019

Yeah, I think running this through the new-style deprecation would make sense, +1.

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

I think if we go the runtime approach, we're going to need to still keep the old code paths. I really want to see this cleanup land, but I don't think we can do it without at least going two phase due to the high risk of breaking folks.

repeated core.Address hosts = 7 [deprecated = true];
reserved 7; // hosts is deprecated by :ref:`load_assignment
// <envoy_api_field_Cluster.load_assignment>`
reserved "hosts";
Copy link
Member

Choose a reason for hiding this comment

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

Is this the way to reserve field names to avoid future YAML/JSON clash? Should we update https://github.com/envoyproxy/envoy/blob/master/api/STYLE.md to enforce this?

routing to certain hosts only when there are insufficient healthy hosts available.
* upstream: add cluster factory to allow creating and registering :ref:`custom cluster type<arch_overview_service_discovery_types_custom>`.
* upstream: added a :ref:`circuit breaker <arch_overview_circuit_break_cluster_maximum_connection_pools>` to limit the number of concurrent connection pools in use.
* upstream: removed cluster.hosts.
Copy link
Member

Choose a reason for hiding this comment

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

removed deprecated clusters.hosts field in favor of :ref: link to the new field.

@HenryYYang
Copy link
Contributor

Sorry for not having a lot of context on this one. Since there's an existing translation from hosts to load_assignment, what's the advantage from the user's point of view in deprecating hosts field?

@stale
Copy link

stale bot commented Apr 9, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Apr 9, 2019
@stale
Copy link

stale bot commented Apr 17, 2019

This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot closed this Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale stalebot believes this issue/PR has not been touched recently waiting:any

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v1.8.0 (Oct 4, 2018) deprecation] Remove features marked deprecated in #3864

6 participants