Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alyssawilk
Copy link
Contributor

@alyssawilk alyssawilk commented Nov 5, 2024

Risk Level: low
Testing: updated tests
Docs Changes: n/a
Release Notes: n/a
envoyproxy/envoy-mobile#176

Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #36990 was opened by alyssawilk.

see: more, trace.

@alyssawilk
Copy link
Contributor Author

/retest

@alyssawilk
Copy link
Contributor Author

/coverage

Copy link

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 envoy-presubmit (check linux_x64 coverage) job completes.

🐱

Caused by: a #36990 (comment) was created by @alyssawilk.

see: more, trace.

@alyssawilk alyssawilk force-pushed the wireCast branch 2 times, most recently from cb12005 to f9917ac Compare November 13, 2024 17:11
Copy link
Contributor

@adisuissa adisuissa left a 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())
Copy link
Contributor

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_); }
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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).

Copy link
Contributor

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()");
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants