Skip to content

Update data-plane-api (core and filter packages)#2495

Merged
htuch merged 17 commits intoenvoyproxy:masterfrom
kyessenov:control-plane
Feb 4, 2018
Merged

Update data-plane-api (core and filter packages)#2495
htuch merged 17 commits intoenvoyproxy:masterfrom
kyessenov:control-plane

Conversation

@kyessenov
Copy link
Copy Markdown
Contributor

title: update data-plane-api

Description:
Update to changes in data-plane-api

Risk Level: Low

Testing:
bazel test.

Docs Changes:
envoyproxy/data-plane-api#452

Release Notes:

Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov kyessenov changed the title Update data-plane-api Update data-plane-api (core and filter packages) Feb 2, 2018
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Comment thread source/common/config/grpc_mux_impl.cc Outdated
GrpcMuxImpl::~GrpcMuxImpl() {
// Hack to force linking of the service: https://github.com/google/protobuf/issues/4221
envoy::service::discovery::v2::AdsDummy dummy;
envoy::service::ratelimit::v2::RateLimitRequest rls_dummy;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We shouldn't need rls_dummy here, right? I don't think it makes sense to include rls.pb.h here. And how come this wasn't an issue previously in general?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've discovered this by running envoy-static with ADS. It is missing ADS descriptor without this change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK, can you remove rls_dummy from here and the rls.pb.h include? It should not be needed in this file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Copy Markdown
Contributor

@ramaraochavali ramaraochavali Feb 4, 2018

Choose a reason for hiding this comment

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

i am confused here. Why is AdsDummy needed here now? It was able to link properly earlier and why the new package need this? I ran in to the same issue with latest source, that it is not able to find the 'MethodDescriptor' for ADS and bazel clean seems to have resolved that. I may be wrong but Can you double check on this once please?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it links correctly but if you try to call ADS methods, the reflection lookup fails since proto descriptor is missing. there's another PR that does a similar fix, so it is happening consistently. adding a dummy forces linking the proto descriptor.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok.got it thanks.

// services as well as types that are referenced in Any messages. IF THIS TEST BREAKS YOU
// HAVE DONE SOMETHING BAD. Consult with the larger dev team on how to handle.
TEST(ProtoDescriptorTest, BackCompat) {
// Hack to force linking of the service: https://github.com/google/protobuf/issues/4221
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm confused. Without linking to grpc_mux stuff, how does this work now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You are right, I need it in two places :(

Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
mattklein123
mattklein123 previously approved these changes Feb 3, 2018
}

GrpcMuxImpl::~GrpcMuxImpl() {
// Hack to force linking of the service: https://github.com/google/protobuf/issues/4221
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, can you add a TODO here to fix this so we can search for it? Also please add a TODO to my new test which I didn't do. Otherwise LGTM.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added todo.

Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov
Copy link
Copy Markdown
Contributor Author

I'd like to re-run mac build (flaked out). Is there some button in circle to do that?

@mattklein123
Copy link
Copy Markdown
Member

@kyessenov I just kicked it, but typically we will marge without OSX passing if it looks like a flake.

mattklein123
mattklein123 previously approved these changes Feb 3, 2018
@mattklein123
Copy link
Copy Markdown
Member

@kyessenov sorry you lost the merge race. Can you merge master?

Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov
Copy link
Copy Markdown
Contributor Author

Merged and fixed.

GrpcMuxImpl::GrpcMuxImpl(const envoy::api::v2::core::Node& node, Grpc::AsyncClientPtr async_client,
Event::Dispatcher& dispatcher,
const Protobuf::MethodDescriptor& service_method)
: node_(node), async_client_(std::move(async_client)), service_method_(service_method) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we add some kind of an ASSERT here on service_method_? with out that if the MethodByName is not found in generic pool, it just segfaults.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Merged to keep things moving, tracking this concern at #2528.

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Agree with @ramaraochavali and @mattklein123 that we should make the proto descriptor dynamic lookups more bullet proof, let's merge this one to avoid further drift and we can iterate.

@htuch htuch merged commit c932e50 into envoyproxy:master Feb 4, 2018
Shikugawa pushed a commit to Shikugawa/envoy that referenced this pull request Mar 28, 2020
Signed-off-by: Kuat Yessenov <kuat@google.com>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Description: Update the documentation of `find_class` method as it seems to accept `/` and `.` and using `/` should be less confusing as this is what `env->findClass` expects.
Risk Level: None
Testing: Manual confirmed that the current implementing of tagging works and it does uses `/` as opposed to `.`.
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Rafał Augustyniak <Augustyniak@users.noreply.github.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Description: Update the documentation of `find_class` method as it seems to accept `/` and `.` and using `/` should be less confusing as this is what `env->findClass` expects.
Risk Level: None
Testing: Manual confirmed that the current implementing of tagging works and it does uses `/` as opposed to `.`.
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Rafał Augustyniak <Augustyniak@users.noreply.github.com>
Signed-off-by: JP Simard <jp@jpsim.com>
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.

4 participants