-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add ClusterInfo as a property in StreamInfo #10432
Conversation
Signed-off-by: gargnupur <gargnupur@google.com>
@@ -1927,6 +1927,23 @@ TEST_F(TcpProxyRoutingTest, DEPRECATED_FEATURE_TEST(ApplicationProtocols)) { | |||
filter_->onNewConnection(); | |||
} | |||
|
|||
TEST_F(TcpProxyRoutingTest, DEPRECATED_FEATURE_TEST(ClusterNameSet)) { |
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.
is this a deprecated feature test?
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.
Not sure why all other tests for TcpProxyRoutingTest are marked DEPRECATED_FEATURE_TEST, hence I marked my test as the same...
will remove it
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.
Removed
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.
This is needed, because TcpProxyRoutingTest is using deprecated_v1 config.
@mattklein123 : what's the plan for such classes? should we add new tests somewhere else?
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.
Other then that, PR is ready for your review.. PTAL
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.
Please make a new test to test this feature which doesn't use deprecated config, then you can remove the DEPRECATED_FEATURE_TEST
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.
Fixed.. PTAL
/** | ||
* @param Upstream connection's ClusterName. | ||
*/ | ||
virtual void setUpstreamClusterName(const absl::string_view upstream_cluster_name) PURE; |
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.
I think this would be a lot more useful if we snap the ClusterInfo shared_ptr. Is there any reason not to do that?
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.
Thanks changed to ClusterInfoConstSharedPtr...
Signed-off-by: gargnupur <gargnupur@google.com>
Signed-off-by: gargnupur <gargnupur@google.com>
Signed-off-by: gargnupur <gargnupur@google.com>
Signed-off-by: gargnupur <gargnupur@google.com>
Signed-off-by: gargnupur <gargnupur@google.com>
@mattklein123 , @kyessenov : all the tests are passing, can you please review it again? |
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.
LGTM modulo some small comments. Thank you!
/wait
@@ -1927,6 +1927,23 @@ TEST_F(TcpProxyRoutingTest, DEPRECATED_FEATURE_TEST(ApplicationProtocols)) { | |||
filter_->onNewConnection(); | |||
} | |||
|
|||
TEST_F(TcpProxyRoutingTest, DEPRECATED_FEATURE_TEST(ClusterNameSet)) { |
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.
Please make a new test to test this feature which doesn't use deprecated config, then you can remove the DEPRECATED_FEATURE_TEST
Signed-off-by: gargnupur <gargnupur@google.com>
Signed-off-by: gargnupur <gargnupur@google.com>
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.
Thanks! This is what I had in mind to generalize cluster name to a cluster info.
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.
Thanks LGTM modulo comment comment.
/wait
Co-Authored-By: Matt Klein <mattklein123@gmail.com> Signed-off-by: gargnupur <gargnupur@google.com>
6d85104
to
8ef276d
Compare
@gargnupur please never force push. It makes reviews much more difficult. Thank you! |
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.
Thanks!
@mattklein123 : Thanks for the feedback.. didn't know that. |
@mattklein123 , @lizan : Can you guys please help merge this? |
Thanks @mattklein123, @lizan and @kyessenov for the review and helping it merge it. |
Add ClusterName as a property in StreamInfo. This is because for TCP, there is no RouteEntry and thus we are not able to get clustername for TCP in scenarios where upstream cluster is not healthy Risk Level: Low Testing: Unit Tests Docs Changes: Release Notes: Signed-off-by: gargnupur <gargnupur@google.com> Co-authored-by: Matt Klein <mattklein123@gmail.com>
Add ClusterName as a property in StreamInfo. This is because for TCP, there is no RouteEntry and thus we are not able to get clustername for TCP in scenarios where upstream cluster is not healthy Risk Level: Low Testing: Unit Tests Docs Changes: Release Notes: Signed-off-by: gargnupur <gargnupur@google.com> Co-authored-by: Matt Klein <mattklein123@gmail.com> Co-authored-by: Matt Klein <mattklein123@gmail.com>
Signed-off-by: gargnupur gargnupur@google.com
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Description:Add ClusterName as a property in StreamInfo. This is because for TCP, there is no RouteEntry and thus we are not able to get clustername for TCP in scenarios where upstream cluster is not healthy
Risk Level: Low
Testing: Unit Tests
Docs Changes:
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]