-
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
proto: moving a utility to the one call location #36990
base: main
Are you sure you want to change the base?
Conversation
/retest |
/coverage |
Coverage for this Pull Request will be rendered here: https://storage.googleapis.com/envoy-pr/36990/coverage/index.html The coverage results are (re-)rendered each time the CI |
cb12005
to
f9917ac
Compare
Signed-off-by: Alyssa Wilk <[email protected]>
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.
Primary change in the PR LGTM. Although I don't fully grok the benefit of moving this out of the protobuf utility, I don't see anything wrong with doing so.
@@ -16,14 +16,13 @@ ExtensionConfigBase::ExtensionConfigBase( | |||
: proto_config_(proto_config), config_factory_(std::move(config_factory)), tls_slot_(tls) { | |||
tls_slot_.set([](Event::Dispatcher&) { return std::make_shared<TlsFilterConfig>(); }); | |||
|
|||
switch (proto_config_.config_type_case()) { | |||
switch (proto_config_.config_type_case()) |
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.
Seems like a mistake (the opening brackets should be kept, and the closing one in line 26 should match the opening one in line 20)
} | ||
return (buffer_->size() == max_buf_size_); | ||
} | ||
bool full() const { return (buffer_ && buffer_->size() == max_buf_size_); } |
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.
bool full() const { return (buffer_ && buffer_->size() == max_buf_size_); } | |
bool full() const { return buffer_ && (buffer_->size() == max_buf_size_); } |
I may be wrong and this doesn't match the style-guide (a bit more readable IMHO).
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.
BTW: is this change related to the PR, or just a fly-by change?
if (!match.ParseFromString(proto_config.match_config().SerializeAsString())) { | ||
// This should should generally succeed, but if there are malformed UTF-8 strings in a | ||
// message, this can fail. | ||
throw EnvoyException("Unable to deserialize during wireCast()"); |
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.
Technically it is not wireCast()
anymore.
Risk Level: low
Testing: updated tests
Docs Changes: n/a
Release Notes: n/a
envoyproxy/envoy-mobile#176