-
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
api: remove hardcoded type urls part.1 #10479
Conversation
Signed-off-by: shikugawa <rei@tetrate.io>
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.
In general, I like this cleanup, but would like it split into two PRs. For next steps, I would recommend against trying to do too much in terms of magic in tests. It's fine to hardcode in tests, so any template complexity etc. needs to be warranted.
@@ -22,6 +22,8 @@ EdsClusterImpl::EdsClusterImpl( | |||
Stats::ScopePtr&& stats_scope, bool added_via_api) | |||
: BaseDynamicClusterImpl(cluster, runtime, factory_context, std::move(stats_scope), | |||
added_via_api), | |||
Envoy::Config::SubscriptionBase<envoy::config::endpoint::v3::ClusterLoadAssignment>( |
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.
FWIW, we're now slowly drifting into the space of true multiple inheritance, which is used somewhat sparingly in Envoy. Not sure if the horse has fully bolted here, @mattklein123?
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.
TBH I don't really have a strong opinion on this. I guess I'm of an opinion that our default should be no, but if there is a good case for it I don't see any major issue. cc @envoyproxy/maintainers
@htuch That is, We should divide this PR into two, shouldn't we? First, basic cleanup of |
@Shikugawa yep. |
Signed-off-by: shikugawa <rei@tetrate.io>
@htuch Destroy hardcoded type URLs on this PR. I will create Part.2 that includes hardcoded type URLs removal and some tests with v3 resource names. |
…ove_hardcoded_type_url Signed-off-by: shikugawa <rei@tetrate.io>
…ove_hardcoded_type_url Signed-off-by: shikugawa <rei@tetrate.io>
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, thanks. I'd ask that we don't do this for tests, as I think it will make them harder to write/understand/debug, conciseness is not necessarily a virtue in test code.
@lizan can you take a look at clang-tidy here? I think this PR should have the fix for the headers issue so I think there might be a different issue? /wait |
@mattklein123 @htuch LGTM? |
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, thanks!
@Shikugawa @htuch template <typename Current> struct SubscriptionBase Differ from the one in Both have the same namespace and looks like they do the same thing more or less?? |
@marcomagdy This PR removees |
Interestingly, my PR failed CI after I merged from master. |
To resolve envoyproxy#10209. This is the continuation of envoyproxy#10479. Remove all of hard-coded type URLs, and operate subscriptions that have the same resource name. Risk Level: Low Signed-off-by: shikugawa <rei@tetrate.io> Signed-off-by: pengg <pengg@google.com>
Signed-off-by: shikugawa rei@tetrate.io
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Description: #10209. There are hardcoded type URLs in resources.h. In this PR, I removed all of the dependencies of those. Now, codes that depend on that are only test code. In the future, I will remove that from test codes and completely destroy that.
Risk Level: Low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
[Optional Fixes #Issue]
[Optional Deprecated:]