Add ClusterInfo as a property in StreamInfo#10432
Conversation
Signed-off-by: gargnupur <gargnupur@google.com>
| filter_->onNewConnection(); | ||
| } | ||
|
|
||
| TEST_F(TcpProxyRoutingTest, DEPRECATED_FEATURE_TEST(ClusterNameSet)) { |
There was a problem hiding this comment.
is this a deprecated feature test?
There was a problem hiding this comment.
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.
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.
Other then that, PR is ready for your review.. PTAL
There was a problem hiding this comment.
Please make a new test to test this feature which doesn't use deprecated config, then you can remove the DEPRECATED_FEATURE_TEST
| /** | ||
| * @param Upstream connection's ClusterName. | ||
| */ | ||
| virtual void setUpstreamClusterName(const absl::string_view upstream_cluster_name) PURE; |
There was a problem hiding this comment.
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.
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? |
mattklein123
left a comment
There was a problem hiding this comment.
LGTM modulo some small comments. Thank you!
/wait
| filter_->onNewConnection(); | ||
| } | ||
|
|
||
| TEST_F(TcpProxyRoutingTest, DEPRECATED_FEATURE_TEST(ClusterNameSet)) { |
There was a problem hiding this comment.
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>
kyessenov
left a comment
There was a problem hiding this comment.
Thanks! This is what I had in mind to generalize cluster name to a cluster info.
mattklein123
left a comment
There was a problem hiding this comment.
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! |
@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:]